sc 1 year ago
parent
commit
f9146d662d
  1. 8
      DyeingComputer.csproj
  2. 18
      Properties/Resources.Designer.cs
  3. 6
      Properties/Resources.en-US.resx
  4. 6
      Properties/Resources.resx
  5. 6
      Properties/Resources.zh-CN.resx
  6. 6
      Properties/Resources.zh-TW.resx
  7. 12
      ViewWorkstep/TemperatureControl.xaml
  8. 28
      ViewWorkstep/TemperatureControl.xaml.cs
  9. 5
      Windows/InputBox.xaml
  10. 25
      Windows/ViewStep.xaml
  11. 10
      Windows/ViewStep.xaml.cs

8
DyeingComputer.csproj

@ -98,6 +98,9 @@
<Compile Include="ViewModel\MainWindowViewModel.cs" />
<Compile Include="ViewModel\ViewModelLocator.cs" />
<Compile Include="ViewModel\WorkOrderViewModel.cs" />
<Compile Include="ViewWorkstep\TemperatureControl.xaml.cs">
<DependentUpon>TemperatureControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\CurveDiagramView.xaml.cs">
<DependentUpon>CurveDiagramView.xaml</DependentUpon>
</Compile>
@ -149,6 +152,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="ViewWorkstep\TemperatureControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\CurveDiagramView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -277,7 +284,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Model\" />
<Folder Include="ViewWorkstep\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommonServiceLocator">

18
Properties/Resources.Designer.cs

@ -375,6 +375,15 @@ namespace DyeingComputer.Properties {
}
}
/// <summary>
/// 查找类似 NO 的本地化字符串。
/// </summary>
public static string NO {
get {
return ResourceManager.GetString("NO", resourceCulture);
}
}
/// <summary>
/// 查找类似 NotExecuted 的本地化字符串。
/// </summary>
@ -716,5 +725,14 @@ namespace DyeingComputer.Properties {
return ResourceManager.GetString("WorkOrderNumder", resourceCulture);
}
}
/// <summary>
/// 查找类似 YES 的本地化字符串。
/// </summary>
public static string YES {
get {
return ResourceManager.GetString("YES", resourceCulture);
}
}
}
}

6
Properties/Resources.en-US.resx

@ -336,4 +336,10 @@
<data name="Function" xml:space="preserve">
<value>Function</value>
</data>
<data name="NO" xml:space="preserve">
<value>NO</value>
</data>
<data name="YES" xml:space="preserve">
<value>YES</value>
</data>
</root>

6
Properties/Resources.resx

@ -336,4 +336,10 @@
<data name="Invalidfeatures" xml:space="preserve">
<value>Invalid features</value>
</data>
<data name="NO" xml:space="preserve">
<value>NO</value>
</data>
<data name="YES" xml:space="preserve">
<value>YES</value>
</data>
</root>

6
Properties/Resources.zh-CN.resx

@ -336,4 +336,10 @@
<data name="Function" xml:space="preserve">
<value>功能</value>
</data>
<data name="NO" xml:space="preserve">
<value>否</value>
</data>
<data name="YES" xml:space="preserve">
<value>是</value>
</data>
</root>

6
Properties/Resources.zh-TW.resx

@ -336,4 +336,10 @@
<data name="Function" xml:space="preserve">
<value>機能</value>
</data>
<data name="NO" xml:space="preserve">
<value>否</value>
</data>
<data name="YES" xml:space="preserve">
<value>是</value>
</data>
</root>

12
ViewWorkstep/TemperatureControl.xaml

@ -0,0 +1,12 @@
<UserControl x:Class="DyeingComputer.ViewWorkstep.TemperatureControl"
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:DyeingComputer.ViewWorkstep"
mc:Ignorable="d"
d:DesignHeight="345" d:DesignWidth="390">
<Grid>
</Grid>
</UserControl>

28
ViewWorkstep/TemperatureControl.xaml.cs

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
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.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace DyeingComputer.ViewWorkstep
{
/// <summary>
/// TemperatureControl.xaml 的交互逻辑
/// </summary>
public partial class TemperatureControl : UserControl
{
public TemperatureControl()
{
InitializeComponent();
}
}
}

