This commit is contained in:
sc committed 2024-08-30 23:37:02 +08:00
commit f9146d662d
11 files changed
+123 -7

No files matched your search

+3 -2
View File
@@ -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>
+21 -4
View File
@@ -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
View File
@@ -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(); //关闭窗口
}
}
}