|
|
@@ -18,6 +18,7 @@ using System.Collections.Concurrent; |
|
|
|
using System.IO.Pipes; |
|
|
|
using BPA.Communication; |
|
|
|
using System.Threading; |
|
|
|
using BeDesignerSCADA.ViewModel; |
|
|
|
|
|
|
|
namespace BPASmart.ConfigurationSoftware |
|
|
|
{ |
|
|
@@ -51,7 +52,6 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
Directory.CreateDirectory(path); |
|
|
|
Json<ProjectModel>.Data.ProjectPath = path; |
|
|
|
Json<ProjectModel>.Data.ProjectName = objModel.ProjectName; |
|
|
|
FileConfigModel.ConstPath = objModel.ProjectPath; |
|
|
|
Head = objModel.ProjectName; |
|
|
|
Save(); |
|
|
|
FileHelper.GetInstance.RegisterOpenFileType(); |
|
|
@@ -68,6 +68,7 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
OpenVarManagerCommand = new RelayCommand(() => |
|
|
|
{ |
|
|
|
Json<LocalPar>.Data.ProjectPath = Json<ProjectModel>.Data.ProjectPath; |
|
|
|
FileConfigModel.ConstPath = Json<ProjectModel>.Data.ProjectPath; |
|
|
|
Json<LocalPar>.Save(); |
|
|
|
if (File.Exists(FileConfigModel.VarManagerPath)) |
|
|
|
{ |
|
|
@@ -96,11 +97,6 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
mainCanvasPanels.ElementAt(index).MainCanvasPanelModel.VariableManagerPath(FileConfigModel.VarConfigPath); |
|
|
|
MainContent = mainCanvasPanels.ElementAt(index).MainCanvasPanelModel; |
|
|
|
} |
|
|
|
//var res = mainCanvasPanels.FirstOrDefault(p => p.PageName == o.ToString()); |
|
|
|
//if (res != null) |
|
|
|
//{ |
|
|
|
// MainContent = res.MainCanvasPanelModel; |
|
|
|
//} |
|
|
|
}); |
|
|
|
|
|
|
|
SaveProjectCommand = new RelayCommand(() => |
|
|
@@ -124,6 +120,7 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
{ |
|
|
|
if (s == PipeTopic.VarSave) |
|
|
|
{ |
|
|
|
DataBusModel.GetInstance().RefreshVariableManager(FileConfigModel.VarConfigPath); |
|
|
|
for (int i = 0; i < mainCanvasPanels.Count; i++) |
|
|
|
{ |
|
|
|
mainCanvasPanels.ElementAt(i).MainCanvasPanelModel.VariableManagerPath(FileConfigModel.VarConfigPath); |
|
|
@@ -142,6 +139,8 @@ namespace BPASmart.ConfigurationSoftware |
|
|
|
if (Json<ProjectModel>.Data.ProjectName != null && Json<ProjectModel>.Data.ProjectName.Length > 0) |
|
|
|
{ |
|
|
|
Head = Json<ProjectModel>.Data.ProjectName; |
|
|
|
FileConfigModel.ConstPath = Json<ProjectModel>.Data.ProjectPath; |
|
|
|
DataBusModel.GetInstance().RefreshVariableManager(FileConfigModel.VarConfigPath); |
|
|
|
} |
|
|
|
|
|
|
|
if (Json<ProjectModel>.Data.Pages?.Count > 0) |
|
|
|