Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
91541e2af8
4 files changed
+39
-37
No files matched your search
@@ -197,9 +197,9 @@
|
|||||||
<Button Content="{x:Static lang:Resources.Jump}" x:Name="ProgramgroupView_Jump" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
<Button Content="{x:Static lang:Resources.Jump}" x:Name="ProgramgroupView_Jump" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
Click="ProgramgroupView_Jump_Click" IsEnabled="{Binding UserButton}"/>
|
Click="ProgramgroupView_Jump_Click" IsEnabled="{Binding UserButton}"/>
|
||||||
<Button Content="{x:Static lang:Resources.R_P}" x:Name="ProgramgroupView_run" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
<Button Content="{x:Static lang:Resources.R_P}" x:Name="ProgramgroupView_run" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
Click="ProgramgroupView_run_Click" Command="{Binding ProgramgroupView_run}"/>
|
Command="{Binding ProgramgroupView_run}"/>
|
||||||
<Button Content="{x:Static lang:Resources.StopProcess}" x:Name="ProgramgroupView_stop" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
<Button Content="{x:Static lang:Resources.StopProcess}" x:Name="ProgramgroupView_stop" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
Click="ProgramgroupView_stop_Click" IsEnabled="{Binding UserButton}"/>
|
IsEnabled="{Binding UserButton}" Command="{Binding ProgramgroupView_stop}"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -56,14 +56,14 @@ namespace DyeingComputer.View
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
//Grid.DataContext = new MainWindowViewModel();
|
//Grid.DataContext = new MainWindowViewModel();
|
||||||
// FocusManager.SetFocusedElement(Grid, Grid);
|
// FocusManager.SetFocusedElement(Grid, Grid);
|
||||||
// if (workName != null)
|
// if (workName != null)
|
||||||
// {
|
// {
|
||||||
// TechnologicalProcess_Import();
|
// TechnologicalProcess_Import();
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
TechnologicalProcess_sql();
|
TechnologicalProcess_sql();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// ProgramgroupView_edit.IsEnabled = false;
|
// ProgramgroupView_edit.IsEnabled = false;
|
||||||
// ProgramgroupView_del.IsEnabled = false;
|
// ProgramgroupView_del.IsEnabled = false;
|
||||||
@@ -494,12 +494,7 @@ namespace DyeingComputer.View
|
|||||||
{
|
{
|
||||||
Parameter_set.Visibility = Visibility.Visible;
|
Parameter_set.Visibility = Visibility.Visible;
|
||||||
Receip.Visibility = Visibility.Collapsed;
|
Receip.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProgramgroupView_run_Click(object sender, RoutedEventArgs e)//运行/暂停
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ProgramgroupView_Jump_Click(object sender, RoutedEventArgs e)
|
private void ProgramgroupView_Jump_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -510,30 +505,7 @@ namespace DyeingComputer.View
|
|||||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Jump", "STEP = " + ID+
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Jump", "STEP = " + ID+
|
||||||
";StepID=" + Numder + ";P1=" + P1 + ";P2=" + P2 + ";P3=" + P3 + ";P4=" + P4 + ";P5=" + P5);
|
";StepID=" + Numder + ";P1=" + P1 + ";P2=" + P2 + ";P3=" + P3 + ";P4=" + P4 + ";P5=" + P5);
|
||||||
|
|
||||||
}//跳步
|
}//跳步
|
||||||
|
|
||||||
private void ProgramgroupView_stop_Click(object sender, RoutedEventArgs e)//结束工艺
|
|
||||||
{
|
|
||||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "WORK_RUN = STOP", MainWindowViewModel.WORK_RUN.ToString());
|
|
||||||
|
|
||||||
MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show(Properties.Resources.StopProcess, "800", MessageBoxButton.OKCancel);
|
|
||||||
if (messageBoxResult == MessageBoxResult.OK)
|
|
||||||
{
|
|
||||||
MainWindowViewModel.WORK_RUN = 0;// 运行时停止键为
|
|
||||||
MainWindowViewModel.DIDETime = 0;
|
|
||||||
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "PROCESS_END", MainWindowViewModel.WORK_RUN.ToString());
|
|
||||||
|
|
||||||
MainWindowViewModel.dt_TP.Rows.Clear();
|
|
||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
|
||||||
SQLiteHelpers.Delete("RUN", null, null);
|
|
||||||
SQLiteHelpers.Close(); //关闭连接
|
|
||||||
ProgramgroupView_stop.IsEnabled = false;
|
|
||||||
ProgramgroupView_Insert.IsEnabled = false;
|
|
||||||
ProgramgroupView_del.IsEnabled = false;
|
|
||||||
ProgramgroupView_edit.IsEnabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -125,6 +125,10 @@ namespace DyeingComputer.View
|
|||||||
MainWindowViewModel.WorkNumder = DateTime.Now.ToString("yyMMddHHmmss");
|
MainWindowViewModel.WorkNumder = DateTime.Now.ToString("yyMMddHHmmss");
|
||||||
TechnologicalProcessView.workName = e.ID;
|
TechnologicalProcessView.workName = e.ID;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is MainWindow) as MainWindow;//跨页面
|
var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is MainWindow) as MainWindow;//跨页面
|
||||||
_mainWindow.container.Content = new TechnologicalProcessView();//获取控件
|
_mainWindow.container.Content = new TechnologicalProcessView();//获取控件
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
|
|
||||||
ProgramgroupView_run = new RelayCommand(
|
ProgramgroupView_run = new RelayCommand(
|
||||||
execute:ProgramgroupView_run_ );//开始/暂停事件
|
execute:ProgramgroupView_run_ );//开始/暂停事件
|
||||||
|
ProgramgroupView_stop = new RelayCommand(
|
||||||
|
execute: ProgramgroupView_stop_);//结束事件
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -226,6 +228,30 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public ICommand ProgramgroupView_run { get; }
|
public ICommand ProgramgroupView_run { get; }
|
||||||
|
private void ProgramgroupView_stop_()//结束
|
||||||
|
{
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "WORK_RUN = STOP", MainWindowViewModel.WORK_RUN.ToString());
|
||||||
|
|
||||||
|
MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show(Properties.Resources.StopProcess, "800", MessageBoxButton.OKCancel);
|
||||||
|
if (messageBoxResult == MessageBoxResult.OK)
|
||||||
|
{
|
||||||
|
MainWindowViewModel.WORK_RUN = 0;// 运行时停止键为
|
||||||
|
MainWindowViewModel.DIDETime = 0;
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "PROCESS_END", MainWindowViewModel.WORK_RUN.ToString());
|
||||||
|
|
||||||
|
MainWindowViewModel.dt_TP.Rows.Clear();
|
||||||
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
SQLiteHelpers.Delete("RUN", null, null);
|
||||||
|
SQLiteHelpers.Close(); //关闭连接
|
||||||
|
|
||||||
|
UserButton = false;
|
||||||
|
IsInteractive = false;
|
||||||
|
ProgramName = null;
|
||||||
|
WorkNumder = "----------";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ICommand ProgramgroupView_stop { get; }
|
||||||
bool _isInteractive;
|
bool _isInteractive;
|
||||||
public bool IsInteractive//步骤表交互选择
|
public bool IsInteractive//步骤表交互选择
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user