输送中心添加手动页面状态信息页面设备信息卡
This commit is contained in:
commit
acd37a8245
21 files changed
+610
-31
No files matched your search
@@ -0,0 +1,40 @@
|
||||
<UserControl x:Class="SunlightCentralizedControlManagement_SCCM_.UserControls.DispenseMacInfo"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.UserControls"
|
||||
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
|
||||
xmlns:viewmodel="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ViewModel"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="400" Background="#FF828282">
|
||||
<Grid Margin="5,5,5,5" Background="White" >
|
||||
<Image x:Name="IMAGE" VerticalAlignment="Top" Height="400" Margin="0,5,0,0" />
|
||||
<Grid Margin="0,400,0,0">
|
||||
<TextBlock TextWrapping="Wrap" Text="{x:Static lang:Resources.Machine}" Height="30" VerticalAlignment="Top" FontSize="16"
|
||||
HorizontalAlignment="Left" Width="150" Background="#FFE0E0E0"/>
|
||||
<TextBlock TextWrapping="Wrap" Text="{x:Static lang:Resources.State}" Height="30" VerticalAlignment="Top" FontSize="16"
|
||||
Margin="0,30,0,0" HorizontalAlignment="Left" Width="150" Background="#FFE0E0E0"/>
|
||||
<TextBlock TextWrapping="Wrap" Text="{x:Static lang:Resources.WorkingStatus}" Height="30" VerticalAlignment="Top" FontSize="16"
|
||||
Margin="0,60,0,0" HorizontalAlignment="Left" Width="150" Background="#FFE0E0E0"/>
|
||||
<Border BorderBrush="#FFE0E0E0" BorderThickness="1" Height="30" VerticalAlignment="Top" Margin="150,0,80,0">
|
||||
<TextBlock x:Name="mac" TextWrapping="Wrap" Text="------" FontSize="16" />
|
||||
</Border>
|
||||
<Border BorderBrush="#FFE0E0E0" BorderThickness="1" Height="30" VerticalAlignment="Top" Margin="150,0,0,0" HorizontalAlignment="Right" Width="80">
|
||||
<TextBlock x:Name="macg" TextWrapping="Wrap" Text="------" FontSize="16" />
|
||||
</Border>
|
||||
<Border BorderBrush="#FFE0E0E0" BorderThickness="1" Height="30" VerticalAlignment="Top" Margin="150,30,0,0">
|
||||
<TextBlock x:Name="state" TextWrapping="Wrap" Text="------" FontSize="16" />
|
||||
</Border>
|
||||
<Border BorderBrush="#FFE0E0E0" BorderThickness="1" Height="30" VerticalAlignment="Top" Margin="150,60,0,0">
|
||||
<TextBlock x:Name="WorkingStatus" TextWrapping="Wrap" Text="------" FontSize="16" />
|
||||
</Border>
|
||||
<Button x:Name="State" Content="{x:Static lang:Resources.Information}" HorizontalAlignment="Right" Height="35" Margin="0,0,15,10" VerticalAlignment="Bottom" Width="80" Click="State_Click" Padding="0,4,0,4"/>
|
||||
<Button x:Name="Manual" Content="{x:Static lang:Resources.Manual}" HorizontalAlignment="Right" Height="35" Margin="0,0,115,10" VerticalAlignment="Bottom" Width="80" Click="Manual_Click" Padding="0,4,0,4"/>
|
||||
<Button x:Name="Screen" Content="{x:Static lang:Resources.Screen}" HorizontalAlignment="Right" Height="35" Margin="0,0,215,10" VerticalAlignment="Bottom" Width="80" Click="Screen_Click" Padding="0,4,0,4"/>
|
||||
|
||||
<materialDesign:PackIcon x:Name="mlock" Kind="Lock" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="50" Height="50" Foreground="#FFA98C00" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,70 @@
|
||||
using ScottPlot.Plottables;
|
||||
using SunlightCentralizedControlManagement_SCCM_.EX;
|
||||
using SunlightCentralizedControlManagement_SCCM_.WindowsView;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media.Media3D;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.UserControls
|
||||
{
|
||||
/// <summary>
|
||||
/// info.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class DispenseMacInfo : UserControl
|
||||
{
|
||||
public DispenseMacInfo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void State_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (mlock.Visibility == Visibility.Visible)
|
||||
{
|
||||
MessageBox.Show(Properties.Resources.Not_a,"Dispense",MessageBoxButton.OK);
|
||||
return;
|
||||
}
|
||||
UserMessage userMessage = new UserMessage();
|
||||
userMessage.DispenseMacInfo(mac.Text, macg.Text);
|
||||
userMessage.Show();
|
||||
}
|
||||
|
||||
private void Manual_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (mlock.Visibility == Visibility.Visible)
|
||||
{
|
||||
MessageBox.Show(Properties.Resources.Not_a, "Dispense", MessageBoxButton.OK);
|
||||
return;
|
||||
}
|
||||
ManualDyelot manualDyelot = new ManualDyelot();
|
||||
manualDyelot.MAC(mac.Text);
|
||||
manualDyelot.Show();
|
||||
}
|
||||
|
||||
private void Screen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (mlock.Visibility == Visibility.Visible)
|
||||
{
|
||||
MessageBox.Show(Properties.Resources.Not_a, "Dispense", MessageBoxButton.OK);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,22 +28,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserControls
|
||||
public info()
|
||||
{
|
||||
InitializeComponent();
|
||||
CountDown();
|
||||
|
||||
}
|
||||
|
||||
private void CountDown()
|
||||
{
|
||||
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
|
||||
{
|
||||
Interval = TimeSpan.FromSeconds(10)//秒
|
||||
};
|
||||
timer1s.Tick += Tick_Event_1S;
|
||||
timer1s.Start();
|
||||
}//时间周期初始化
|
||||
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user