manager: tree view & action set infos editor panel

This commit is contained in:
2025-06-29 14:19:58 +02:00
parent 87cb9b8b37
commit 6e8b4f0a9d
5 changed files with 240 additions and 400 deletions

View File

@@ -29,48 +29,54 @@ partial class MainForm
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
var tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition(); var tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition();
var resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); var resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
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();
radListControl_Updates = new Telerik.WinControls.UI.RadListControl(); radTreeView_Sets = new Telerik.WinControls.UI.RadTreeView();
splitPanel2 = new Telerik.WinControls.UI.SplitPanel(); splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
tableLayoutPanel1 = new TableLayoutPanel(); tableLayoutPanel_ActionSet = new TableLayoutPanel();
radGridView_Actions = new Telerik.WinControls.UI.RadGridView(); radGridView_Actions = new Telerik.WinControls.UI.RadGridView();
tableLayoutPanel_ActionSetInfo = new TableLayoutPanel();
radLabel1 = new Telerik.WinControls.UI.RadLabel();
radTextBoxControl_Version = new Telerik.WinControls.UI.RadTextBoxControl();
radCheckBox_IsPublic = new Telerik.WinControls.UI.RadCheckBox();
radMenuItem_Workspace = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_Workspace = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_WorkspacePreferences = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_WorkspacePreferences = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_SaveWorkspace = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_SaveWorkspace = new Telerik.WinControls.UI.RadMenuItem();
radMenuSeparatorItem1 = new Telerik.WinControls.UI.RadMenuSeparatorItem(); radMenuSeparatorItem1 = new Telerik.WinControls.UI.RadMenuSeparatorItem();
radMenuHeaderItem_NewWorkspace = new Telerik.WinControls.UI.RadMenuHeaderItem();
radMenuSeparatorItem3 = new Telerik.WinControls.UI.RadMenuSeparatorItem();
radMenuHeaderItem_RecentWorkspaces = new Telerik.WinControls.UI.RadMenuHeaderItem();
radMenuItem_Tools = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_Tools = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_Updates = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_Updates = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_EditUpdate = new Telerik.WinControls.UI.RadMenuItem();
radMenuSeparatorItem2 = new Telerik.WinControls.UI.RadMenuSeparatorItem();
radMenuItem_CreateUpdate = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_CreateUpdate = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_RemoveUpdate = new Telerik.WinControls.UI.RadMenuItem(); radMenuItem_RemoveUpdate = new Telerik.WinControls.UI.RadMenuItem();
radWaitingBar_Updates = new Telerik.WinControls.UI.RadWaitingBar(); radWaitingBar_Updates = new Telerik.WinControls.UI.RadWaitingBar();
dotsRingWaitingBarIndicatorElement1 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement(); dotsRingWaitingBarIndicatorElement1 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement();
radWaitingBar_Actions = new Telerik.WinControls.UI.RadWaitingBar(); radWaitingBar_Actions = new Telerik.WinControls.UI.RadWaitingBar();
dotsRingWaitingBarIndicatorElement2 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement(); dotsRingWaitingBarIndicatorElement2 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement();
radMenuHeaderItem_NewWorkspace = new Telerik.WinControls.UI.RadMenuHeaderItem();
radMenuHeaderItem_RecentWorkspaces = new Telerik.WinControls.UI.RadMenuHeaderItem();
radMenuSeparatorItem3 = new Telerik.WinControls.UI.RadMenuSeparatorItem();
radMenu1 = new Telerik.WinControls.UI.RadMenu(); radMenu1 = new Telerik.WinControls.UI.RadMenu();
((System.ComponentModel.ISupportInitialize)radSplitContainer1).BeginInit(); ((System.ComponentModel.ISupportInitialize)radSplitContainer1).BeginInit();
radSplitContainer1.SuspendLayout(); radSplitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit(); ((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
splitPanel1.SuspendLayout(); splitPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout(); tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radListControl_Updates).BeginInit(); ((System.ComponentModel.ISupportInitialize)radTreeView_Sets).BeginInit();
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit(); ((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
splitPanel2.SuspendLayout(); splitPanel2.SuspendLayout();
tableLayoutPanel1.SuspendLayout(); tableLayoutPanel_ActionSet.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radGridView_Actions).BeginInit(); ((System.ComponentModel.ISupportInitialize)radGridView_Actions).BeginInit();
((System.ComponentModel.ISupportInitialize)radGridView_Actions.MasterTemplate).BeginInit(); ((System.ComponentModel.ISupportInitialize)radGridView_Actions.MasterTemplate).BeginInit();
tableLayoutPanel_ActionSetInfo.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radLabel1).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBoxControl_Version).BeginInit();
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).BeginInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Updates).BeginInit(); ((System.ComponentModel.ISupportInitialize)radWaitingBar_Updates).BeginInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Actions).BeginInit(); ((System.ComponentModel.ISupportInitialize)radWaitingBar_Actions).BeginInit();
((System.ComponentModel.ISupportInitialize)this).BeginInit();
((System.ComponentModel.ISupportInitialize)radMenu1).BeginInit(); ((System.ComponentModel.ISupportInitialize)radMenu1).BeginInit();
((System.ComponentModel.ISupportInitialize)this).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// radSplitContainer1 // radSplitContainer1
@@ -89,10 +95,11 @@ partial class MainForm
splitPanel1.Controls.Add(tableLayoutPanel2); splitPanel1.Controls.Add(tableLayoutPanel2);
splitPanel1.Location = new Point(0, 0); splitPanel1.Location = new Point(0, 0);
splitPanel1.Name = "splitPanel1"; splitPanel1.Name = "splitPanel1";
splitPanel1.Size = new Size(200, 422); splitPanel1.Size = new Size(232, 422);
splitPanel1.SizeInfo.AbsoluteSize = new Size(232, 200);
splitPanel1.SizeInfo.AutoSizeScale = new SizeF(-0.190954775F, 0F); splitPanel1.SizeInfo.AutoSizeScale = new SizeF(-0.190954775F, 0F);
splitPanel1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute; splitPanel1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute;
splitPanel1.SizeInfo.SplitterCorrection = new Size(-152, 0); splitPanel1.SizeInfo.SplitterCorrection = new Size(-120, 0);
splitPanel1.TabIndex = 0; splitPanel1.TabIndex = 0;
splitPanel1.TabStop = false; splitPanel1.TabStop = false;
// //
@@ -100,53 +107,57 @@ partial class MainForm
// //
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(radListControl_Updates, 0, 0); tableLayoutPanel2.Controls.Add(radTreeView_Sets, 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";
tableLayoutPanel2.RowCount = 1; tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
tableLayoutPanel2.Size = new Size(200, 422); tableLayoutPanel2.Size = new Size(232, 422);
tableLayoutPanel2.TabIndex = 1; tableLayoutPanel2.TabIndex = 1;
// //
// radListControl_Updates // radTreeView_Sets
// //
radListControl_Updates.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; radTreeView_Sets.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
radListControl_Updates.ItemHeight = 24; radTreeView_Sets.ItemHeight = 24;
radListControl_Updates.Location = new Point(3, 3); radTreeView_Sets.LineColor = Color.FromArgb(152, 152, 152);
radListControl_Updates.Name = "radListControl_Updates"; radTreeView_Sets.LineStyle = Telerik.WinControls.UI.TreeLineStyle.Solid;
radListControl_Updates.Size = new Size(194, 416); radTreeView_Sets.Location = new Point(3, 3);
radListControl_Updates.TabIndex = 0; radTreeView_Sets.Name = "radTreeView_Sets";
radListControl_Updates.SelectedIndexChanged += RadListControl_Updates_SelectedIndexChanged; radTreeView_Sets.Size = new Size(226, 416);
radTreeView_Sets.TabIndex = 0;
radTreeView_Sets.SelectedNodeChanged += RadTreeView_Sets_SelectedNodeChanged;
// //
// splitPanel2 // splitPanel2
// //
splitPanel2.Controls.Add(tableLayoutPanel1); splitPanel2.Controls.Add(tableLayoutPanel_ActionSet);
splitPanel2.Location = new Point(204, 0); splitPanel2.Location = new Point(236, 0);
splitPanel2.Name = "splitPanel2"; splitPanel2.Name = "splitPanel2";
splitPanel2.Size = new Size(596, 422); splitPanel2.Size = new Size(564, 422);
splitPanel2.SizeInfo.AutoSizeScale = new SizeF(0.190954745F, 0F); splitPanel2.SizeInfo.AutoSizeScale = new SizeF(-0.0600000024F, 0F);
splitPanel2.SizeInfo.SplitterCorrection = new Size(152, 0); splitPanel2.SizeInfo.SplitterCorrection = new Size(120, 0);
splitPanel2.TabIndex = 1; splitPanel2.TabIndex = 1;
splitPanel2.TabStop = false; splitPanel2.TabStop = false;
// //
// tableLayoutPanel1 // tableLayoutPanel_ActionSet
// //
tableLayoutPanel1.ColumnCount = 1; tableLayoutPanel_ActionSet.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); tableLayoutPanel_ActionSet.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(radGridView_Actions, 0, 0); tableLayoutPanel_ActionSet.Controls.Add(radGridView_Actions, 0, 1);
tableLayoutPanel1.Dock = DockStyle.Fill; tableLayoutPanel_ActionSet.Controls.Add(tableLayoutPanel_ActionSetInfo, 0, 0);
tableLayoutPanel1.Location = new Point(0, 0); tableLayoutPanel_ActionSet.Dock = DockStyle.Fill;
tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel_ActionSet.Location = new Point(0, 0);
tableLayoutPanel1.RowCount = 1; tableLayoutPanel_ActionSet.Name = "tableLayoutPanel_ActionSet";
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutPanel_ActionSet.RowCount = 2;
tableLayoutPanel1.Size = new Size(596, 422); tableLayoutPanel_ActionSet.RowStyles.Add(new RowStyle());
tableLayoutPanel1.TabIndex = 0; tableLayoutPanel_ActionSet.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel_ActionSet.Size = new Size(564, 422);
tableLayoutPanel_ActionSet.TabIndex = 0;
// //
// radGridView_Actions // radGridView_Actions
// //
radGridView_Actions.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; radGridView_Actions.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
radGridView_Actions.Location = new Point(3, 3); radGridView_Actions.Location = new Point(3, 33);
// //
// //
// //
@@ -156,9 +167,9 @@ partial class MainForm
radGridView_Actions.MasterTemplate.AllowRowResize = false; radGridView_Actions.MasterTemplate.AllowRowResize = false;
radGridView_Actions.MasterTemplate.AllowSearchRow = true; radGridView_Actions.MasterTemplate.AllowSearchRow = true;
radGridView_Actions.MasterTemplate.EnableGrouping = false; radGridView_Actions.MasterTemplate.EnableGrouping = false;
radGridView_Actions.MasterTemplate.ViewDefinition = tableViewDefinition1; radGridView_Actions.MasterTemplate.ViewDefinition = tableViewDefinition2;
radGridView_Actions.Name = "radGridView_Actions"; radGridView_Actions.Name = "radGridView_Actions";
radGridView_Actions.Size = new Size(590, 416); radGridView_Actions.Size = new Size(558, 386);
radGridView_Actions.TabIndex = 0; radGridView_Actions.TabIndex = 0;
radGridView_Actions.CellFormatting += RadGridView_Actions_CellFormatting; radGridView_Actions.CellFormatting += RadGridView_Actions_CellFormatting;
radGridView_Actions.UserAddedRow += RadGridView_Actions_UserAddedRow; radGridView_Actions.UserAddedRow += RadGridView_Actions_UserAddedRow;
@@ -166,6 +177,55 @@ partial class MainForm
radGridView_Actions.CellValueChanged += RadGridView_Actions_CellValueChanged; radGridView_Actions.CellValueChanged += RadGridView_Actions_CellValueChanged;
radGridView_Actions.ContextMenuOpening += RadGridView_Actions_ContextMenuOpening; radGridView_Actions.ContextMenuOpening += RadGridView_Actions_ContextMenuOpening;
// //
// tableLayoutPanel_ActionSetInfo
//
tableLayoutPanel_ActionSetInfo.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel_ActionSetInfo.AutoSize = true;
tableLayoutPanel_ActionSetInfo.ColumnCount = 3;
tableLayoutPanel_ActionSetInfo.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel_ActionSetInfo.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel_ActionSetInfo.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel_ActionSetInfo.Controls.Add(radLabel1, 0, 0);
tableLayoutPanel_ActionSetInfo.Controls.Add(radTextBoxControl_Version, 1, 0);
tableLayoutPanel_ActionSetInfo.Controls.Add(radCheckBox_IsPublic, 2, 0);
tableLayoutPanel_ActionSetInfo.Location = new Point(0, 0);
tableLayoutPanel_ActionSetInfo.Margin = new Padding(0);
tableLayoutPanel_ActionSetInfo.Name = "tableLayoutPanel_ActionSetInfo";
tableLayoutPanel_ActionSetInfo.RowCount = 1;
tableLayoutPanel_ActionSetInfo.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel_ActionSetInfo.Size = new Size(564, 30);
tableLayoutPanel_ActionSetInfo.TabIndex = 1;
//
// radLabel1
//
radLabel1.Anchor = AnchorStyles.Left;
radLabel1.Location = new Point(3, 4);
radLabel1.Name = "radLabel1";
radLabel1.Size = new Size(58, 22);
radLabel1.TabIndex = 0;
radLabel1.Text = "Version:";
//
// radTextBoxControl_Version
//
radTextBoxControl_Version.Anchor = AnchorStyles.Left;
radTextBoxControl_Version.AutoSize = true;
radTextBoxControl_Version.Location = new Point(67, 3);
radTextBoxControl_Version.Name = "radTextBoxControl_Version";
radTextBoxControl_Version.NullText = "e.g. 1.2.5.0";
radTextBoxControl_Version.Size = new Size(150, 24);
radTextBoxControl_Version.TabIndex = 1;
radTextBoxControl_Version.TextChanged += RadTextBoxControl1_TextChanged;
//
// radCheckBox_IsPublic
//
radCheckBox_IsPublic.Anchor = AnchorStyles.Left;
radCheckBox_IsPublic.Location = new Point(223, 5);
radCheckBox_IsPublic.Name = "radCheckBox_IsPublic";
radCheckBox_IsPublic.Size = new Size(76, 20);
radCheckBox_IsPublic.TabIndex = 2;
radCheckBox_IsPublic.Text = "Is public";
radCheckBox_IsPublic.ToggleStateChanged += RadCheckBox1_ToggleStateChanged;
//
// radMenuItem_Workspace // radMenuItem_Workspace
// //
radMenuItem_Workspace.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_WorkspacePreferences, radMenuItem_SaveWorkspace, radMenuSeparatorItem1, radMenuHeaderItem_NewWorkspace, radMenuSeparatorItem3, radMenuHeaderItem_RecentWorkspaces }); radMenuItem_Workspace.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_WorkspacePreferences, radMenuItem_SaveWorkspace, radMenuSeparatorItem1, radMenuHeaderItem_NewWorkspace, radMenuSeparatorItem3, radMenuHeaderItem_RecentWorkspaces });
@@ -190,6 +250,22 @@ partial class MainForm
radMenuSeparatorItem1.Text = "radMenuSeparatorItem1"; radMenuSeparatorItem1.Text = "radMenuSeparatorItem1";
radMenuSeparatorItem1.TextAlignment = ContentAlignment.MiddleLeft; radMenuSeparatorItem1.TextAlignment = ContentAlignment.MiddleLeft;
// //
// radMenuHeaderItem_NewWorkspace
//
radMenuHeaderItem_NewWorkspace.Name = "radMenuHeaderItem_NewWorkspace";
radMenuHeaderItem_NewWorkspace.Text = "New workspace";
//
// radMenuSeparatorItem3
//
radMenuSeparatorItem3.Name = "radMenuSeparatorItem3";
radMenuSeparatorItem3.Text = "radMenuSeparatorItem3";
radMenuSeparatorItem3.TextAlignment = ContentAlignment.MiddleLeft;
//
// radMenuHeaderItem_RecentWorkspaces
//
radMenuHeaderItem_RecentWorkspaces.Name = "radMenuHeaderItem_RecentWorkspaces";
radMenuHeaderItem_RecentWorkspaces.Text = "Recent workspaces";
//
// radMenuItem_Tools // radMenuItem_Tools
// //
radMenuItem_Tools.Name = "radMenuItem_Tools"; radMenuItem_Tools.Name = "radMenuItem_Tools";
@@ -197,23 +273,11 @@ partial class MainForm
// //
// radMenuItem_Updates // radMenuItem_Updates
// //
radMenuItem_Updates.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_EditUpdate, radMenuSeparatorItem2, radMenuItem_CreateUpdate, radMenuItem_RemoveUpdate }); radMenuItem_Updates.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_CreateUpdate, radMenuItem_RemoveUpdate });
radMenuItem_Updates.Name = "radMenuItem_Updates"; radMenuItem_Updates.Name = "radMenuItem_Updates";
radMenuItem_Updates.Text = "Updates"; radMenuItem_Updates.Text = "Updates";
radMenuItem_Updates.DropDownOpening += RadMenuItem_Updates_DropDownOpening; radMenuItem_Updates.DropDownOpening += RadMenuItem_Updates_DropDownOpening;
// //
// radMenuItem_EditUpdate
//
radMenuItem_EditUpdate.Name = "radMenuItem_EditUpdate";
radMenuItem_EditUpdate.Text = "Edit";
radMenuItem_EditUpdate.Click += RadMenuItem_EditUpdate_Click;
//
// radMenuSeparatorItem2
//
radMenuSeparatorItem2.Name = "radMenuSeparatorItem2";
radMenuSeparatorItem2.Text = "radMenuSeparatorItem2";
radMenuSeparatorItem2.TextAlignment = ContentAlignment.MiddleLeft;
//
// radMenuItem_CreateUpdate // radMenuItem_CreateUpdate
// //
radMenuItem_CreateUpdate.Name = "radMenuItem_CreateUpdate"; radMenuItem_CreateUpdate.Name = "radMenuItem_CreateUpdate";
@@ -228,7 +292,7 @@ partial class MainForm
// //
// radWaitingBar_Updates // radWaitingBar_Updates
// //
radWaitingBar_Updates.AssociatedControl = radListControl_Updates; radWaitingBar_Updates.AssociatedControl = radTreeView_Sets;
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);
@@ -260,29 +324,6 @@ partial class MainForm
// //
dotsRingWaitingBarIndicatorElement2.Name = "dotsRingWaitingBarIndicatorElement2"; dotsRingWaitingBarIndicatorElement2.Name = "dotsRingWaitingBarIndicatorElement2";
// //
// radMenuHeaderItem_NewWorkspace
//
radMenuHeaderItem_NewWorkspace.Name = "radMenuHeaderItem_NewWorkspace";
radMenuHeaderItem_NewWorkspace.Text = "New workspace";
//
// radMenuHeaderItem_RecentWorkspaces
//
radMenuHeaderItem_RecentWorkspaces.Name = "radMenuHeaderItem_RecentWorkspaces";
radMenuHeaderItem_RecentWorkspaces.Text = "Recent workspaces";
//
// radMenuSeparatorItem3
//
radMenuSeparatorItem3.Name = "radMenuSeparatorItem3";
radMenuSeparatorItem3.Text = "radMenuSeparatorItem3";
radMenuSeparatorItem3.TextAlignment = ContentAlignment.MiddleLeft;
//
// MainForm
//
AutoScaleBaseSize = new Size(7, 15);
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
//
// radMenu1 // radMenu1
// //
radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_Workspace, radMenuItem_Updates, radMenuItem_Tools }); radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_Workspace, radMenuItem_Updates, radMenuItem_Tools });
@@ -290,6 +331,13 @@ partial class MainForm
radMenu1.Name = "radMenu1"; radMenu1.Name = "radMenu1";
radMenu1.Size = new Size(800, 28); radMenu1.Size = new Size(800, 28);
radMenu1.TabIndex = 1; radMenu1.TabIndex = 1;
//
// MainForm
//
AutoScaleBaseSize = new Size(7, 15);
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(radWaitingBar_Actions); Controls.Add(radWaitingBar_Actions);
Controls.Add(radWaitingBar_Updates); Controls.Add(radWaitingBar_Updates);
Controls.Add(radSplitContainer1); Controls.Add(radSplitContainer1);
@@ -305,12 +353,18 @@ partial class MainForm
((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)radListControl_Updates).EndInit(); ((System.ComponentModel.ISupportInitialize)radTreeView_Sets).EndInit();
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit(); ((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
splitPanel2.ResumeLayout(false); splitPanel2.ResumeLayout(false);
tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel_ActionSet.ResumeLayout(false);
tableLayoutPanel_ActionSet.PerformLayout();
((System.ComponentModel.ISupportInitialize)radGridView_Actions.MasterTemplate).EndInit(); ((System.ComponentModel.ISupportInitialize)radGridView_Actions.MasterTemplate).EndInit();
((System.ComponentModel.ISupportInitialize)radGridView_Actions).EndInit(); ((System.ComponentModel.ISupportInitialize)radGridView_Actions).EndInit();
tableLayoutPanel_ActionSetInfo.ResumeLayout(false);
tableLayoutPanel_ActionSetInfo.PerformLayout();
((System.ComponentModel.ISupportInitialize)radLabel1).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBoxControl_Version).EndInit();
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).EndInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Updates).EndInit(); ((System.ComponentModel.ISupportInitialize)radWaitingBar_Updates).EndInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Actions).EndInit(); ((System.ComponentModel.ISupportInitialize)radWaitingBar_Actions).EndInit();
((System.ComponentModel.ISupportInitialize)radMenu1).EndInit(); ((System.ComponentModel.ISupportInitialize)radMenu1).EndInit();
@@ -329,7 +383,7 @@ partial class MainForm
private Telerik.WinControls.UI.RadMenuItem radMenuItem_WorkspacePreferences; private Telerik.WinControls.UI.RadMenuItem radMenuItem_WorkspacePreferences;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Tools; private Telerik.WinControls.UI.RadMenuItem radMenuItem_Tools;
private TableLayoutPanel tableLayoutPanel2; private TableLayoutPanel tableLayoutPanel2;
private TableLayoutPanel tableLayoutPanel1; private TableLayoutPanel tableLayoutPanel_ActionSet;
private Telerik.WinControls.UI.RadGridView radGridView_Actions; private Telerik.WinControls.UI.RadGridView radGridView_Actions;
private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem1; private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem1;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_SaveWorkspace; private Telerik.WinControls.UI.RadMenuItem radMenuItem_SaveWorkspace;
@@ -337,13 +391,15 @@ partial class MainForm
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;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Updates; private Telerik.WinControls.UI.RadMenuItem radMenuItem_Updates;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_EditUpdate;
private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem2;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_CreateUpdate; private Telerik.WinControls.UI.RadMenuItem radMenuItem_CreateUpdate;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_RemoveUpdate; private Telerik.WinControls.UI.RadMenuItem radMenuItem_RemoveUpdate;
private Telerik.WinControls.UI.RadMenuHeaderItem radMenuHeaderItem_NewWorkspace; private Telerik.WinControls.UI.RadMenuHeaderItem radMenuHeaderItem_NewWorkspace;
private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem3; private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem3;
private Telerik.WinControls.UI.RadMenuHeaderItem radMenuHeaderItem_RecentWorkspaces; private Telerik.WinControls.UI.RadMenuHeaderItem radMenuHeaderItem_RecentWorkspaces;
private Telerik.WinControls.UI.RadTreeView radTreeView_Sets;
private TableLayoutPanel tableLayoutPanel_ActionSetInfo;
private Telerik.WinControls.UI.RadLabel radLabel1;
private Telerik.WinControls.UI.RadTextBoxControl radTextBoxControl_Version;
private Telerik.WinControls.UI.RadCheckBox radCheckBox_IsPublic;
} }

