细节页面的右键逻辑,添加语言
This commit is contained in:
commit
435a54a61a
5 files changed
+56
-34
No files matched your search
@@ -1069,12 +1069,12 @@
|
||||
<value>音量</value>
|
||||
</data>
|
||||
<data name="Pequest" xml:space="preserve">
|
||||
<value />
|
||||
<value>請求</value>
|
||||
</data>
|
||||
<data name="Subroutine" xml:space="preserve">
|
||||
<value />
|
||||
<value>副功能</value>
|
||||
</data>
|
||||
<data name="DispenseException" xml:space="preserve">
|
||||
<value />
|
||||
<value>輸送異常</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -78,6 +78,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
||||
drEmployee["Message"] = "";
|
||||
drEmployee["SYSKEY"] = "";
|
||||
drEmployee["WORK_RUN"] = "-1";
|
||||
drEmployee["ERR"] = false;
|
||||
drEmployee.EndEdit();
|
||||
drEmployee.AcceptChanges();
|
||||
LogGing.LogGingDATA("[IP='" + client.IP + "' AND port='" + client.Port + "']=Link_STOP");
|
||||
@@ -104,6 +105,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
||||
drEmployee["Message"] = "";
|
||||
drEmployee["SYSKEY"] = "";
|
||||
drEmployee["WORK_RUN"] = "-1";
|
||||
drEmployee["ERR"] = false;
|
||||
drEmployee.EndEdit();
|
||||
drEmployee.AcceptChanges();
|
||||
LogGing.LogGingDATA("[IP='" + client.IP + "' AND port='" + client.Port + "']=Link_INTERRUPT");
|
||||
@@ -386,12 +388,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
||||
{
|
||||
a.UseCheckClear()
|
||||
.SetCheckClearType(CheckClearType.All)
|
||||
.SetTick(TimeSpan.FromSeconds(60))
|
||||
.SetTick(TimeSpan.FromSeconds(5))
|
||||
.SetOnClose((c, t) =>
|
||||
{
|
||||
c.TryShutdown();
|
||||
});
|
||||
a.UseTcpReconnection();//触发型重连
|
||||
// a.UseTcpReconnection();//触发型重连
|
||||
})
|
||||
.ConfigureContainer(a =>
|
||||
{
|
||||
|
||||
+33
-19
@@ -17,6 +17,14 @@
|
||||
<ConvertMoels:StateToColorConvert x:Key="StateToColorConvert"/>
|
||||
<ConvertMoels:BoolToVisidilityConvert x:Key="BoolToVisidilityConvert"/>
|
||||
<ConvertMoels:StatenToImageConvert x:Key="StatenToImageConvert"/>
|
||||
<ContextMenu x:Key="PersoncontextMenu">
|
||||
<MenuItem Header="{x:Static lang:Resources._lock}" Click="MenuItem_LOCK_XML"/>
|
||||
</ContextMenu>
|
||||
<ContextMenu x:Key="PersoncontextMenuStep">
|
||||
<MenuItem Header="{x:Static lang:Resources.edit}" Click="MenuItem_edit"/>
|
||||
<MenuItem Header="{x:Static lang:Resources.Insert}" Click="MenuItem_Insert"/>
|
||||
<MenuItem Header="{x:Static lang:Resources.Delete}" Click="MenuItem_Delete"/>
|
||||
</ContextMenu>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -51,6 +59,21 @@
|
||||
<DataTrigger Binding="{Binding State}" Value="308">
|
||||
<Setter Property="Background" Value="Yellow"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding State}" Value="800">
|
||||
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding State}" Value="101">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource PersoncontextMenu}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding State}" Value="201">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource PersoncontextMenu}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding State}" Value="202">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource PersoncontextMenu}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding State}" Value="309">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource PersoncontextMenu}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
@@ -74,7 +97,7 @@
|
||||
<Setter Property="Background" Value="#FFFFFFFF"/>
|
||||
<Setter Property="BorderBrush" Value="#FFFFFFFF"/>
|
||||
<Setter Property="Foreground" Value="#000000"/>
|
||||
</Style>
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.Columns>
|
||||
<!--列信息绑定-->
|
||||
@@ -152,6 +175,10 @@
|
||||
<DataTrigger Binding="{Binding RUN}" Value="9">
|
||||
<Setter Property="Background" Value="Red"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.IsInteractive,
|
||||
RelativeSource={RelativeSource AncestorType=DataGrid}}" Value="true">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource PersoncontextMenuStep}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
@@ -167,13 +194,6 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static lang:Resources.edit}" Click="MenuItem_edit"/>
|
||||
<MenuItem Header="{x:Static lang:Resources.Insert}" Click="MenuItem_Insert"/>
|
||||
<MenuItem Header="{x:Static lang:Resources.Delete}" Click="MenuItem_Delete"/>
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.Columns>
|
||||
<!--列信息绑定-->
|
||||
<DataGridTextColumn Binding="{Binding ProgramID}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
@@ -260,12 +280,14 @@
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</DataGrid>
|
||||
<TextBlock Grid.Column="0" x:Name="machin_LOG" TextWrapping="Wrap" FontSize="27" VerticalAlignment="Top" Height="40" Background="#FF2793FF" Foreground="White" FontWeight="Bold"/>
|
||||
<Grid Margin="0,40,0,0" Grid.ColumnSpan="2" Grid.Column="0" >
|
||||
<rdp:RemoteDesktopWpf x:Name="rdp" Visibility="Collapsed" />
|
||||
<ContentControl x:Name="Picture" Background="White"/>
|
||||
<TextBlock x:Name="log" Text="{Binding Sys_machine}" TextWrapping="Wrap" FontSize="25" Background="White"/>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" PanningMode="VerticalOnly">
|
||||
<TextBlock x:Name="log" Text="{Binding Sys_machine}" TextWrapping="Wrap" FontSize="25" Background="White"/>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<GridSplitter Grid.Row="0" Grid.Column="1" Width="5" HorizontalAlignment="Center" Background="#FF00204E"/>
|
||||
</Grid>
|
||||
@@ -301,15 +323,7 @@
|
||||
<TextBlock Text="{x:Static lang:Resources.Receipt}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem MinWidth="150" MouseLeftButtonUp="ListViewItem_LOCK_XML" IsEnabled="False" x:Name="LOCK_XML">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="LinkLock" Width="40" Height="30" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/>
|
||||
<TextBlock Text="{x:Static lang:Resources._lock}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="3" x:Name="scr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="800,0,0,0">
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
|
||||
@@ -100,8 +100,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
DyeingMachine.IsEnabled = true;
|
||||
Curve.IsEnabled = true;
|
||||
Screen.IsEnabled = true;
|
||||
Receipt.IsEnabled = true;
|
||||
LOCK_XML.IsEnabled = true;
|
||||
Receipt.IsEnabled = true;
|
||||
TechnologicalProcess_bool = true;
|
||||
IsInteractive = false;
|
||||
|
||||
@@ -226,7 +225,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
dyelotView.DyelotDatatable(Product_DAT);
|
||||
Picture.Content = dyelotView;
|
||||
}//单据
|
||||
private void ListViewItem_LOCK_XML(object sender, MouseButtonEventArgs e)
|
||||
private void MenuItem_LOCK_XML(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<string>("LOCK");
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
/**染机用户信息**/
|
||||
try
|
||||
{
|
||||
if ((int)Selet_Machines(Machines, "UserInfoStart", "ID='" + i + "'") == 901)
|
||||
if ((int)Selet_Machines(Machines, "UserInfoStart", "ID='" + i + "'") == 901)//打开用户提示信息
|
||||
{
|
||||
MainWindow.InfData.Rows.Add(new object[] {
|
||||
Selet_Machines(Machines, "Name", "ID='" + i + "'"),
|
||||
@@ -345,7 +345,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
Selet_Machines(Machines, "ID", "ID='" + i + "'")});
|
||||
Updata_Machines(Machines, "UserInfoStart", "ID='" + i + "'", "900");
|
||||
}
|
||||
if (Selet_Machines(Machines, "UserInfoStart", "ID='" + i + "'").ToString() == "902")
|
||||
if (Selet_Machines(Machines, "UserInfoStart", "ID='" + i + "'").ToString() == "902")//删除用户提示信息
|
||||
{
|
||||
MainWindow.InfData.Select("ID='" + i + "'").First().Delete();
|
||||
}
|
||||
@@ -449,7 +449,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
dataRow["Redye"] + "' AND Step = '" + dataRow["Step"] + "'"))
|
||||
{
|
||||
Row.BeginEdit();
|
||||
Row["State"] = 301;
|
||||
Row["State"] = 309;
|
||||
Row["Amount"] = 0;
|
||||
Row["DispenseEndTime"] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
Row.EndEdit();
|
||||
@@ -501,13 +501,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dt.Select("DyeState = 309").Count() > 0)
|
||||
else if (dt.Select("PowderState = 309").Count() > 0)
|
||||
{
|
||||
foreach (DataRow Row in Dyelot_CALL.Select("Dyelot='" + dataRow["Dyelot"] + "' and Redye ='" +
|
||||
dataRow["Redye"] + "' AND Step = '" + dataRow["Step"] + "'"))
|
||||
{
|
||||
Row.BeginEdit();
|
||||
Row["State"] = 301;
|
||||
Row["State"] = 309;
|
||||
Row["Amount"] = 0;
|
||||
Row["DispenseEndTime"] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
Row.EndEdit();
|
||||
@@ -552,13 +552,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dt.Select("DyeState = 309").Count() > 0)
|
||||
else if (dt.Select("ChemicalState = 309").Count() > 0)
|
||||
{
|
||||
foreach (DataRow Row in Dyelot_CALL.Select("Dyelot='" + dataRow["Dyelot"] + "' and Redye ='" +
|
||||
dataRow["Redye"] + "' AND Step = '" + dataRow["Step"] + "'"))
|
||||
{
|
||||
Row.BeginEdit();
|
||||
Row["State"] = 301;
|
||||
Row["State"] = 309;
|
||||
Row["Amount"] = 0;
|
||||
Row["DispenseEndTime"] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
Row.EndEdit();
|
||||
@@ -591,6 +591,13 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
DAT = "SC828" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines,
|
||||
"SYSKEY", "Name='" + row.Field<string>("Machine") + "'") + Product_.ToJsonString()
|
||||
});
|
||||
if (row["State"].ToString() == "309")
|
||||
{
|
||||
MainWindow.InfData.Rows.Add(new object[] { row["Machine"],
|
||||
Resources.Step + row["Step"]+ Resources.DispenseException,
|
||||
Selet_Machines(Machines, "SYSKEY", "Name='" + row["Machine"] + "'"),
|
||||
Selet_Machines(Machines, "ID", "Name='" + row["Machine"] + "'")});
|
||||
}
|
||||
Dyelot_CALL.Rows.Remove(row);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user