添加资源,总览页面添加图表,其它逻辑修正
This commit is contained in:
commit
4449530bb7
14 files changed
+222
-57
No files matched your search
@@ -19,6 +19,7 @@
|
||||
<ConvertMoels:StatenToImageConvert x:Key="StatenToImageConvert"/>
|
||||
<ContextMenu x:Key="PersoncontextMenu">
|
||||
<MenuItem Header="{x:Static lang:Resources._lock}" Click="MenuItem_LOCK_XML"/>
|
||||
<MenuItem Header="{x:Static lang:Resources._Auto}" Click="MenuItem_AUTO_XML"/>
|
||||
</ContextMenu>
|
||||
<ContextMenu x:Key="PersoncontextMenuStep">
|
||||
<MenuItem Header="{x:Static lang:Resources.edit}" Click="MenuItem_edit"/>
|
||||
@@ -112,9 +113,12 @@
|
||||
<materialDesign:PackIcon Width="25" Height="30"
|
||||
Kind="{Binding Path=State,Converter={StaticResource StatexmlConvert}}"
|
||||
Foreground="{Binding Path=State,Converter={StaticResource StateToColorConvert}}"/>
|
||||
<materialDesign:PackIcon Width="25" Height="30"
|
||||
Kind="{Binding Path=LOCK,Converter={StaticResource StatexmlConvert}}"
|
||||
<materialDesign:PackIcon Width="25" Height="30" Kind="Lock"
|
||||
Visibility="{Binding Path=LOCK,Converter={StaticResource StatexmlConvert}}"
|
||||
Foreground="{Binding Path=State,Converter={StaticResource StateToColorConvert}}"/>
|
||||
<materialDesign:PackIcon Width="25" Height="30" Kind="HandBackRight"
|
||||
Visibility="{Binding Path=AUTO,Converter={StaticResource StatexmlConvert}}"
|
||||
Foreground="{Binding Path=State,Converter={StaticResource StateToColorConvert}}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
+43
-11
@@ -227,19 +227,21 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
}//单据
|
||||
private void MenuItem_LOCK_XML(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<string>("LOCK");
|
||||
bool mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<bool>("LOCK");
|
||||
|
||||
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
||||
dat_821.Clear();
|
||||
Dictionary<string, object> dat_ = new Dictionary<string, object>();
|
||||
dat_.Clear();
|
||||
|
||||
if (mode != "True")
|
||||
if (!mode)
|
||||
{
|
||||
dat_821.Add("LOCK", "True");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "True");
|
||||
}
|
||||
dat_.Add("NAME", "LOCK");
|
||||
dat_.Add("VALUE", "True");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "True");
|
||||
}
|
||||
else
|
||||
{
|
||||
dat_821.Add("LOCK", "FALSE");
|
||||
dat_.Add("NAME", "LOCK");
|
||||
dat_.Add("VALUE", "False");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "False");
|
||||
}
|
||||
|
||||
@@ -248,14 +250,43 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_821.ToJsonString()
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
});
|
||||
|
||||
if (mode != "True") { MessageBox.Show(machine + Properties.Resources.user_lock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
if (!mode) { MessageBox.Show(machine + Properties.Resources.user_lock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
} else {
|
||||
MessageBox.Show(machine + Properties.Resources.user_unlock, "800", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}//锁定
|
||||
private void MenuItem_AUTO_XML(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bool mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<bool>("AUTO");
|
||||
|
||||
Dictionary<string, object> dat_ = new Dictionary<string, object>();
|
||||
dat_.Clear();
|
||||
|
||||
if (!mode)
|
||||
{
|
||||
dat_.Add("NAME", "AUTO");
|
||||
dat_.Add("VALUE", "True");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "AUTO", "Name='" + machine + "'", "True");
|
||||
}
|
||||
else
|
||||
{
|
||||
dat_.Add("NAME", "AUTO");
|
||||
dat_.Add("VALUE", "FALSE");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "AUTO", "Name='" + machine + "'", "False");
|
||||
}
|
||||
|
||||
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC829" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", "ID='" + index + "'") + dat_.ToJsonString()
|
||||
});
|
||||
|
||||
}//手自动
|
||||
private void ListViewItem_Curve(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
log.Visibility = Visibility.Collapsed;
|
||||
@@ -658,7 +689,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
public string Step { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string State { get; set; }
|
||||
public string LOCK { get; set; }
|
||||
public bool LOCK { get; set; }
|
||||
public bool AUTO { get; set; }
|
||||
|
||||
}
|
||||
public class TechnologicalP
|
||||
|
||||
+1
-2
@@ -105,10 +105,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
else if (State_ == "201")
|
||||
{ inf[i].name.Background = new SolidColorBrush(Color.FromRgb(0, 255, 0)); }
|
||||
else if (State_ == "202")
|
||||
{ inf[i].name.Background = new SolidColorBrush(Color.FromRgb(255, 255, 0)); }
|
||||
{ inf[i].name.Background = new SolidColorBrush(Color.FromRgb(0, 255, 0)); }
|
||||
else
|
||||
{ inf[i].name.Background = new SolidColorBrush(Color.FromRgb(255, 0, 0)); }
|
||||
|
||||
inf[i].temp.Text = Selet_Machines(MainWindowViewModel.Machines, "Temperature", i).ToString() + "°C";
|
||||
inf[i].Process.Text = (string)Selet_Machines(MainWindowViewModel.Machines, "Process", i);
|
||||
inf[i].Step.Text = (string)Selet_Machines(MainWindowViewModel.Machines, "Step", i);
|
||||
|
||||
Reference in new issue
Block a user