添加图片资源,修改工艺启动页面,修改图形页面大小添加关机按钮
This commit is contained in:
commit
d448909269
15 files changed
+82
-91
No files matched your search
@@ -413,6 +413,10 @@
|
||||
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.css" />
|
||||
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.min.css" />
|
||||
<Content Include="Fonts\font-awesome-4.7.0\fonts\fontawesome-webfont.svg" />
|
||||
<Resource Include="Lmage\IconParkMessages.png" />
|
||||
<Resource Include="Lmage\IconParkPlayTwo.png" />
|
||||
<Resource Include="Lmage\StreamlinePlayList4Solid.png" />
|
||||
<Resource Include="Lmage\StreamlinePlayList8.png" />
|
||||
<Resource Include="Lmage\IconParkAutoFocus.png" />
|
||||
<Resource Include="Lmage\FlatColorIconsCancel.png" />
|
||||
<Resource Include="Lmage\IconParkPauseOne.png" />
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
+4
-3
@@ -9,8 +9,9 @@
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d" KeyDown="W_KeyDown"
|
||||
Title="SUNLIGHT 838 b0.0.1 (2024/08/10)"
|
||||
Height="720" Width="1280">
|
||||
<!--WindowState ="Maximized" WindowStyle="None"-->
|
||||
Height="720" Width="1280"
|
||||
WindowState ="Maximized"
|
||||
WindowStyle="None">
|
||||
<Window.Resources>
|
||||
<Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
|
||||
@@ -165,7 +166,7 @@
|
||||
|
||||
<StackPanel Margin="0,0,170,0" HorizontalAlignment="Right"
|
||||
Orientation="Horizontal" FlowDirection="RightToLeft">
|
||||
<Image Height="40" Width="40" VerticalAlignment="Center">
|
||||
<Image Height="40" Width="40" VerticalAlignment="Center" FlowDirection="LeftToRight">
|
||||
<Image.Style>
|
||||
<Style TargetType="Image">
|
||||
<Setter Property="Source" Value="/Lmage/IconParkStopwatch.png"/>
|
||||
|
||||
Generated
+9
@@ -1158,6 +1158,15 @@ namespace DyeingComputer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Shutdown 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Shutdown {
|
||||
get {
|
||||
return ResourceManager.GetString("Shutdown", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 StartTime 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -555,4 +555,7 @@
|
||||
<data name="Manual" xml:space="preserve">
|
||||
<value>Manual</value>
|
||||
</data>
|
||||
<data name="Shutdown" xml:space="preserve">
|
||||
<value>Shutdown</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -555,4 +555,7 @@
|
||||
<data name="Manual" xml:space="preserve">
|
||||
<value>Manual</value>
|
||||
</data>
|
||||
<data name="Shutdown" xml:space="preserve">
|
||||
<value>Shutdown</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -555,4 +555,7 @@
|
||||
<data name="Manual" xml:space="preserve">
|
||||
<value>手动</value>
|
||||
</data>
|
||||
<data name="Shutdown" xml:space="preserve">
|
||||
<value>关机</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -555,4 +555,7 @@
|
||||
<data name="Manual" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Shutdown" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
</root>
|
||||
@@ -17,5 +17,8 @@
|
||||
<TextBlock Name="RX" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="30" Width="100" Margin="5,0,0,0"/>
|
||||
<TextBlock Name="TX" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="30" Width="100" Margin="200,0,0,0"/>
|
||||
|
||||
<Button Content="{x:Static lang:Resources.Shutdown}" x:Name="Shutdown" FontSize="20" HorizontalAlignment="Right" Height="40" Margin="0,0,10,10"
|
||||
VerticalAlignment="Bottom" Width="200" Background="White" Click="Shutdown_Click"/>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -65,13 +65,21 @@ namespace DyeingComputer.View
|
||||
timer1s.Start();
|
||||
}
|
||||
|
||||
|
||||
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||
{
|
||||
RX.Text = MainWindowViewModel.RX.ToString();
|
||||
TX.Text = MainWindowViewModel.TX.ToString();
|
||||
}
|
||||
|
||||
|
||||
private void Shutdown_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show(Properties.Resources.Shutdown, "800", MessageBoxButton.YesNo);
|
||||
if (messageBoxResult == MessageBoxResult.No) return;
|
||||
if (messageBoxResult == MessageBoxResult.Yes)
|
||||
{
|
||||
// Application.Current.Shutdown();
|
||||
System.Environment.Exit(0);//退出
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
-15
@@ -10,7 +10,7 @@
|
||||
xmlns:viewmodel="clr-namespace:DyeingComputer.ViewModel"
|
||||
xmlns:ConvertMoels="clr-namespace:DyeingComputer.ConvertMoels"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:WorkOrderViewModel}"
|
||||
mc:Ignorable="d" KeyDown="UserControl_KeyDown"
|
||||
mc:Ignorable="d"
|
||||
Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="630" d:DesignWidth="1280" >
|
||||
<UserControl.Resources>
|
||||
@@ -30,7 +30,7 @@
|
||||
VerticalAlignment="Top" Width="200" Background="White" Click="WorkOrderView_redy_Click"/>
|
||||
|
||||
<DataGrid x:Name="Grid" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
|
||||
Margin="0,40,0,300" d:ItemsSource="{d:SampleData ItemCount=20}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
Margin="0,40,0,400" d:ItemsSource="{d:SampleData ItemCount=20}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||
@@ -100,20 +100,14 @@
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Remark}" Width="*" Binding="{Binding Remark}" IsReadOnly="True"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<Grid VerticalAlignment="Bottom" Height="300">
|
||||
<Grid VerticalAlignment="Bottom" Height="400">
|
||||
<ContentControl x:Name="Picture" Margin="0,0,200,0"/>
|
||||
|
||||
<Button x:Name="inf" FontSize="20" HorizontalAlignment="Right" Height="100" VerticalAlignment="Top" Width="200" Click="inf_Click">
|
||||
<Button.Background>
|
||||
<ImageBrush ImageSource="/Lmage/inf.png" TileMode="None" Stretch="Uniform"/>
|
||||
</Button.Background>
|
||||
</Button>
|
||||
<Button x:Name="start" FontSize="20" HorizontalAlignment="Right" Height="200" VerticalAlignment="Bottom" Width="200" Click="start_Click" >
|
||||
<Button.Background>
|
||||
<ImageBrush ImageSource="/Lmage/start3.png" TileMode="None"/>
|
||||
</Button.Background>
|
||||
</Button>
|
||||
|
||||
<Image Source="/Lmage/IconParkMessages.png" HorizontalAlignment="Right" Height="200"
|
||||
VerticalAlignment="Top" Width="200" MouseLeftButtonDown="Image_MouseLeftButtonDown"
|
||||
MouseLeftButtonUp="Image_MouseLeftButtonUp"/>
|
||||
<Image Source="/Lmage/IconParkPlayTwo.png" HorizontalAlignment="Right" Height="200"
|
||||
VerticalAlignment="Bottom" Width="200" MouseLeftButtonDown="Image_MouseLeftButtonDown1"
|
||||
MouseLeftButtonUp="Image_MouseLeftButtonUp1"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
+31
-71
@@ -101,7 +101,6 @@ namespace DyeingComputer.View
|
||||
_lock = null;
|
||||
}
|
||||
|
||||
|
||||
private void WorkOrderView_lock_Click(object sender, RoutedEventArgs e)//锁定按钮
|
||||
{
|
||||
if (WorkOrder_Numder == null) return;
|
||||
@@ -185,57 +184,46 @@ namespace DyeingComputer.View
|
||||
}
|
||||
}
|
||||
|
||||
private void UserControl_KeyDown(object sender, KeyEventArgs e) //键盘监控
|
||||
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Y) //按键
|
||||
((System.Windows.Controls.Image)sender).RenderTransform = new ScaleTransform(0.9, 0.9);
|
||||
}
|
||||
private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
((System.Windows.Controls.Image)sender).RenderTransform = Transform.Identity;
|
||||
if (string.IsNullOrEmpty(WorkOrder_Numder)) return;
|
||||
|
||||
DataGrid dataGrid = new DataGrid();
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Step, Width = 60, Binding = new Binding("Step") });
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Directives, Width = 300, Binding = new Binding("StepName") });
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.ParameterSet, Width = 500, Binding = new Binding("ParameterName") });
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Remark, Width = 600, Binding = new Binding("Remark") });
|
||||
dataGrid.AutoGenerateColumns = false;
|
||||
dataGrid.CanUserReorderColumns = false;
|
||||
dataGrid.CanUserSortColumns = false;
|
||||
dataGrid.CanUserResizeRows = false;
|
||||
dataGrid.CanUserResizeColumns = false;
|
||||
dataGrid.ColumnHeaderHeight = 40;
|
||||
dataGrid.FontSize = 25;
|
||||
dataGrid.HorizontalGridLinesBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 201, 201, 201));
|
||||
dataGrid.VerticalGridLinesBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 201, 201, 201));
|
||||
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
|
||||
updata_temp.Clear(); //使用前清缓存
|
||||
updata_temp.Add("State", 101);
|
||||
SQLiteHelpers.Update("WorkOrder", updata_temp, "WorkOrder='" + WorkOrder_Numder + "'", null);
|
||||
|
||||
DataTable WorkorderSteps = SQLiteHelpers.ExecuteDataSet(
|
||||
"select * from WorkorderSteps where WorkOrder='" + WorkOrder_Numder + "'", null).Tables[0]; //读取表写入缓存
|
||||
MainWindowViewModel.ProgramName = Process_Name;
|
||||
SQLiteHelpers.Delete("RUN", null, null); //删除run信息
|
||||
DataTable data_t = new DataTable();
|
||||
data_t = WorkorderSteps.Clone();
|
||||
int a = WorkorderSteps.Rows.Count;
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
data_t.Clear();//清空
|
||||
DataRow dt = WorkorderSteps.Rows[i];//行转
|
||||
DataRow dr = data_t.NewRow();
|
||||
dr.ItemArray = dt.ItemArray;
|
||||
dr.BeginEdit(); //添加订单号
|
||||
dr["ProgramID"] = Process_id;
|
||||
dr["Program"] = MainWindowViewModel.ProgramName;
|
||||
dr.EndEdit();
|
||||
data_t.Rows.InsertAt(dr, 0); //行转换
|
||||
|
||||
SQLiteHelpers.InsertData("RUN", SQLiteHelpers.DataTableToDictionary(data_t));//行插入
|
||||
}
|
||||
|
||||
string sql_script = "select * from WorkorderSteps where WorkOrder='" + WorkOrder_Numder + "'";
|
||||
DataTable inf = SQLiteHelpers.ExecuteDataSet(sql_script, null).Tables[0]; //读取表写入缓存
|
||||
SQLiteHelpers.Close(); //关闭连接
|
||||
dataGrid.ItemsSource = inf.DefaultView; //转换显示计划表
|
||||
|
||||
if (Process_id != null) //选定工艺有效跳转准备
|
||||
Picture.Content = dataGrid;
|
||||
}//信息
|
||||
private void Image_MouseLeftButtonDown1(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MainWindowViewModel.WorkNumder = WorkOrder_Numder;
|
||||
TechnologicalProcessView.workName = Process_id;
|
||||
MainWindowViewModel.SYS_REDYE = 0;
|
||||
|
||||
MainWindowViewModel.ViewID = 1;
|
||||
var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is MainWindow) as MainWindow;//跨页面
|
||||
_mainWindow.container.Content = new TechnologicalProcessView();//获取控件
|
||||
((System.Windows.Controls.Image)sender).RenderTransform = new ScaleTransform(0.9, 0.9);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void start_Click(object sender, RoutedEventArgs e)//开始
|
||||
private void Image_MouseLeftButtonUp1(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
((System.Windows.Controls.Image)sender).RenderTransform = Transform.Identity;
|
||||
if (string.IsNullOrEmpty(WorkOrder_Numder)) return;
|
||||
if (_lock == "1")
|
||||
{
|
||||
@@ -324,35 +312,7 @@ namespace DyeingComputer.View
|
||||
var _mainWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(window => window is MainWindow) as MainWindow;//跨页面
|
||||
_mainWindow.container.Content = new TechnologicalProcessView();//获取控件
|
||||
}
|
||||
}
|
||||
private void inf_Click(object sender, RoutedEventArgs e)//信息
|
||||
{
|
||||
if (string.IsNullOrEmpty(WorkOrder_Numder)) return;
|
||||
|
||||
DataGrid dataGrid = new DataGrid();
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Step, Width = 60, Binding = new Binding("Step") });
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Directives, Width = 300, Binding = new Binding("StepName") });
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.ParameterSet, Width =500, Binding = new Binding("ParameterName") });
|
||||
dataGrid.Columns.Add(new DataGridTextColumn() { Header = Properties.Resources.Remark, Width = 600, Binding = new Binding("Remark") });
|
||||
dataGrid.AutoGenerateColumns = false;
|
||||
dataGrid.CanUserReorderColumns = false;
|
||||
dataGrid.CanUserSortColumns = false;
|
||||
dataGrid.CanUserResizeRows = false;
|
||||
dataGrid.CanUserResizeColumns = false;
|
||||
dataGrid.ColumnHeaderHeight = 40;
|
||||
dataGrid.FontSize = 25;
|
||||
dataGrid.HorizontalGridLinesBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 201, 201, 201));
|
||||
dataGrid.VerticalGridLinesBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 201, 201, 201));
|
||||
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
string sql_script = "select * from WorkorderSteps where WorkOrder='"+ WorkOrder_Numder+"'";
|
||||
DataTable inf = SQLiteHelpers.ExecuteDataSet(sql_script, null).Tables[0]; //读取表写入缓存
|
||||
SQLiteHelpers.Close(); //关闭连接
|
||||
dataGrid.ItemsSource = inf.DefaultView; //转换显示计划表
|
||||
|
||||
Picture.Content = dataGrid;
|
||||
}
|
||||
}//开始
|
||||
|
||||
private void TEMP()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user