View File

@@ -7,8 +7,6 @@ using Pilz.Plugins.Advanced;
using Pilz.Plugins.Advanced.UI.WinForms.Telerik; using Pilz.Plugins.Advanced.UI.WinForms.Telerik;
using Pilz.UI.Symbols; using Pilz.UI.Symbols;
using Pilz.UI.WinForms.Extensions; using Pilz.UI.WinForms.Extensions;
using Pilz.UI.WinForms.Telerik.Dialogs;
using Pilz.UI.WinForms.Telerik.Extensions;
using Telerik.WinControls; using Telerik.WinControls;
using Telerik.WinControls.UI; using Telerik.WinControls.UI;
@@ -19,13 +17,14 @@ public partial class MainForm : RadForm, IMainApi
private record RecentFilesItemTag(WorkspaceConfig Config, WorkspaceFeature Feature); private record RecentFilesItemTag(WorkspaceConfig Config, WorkspaceFeature Feature);
private record WorkspaceTag(IWorkspace Workspace, WorkspaceFeature Feature); private record WorkspaceTag(IWorkspace Workspace, WorkspaceFeature Feature);
private bool loadingMainView;
private WorkspaceTag? wsInfo; private WorkspaceTag? wsInfo;
private InstallAction? tempAction; private InstallAction? tempAction;
Form IMainApi.MainWindow => this; Form IMainApi.MainWindow => this;
IWorkspace? IMainApi.CurWorkspace => wsInfo?.Workspace; IWorkspace? IMainApi.CurWorkspace => wsInfo?.Workspace;
public IActionSetInfos? CurActionSet => radListControl_Updates.SelectedValue as IActionSetInfos; public IActionSetInfos? CurActionSet => radTreeView_Sets.SelectedNode?.Tag as IActionSetInfos;
public MainForm() public MainForm()
{ {
@@ -37,7 +36,6 @@ public partial class MainForm : RadForm, IMainApi
//radMenuItem_OpenNewWorkspace.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.new_window, SymbolSize.Small); //radMenuItem_OpenNewWorkspace.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.new_window, SymbolSize.Small);
//radMenuItem_RecentWorkspaces.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.time_machine, SymbolSize.Small); //radMenuItem_RecentWorkspaces.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.time_machine, SymbolSize.Small);
radMenuItem_Updates.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small); radMenuItem_Updates.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small);
radMenuItem_EditUpdate.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small);
radMenuItem_CreateUpdate.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.add, SymbolSize.Small); radMenuItem_CreateUpdate.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.add, SymbolSize.Small);
radMenuItem_RemoveUpdate.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.remove, SymbolSize.Small); radMenuItem_RemoveUpdate.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.remove, SymbolSize.Small);
radMenuItem_Tools.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.tools, SymbolSize.Small); radMenuItem_Tools.SvgImage = Program.Symbols.GetSvgImage(AppSymbols.tools, SymbolSize.Small);
@@ -119,47 +117,74 @@ public partial class MainForm : RadForm, IMainApi
radWaitingBar_Updates.StartWaiting(); radWaitingBar_Updates.StartWaiting();
Text = wsInfo.Workspace.Config.DisplayText; Text = wsInfo.Workspace.Config.DisplayText;
radListControl_Updates.BeginUpdate(); radTreeView_Sets.BeginUpdate();
radListControl_Updates.Items.Clear(); radTreeView_Sets.Nodes.Clear();
AddUpdateItem(wsInfo.Workspace.InstallInfos); AddUpdateItem(wsInfo.Workspace.InstallInfos);
wsInfo.Workspace.UpdateInfos.Updates.ForEach(n => AddUpdateItem(n)); var nodeUpdates = new RadTreeNode
{
Text = "Updates",
Name = "updates",
SvgImage = Program.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small),
};
wsInfo.Workspace.UpdateInfos.Updates.ForEach(n => AddUpdateItem(n, nodeUpdates.Nodes));
radTreeView_Sets.Nodes.Add(nodeUpdates);
radListControl_Updates.EndUpdate(); radTreeView_Sets.EndUpdate();
radWaitingBar_Updates.StopWaiting(); radWaitingBar_Updates.StopWaiting();
} }
private RadListDataItem AddUpdateItem(IActionSetInfos infos) private RadTreeNode AddUpdateItem(IActionSetInfos infos)
{
return AddUpdateItem(infos, radTreeView_Sets.Nodes);
}
private RadTreeNode AddUpdateItem(IActionSetInfos infos, RadTreeNodeCollection parent)
{ {
var item = CreateUpdateItem(infos); var item = CreateUpdateItem(infos);
radListControl_Updates.Items.Add(item); parent.Add(item);
return item; return item;
} }
private RadListDataItem InsertUpdateItem(IActionSetInfos infos) private RadTreeNode InsertUpdateItem(IActionSetInfos infos)
{ {
var item = CreateUpdateItem(infos); var item = CreateUpdateItem(infos);
radListControl_Updates.Items.Insert(Math.Min(1, radListControl_Updates.Items.Count), item); var nodeUpdates = radTreeView_Sets.Nodes["updates"];
nodeUpdates.Nodes.Insert(Math.Min(1, nodeUpdates.Nodes.Count), item);
return item; return item;
} }
private RadListDataItem CreateUpdateItem(IActionSetInfos infos) private RadTreeNode CreateUpdateItem(IActionSetInfos infos)
{ {
var item = new RadListDataItem(); var item = new RadTreeNode();
UpdateUpdateItem(item, infos); UpdateUpdateItem(item, infos);
return item; return item;
} }
private void UpdateUpdateItem(RadListDataItem item) private void UpdateUpdateItem(RadTreeNode item)
{ {
if (item.Value is IActionSetInfos infos) if (item.Tag is IActionSetInfos infos)
UpdateUpdateItem(item, infos); UpdateUpdateItem(item, infos);
} }
private void UpdateUpdateItem(RadListDataItem item, IActionSetInfos infos) private void SaveActionsSet()
{ {
if (item.Value != infos) if (loadingMainView || CurActionSet is not IActionSetInfos infos)
item.Value = infos; return;
if (!Version.TryParse(radTextBoxControl_Version.Text.Trim(), out Version? version))
version = new Version("1.0.0.0");
infos.Version = version;
infos.IsPublic = radCheckBox_IsPublic.Checked;
UpdateUpdateItem(radTreeView_Sets.SelectedNode);
}
private void UpdateUpdateItem(RadTreeNode item, IActionSetInfos infos)
{
if (item.Tag != infos)
item.Tag = infos;
if (infos is UpdateInfo) if (infos is UpdateInfo)
item.Text = string.Format(GeneralLangRes.Node_Update, infos.Version?.ToString() ?? "?"); item.Text = string.Format(GeneralLangRes.Node_Update, infos.Version?.ToString() ?? "?");
@@ -173,9 +198,10 @@ public partial class MainForm : RadForm, IMainApi
public void UpdateItem(IActionSetInfos actionSetInfos) public void UpdateItem(IActionSetInfos actionSetInfos)
{ {
RadListDataItem? item = null; RadTreeNode? item = null;
var nodeUpdates = radTreeView_Sets.Nodes["updates"];
foreach (var iitem in radListControl_Updates.Items) foreach (var iitem in nodeUpdates.Nodes)
{ {
if (item == null && iitem.Value == actionSetInfos) if (item == null && iitem.Value == actionSetInfos)
item = iitem; item = iitem;
@@ -184,7 +210,7 @@ public partial class MainForm : RadForm, IMainApi
if (item == null) if (item == null)
InsertUpdateItem(actionSetInfos); InsertUpdateItem(actionSetInfos);
else if (wsInfo?.Workspace.UpdateInfos != null && !wsInfo.Workspace.UpdateInfos.Updates.Contains(actionSetInfos)) else if (wsInfo?.Workspace.UpdateInfos != null && !wsInfo.Workspace.UpdateInfos.Updates.Contains(actionSetInfos))
radListControl_Updates.Items.Remove(item); item.Remove();
else else
UpdateUpdateItem(item); UpdateUpdateItem(item);
} }
@@ -198,7 +224,29 @@ public partial class MainForm : RadForm, IMainApi
} }
} }
private void LoadActionSet(IActionSetInfos infos) private void LoadMainView()
{
loadingMainView = true;
tableLayoutPanel_ActionSet.Visible = false;
tableLayoutPanel_ActionSetInfo.Visible = false;
if (CurActionSet is IActionSet set)
{
if (set is IActionSetInfos infos)
{
radTextBoxControl_Version.Text = infos.Version?.ToString();
radCheckBox_IsPublic.Checked = infos.IsPublic;
tableLayoutPanel_ActionSetInfo.Visible = true;
}
tableLayoutPanel_ActionSet.Visible = true;
LoadActionSet(set);
}
loadingMainView = false;
}
private void LoadActionSet(IActionSet infos)
{ {
radGridView_Actions.BeginUpdate(); radGridView_Actions.BeginUpdate();
radGridView_Actions.Rows.Clear(); radGridView_Actions.Rows.Clear();
@@ -263,6 +311,12 @@ public partial class MainForm : RadForm, IMainApi
Width = 50, Width = 50,
IsVisible = infos is UpdateInfo, IsVisible = infos is UpdateInfo,
}, },
new GridViewTextBoxColumn
{
Name = "destpath",
HeaderText = ActionsListLangRes.Col_DestPath,
Width = 250,
},
new GridViewComboBoxColumn new GridViewComboBoxColumn
{ {
Name = "srctype", Name = "srctype",
@@ -314,12 +368,6 @@ public partial class MainForm : RadForm, IMainApi
IsVisible = infos is UpdateInfo, IsVisible = infos is UpdateInfo,
}, },
new GridViewTextBoxColumn new GridViewTextBoxColumn
{
Name = "destpath",
HeaderText = ActionsListLangRes.Col_DestPath,
Width = 250,
},
new GridViewTextBoxColumn
{ {
Name = "website", Name = "website",
HeaderText = ActionsListLangRes.Col_Website, HeaderText = ActionsListLangRes.Col_Website,
@@ -409,10 +457,9 @@ public partial class MainForm : RadForm, IMainApi
func.Execute(new MainApiParameters(this)); func.Execute(new MainApiParameters(this));
} }
private void RadListControl_Updates_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) private void RadTreeView_Sets_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
{ {
if (radListControl_Updates.Items.ElementAtOrDefault(e.Position)?.Value is IActionSetInfos infos) LoadMainView();
LoadActionSet(infos);
} }
private void RadGridView_Actions_CellFormatting(object sender, CellFormattingEventArgs e) private void RadGridView_Actions_CellFormatting(object sender, CellFormattingEventArgs e)
@@ -537,36 +584,29 @@ public partial class MainForm : RadForm, IMainApi
private void RadMenuItem_Updates_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e) private void RadMenuItem_Updates_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e)
{ {
radMenuItem_EditUpdate.Enabled = radListControl_Updates.SelectedItem?.Value is IActionSetInfos; radMenuItem_RemoveUpdate.Enabled = radTreeView_Sets.SelectedNode?.Tag is UpdateInfo;
radMenuItem_RemoveUpdate.Enabled = radListControl_Updates.SelectedItem?.Value is UpdateInfo;
}
private void RadMenuItem_EditUpdate_Click(object sender, EventArgs e)
{
if (radListControl_Updates.SelectedItem?.Value is IActionSetInfos infos
&& RadDialogBase.ShowDialog(new UpdatePropertiesEditorFlyout(infos), TitlesLangRes.EditUpdate, Program.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small)).IsValid())
UpdateUpdateItem(radListControl_Updates.SelectedItem);
} }
private void RadMenuItem_CreateUpdate_Click(object sender, EventArgs e) private void RadMenuItem_CreateUpdate_Click(object sender, EventArgs e)
{ {
var infos = new UpdateInfo(); if (wsInfo?.Workspace.UpdateInfos is null)
return;
if (wsInfo?.Workspace.UpdateInfos is not null var infos = new UpdateInfo
&& RadDialogBase.ShowDialog(new UpdatePropertiesEditorFlyout(infos), TitlesLangRes.EditUpdate, Program.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small)).IsValid())
{ {
wsInfo.Workspace.UpdateInfos.Updates.Insert(0, infos); Version = wsInfo.Workspace.InstallInfos?.Version,
InsertUpdateItem(infos); };
} wsInfo.Workspace.UpdateInfos.Updates.Insert(0, infos);
InsertUpdateItem(infos);
} }
private void RadMenuItem_RemoveUpdate_Click(object sender, EventArgs e) private void RadMenuItem_RemoveUpdate_Click(object sender, EventArgs e)
{ {
if (radListControl_Updates.SelectedItem?.Value is UpdateInfo infos && wsInfo?.Workspace.UpdateInfos is not null if (radTreeView_Sets.SelectedNode?.Tag is UpdateInfo infos && wsInfo?.Workspace.UpdateInfos is not null
&& RadMessageBox.Show(MsgBoxLangRes.RemoveUpdate, MsgBoxLangRes.RemoveUpdate_Title, MessageBoxButtons.YesNo, RadMessageIcon.Exclamation).IsYes()) && RadMessageBox.Show(MsgBoxLangRes.RemoveUpdate, MsgBoxLangRes.RemoveUpdate_Title, MessageBoxButtons.YesNo, RadMessageIcon.Exclamation).IsYes())
{ {
wsInfo.Workspace.UpdateInfos.Updates.Remove(infos); wsInfo.Workspace.UpdateInfos.Updates.Remove(infos);
radListControl_Updates.Items.Remove(radListControl_Updates.SelectedItem); radTreeView_Sets.SelectedNode.Remove();
} }
} }
@@ -598,4 +638,14 @@ public partial class MainForm : RadForm, IMainApi
PluginFeatureController.Instance.Functions.Get(FeatureTypes.ActionsContextMenu).InsertItemsTo(e.ContextMenu.Items, customClickHandler: RadMenuItem_ToolsItem_Click, insertPrioSplitters: true); PluginFeatureController.Instance.Functions.Get(FeatureTypes.ActionsContextMenu).InsertItemsTo(e.ContextMenu.Items, customClickHandler: RadMenuItem_ToolsItem_Click, insertPrioSplitters: true);
} }
} }
private void RadTextBoxControl1_TextChanged(object sender, EventArgs e)
{
SaveActionsSet();
}
private void RadCheckBox1_ToggleStateChanged(object sender, StateChangedEventArgs args)
{
SaveActionsSet();
}
} }