5
Windows/InputBox.xaml

@ -4,6 +4,7 @@
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"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
ResizeMode ="NoResize"
@ -12,7 +13,7 @@
<Grid FocusManager.FocusedElement="{Binding ElementName=Boxx}">
<TextBox x:Name="Boxx" Height="40" Margin="20,10,20,0" VerticalAlignment="Top" FontSize="26"
MaxLines="1" BorderThickness="3,3,3,3" ClipToBounds="True"/>
<Button Content="YES" HorizontalAlignment="Left" Height="35" Margin="50,70,0,5" VerticalAlignment="Bottom" Width="80" Click="YES_Click"/>
<Button Content="NO" HorizontalAlignment="Right" Height="35" Margin="0,70,50,5" VerticalAlignment="Bottom" Width="80" Click="NO_Click"/>
<Button Content="{x:Static lang:Resources.YES}" HorizontalAlignment="Left" Height="35" Margin="50,70,0,5" VerticalAlignment="Bottom" Width="80" Click="YES_Click"/>
<Button Content="{x:Static lang:Resources.NO}" HorizontalAlignment="Right" Height="35" Margin="0,70,50,5" VerticalAlignment="Bottom" Width="80" Click="NO_Click"/>
</Grid>
</Window>

25
Windows/ViewStep.xaml

@ -8,15 +8,32 @@
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
Title="SUNLIGHT 800" Height="450" Width="400">
Title="SUNLIGHT 800" Height="400" Width="400">
<Grid FocusManager.FocusedElement="{Binding ElementName=box}">
<TextBlock Text="{x:Static lang:Resources.Code}" HorizontalAlignment="Left" Height="30" Margin="10,20,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" 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="150" FontSize="20" Background="#FFEFEEEE"/>
<ComboBox x:Name="boxID" HorizontalAlignment="Right" Height="30" Margin="0,60,10,0" VerticalAlignment="Top" Width="230" FontSize="20" Text="12345125" SelectionChanged="BoxID_SelectionChanged"/>
<TextBox x:Name="boxNAME" HorizontalAlignment="Right" Height="30" Margin="0,20,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
TextChanged="TextBox_TextChanged" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
<Grid Margin="5,100,5,5">
<ContentControl x:Name="container"/>
</Grid>
<TextBlock x:Name="P1N" HorizontalAlignment="Left" Height="30" Margin="10,120,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
<TextBox x:Name="P1" HorizontalAlignment="Right" Height="30" Margin="0,120,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
<TextBlock x:Name="P2N" HorizontalAlignment="Left" Height="30" Margin="10,155,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
<TextBox x:Name="P2" HorizontalAlignment="Right" Height="30" Margin="0,155,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
<TextBlock x:Name="P3N" HorizontalAlignment="Left" Height="30" Margin="10,190,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
<TextBox x:Name="P3" HorizontalAlignment="Right" Height="30" Margin="0,190,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
<TextBlock x:Name="P4N" HorizontalAlignment="Left" Height="30" Margin="10,225,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
<TextBox x:Name="P4" HorizontalAlignment="Right" Height="30" Margin="0,225,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
<TextBlock x:Name="P5N" HorizontalAlignment="Left" Height="30" Margin="10,260,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
<TextBox x:Name="P5" HorizontalAlignment="Right" Height="30" Margin="0,260,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
<Button Content="{x:Static lang:Resources.YES}" HorizontalAlignment="Left" Height="35" Margin="50,70,0,5" VerticalAlignment="Bottom" Width="80" Click="YES_Click"/>
<Button Content="{x:Static lang:Resources.NO}" HorizontalAlignment="Right" Height="35" Margin="0,70,50,5" VerticalAlignment="Bottom" Width="80" Click="NO_Click"/>
</Grid>
</Window>

10
Windows/ViewStep.xaml.cs

@ -94,5 +94,15 @@ namespace DyeingComputer.Windows
boxNAME.Text = a.ElementAt(i);
}
}
private void YES_Click(object sender, RoutedEventArgs e)
{
}
private void NO_Click(object sender, RoutedEventArgs e)
{
this.Close(); //关闭窗口
}
}
}

Loading…
Cancel
Save