动态IO映射实现
This commit is contained in:
commit
9c492444c9
3 files changed
+176
-20
No files matched your search
+27
-11
@@ -19,7 +19,8 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DataGrid x:Name="Grid_D" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_D_SelectionChanged" d:ItemsSource="{d:SampleData ItemCount=512}"
|
<DataGrid x:Name="Grid_D" AlternationCount="2" SelectionChanged="Grid_D_SelectionChanged"
|
||||||
|
CellEditEnding="Grid_D_CellEditEnding" BeginningEdit="Grid_D_BeginningEdit" d:ItemsSource="{d:SampleData ItemCount=512}"
|
||||||
Margin="0,0,0,0" ItemsSource="{Binding Path=SYSData_D,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="False" MinColumnWidth="30"
|
Margin="0,0,0,0" ItemsSource="{Binding Path=SYSData_D,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" AllowDrop="False"
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" AllowDrop="False"
|
||||||
@@ -56,15 +57,22 @@
|
|||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="100" Binding="{Binding ID}" IsReadOnly="True">
|
<DataGridTextColumn Header="DIO" Width="100" Binding="{Binding ID}" IsReadOnly="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="*" Binding="{Binding IOName}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="PLC" Width="100" Binding="{Binding PLC}">
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="100" Binding="{Binding DIO}" IsReadOnly="True">
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="NAME" Width="*" Binding="{Binding IOName}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="info" Width="100" Binding="{Binding DIO}" IsReadOnly="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@@ -79,7 +87,8 @@
|
|||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="Grid_A" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_A_SelectionChanged" d:ItemsSource="{d:SampleData ItemCount=256}"
|
<DataGrid x:Name="Grid_A" AlternationCount="2" SelectionChanged="Grid_A_SelectionChanged"
|
||||||
|
CellEditEnding="Grid_A_CellEditEnding" BeginningEdit="Grid_A_BeginningEdit" d:ItemsSource="{d:SampleData ItemCount=256}"
|
||||||
Margin="0,0,0,0" ItemsSource="{Binding Path=SYSData_A,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="False" MinColumnWidth="30"
|
Margin="0,0,0,0" ItemsSource="{Binding Path=SYSData_A,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" AllowDrop="False"
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" AllowDrop="False"
|
||||||
@@ -116,15 +125,22 @@
|
|||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="100" Binding="{Binding ID}" IsReadOnly="True">
|
<DataGridTextColumn Header="AIO" Width="100" Binding="{Binding ID}" IsReadOnly="True">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="*" Binding="{Binding IOName}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="PLC" Width="100" Binding="{Binding PLC}">
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="100" Binding="{Binding AIO}" IsReadOnly="True"/>
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
<DataGridTextColumn Header="NAME" Width="*" Binding="{Binding IOName}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="info" Width="100" Binding="{Binding AIO}" IsReadOnly="True"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="Grid_M" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_M_SelectionChanged" d:ItemsSource="{d:SampleData ItemCount=200}"
|
<DataGrid x:Name="Grid_M" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_M_SelectionChanged" d:ItemsSource="{d:SampleData ItemCount=200}"
|
||||||
@@ -164,9 +180,9 @@
|
|||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="100" Binding="{Binding ID}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="ID" Width="100" Binding="{Binding ID}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="*" Binding="{Binding IOName}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="NAME" Width="*" Binding="{Binding IOName}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="100" Binding="{Binding Value}" IsReadOnly="True"/>
|
<DataGridTextColumn Header="info" Width="100" Binding="{Binding Value}" IsReadOnly="True"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -14,6 +15,7 @@ using System.Windows.Media.Animation;
|
|||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using static DyeingComputer.UserClass.SqliteHelper;
|
||||||
|
|
||||||
namespace DyeingComputer.View
|
namespace DyeingComputer.View
|
||||||
{
|
{
|
||||||
@@ -26,6 +28,8 @@ namespace DyeingComputer.View
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
|
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
|
|
||||||
private void Grid_D_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Grid_D_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -41,5 +45,58 @@ namespace DyeingComputer.View
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void Grid_D_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
|
||||||
|
{
|
||||||
|
string ID;
|
||||||
|
string newValue = (e.EditingElement as TextBox).Text;//获得输入单元格信息
|
||||||
|
|
||||||
|
int rownum = Grid_D.SelectedIndex;//获取鼠标选中行并定义变量
|
||||||
|
if (rownum != -1)//判断鼠标定位是否有效
|
||||||
|
{
|
||||||
|
ID = (Grid_D.Columns[0].GetCellContent(Grid_D.Items[rownum]) as TextBlock).Text;//定位第0列,
|
||||||
|
|
||||||
|
Dictionary<string, object> datagrid_v = new Dictionary<string, object>();//缓存函数
|
||||||
|
datagrid_v.Add("PLC", newValue);
|
||||||
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
SQLiteHelpers.Update("IOName", datagrid_v, "ID ='" + ID + "'", null);//更新
|
||||||
|
SQLiteHelpers.Close();//关闭数据库
|
||||||
|
}
|
||||||
|
MainWindowViewModel.SQL_data();//重新获得io表
|
||||||
|
MainWindowViewModel.D_view = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Grid_D_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
|
||||||
|
{
|
||||||
|
MainWindowViewModel.D_view = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Grid_A_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
|
||||||
|
{
|
||||||
|
string ID;
|
||||||
|
string newValue = (e.EditingElement as TextBox).Text;//获得输入单元格信息
|
||||||
|
|
||||||
|
int rownum = Grid_A.SelectedIndex;//获取鼠标选中行并定义变量
|
||||||
|
if (rownum != -1)//判断鼠标定位是否有效
|
||||||
|
{
|
||||||
|
ID = (Grid_A.Columns[0].GetCellContent(Grid_A.Items[rownum]) as TextBlock).Text;//定位第0列,
|
||||||
|
|
||||||
|
Dictionary<string, object> datagrid_v = new Dictionary<string, object>();//缓存函数
|
||||||
|
datagrid_v.Add("PLC", newValue);
|
||||||
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
SQLiteHelpers.Update("IOName", datagrid_v, "ID ='" + ID + "'", null);//更新
|
||||||
|
SQLiteHelpers.Close();//关闭数据库
|
||||||
|
}
|
||||||
|
MainWindowViewModel.SQL_data();//重新获得io表
|
||||||
|
MainWindowViewModel.A_view = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Grid_A_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
|
||||||
|
{
|
||||||
|
MainWindowViewModel.A_view = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,8 +54,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
|
|
||||||
public class MainWindowViewModel : ViewModelBase
|
public class MainWindowViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
private static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
||||||
private IniFile.IniFiles Configini = new IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "DyeingComputer.ini");
|
private IniFile.IniFiles Configini = new IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "DyeingComputer.ini");
|
||||||
private PID pid = new PID();
|
private PID pid = new PID();
|
||||||
@@ -1164,7 +1164,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
public static DataTable dt_d = new DataTable("DIO");
|
public static DataTable dt_d = new DataTable("DIO");
|
||||||
public static DataTable dt_a = new DataTable("AIO");
|
public static DataTable dt_a = new DataTable("AIO");
|
||||||
public static DataTable dt_m = new DataTable("M");
|
public static DataTable dt_m = new DataTable("M");
|
||||||
void SQL_data()//获得io表
|
public static void SQL_data()//获得io表
|
||||||
{
|
{
|
||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
@@ -1196,12 +1196,15 @@ namespace DyeingComputer.ViewModel
|
|||||||
|
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
{
|
{
|
||||||
for (ushort i = 0; i < DO_L; i++) { Updata_dtd((i + 2001).ToString(), DO[i]); }
|
for (ushort i = 0; i < DO_L; i++) { Upplc_dtd((i + 2001).ToString(), DO[i]); }
|
||||||
for (ushort i = 0; i < DQ_L; i++) { DQ[i] = Selet_dtd((i + 3001).ToString()); }
|
for (ushort i = 0; i < DQ_L; i++) { DQ[i] = Seplc_dtd((i + 3001).ToString()); }
|
||||||
for (ushort i = 0; i < RW_L; i++) { Updata_dta((i + 4001).ToString(), RW[i]); }
|
for (ushort i = 0; i < RW_L; i++) { Upplc_dta((i + 4001).ToString(), RW[i]); }
|
||||||
for (ushort i = 0; i < DW_L; i++) { DW[i] = Convert.ToUInt16(Selet_dta((i + 5001).ToString())); }
|
for (ushort i = 0; i < DW_L; i++) { DW[i] = Convert.ToUInt16(Seplc_dta((i + 5001).ToString())); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static object D_view=true;
|
||||||
|
public static object A_view=true;
|
||||||
private async void IO_view()//IO显示
|
private async void IO_view()//IO显示
|
||||||
{
|
{
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
@@ -1214,13 +1217,13 @@ namespace DyeingComputer.ViewModel
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SYSData_A = ToObservableCollection<DATA_A>(dt_a);
|
if ((bool)A_view) SYSData_A = ToObservableCollection<DATA_A>(dt_a);
|
||||||
}
|
}
|
||||||
catch (Exception ex) { Name_err = "IO_SYSData_A" + "(" + ex.Message + ")"; }
|
catch (Exception ex) { Name_err = "IO_SYSData_A" + "(" + ex.Message + ")"; }
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SYSData_D = ToObservableCollection<DATA_D>(dt_d);
|
if ((bool)D_view) SYSData_D = ToObservableCollection<DATA_D>(dt_d);
|
||||||
}
|
}
|
||||||
catch (Exception ex) { Name_err = "IO_SYSData_D" + "(" + ex.Message + ")"; }
|
catch (Exception ex) { Name_err = "IO_SYSData_D" + "(" + ex.Message + ")"; }
|
||||||
});
|
});
|
||||||
@@ -1341,6 +1344,83 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Upplc_dtd(string key, bool Value)//更新PLCD
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (dt_d)//锁
|
||||||
|
{
|
||||||
|
DataRow drEmploye = dt_d.Select("PLC=" + key).First();
|
||||||
|
drEmploye.BeginEdit();
|
||||||
|
drEmploye["DIO"] = Value;
|
||||||
|
drEmploye.EndEdit();
|
||||||
|
drEmploye.AcceptChanges();
|
||||||
|
drEmploye.ClearErrors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogGing.LogGingDATA("PLCDTD:" + ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void Upplc_dta(string key, int Value)//更新PLCA寄存器
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (dt_a)
|
||||||
|
{
|
||||||
|
DataRow drEmploye = dt_a.Select("PLC=" + key).First();
|
||||||
|
drEmploye.BeginEdit();
|
||||||
|
drEmploye["AIO"] = Value;
|
||||||
|
drEmploye.EndEdit();
|
||||||
|
drEmploye.AcceptChanges();
|
||||||
|
drEmploye.ClearErrors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogGing.LogGingDATA("PLCDTA:" + ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static bool Seplc_dtd(string key)//PLCD寄存器
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (dt_d)
|
||||||
|
{
|
||||||
|
// DataRow[] arrRows = dt_d.Select("ID='" + key + "'");
|
||||||
|
// bool index = Convert.ToBoolean(arrRows[0]["DIO"].ToString());
|
||||||
|
DataRow drEmployee = dt_d.Select("PLC=" + key).First();
|
||||||
|
bool index = drEmployee.Field<bool>("DIO");
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogGing.LogGingDATA("PLCDTD:" + ex.ToString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static int Seplc_dta(string key)//PLCA寄存器
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (dt_a)
|
||||||
|
{
|
||||||
|
// DataRow[] arrRows = dt_a.Select("ID='" + key + "'");
|
||||||
|
// int index = Convert.ToInt16(arrRows[0]["AIO"].ToString());
|
||||||
|
DataRow drEmployee = dt_a.Select("PLC=" + key).First();
|
||||||
|
int index = drEmployee.Field<int>("AIO");
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogGing.LogGingDATA("PLCDTA:" + ex.ToString());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ObservableCollection<DATA_A> sysData_A = new ObservableCollection<DATA_A>();
|
ObservableCollection<DATA_A> sysData_A = new ObservableCollection<DATA_A>();
|
||||||
ObservableCollection<DATA_D> sysData_D = new ObservableCollection<DATA_D>();
|
ObservableCollection<DATA_D> sysData_D = new ObservableCollection<DATA_D>();
|
||||||
ObservableCollection<DATA_M> sysData_M = new ObservableCollection<DATA_M>();
|
ObservableCollection<DATA_M> sysData_M = new ObservableCollection<DATA_M>();
|
||||||
@@ -1379,6 +1459,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
public string IOName { get; set; }
|
public string IOName { get; set; }
|
||||||
public int AIO { get; set; }
|
public int AIO { get; set; }
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
|
public string PLC { get; set; }
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
}
|
}
|
||||||
public class DATA_D
|
public class DATA_D
|
||||||
@@ -1386,6 +1467,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
public string IOName { get; set; }
|
public string IOName { get; set; }
|
||||||
public bool DIO { get; set; }
|
public bool DIO { get; set; }
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
|
public string PLC { get; set; }
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
}
|
}
|
||||||
public class DATA_M
|
public class DATA_M
|
||||||
@@ -1393,6 +1475,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
public string IOName { get; set; }
|
public string IOName { get; set; }
|
||||||
public double Value { get; set; }
|
public double Value { get; set; }
|
||||||
public string ID { get; set; }
|
public string ID { get; set; }
|
||||||
|
public string PLC { get; set; }
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
}
|
}
|
||||||
public ObservableCollection<T> ToObservableCollection<T>(DataTable dt) where T : class, new()
|
public ObservableCollection<T> ToObservableCollection<T>(DataTable dt) where T : class, new()
|
||||||
|
|||||||
Reference in new issue
Block a user