some more work

This commit is contained in:
2024-09-25 12:08:38 +02:00
parent bc6c483ba6
commit 2f9d60f1a8
26 changed files with 2434 additions and 60 deletions

View File

@@ -18,6 +18,8 @@ public partial class MainForm : RadForm, IMainApi
{
private WorkspaceTag? wsInfo;
Form IMainApi.MainWindow => this;
IWorkspace? IMainApi.CurWorkspace => wsInfo?.Workspace;
public IActionSetInfos? CurActionSet => radListControl_Updates.SelectedValue as IActionSetInfos;
@@ -152,7 +154,7 @@ public partial class MainForm : RadForm, IMainApi
private void UpdateUpdateItem(RadListDataItem item)
{
if (item.Tag is IActionSetInfos infos)
if (item.Value is IActionSetInfos infos)
UpdateUpdateItem(item, infos);
}
@@ -167,6 +169,8 @@ public partial class MainForm : RadForm, IMainApi
item.Text = string.Format(GeneralLangRes.Node_Install, infos.Version.ToString());
else
item.Text = infos.Version.ToString();
item.SvgImage = AppGlobals.Symbols.GetSvgImage(infos.IsPublic ? AppSymbols.eye : AppSymbols.invisible, SymbolSize.Small);
}
private void LoadActionSet(IActionSetInfos infos)
@@ -487,7 +491,7 @@ public partial class MainForm : RadForm, IMainApi
private void RadMenuItem_EditUpdate_Click(object sender, EventArgs e)
{
if (radListControl_Updates.SelectedItem?.Value is IActionSetInfos infos
&& RadDialogBase.Show(new UpdatePropertiesEditorFlyout(infos), TitlesLangRes.EditUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small)).IsValid())
&& RadDialogBase.ShowDialog(new UpdatePropertiesEditorFlyout(infos), TitlesLangRes.EditUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small)).IsValid())
UpdateUpdateItem(radListControl_Updates.SelectedItem);
}

View File

@@ -31,9 +31,11 @@ partial class UpdatePropertiesEditorFlyout
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
@@ -44,14 +46,17 @@ partial class UpdatePropertiesEditorFlyout
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 = 3;
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.Size = new Size(300, 58);
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
tableLayoutPanel1.Size = new Size(300, 84);
tableLayoutPanel1.TabIndex = 4;
//
// radLabel1
@@ -71,6 +76,14 @@ partial class UpdatePropertiesEditorFlyout
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);
@@ -81,12 +94,13 @@ partial class UpdatePropertiesEditorFlyout
Controls.Add(tableLayoutPanel1);
MinimumSize = new Size(300, 0);
Name = "UpdatePropertiesEditorFlyout";
Size = new Size(300, 118);
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();
}
@@ -96,4 +110,5 @@ partial class UpdatePropertiesEditorFlyout
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

@@ -16,6 +16,7 @@ public partial class UpdatePropertiesEditorFlyout : RadFlyoutBase, ILoadContent
public void LoadContent()
{
radTextBox_Version.Text = infos.Version.ToString();
radCheckBox_IsPublic.Checked = infos.IsPublic;
}
protected override bool ValidateOK()
@@ -24,6 +25,7 @@ public partial class UpdatePropertiesEditorFlyout : RadFlyoutBase, ILoadContent
return false;
infos.Version = version;
infos.IsPublic = radCheckBox_IsPublic.Checked;
return base.ValidateOK();
}