|
|
@@ -65,7 +65,7 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
ActionManage.GetInstance.Register(new Action<object>((o) => |
|
|
|
{ |
|
|
|
Pages.Add(o.ToString()); |
|
|
|
string path = $"{ Json<ProjectModel>.Data.ProjectPath}\\{Global.PageDirectoryName}"; |
|
|
|
string path = $"{ Json<ProjectModel>.Data.ProjectPath}\\{FileConfigModel.PageDirectoryName}"; |
|
|
|
Directory.CreateDirectory(path); |
|
|
|
File.WriteAllText($"{path}\\{o.ToString()}.lay", null, Encoding.Unicode); |
|
|
|
Json<ProjectModel>.Data.Pages.TryAdd(o.ToString(), $"{path}\\{o.ToString()}.lay"); |
|
|
@@ -77,7 +77,7 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
bool? result = newProjectView.ShowDialog(); |
|
|
|
if (result != null && result == true) |
|
|
|
{ |
|
|
|
if (newProjectView.Tag != null && newProjectView.Tag is NewDataModel objModel) |
|
|
|
if (newProjectView.Tag != null && newProjectView.Tag is NewProjectModel objModel) |
|
|
|
{ |
|
|
|
string path = $"{objModel.ProjectPath}\\{objModel.ProjectName}"; |
|
|
|
Directory.CreateDirectory(path); |
|
|
@@ -100,19 +100,19 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
{ |
|
|
|
Json<LocalPar>.Data.ProjectPath = Json<ProjectModel>.Data.ProjectPath; |
|
|
|
Json<LocalPar>.Save(); |
|
|
|
if (File.Exists(Global.VarManagerPath)) |
|
|
|
if (File.Exists(FileConfigModel.VarManagerPath)) |
|
|
|
{ |
|
|
|
Process[] pro = Process.GetProcesses(); |
|
|
|
if (pro?.ToList().FirstOrDefault(p => p.ProcessName.Contains("BPASmart.VariableManager")) == null) |
|
|
|
{ |
|
|
|
Process.Start(Global.VarManagerPath); |
|
|
|
Process.Start(FileConfigModel.VarManagerPath); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
SelectedPageCommand = new RelayCommand<object>((o) => |
|
|
|
{ |
|
|
|
string path = $"{Json<ProjectModel>.Data.ProjectPath}\\{Global.PageDirectoryName}\\{o.ToString()}.lay"; |
|
|
|
string path = $"{Json<ProjectModel>.Data.ProjectPath}\\{FileConfigModel.PageDirectoryName}\\{o.ToString()}.lay"; |
|
|
|
if (mainCanvasPanels.FirstOrDefault(p => p.PageName == o.ToString()) == null) |
|
|
|
{ |
|
|
|
mainCanvasPanels.Add(new MainCanvasPageModel() |
|
|
|