proper finish updates collector
This commit is contained in:
@@ -173,6 +173,33 @@ public partial class MainForm : RadForm, IMainApi
|
||||
item.SvgImage = AppGlobals.Symbols.GetSvgImage(infos.IsPublic ? AppSymbols.eye : AppSymbols.invisible, SymbolSize.Small);
|
||||
}
|
||||
|
||||
public void UpdateItem(IActionSetInfos actionSetInfos)
|
||||
{
|
||||
RadListDataItem? item = null;
|
||||
|
||||
foreach (var iitem in radListControl_Updates.Items)
|
||||
{
|
||||
if (item == null && iitem.Value == actionSetInfos)
|
||||
item = iitem;
|
||||
}
|
||||
|
||||
if (item == null)
|
||||
InsertUpdateItem(actionSetInfos);
|
||||
else if (wsInfo?.Workspace.UpdateInfos != null && !wsInfo.Workspace.UpdateInfos.Updates.Contains(actionSetInfos))
|
||||
radListControl_Updates.Items.Remove(item);
|
||||
else
|
||||
UpdateUpdateItem(item);
|
||||
}
|
||||
|
||||
public void UpdateItem(InstallAction action)
|
||||
{
|
||||
foreach (var row in radGridView_Actions.Rows)
|
||||
{
|
||||
if (row.Tag == action)
|
||||
UpdateActionRow(row);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadActionSet(IActionSetInfos infos)
|
||||
{
|
||||
radGridView_Actions.BeginUpdate();
|
||||
@@ -307,32 +334,40 @@ public partial class MainForm : RadForm, IMainApi
|
||||
{
|
||||
var row = radGridView_Actions.Rows.AddNew();
|
||||
row.Tag = action;
|
||||
row.Cells["id"].Value = action.Id;
|
||||
row.Cells["name"].Value = action.Name;
|
||||
row.Cells["iszip"].Value = action.IsZip;
|
||||
row.Cells["zippath"].Value = action.ZipPath;
|
||||
row.Cells["destpath"].Value = action.DestPath;
|
||||
row.Cells["srcurl"].Value = action.SourceUrl;
|
||||
row.Cells["srctype"].Value = action.SourceType;
|
||||
row.Cells["srcowner"].Value = action.SourceOwner;
|
||||
row.Cells["srcname"].Value = action.SourceName;
|
||||
row.Cells["srcregex"].Value = action.SourceRegex;
|
||||
row.Cells["srctag"].Value = action.SourceTag;
|
||||
row.Cells["side"].Value = action.Side;
|
||||
row.Cells["isextra"].Value = action.IsExtra;
|
||||
|
||||
if (action is UpdateAction uaction)
|
||||
{
|
||||
row.Cells["inherit"].Value = uaction.InheritFrom; // TODO: Find inherit action and put it in here!
|
||||
row.Cells["utype"].Value = uaction.Type;
|
||||
row.Cells["srcpath"].Value = uaction.SrcPath;
|
||||
row.Cells["isdir"].Value = uaction.IsDirectory;
|
||||
}
|
||||
UpdateActionRow(row);
|
||||
}
|
||||
|
||||
radGridView_Actions.EndUpdate();
|
||||
}
|
||||
|
||||
private void UpdateActionRow(GridViewRowInfo row)
|
||||
{
|
||||
if (row.Tag is not InstallAction action)
|
||||
return;
|
||||
|
||||
row.Cells["id"].Value = action.Id;
|
||||
row.Cells["name"].Value = action.Name;
|
||||
row.Cells["iszip"].Value = action.IsZip;
|
||||
row.Cells["zippath"].Value = action.ZipPath;
|
||||
row.Cells["destpath"].Value = action.DestPath;
|
||||
row.Cells["srcurl"].Value = action.SourceUrl;
|
||||
row.Cells["srctype"].Value = action.SourceType;
|
||||
row.Cells["srcowner"].Value = action.SourceOwner;
|
||||
row.Cells["srcname"].Value = action.SourceName;
|
||||
row.Cells["srcregex"].Value = action.SourceRegex;
|
||||
row.Cells["srctag"].Value = action.SourceTag;
|
||||
row.Cells["side"].Value = action.Side;
|
||||
row.Cells["isextra"].Value = action.IsExtra;
|
||||
|
||||
if (action is not UpdateAction uaction)
|
||||
return;
|
||||
|
||||
row.Cells["inherit"].Value = uaction.InheritFrom; // TODO: Find inherit action and put it in here!
|
||||
row.Cells["utype"].Value = uaction.Type;
|
||||
row.Cells["srcpath"].Value = uaction.SrcPath;
|
||||
row.Cells["isdir"].Value = uaction.IsDirectory;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadRecentWorkspaces();
|
||||
|
||||
Reference in New Issue
Block a user