添加通知页面

This commit is contained in:
sc committed 2025-08-01 00:32:41 +08:00
commit 928dc8099d
11 files changed
+129 -2

No files matched your search

+9
View File
@@ -197,6 +197,9 @@
<Compile Include="Windows\InputBox.xaml.cs">
<DependentUpon>InputBox.xaml</DependentUpon>
</Compile>
<Compile Include="Windows\UserCall.xaml.cs">
<DependentUpon>UserCall.xaml</DependentUpon>
</Compile>
<Compile Include="Windows\ViewProgram.xaml.cs">
<DependentUpon>ViewProgram.xaml</DependentUpon>
</Compile>
@@ -271,6 +274,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Windows\UserCall.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Windows\ViewProgram.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -413,6 +420,8 @@
<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\FxemojiBellcancellation.png" />
<Resource Include="Lmage\FxemojiRingingbell.png" />
<Resource Include="Lmage\IconParkMessages.png" />
<Resource Include="Lmage\IconParkPlayTwo.png" />
<Resource Include="Lmage\StreamlinePlayList4Solid.png" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

+9
View File
@@ -762,6 +762,15 @@ namespace DyeingComputer.Properties {
}
}
/// <summary>
/// 查找类似 Muffling 的本地化字符串。
/// </summary>
public static string Muffling {
get {
return ResourceManager.GetString("Muffling", resourceCulture);
}
}
/// <summary>
/// 查找类似 NAME 的本地化字符串。
/// </summary>
+3
View File
@@ -579,4 +579,7 @@
<data name="Total" xml:space="preserve">
<value>Total</value>
</data>
<data name="Muffling" xml:space="preserve">
<value>Muffling</value>
</data>
</root>
+3
View File
@@ -579,4 +579,7 @@
<data name="Total" xml:space="preserve">
<value>Total</value>
</data>
<data name="Muffling" xml:space="preserve">
<value>Muffling</value>
</data>
</root>
+3
View File
@@ -579,4 +579,7 @@
<data name="Total" xml:space="preserve">
<value>总量</value>
</data>
<data name="Muffling" xml:space="preserve">
<value>静音</value>
</data>
</root>
+3
View File
@@ -579,4 +579,7 @@
<data name="Total" xml:space="preserve">
<value>總量</value>
</data>
<data name="Muffling" xml:space="preserve">
<value />
</data>
</root>
+2 -2
View File
@@ -145,8 +145,8 @@ namespace DyeingComputer.View
WorkOrder_new.Add("Dyelot", WorkOrder_Numder);
WorkOrder_new.Add("ProgramName", Process_Name);
WorkOrder_new.Add("StartTime", DateTime.Now.AddMinutes(1).ToString("yyyy/MM/dd HH:mm:ss"));
WorkOrder_new.Add("EndTime", DateTime.Now.AddMinutes(DateTime.Parse(e.TIME).Minute +
DateTime.Parse(e.TIME).Hour*60).ToString("yyyy/MM/dd HH:mm:ss"));
WorkOrder_new.Add("EndTime", (DateTime.Now.AddMinutes(1) +
TimeSpan.Parse(e.TIME)).ToString("yyyy/MM/dd HH:mm:ss"));
WorkOrder_new.Add("Time", e.TIME);
WorkOrder_new.Add("State", "101");
WorkOrder_new.Add("ProgramID", Process_id);
+31
View File
@@ -0,0 +1,31 @@
<Window x:Class="DyeingComputer.Windows.UserCall"
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"
ResizeMode="NoResize"
mc:Ignorable="d"
Title="SUNLIGHT 800" Height="400" Width="400">
<Grid>
<TextBox x:Name="INF_DATA" Margin="5,5,5,150" TextWrapping="Wrap" FontSize="30" IsReadOnly="True" />
<Image Height="100" Width="100" VerticalAlignment="Bottom" FlowDirection="LeftToRight"
HorizontalAlignment="Left" Margin="25,0,0,27" Source="/Lmage/FxemojiRingingbell.png"/>
<Image x:Name="NOT" Height="100" Width="100" VerticalAlignment="Bottom" FlowDirection="LeftToRight"
HorizontalAlignment="Left" Margin="25,0,0,27" Source="/Lmage/FxemojiBellcancellation.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.Time}"
TextWrapping="Wrap" VerticalAlignment="Bottom" Width="80" FontSize="25" IsReadOnly="True"
Background="{x:Null}" Foreground="Black" BorderBrush="{x:Null}" />
<Button Content="{x:Static lang:Resources.Muffling}" HorizontalAlignment="Right" Height="35" Margin="50,70,150,20"
VerticalAlignment="Bottom" Width="80" Click="Muffling_Click" Name="Muffling_"/>
<Button Content="{x:Static lang:Resources.YES}" HorizontalAlignment="Right" Height="35" Margin="50,70,20,20"
VerticalAlignment="Bottom" Width="80" Click="YES_Click"/>
</Grid>
</Window>
+66
View File
@@ -0,0 +1,66 @@
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 UserCall : Window
{
DateTime times = DateTime.Now;
TimeSpan timeSpan5=new TimeSpan(0,0,0,5);
public UserCall()
{
InitializeComponent();
NOT.Visibility =Visibility.Collapsed;
Muffling_.IsEnabled = false;
DispatcherTimer disTimer = new DispatcherTimer
{
Interval = TimeSpan.FromMilliseconds(950) //毫秒
};
disTimer.Tick += DisTimer_1S;
disTimer.Start();//计时开始
}
void DisTimer_1S(object sender, EventArgs e)
{
TimeSpan timeSpan = DateTime.Now - times;
TIME_.Text = timeSpan.ToString(@"hh\:mm\:ss");
if (timeSpan>timeSpan5) Muffling_.IsEnabled=true;//5秒后允许禁英
}
private void YES_Click(object sender, RoutedEventArgs e)//确认
{
this.Close(); //关闭窗口
}
private void Muffling_Click(object sender, RoutedEventArgs e)//
{
NOT.Visibility = Visibility.Visible;
}
}
}