锁定功能
This commit is contained in:
commit
54addaff17
4 files changed
+113
-7
No files matched your search
+10
-2
@@ -107,8 +107,8 @@
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White"
|
||||
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" BorderBrush="{x:Null}"
|
||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" ContextMenuOpening="Gridstep_ContextMenuOpening">
|
||||
<DataGrid.RowStyle>
|
||||
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
||||
<DataGrid.RowStyle >
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="IsHitTestVisible" Value="{Binding DataContext.IsInteractive,
|
||||
RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||
@@ -210,6 +210,14 @@
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Width="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>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="3" x:Name="scr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="700,0,0,0">
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
Curve.IsEnabled = true;
|
||||
Screen.IsEnabled = true;
|
||||
Receipt.IsEnabled = true;
|
||||
LOCK_XML.IsEnabled = true;
|
||||
TechnologicalProcess_bool = true;
|
||||
IsInteractive = false;
|
||||
|
||||
@@ -202,6 +203,33 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
dyelotView.Dyelot(workOrder);
|
||||
Picture.Content = dyelotView;
|
||||
}//单据
|
||||
private void ListViewItem_LOCK_XML(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
string mode = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First().Field<string>("LOCK");
|
||||
|
||||
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
||||
dat_821.Clear();
|
||||
|
||||
if (mode != "TRUE")
|
||||
{
|
||||
dat_821.Add("LOCK", "TRUE");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "Name='" + machine + "'", "TRUE");
|
||||
}
|
||||
else
|
||||
{
|
||||
dat_821.Add("LOCK", "FALSE");
|
||||
MainWindowViewModel.Updata_Machines(MainWindowViewModel.Machines, "LOCK", "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_821.ToJsonString()
|
||||
});
|
||||
|
||||
}//锁定
|
||||
private void ListViewItem_Curve(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
log.Visibility = Visibility.Collapsed;
|
||||
@@ -579,8 +607,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
RaisePropertyChanged("TechnologicalProcess_View");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ObservableCollection<TechnologicalM> TechnologicalMachine_View
|
||||
{
|
||||
get { return technologicalMachine_View; }
|
||||
|
||||
Reference in new issue
Block a user