Procházet zdrojové kódy

消息通知

样式分支
pry před 2 roky
rodič
revize
0879c50033
3 změnil soubory, kde provedl 17 přidání a 23 odebrání
  1. +2
    -0
      BPASmart.ConfigurationSoftware/App.xaml.cs
  2. +10
    -17
      BPASmart.ConfigurationSoftware/MainWindow.xaml
  3. +5
    -6
      BPASmart.ConfigurationSoftware/MainWindowViewModel.cs

+ 2
- 0
BPASmart.ConfigurationSoftware/App.xaml.cs Zobrazit soubor

@@ -8,6 +8,8 @@ using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using BPA.Communication;
using System.IO;
using System.Diagnostics;

namespace BPASmart.ConfigurationSoftware
{


+ 10
- 17
BPASmart.ConfigurationSoftware/MainWindow.xaml Zobrazit soubor

@@ -155,7 +155,7 @@
<ColumnDefinition />
</Grid.ColumnDefinitions>

<Border BorderThickness="2" BorderBrush="Blue">
<Border BorderBrush="Blue" BorderThickness="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="20" />
@@ -204,7 +204,6 @@
</Grid>
</Border>


<GridSplitter
Grid.Row="2"
Width="2"
@@ -218,7 +217,7 @@
Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="2" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
@@ -227,12 +226,15 @@
Grid.Row="1"
Width="auto"
Height="auto"
Content="{Binding MainContent}" Margin="0,0,0,5" Grid.RowSpan="3" />
Margin="0,0,0,5"
Content="{Binding MainContent}" />



<Border
Grid.Row="3"
Grid.Row="2"
Grid.RowSpan="2"
Margin="-7 0 0 0"
Margin="-7,0,0,0"
BorderBrush="Blue"
BorderThickness="2">
<Grid Margin="5,5,0,0">
@@ -257,19 +259,10 @@
Grid.Row="2"
Height="2"
HorizontalAlignment="Stretch"
Background="Blue" Grid.RowSpan="2" />
Background="Blue" />

</Grid>

<!--<ContentControl
Grid.Row="1"
Grid.Column="1"
Width="auto"
Height="auto"
Content="{Binding MainContent}" />-->
<!--<Canvas Name="cav" Grid.Column="1" Grid.Row="1">

</Canvas>-->
</Grid>

</Grid>



+ 5
- 6
BPASmart.ConfigurationSoftware/MainWindowViewModel.cs Zobrazit soubor

@@ -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)


Načítá se…
Zrušit
Uložit