View File

@@ -1,114 +0,0 @@
namespace ModpackUpdater.Apps.Manager.Ui;
partial class UpdatePropertiesEditorFlyout
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
tableLayoutPanel1 = new TableLayoutPanel();
radLabel1 = new Telerik.WinControls.UI.RadLabel();
radTextBox_Version = new Telerik.WinControls.UI.RadTextBox();
radCheckBox_IsPublic = new Telerik.WinControls.UI.RadCheckBox();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radLabel1).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_Version).BeginInit();
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).BeginInit();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.AutoSize = true;
tableLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(radLabel1, 0, 0);
tableLayoutPanel1.Controls.Add(radTextBox_Version, 0, 1);
tableLayoutPanel1.Controls.Add(radCheckBox_IsPublic, 0, 3);
tableLayoutPanel1.Dock = DockStyle.Fill;
tableLayoutPanel1.Location = new Point(0, 30);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 4;
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
tableLayoutPanel1.Size = new Size(300, 84);
tableLayoutPanel1.TabIndex = 4;
//
// radLabel1
//
radLabel1.Location = new Point(3, 3);
radLabel1.Name = "radLabel1";
radLabel1.Size = new Size(55, 22);
radLabel1.TabIndex = 0;
radLabel1.Text = "Version";
//
// radTextBox_Version
//
radTextBox_Version.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_Version.Location = new Point(3, 31);
radTextBox_Version.Name = "radTextBox_Version";
radTextBox_Version.NullText = "1.5.37.0";
radTextBox_Version.Size = new Size(294, 24);
radTextBox_Version.TabIndex = 1;
//
// radCheckBox_IsPublic
//
radCheckBox_IsPublic.Location = new Point(3, 61);
radCheckBox_IsPublic.Name = "radCheckBox_IsPublic";
radCheckBox_IsPublic.Size = new Size(76, 20);
radCheckBox_IsPublic.TabIndex = 3;
radCheckBox_IsPublic.Text = "Is public";
//
// UpdatePropertiesEditorFlyout
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
BackColor = Color.Transparent;
Controls.Add(tableLayoutPanel1);
MinimumSize = new Size(300, 0);
Name = "UpdatePropertiesEditorFlyout";
Size = new Size(300, 144);
Controls.SetChildIndex(tableLayoutPanel1, 0);
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)radLabel1).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_Version).EndInit();
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private TableLayoutPanel tableLayoutPanel1;
private Telerik.WinControls.UI.RadLabel radLabel1;
private Telerik.WinControls.UI.RadTextBox radTextBox_Version;
private Telerik.WinControls.UI.RadCheckBox radCheckBox_IsPublic;
}

View File

@@ -1,32 +0,0 @@
using Pilz.UI;
using Pilz.UI.WinForms.Telerik.Dialogs;
namespace ModpackUpdater.Apps.Manager.Ui;
public partial class UpdatePropertiesEditorFlyout : RadFlyoutBase, ILoadContent
{
private readonly IActionSetInfos infos;
public UpdatePropertiesEditorFlyout(IActionSetInfos infos)
{
this.infos = infos;
InitializeComponent();
}
public void LoadContent()
{
radTextBox_Version.Text = infos.Version?.ToString();
radCheckBox_IsPublic.Checked = infos.IsPublic;
}
protected override bool ValidateOK()
{
if (!Version.TryParse(radTextBox_Version.Text.Trim(), out Version? version))
return false;
infos.Version = version;
infos.IsPublic = radCheckBox_IsPublic.Checked;
return base.ValidateOK();
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>