|
|
@@ -241,11 +241,14 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
/// <param name="o"></param> |
|
|
|
public void RemovePageCommand(object o) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show($"准备删除页面:{o.ToString()}"); |
|
|
|
if (!string.IsNullOrEmpty(o?.ToString())) |
|
|
|
{ |
|
|
|
if (Pages.FirstOrDefault(p => p == o.ToString()) != null) |
|
|
|
{ |
|
|
|
Pages.Remove(o.ToString()); |
|
|
|
if (Json<ProjectModel>.Data.Pages.ContainsKey(o.ToString())) |
|
|
|
Json<ProjectModel>.Data.Pages.Remove(o.ToString()); |
|
|
|
string path = $"{FileConfigModel.ConstPath}\\{FileConfigModel.PageDirName}\\{o.ToString()}.lay"; |
|
|
|
if (File.Exists(path)) File.Delete(path); |
|
|
|
if (!File.Exists(path)) MessageLog.GetInstance.Show($"页面 {o.ToString()} 删除成功"); |
|
|
@@ -265,6 +268,7 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
Serialization<BinConfigFile>.Data.StartPageName = o.ToString(); |
|
|
|
Serialization<BinConfigFile>.Save($"{FileConfigModel.GetBinConfigPath}"); |
|
|
|
} |
|
|
|
MessageLog.GetInstance.Show($"当前启动页面:{Serialization<BinConfigFile>.Data.StartPageName}"); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
@@ -275,7 +279,7 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(o?.ToString())) |
|
|
|
{ |
|
|
|
|
|
|
|
MessageLog.GetInstance.Show($"页面 {o.ToString()}重命名"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|