添加取样页面及相关资源
This commit is contained in:
commit
e1a567d1f7
12 files changed
+178
-11
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<Window x:Class="DyeingComputer.Windows.Sampling"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:DyeingComputer.Windows"
|
||||
xmlns:lang="clr-namespace:DyeingComputer.Properties"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Loaded ="Window_Loaded"
|
||||
ResizeMode="NoResize"
|
||||
mc:Ignorable="d"
|
||||
Title="SUNLIGHT 800" Height="200" Width="400">
|
||||
<Grid>
|
||||
<Image x:Name="NOT" Height="100" Width="100" VerticalAlignment="Bottom" FlowDirection="LeftToRight"
|
||||
HorizontalAlignment="Left" Margin="25,0,0,27" Source="/Lmage/StreamlineUltimateColorColorPaletteSample1.png"/>
|
||||
|
||||
<TextBox x:Name="TIME_" HorizontalAlignment="Right" Height="40" Margin="0,0,20,80"
|
||||
TextWrapping="Wrap" VerticalAlignment="Bottom" Width="134" FontSize="30" IsReadOnly="True"
|
||||
BorderBrush="{x:Null}" />
|
||||
<TextBox HorizontalAlignment="Right" Height="40" Margin="0,0,150,80" Text="{x:Static lang:Resources.Sampling}"
|
||||
TextWrapping="Wrap" VerticalAlignment="Bottom" Width="80" FontSize="25" IsReadOnly="True"
|
||||
Background="{x:Null}" Foreground="Black" BorderBrush="{x:Null}" />
|
||||
|
||||
<Button Content="{x:Static lang:Resources.ADD}" HorizontalAlignment="Right" Height="35" Margin="50,70,150,20"
|
||||
VerticalAlignment="Bottom" Width="80" Click="ADD_Click" Name="ADD_"/>
|
||||
<Button Content="{x:Static lang:Resources.Confirm}" HorizontalAlignment="Right" Height="35" Margin="50,70,20,20"
|
||||
VerticalAlignment="Bottom" Width="80" Click="Confirm_Click" x:Name="Confirm_"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,75 @@
|
||||
using DyeingComputer.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
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.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
using System.Xml.Linq;
|
||||
using static DyeingComputer.UserClass.SqliteHelper;
|
||||
using static DyeingComputer.Windows.ViewStep;
|
||||
|
||||
namespace DyeingComputer.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// ViewProgram.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class Sampling : Window
|
||||
{
|
||||
DateTime times = DateTime.Now;
|
||||
TimeSpan timeSpan;
|
||||
public int CALL_time = 60;
|
||||
public Sampling()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
NOT.Visibility = Visibility.Collapsed;
|
||||
Confirm_.IsEnabled = false;
|
||||
ADD_.IsEnabled = false;
|
||||
timeSpan = new TimeSpan(0, 0, 0, CALL_time);
|
||||
DispatcherTimer disTimer = new DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromMilliseconds(950) //毫秒
|
||||
};
|
||||
disTimer.Tick += DisTimer_1S;
|
||||
disTimer.Start();//计时开始
|
||||
}
|
||||
void DisTimer_1S(object sender, EventArgs e)
|
||||
{
|
||||
TimeSpan timeSpanT = DateTime.Now - times;
|
||||
TIME_.Text = timeSpanT.ToString(@"hh\:mm\:ss");
|
||||
|
||||
if (timeSpanT > timeSpan)
|
||||
{
|
||||
Confirm_.IsEnabled = true;
|
||||
ADD_.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void Confirm_Click(object sender, RoutedEventArgs e)//确认
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ADD_Click(object sender, RoutedEventArgs e)//
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:local="clr-namespace:DyeingComputer.Windows"
|
||||
xmlns:lang="clr-namespace:DyeingComputer.Properties"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Loaded ="Window_Loaded"
|
||||
ResizeMode="NoResize"
|
||||
mc:Ignorable="d"
|
||||
Title="SUNLIGHT 800" Height="400" Width="400">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DyeingComputer.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
@@ -29,14 +30,18 @@ namespace DyeingComputer.Windows
|
||||
public partial class UserCall : Window
|
||||
{
|
||||
DateTime times = DateTime.Now;
|
||||
TimeSpan timeSpan5=new TimeSpan(0,0,0,5);
|
||||
|
||||
TimeSpan timeSpan5;
|
||||
public string Inf_DAT;//信息
|
||||
public int CALL_time = 5;//
|
||||
public UserCall()
|
||||
{
|
||||
InitializeComponent();
|
||||
NOT.Visibility =Visibility.Collapsed;
|
||||
InitializeComponent();
|
||||
}
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
NOT.Visibility = Visibility.Collapsed;
|
||||
Muffling_.IsEnabled = false;
|
||||
|
||||
timeSpan5 = new TimeSpan(0, 0, 0, CALL_time);
|
||||
DispatcherTimer disTimer = new DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromMilliseconds(950) //毫秒
|
||||
@@ -50,10 +55,13 @@ namespace DyeingComputer.Windows
|
||||
TIME_.Text = timeSpan.ToString(@"hh\:mm\:ss");
|
||||
|
||||
if (timeSpan>timeSpan5) Muffling_.IsEnabled=true;//5秒后允许禁英
|
||||
|
||||
INF_DATA.Text = Inf_DAT;
|
||||
}
|
||||
|
||||
private void YES_Click(object sender, RoutedEventArgs e)//确认
|
||||
{
|
||||
MainWindowViewModel.UserCall_OK = true;
|
||||
this.Close(); //关闭窗口
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user