sc 4 years ago
parent
commit
c8d7ae3711
  1. 4
      MainWindow.xaml
  2. 4
      MainWindow.xaml.cs
  3. 2
      View/StuffView.xaml
  4. 4
      View/StuffView.xaml.cs

4
MainWindow.xaml

@ -109,8 +109,8 @@
<RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/> <RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="统计" Tag="&#xf080;" HorizontalAlignment="Left" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/> <RadioButton Content="统计" Tag="&#xf080;" HorizontalAlignment="Left" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="原料" Tag="&#xF00B;" HorizontalAlignment="Left" Height="55" Margin="0,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/> <RadioButton Content="原料" Tag="&#xF00B;" HorizontalAlignment="Left" Height="55" Margin="0,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,50" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="exit" /> <RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,50" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Exit" />
<RadioButton Content="信息" Tag="&#xF0B1;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,105" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="help" /> <RadioButton Content="信息" Tag="&#xF0B1;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,105" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Help" />
<Rectangle HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" VerticalAlignment="Top" Width="120"> <Rectangle HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" VerticalAlignment="Top" Width="120">
<Rectangle.Fill> <Rectangle.Fill>
<ImageBrush ImageSource="/Logo/sunlight_sc.png"/> <ImageBrush ImageSource="/Logo/sunlight_sc.png"/>

4
MainWindow.xaml.cs

@ -35,12 +35,12 @@ namespace Audit
{ {
} }
private void exit(object sender, RoutedEventArgs e) private void Exit(object sender, RoutedEventArgs e)
{ {
Application.Current.Shutdown();//关闭全部窗口 Application.Current.Shutdown();//关闭全部窗口
} }
private void help(object sender, RoutedEventArgs e) private void Help(object sender, RoutedEventArgs e)
{ {
Windows.help help = new Windows.help(); Windows.help help = new Windows.help();
help.Show();//实例化并打开信息窗口 help.Show();//实例化并打开信息窗口

2
View/StuffView.xaml

@ -82,7 +82,7 @@
<RadioButton Content="全部原料" x:Name="Button_all" GroupName="button" HorizontalAlignment="Left" Height="40" Margin="995,385,0,0" VerticalAlignment="Top" Width="100" FontSize="18" BorderBrush="{x:Null}" Background="{x:Null}" Grid.Column="1" IsChecked="True"/> <RadioButton Content="全部原料" x:Name="Button_all" GroupName="button" HorizontalAlignment="Left" Height="40" Margin="995,385,0,0" VerticalAlignment="Top" Width="100" FontSize="18" BorderBrush="{x:Null}" Background="{x:Null}" Grid.Column="1" IsChecked="True"/>
<TextBox x:Name="stuff_ProductCode" HorizontalAlignment="Left" Height="30" Margin="105,0,0,100" Text="" VerticalAlignment="Bottom" Width="130" FontSize="16" MaxLines="1" MaxLength="25"/> <TextBox x:Name="stuff_ProductCode" HorizontalAlignment="Left" Height="30" Margin="105,0,0,100" Text="" VerticalAlignment="Bottom" Width="130" FontSize="16" MaxLines="1" MaxLength="25"/>
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,100" TextWrapping="Wrap" Text="原料代码" VerticalAlignment="Bottom" Width="100" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,100" TextWrapping="Wrap" Text="原料代码" VerticalAlignment="Bottom" Width="100" FontSize="20"/>
<TextBox x:Name="stuff_ProductName" HorizontalAlignment="Left" Height="30" Margin="345,0,0,100" Text="" VerticalAlignment="Bottom" Width="200" FontSize="16" MaxLines="1" MaxLength="25"/> <TextBox x:Name="stuff_ProductName" HorizontalAlignment="Left" Height="30" Margin="345,0,0,100" Text="" VerticalAlignment="Bottom" Width="200" FontSize="16" MaxLines="1" MaxLength="50"/>
<TextBlock HorizontalAlignment="Left" Height="30" Margin="255,0,0,100" TextWrapping="Wrap" Text="原料名称" VerticalAlignment="Bottom" Width="100" FontSize="20"/> <TextBlock HorizontalAlignment="Left" Height="30" Margin="255,0,0,100" TextWrapping="Wrap" Text="原料名称" VerticalAlignment="Bottom" Width="100" FontSize="20"/>
<ComboBox x:Name="stuff_ProductType" HorizontalAlignment="Left" Height="30" Margin="645,0,0,100" Text="" VerticalAlignment="Bottom" Width="100" FontSize="16" IsReadOnly="True" IsEditable="True"> <ComboBox x:Name="stuff_ProductType" HorizontalAlignment="Left" Height="30" Margin="645,0,0,100" Text="" VerticalAlignment="Bottom" Width="100" FontSize="16" IsReadOnly="True" IsEditable="True">
<ComboBoxItem Content="染料"></ComboBoxItem> <ComboBoxItem Content="染料"></ComboBoxItem>

4
View/StuffView.xaml.cs

@ -108,8 +108,8 @@ namespace Audit.View
if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)//打开调色盘 if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)//打开调色盘
{ {
System.Drawing.Color DColor = colorDialog.Color;////获取选中色彩信息 System.Drawing.Color DColor = colorDialog.Color;////获取选中色彩信息
System.Windows.Media.Color MColor = new System.Windows.Media.Color();//转换 //System.Windows.Media.Color MColor = new System.Windows.Media.Color();//转换
MColor = System.Windows.Media.Color.FromArgb(DColor.A, DColor.R, DColor.G, DColor.B);//配置ARGB参数 System.Windows.Media.Color MColor = System.Windows.Media.Color.FromArgb(DColor.A, DColor.R, DColor.G, DColor.B);//转换并配置ARGB参数
stuff_Color.Background = new SolidColorBrush(MColor);//ARGB参数输出至stuff_Color的背景色 stuff_Color.Background = new SolidColorBrush(MColor);//ARGB参数输出至stuff_Color的背景色
stuff_Color.Foreground = new SolidColorBrush(MColor);//ARGB参数输出至stuff_Color的前景色 stuff_Color.Foreground = new SolidColorBrush(MColor);//ARGB参数输出至stuff_Color的前景色
string colorCode = Convert.ToString(DColor.B,16) + Convert.ToString(DColor.G,16) + Convert.ToString(DColor.R,16);//反向十六进制RGB string colorCode = Convert.ToString(DColor.B,16) + Convert.ToString(DColor.G,16) + Convert.ToString(DColor.R,16);//反向十六进制RGB

Loading…
Cancel
Save