minor fixes
This commit is contained in:
@@ -192,6 +192,7 @@ partial class MainForm
|
||||
//
|
||||
radMenuItem_SaveWorkspace.Name = "radMenuItem_SaveWorkspace";
|
||||
radMenuItem_SaveWorkspace.Text = "Save";
|
||||
radMenuItem_SaveWorkspace.Click += RadMenuItem_SaveWorkspace_Click;
|
||||
//
|
||||
// radMenuSeparatorItem1
|
||||
//
|
||||
|
||||
@@ -399,6 +399,11 @@ public partial class MainForm : RadForm, IMainApi
|
||||
}
|
||||
}
|
||||
|
||||
private void RadMenuItem_SaveWorkspace_Click(object sender, EventArgs e)
|
||||
{
|
||||
wsInfo?.Workspace.Save();
|
||||
}
|
||||
|
||||
private void RadMenuItem_ToolsItem_Click(object? sender, EventArgs e)
|
||||
{
|
||||
if (sender is RadMenuItem item && item.Tag is PluginFunction func)
|
||||
@@ -446,8 +451,25 @@ public partial class MainForm : RadForm, IMainApi
|
||||
var newValue = e.Row.Cells[e.Column.Name].Value;
|
||||
var colName = e.Column.Name;
|
||||
|
||||
if (newValue is string valueStr)
|
||||
if (newValue is bool valueBool)
|
||||
{
|
||||
switch (colName)
|
||||
{
|
||||
case "iszip":
|
||||
action.IsZip = valueBool;
|
||||
break;
|
||||
case "isextra":
|
||||
action.IsExtra = valueBool;
|
||||
break;
|
||||
case "isdir":
|
||||
if (uaction is not null)
|
||||
uaction.IsDirectory = valueBool;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var valueStr = newValue as string ?? string.Empty;
|
||||
var valueNullStr = valueStr.Nullify();
|
||||
|
||||
switch (colName)
|
||||
@@ -477,7 +499,7 @@ public partial class MainForm : RadForm, IMainApi
|
||||
action.SourceName = valueNullStr;
|
||||
break;
|
||||
case "srcregex":
|
||||
action.SourceTag = valueNullStr;
|
||||
action.SourceRegex = valueNullStr;
|
||||
break;
|
||||
case "srctag":
|
||||
action.SourceTag = valueNullStr;
|
||||
@@ -499,22 +521,6 @@ public partial class MainForm : RadForm, IMainApi
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (newValue is bool valueBool)
|
||||
{
|
||||
switch (colName)
|
||||
{
|
||||
case "iszip":
|
||||
action.IsZip = valueBool;
|
||||
break;
|
||||
case "isextra":
|
||||
action.IsExtra = valueBool;
|
||||
break;
|
||||
case "isdir":
|
||||
if (uaction is not null)
|
||||
uaction.IsDirectory = valueBool;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RadMenuItem_Updates_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
|
||||
@@ -22,6 +22,10 @@ public class InstallInfos : IActionSetInfos
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
return JsonConvert.SerializeObject(this, new JsonSerializerSettings
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,10 @@ public class UpdateInfos
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this);
|
||||
return JsonConvert.SerializeObject(this, new JsonSerializerSettings
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user