Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
aaa4f1282b
10 files changed
+190
-58
No files matched your search
Generated
+27
@@ -186,6 +186,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Before 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Before {
|
||||
get {
|
||||
return ResourceManager.GetString("Before", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Beginning 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -510,6 +519,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 DayAfter 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string DayAfter {
|
||||
get {
|
||||
return ResourceManager.GetString("DayAfter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Delete 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -2292,6 +2310,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Today 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Today {
|
||||
get {
|
||||
return ResourceManager.GetString("Today", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Type 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -915,4 +915,13 @@
|
||||
<data name="Group" xml:space="preserve">
|
||||
<value>Group</value>
|
||||
</data>
|
||||
<data name="Before" xml:space="preserve">
|
||||
<value>Before</value>
|
||||
</data>
|
||||
<data name="Today" xml:space="preserve">
|
||||
<value>Today</value>
|
||||
</data>
|
||||
<data name="DayAfter" xml:space="preserve">
|
||||
<value>Day After</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -915,4 +915,13 @@
|
||||
<data name="Group" xml:space="preserve">
|
||||
<value>Group</value>
|
||||
</data>
|
||||
<data name="Before" xml:space="preserve">
|
||||
<value>Before</value>
|
||||
</data>
|
||||
<data name="Today" xml:space="preserve">
|
||||
<value>Today</value>
|
||||
</data>
|
||||
<data name="DayAfter" xml:space="preserve">
|
||||
<value>DayAfter</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -915,4 +915,13 @@
|
||||
<data name="Group" xml:space="preserve">
|
||||
<value>组</value>
|
||||
</data>
|
||||
<data name="Before" xml:space="preserve">
|
||||
<value>前一天</value>
|
||||
</data>
|
||||
<data name="Today" xml:space="preserve">
|
||||
<value>今天</value>
|
||||
</data>
|
||||
<data name="DayAfter" xml:space="preserve">
|
||||
<value>后一天</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -879,24 +879,24 @@
|
||||
<data name="ProductionPlanning" xml:space="preserve">
|
||||
<value>生產計劃</value>
|
||||
</data>
|
||||
<data name="Conveyor" xml:space="preserve">
|
||||
<value>輸送</value>
|
||||
</data>
|
||||
<data name="continue" xml:space="preserve">
|
||||
<value>繼續</value>
|
||||
</data>
|
||||
<data name="Stop" xml:space="preserve">
|
||||
<value>停止</value>
|
||||
</data>
|
||||
<data name="Resume" xml:space="preserve">
|
||||
<value>恢復</value>
|
||||
</data>
|
||||
<data name="Stop" xml:space="preserve">
|
||||
<value>停止</value>
|
||||
</data>
|
||||
<data name="DyeingMachine" xml:space="preserve">
|
||||
<value>染色機</value>
|
||||
</data>
|
||||
<data name="Receipt" xml:space="preserve">
|
||||
<value>單據</value>
|
||||
</data>
|
||||
<data name="Conveyor" xml:space="preserve">
|
||||
<value>輸送</value>
|
||||
</data>
|
||||
<data name="Date" xml:space="preserve">
|
||||
<value>日期</value>
|
||||
</data>
|
||||
|
||||
+30
-41
@@ -9,52 +9,17 @@
|
||||
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
Loaded="UserControl_Loaded"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:CurveDiagramViewModel}"
|
||||
d:DesignHeight="900" d:DesignWidth="1800">
|
||||
<Grid>
|
||||
<DataGrid x:Name="Griddata" AlternationCount="2" IsReadOnly="True" SelectionChanged="Griddata_SelectionChanged"
|
||||
Margin="0,0,0,57" d:ItemsSource="{d:SampleData ItemCount=999}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All"
|
||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column"
|
||||
Background="White" SelectionMode="Single" FontSize="15" TabIndex="1" Focusable="True" BorderBrush="Black" HorizontalAlignment="Right" Width="150">
|
||||
<DataGrid.RowStyle >
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="FontSize" Value="25" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
||||
<Setter Property="Background" Value="#FFFFFFFF" />
|
||||
</Trigger>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
||||
<Setter Property="Background" Value="#FFF0F0F0" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="False"/>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="MinWidth" Value="20"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#FFC0C0C0"/>
|
||||
<Setter Property="BorderBrush" Value="#FFC0C0C0"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.Columns>
|
||||
<!--列信息绑定-->
|
||||
<DataGridTextColumn Header="{x:Static lang:Resources.Machine}" Binding="{Binding Name}" Width="auto" IsReadOnly="True"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<ListView x:Name="machines" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD"
|
||||
HorizontalAlignment="Right" Width="300" Margin="0,60,0,0">
|
||||
</ListView>
|
||||
|
||||
<lvc:CartesianChart x:Name="OscChart" MinWidth="1280" MinHeight="600" EasingFunction="{x:Null}"
|
||||
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}" Margin="0,0,300,60">
|
||||
Series="{Binding Series}" YAxes="{Binding YAxes}" XAxes="{Binding XAxes}" Margin="0,0,300,60">
|
||||
<lvc:CartesianChart.Style>
|
||||
<Style TargetType="{x:Type lvc:CartesianChart}">
|
||||
<Setter Property="ZoomMode" Value="PanX"/>
|
||||
@@ -76,6 +41,30 @@
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Before" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<materialDesign:PackIcon Kind="NavigateBefore" Width="25" Height="40" Margin="10" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{x:Static lang:Resources.Before}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Today" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<materialDesign:PackIcon Kind="NavigationVariantOutline" Width="25" Height="40" Margin="10" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{x:Static lang:Resources.Today}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_DayAfter" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<materialDesign:PackIcon Kind="NavigateNext" Width="25" Height="40" Margin="10" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{x:Static lang:Resources.DayAfter}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||
<ListViewItem Height="60" x:Name="WNumder">
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
|
||||
+96
-7
@@ -1,6 +1,9 @@
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using OpenTK.Graphics.ES11;
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -32,7 +35,82 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
Sdatepicker.Language = XmlLanguage.GetLanguage(Configini.IniReadvalue("SYS", "Language"));
|
||||
Edatepicker.Language = XmlLanguage.GetLanguage(Configini.IniReadvalue("SYS", "Language"));
|
||||
Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView;
|
||||
}
|
||||
|
||||
public static object Selet_Machines(DataTable DB, string name, int key)//查询
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (DB)
|
||||
{
|
||||
DataRow drEmployee = DB.Rows[key];
|
||||
object index = drEmployee.Field<object>(name);
|
||||
return index;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// LogGing.LogGingDATA("SDTD:" + ex.ToString());
|
||||
return "ERR";
|
||||
}
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView;
|
||||
ListViewItem[] listViewItems =new ListViewItem[999];
|
||||
|
||||
ListView[] listView = new ListView[999];
|
||||
|
||||
for (int i = 0; i < MainWindowViewModel.Machines.Rows.Count; i++)
|
||||
{
|
||||
StackPanel stackPanel = new StackPanel();
|
||||
stackPanel.Orientation = Orientation.Horizontal;
|
||||
|
||||
TextBlock textBlock = new TextBlock();
|
||||
|
||||
PackIcon packIcon = new PackIcon();
|
||||
packIcon.Kind = PackIconKind.ChartBellCurve; //曲线图标
|
||||
packIcon.Width = 25;
|
||||
packIcon.Height = 40;
|
||||
packIcon.VerticalAlignment = VerticalAlignment.Center;
|
||||
|
||||
stackPanel.Children.Add(packIcon);
|
||||
stackPanel.Children.Add(textBlock);
|
||||
|
||||
|
||||
/* inf[i] = new View.info(); Width="25" Height="40" Margin="10" VerticalAlignment="Center"/>
|
||||
inf[i].Margin = new Thickness(5, 5, 0, 5);
|
||||
inf[i].Width = 300;
|
||||
inf[i].Height = 400;
|
||||
inf[i].name.Text = Selet_Machines(MainWindowViewModel.Machines, "name", i).ToString();
|
||||
|
||||
string State_ = Selet_Machines(MainWindowViewModel.Machines, "State", i).ToString();
|
||||
if (State_ == "101")
|
||||
{ inf[i].name.Background = new SolidColorBrush(Color.FromRgb(100, 100, 100)); }
|
||||
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)); }
|
||||
else
|
||||
{ inf[i].name.Background = new SolidColorBrush(Color.FromRgb(255, 0, 0)); }
|
||||
|
||||
inf[i].temp.Text = (Selet_Machines(MainWindowViewModel.Machines, "Temperature", i) + "°C").ToString();
|
||||
inf[i].Process.Text = Selet_Machines(MainWindowViewModel.Machines, "Process", i).ToString();
|
||||
inf[i].Step.Text = Selet_Machines(MainWindowViewModel.Machines, "Step", i).ToString();
|
||||
inf[i].Message.Text = Selet_Machines(MainWindowViewModel.Machines, "Message", i).ToString();
|
||||
inf[i].Orders.Text = Selet_Machines(MainWindowViewModel.Machines, "Orders", i).ToString();
|
||||
inf[i].time.Text = Selet_Machines(MainWindowViewModel.Machines, "time", i).ToString();
|
||||
|
||||
WholeView.Children.Add(inf[i]);*/
|
||||
listViewItems[i]= new ListViewItem();
|
||||
listViewItems[i].Tag = stackPanel;
|
||||
// listViewItems[i].
|
||||
|
||||
// listView[i].Template = Selet_Machines(MainWindowViewModel.Machines,"name",i);
|
||||
|
||||
machines.Items.Add(listView[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -40,11 +118,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
|
||||
}
|
||||
|
||||
private void Paused_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DatePicker_Today(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
@@ -56,5 +129,21 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListViewItem_Before(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListViewItem_Today(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListViewItem_DayAfter(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<ScrollViewer x:Name="scr" Margin="0" VerticalScrollBarVisibility="Auto">
|
||||
<ScrollViewer Margin="0" VerticalScrollBarVisibility="Auto">
|
||||
<WrapPanel Orientation="Horizontal" x:Name="WholeView" Background="White">
|
||||
|
||||
</WrapPanel>
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
CountDown();
|
||||
}
|
||||
|
||||
public static string SYS_WorkNumder = "738891980000"; //工单号
|
||||
public static string SYS_WorkNumder; //工单号
|
||||
public static int SYS_AT1; //附缸1-3
|
||||
public static int SYS_AT2;
|
||||
public static int SYS_AT3;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<Grid FocusManager.FocusedElement="{Binding ElementName=boxNAME}">
|
||||
<TextBlock Text="{x:Static lang:Resources.Code}" HorizontalAlignment="Left" Height="30" Margin="10,20,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="130" FontSize="20" Background="#FFEFEEEE"/>
|
||||
<TextBlock Text="{x:Static lang:Resources.Function}" HorizontalAlignment="Left" Height="30" Margin="10,60,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="130" FontSize="20" Background="#FFEFEEEE"/>
|
||||
<ComboBox x:Name="boxID" HorizontalAlignment="Right" Height="30" Margin="0,60,10,0" VerticalAlignment="Top" Width="230" FontSize="20" SelectionChanged="BoxID_SelectionChanged" BorderBrush="#FF5100E0"/>
|
||||
<ComboBox x:Name="boxID" HorizontalAlignment="Right" Height="30" Margin="0,60,10,0" VerticalAlignment="Top" Width="230" FontSize="18" SelectionChanged="BoxID_SelectionChanged" BorderBrush="#FF5100E0"/>
|
||||
<TextBox x:Name="boxNAME" HorizontalAlignment="Right" Height="30" Margin="0,20,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True" ToolTip="code"
|
||||
TextChanged="TextBox_TextChanged" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Left" MaxLength="3" CaretBrush="#FF5100E0" BorderBrush="#FF5100E0"/>
|
||||
TextChanged="TextBox_TextChanged" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="18" HorizontalContentAlignment="Left" MaxLength="3" CaretBrush="#FF5100E0" BorderBrush="#FF5100E0"/>
|
||||
|
||||
<TextBlock x:Name="P1N" HorizontalAlignment="Left" Height="30" Margin="10,120,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="130" FontSize="20" Background="#FFEFEEEE" Visibility="Hidden"/>
|
||||
<TextBox x:Name="P1" HorizontalAlignment="Right" Height="30" Margin="0,120,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
||||
|
||||
Reference in new issue
Block a user