change treeview to listcontrol
This commit is contained in:
30
ModpackUpdater.Apps.Manager/Form1.Designer.cs
generated
30
ModpackUpdater.Apps.Manager/Form1.Designer.cs
generated
@@ -33,7 +33,7 @@ partial class Form1
|
|||||||
radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
|
radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
|
||||||
splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
|
splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
|
||||||
tableLayoutPanel2 = new TableLayoutPanel();
|
tableLayoutPanel2 = new TableLayoutPanel();
|
||||||
radTreeView_Updates = new Telerik.WinControls.UI.RadTreeView();
|
radListControl_Updates = new Telerik.WinControls.UI.RadListControl();
|
||||||
splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
|
splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
|
||||||
tableLayoutPanel1 = new TableLayoutPanel();
|
tableLayoutPanel1 = new TableLayoutPanel();
|
||||||
radGridView_Actions = new Telerik.WinControls.UI.RadGridView();
|
radGridView_Actions = new Telerik.WinControls.UI.RadGridView();
|
||||||
@@ -54,7 +54,7 @@ partial class Form1
|
|||||||
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
|
||||||
splitPanel1.SuspendLayout();
|
splitPanel1.SuspendLayout();
|
||||||
tableLayoutPanel2.SuspendLayout();
|
tableLayoutPanel2.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)radTreeView_Updates).BeginInit();
|
((System.ComponentModel.ISupportInitialize)radListControl_Updates).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
|
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
|
||||||
splitPanel2.SuspendLayout();
|
splitPanel2.SuspendLayout();
|
||||||
tableLayoutPanel1.SuspendLayout();
|
tableLayoutPanel1.SuspendLayout();
|
||||||
@@ -101,7 +101,7 @@ partial class Form1
|
|||||||
//
|
//
|
||||||
tableLayoutPanel2.ColumnCount = 1;
|
tableLayoutPanel2.ColumnCount = 1;
|
||||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||||
tableLayoutPanel2.Controls.Add(radTreeView_Updates, 0, 0);
|
tableLayoutPanel2.Controls.Add(radListControl_Updates, 0, 0);
|
||||||
tableLayoutPanel2.Dock = DockStyle.Fill;
|
tableLayoutPanel2.Dock = DockStyle.Fill;
|
||||||
tableLayoutPanel2.Location = new Point(0, 0);
|
tableLayoutPanel2.Location = new Point(0, 0);
|
||||||
tableLayoutPanel2.Name = "tableLayoutPanel2";
|
tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||||
@@ -110,17 +110,15 @@ partial class Form1
|
|||||||
tableLayoutPanel2.Size = new Size(200, 422);
|
tableLayoutPanel2.Size = new Size(200, 422);
|
||||||
tableLayoutPanel2.TabIndex = 1;
|
tableLayoutPanel2.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// radTreeView_Updates
|
// radListControl_Updates
|
||||||
//
|
//
|
||||||
radTreeView_Updates.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
radListControl_Updates.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
radTreeView_Updates.ItemHeight = 24;
|
radListControl_Updates.ItemHeight = 24;
|
||||||
radTreeView_Updates.LineColor = Color.FromArgb(152, 152, 152);
|
radListControl_Updates.Location = new Point(3, 3);
|
||||||
radTreeView_Updates.LineStyle = Telerik.WinControls.UI.TreeLineStyle.Solid;
|
radListControl_Updates.Name = "radListControl_Updates";
|
||||||
radTreeView_Updates.Location = new Point(3, 3);
|
radListControl_Updates.Size = new Size(194, 416);
|
||||||
radTreeView_Updates.Name = "radTreeView_Updates";
|
radListControl_Updates.TabIndex = 0;
|
||||||
radTreeView_Updates.Size = new Size(194, 416);
|
radListControl_Updates.SelectedIndexChanged += RadListControl_Updates_SelectedIndexChanged;
|
||||||
radTreeView_Updates.TabIndex = 0;
|
|
||||||
radTreeView_Updates.SelectedNodeChanged += RadTreeView_Updates_SelectedNodeChanged;
|
|
||||||
//
|
//
|
||||||
// splitPanel2
|
// splitPanel2
|
||||||
//
|
//
|
||||||
@@ -218,7 +216,7 @@ partial class Form1
|
|||||||
//
|
//
|
||||||
// radWaitingBar_Updates
|
// radWaitingBar_Updates
|
||||||
//
|
//
|
||||||
radWaitingBar_Updates.AssociatedControl = radTreeView_Updates;
|
radWaitingBar_Updates.AssociatedControl = radListControl_Updates;
|
||||||
radWaitingBar_Updates.Location = new Point(0, 78);
|
radWaitingBar_Updates.Location = new Point(0, 78);
|
||||||
radWaitingBar_Updates.Name = "radWaitingBar_Updates";
|
radWaitingBar_Updates.Name = "radWaitingBar_Updates";
|
||||||
radWaitingBar_Updates.Size = new Size(70, 70);
|
radWaitingBar_Updates.Size = new Size(70, 70);
|
||||||
@@ -271,7 +269,7 @@ partial class Form1
|
|||||||
((System.ComponentModel.ISupportInitialize)splitPanel1).EndInit();
|
((System.ComponentModel.ISupportInitialize)splitPanel1).EndInit();
|
||||||
splitPanel1.ResumeLayout(false);
|
splitPanel1.ResumeLayout(false);
|
||||||
tableLayoutPanel2.ResumeLayout(false);
|
tableLayoutPanel2.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)radTreeView_Updates).EndInit();
|
((System.ComponentModel.ISupportInitialize)radListControl_Updates).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
|
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
|
||||||
splitPanel2.ResumeLayout(false);
|
splitPanel2.ResumeLayout(false);
|
||||||
tableLayoutPanel1.ResumeLayout(false);
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
@@ -290,7 +288,6 @@ partial class Form1
|
|||||||
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1;
|
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1;
|
||||||
private Telerik.WinControls.UI.SplitPanel splitPanel1;
|
private Telerik.WinControls.UI.SplitPanel splitPanel1;
|
||||||
private Telerik.WinControls.UI.SplitPanel splitPanel2;
|
private Telerik.WinControls.UI.SplitPanel splitPanel2;
|
||||||
private Telerik.WinControls.UI.RadTreeView radTreeView_Updates;
|
|
||||||
private Telerik.WinControls.UI.RadMenu radMenu1;
|
private Telerik.WinControls.UI.RadMenu radMenu1;
|
||||||
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Workspace;
|
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Workspace;
|
||||||
private Telerik.WinControls.UI.RadMenuItem radMenuItem_WorkspacePreferences;
|
private Telerik.WinControls.UI.RadMenuItem radMenuItem_WorkspacePreferences;
|
||||||
@@ -306,4 +303,5 @@ partial class Form1
|
|||||||
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement1;
|
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement1;
|
||||||
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar_Actions;
|
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar_Actions;
|
||||||
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement2;
|
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement2;
|
||||||
|
private Telerik.WinControls.UI.RadListControl radListControl_Updates;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,10 +108,10 @@ public partial class Form1 : RadForm, IMainApi
|
|||||||
|
|
||||||
radWaitingBar_Updates.StartWaiting();
|
radWaitingBar_Updates.StartWaiting();
|
||||||
Text = workspace.Config.DisplayText;
|
Text = workspace.Config.DisplayText;
|
||||||
radTreeView_Updates.BeginUpdate();
|
radListControl_Updates.BeginUpdate();
|
||||||
radTreeView_Updates.Nodes.Clear();
|
radListControl_Updates.Items.Clear();
|
||||||
|
|
||||||
radTreeView_Updates.Nodes.Add(new RadTreeNode
|
radListControl_Updates.Items.Add(new RadListDataItem
|
||||||
{
|
{
|
||||||
Text = string.Format(GeneralLangRes.Node_Install, workspace.InstallInfos.Version.ToString()),
|
Text = string.Format(GeneralLangRes.Node_Install, workspace.InstallInfos.Version.ToString()),
|
||||||
Tag = workspace.InstallInfos,
|
Tag = workspace.InstallInfos,
|
||||||
@@ -119,14 +119,14 @@ public partial class Form1 : RadForm, IMainApi
|
|||||||
|
|
||||||
foreach (var update in workspace.UpdateInfos.Updates)
|
foreach (var update in workspace.UpdateInfos.Updates)
|
||||||
{
|
{
|
||||||
radTreeView_Updates.Nodes.Add(new RadTreeNode
|
radListControl_Updates.Items.Add(new RadListDataItem
|
||||||
{
|
{
|
||||||
Text = string.Format(GeneralLangRes.Node_Update, update.Version.ToString()),
|
Text = string.Format(GeneralLangRes.Node_Update, update.Version.ToString()),
|
||||||
Tag = update,
|
Tag = update,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
radTreeView_Updates.EndUpdate();
|
radListControl_Updates.EndUpdate();
|
||||||
radWaitingBar_Updates.StopWaiting();
|
radWaitingBar_Updates.StopWaiting();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,9 +313,9 @@ public partial class Form1 : RadForm, IMainApi
|
|||||||
func.Execute(new MainApiParameters(this));
|
func.Execute(new MainApiParameters(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RadTreeView_Updates_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
|
private void RadListControl_Updates_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Node?.Tag is IActionSetInfos infos)
|
if (radListControl_Updates.Items.ElementAtOrDefault(e.Position)?.Tag is IActionSetInfos infos)
|
||||||
LoadActionSet(infos);
|
LoadActionSet(infos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user