Advertisement
Divergent7

Untitled

Oct 1st, 2022
874
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16.  
  17. namespace WpfApp1
  18. {
  19.     /// <summary>
  20.     /// Логика взаимодействия для MainWindow.xaml
  21.     /// </summary>
  22.     public partial class MainWindow : Window
  23.     {
  24.         public MainWindow()
  25.         {
  26.             InitializeComponent();
  27.         }
  28.  
  29.         private void Recogition_btn_Click(object sender, RoutedEventArgs e)
  30.         {
  31.  
  32.         }
  33.  
  34.         private void Learning_btn_Click(object sender, RoutedEventArgs e)
  35.         {
  36.  
  37.         }
  38.  
  39.         private void Test_btn_Click(object sender, RoutedEventArgs e)
  40.         {
  41.  
  42.         }
  43.  
  44.         private  void Border_Click(object sender, RoutedEventArgs e)
  45.         {
  46.             Button btn = (Button)e.OriginalSource;
  47.             if (btn.Background == Brushes.Gray)
  48.             {
  49.                 btn.Background = Brushes.Orange;
  50.             }
  51.             else
  52.                 btn.Background = Brushes.Gray;
  53.         }
  54.     }
  55. }
  56.  
  57.  
  58.  
  59.  
  60. <Window x:Class="WpfApp1.MainWindow"
  61.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  62.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  63.         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  64.         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  65.         xmlns:local="clr-namespace:WpfApp1"
  66.         mc:Ignorable="d"
  67.         Title="MainWindow" Height="450" Width="800">
  68.     <Grid>
  69.         <Button x:Name="Recogition_btn" Content="Распознавание" HorizontalAlignment="Left" Margin="604,109,0,0" VerticalAlignment="Top" Height="38" Width="108" Click="Recogition_btn_Click"/>
  70.         <Button x:Name="Learning_btn" Content="Обучение" HorizontalAlignment="Left" Margin="604,165,0,0" VerticalAlignment="Top" Height="34" Width="108" Click="Learning_btn_Click"/>
  71.         <Button x:Name="Test_btn" Content="Тест" HorizontalAlignment="Left" Margin="604,217,0,0" VerticalAlignment="Top" Height="32" Width="108" Click="Test_btn_Click"/>
  72.         <Border ButtonBase.Click="Border_Click" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="381" Margin="130,0,0,0" VerticalAlignment="Center" Width="296">
  73.             <Grid >
  74.                 <Grid.RowDefinitions>
  75.                     <RowDefinition> </RowDefinition>
  76.                     <RowDefinition></RowDefinition>
  77.                     <RowDefinition></RowDefinition>
  78.                     <RowDefinition></RowDefinition>
  79.                     <RowDefinition></RowDefinition>
  80.                 </Grid.RowDefinitions>
  81.                 <Grid.ColumnDefinitions>
  82.                     <ColumnDefinition></ColumnDefinition>
  83.                     <ColumnDefinition></ColumnDefinition>
  84.                     <ColumnDefinition></ColumnDefinition>
  85.                 </Grid.ColumnDefinitions>
  86.                 <Button Background="Gray"  Grid.Column="1"></Button>
  87.                 <Button Background="Gray"  Grid.Column="2"></Button>
  88.                 <Button Background="Gray"  Grid.Row="1"></Button>
  89.                 <Button Background="Gray"  Grid.Row="2"></Button>
  90.                 <Button Background="Gray"  Grid.Row="3"></Button>
  91.                 <Button Background="Gray"  Grid.Row="4"></Button>
  92.                 <Button Background="Gray"  Grid.Column="1" Grid.Row="1"></Button>
  93.                 <Button Background="Gray"  Grid.Column="1" Grid.Row="3"></Button>
  94.                 <Button Background="Gray"  Grid.Column="1" Grid.Row="4"></Button>
  95.                 <Button Background="Gray"  
  96.                         Grid.Column="2" Grid.Row="1"></Button>
  97.                 <Button Background="Gray"  Grid.Column="2" Grid.Row="2"></Button>
  98.                 <Button Background="Gray"  Grid.Column="2" Grid.Row="3"></Button>
  99.                 <Button Background="Gray"  Grid.Column="2" Grid.Row="4"></Button>
  100.                 <Button Background="Gray" Grid.Column="1" Grid.Row="2"></Button>
  101.                 <Button Background="Gray"  ></Button>
  102.  
  103.             </Grid>
  104.         </Border>
  105.     </Grid>
  106. </Window>
  107.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement