MainWindow.axaml 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <Window xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="500"
  6. x:Class="praktika3_graph_interface.MainWindow"
  7. Title="praktika3_graph_interface">
  8. <Window.Styles>
  9. <Style Selector="TextBox.textBoxesFIO">
  10. <Setter Property="Foreground" Value="#759242" />
  11. <Setter Property="Background" Value="#FFDED3A6" />
  12. <Setter Property="Margin" Value="5"/>
  13. </Style>
  14. <Style Selector="TextBox.textBoxesNum">
  15. <Setter Property="Foreground" Value="#759242" />
  16. <Setter Property="Background" Value="#FFDED3A6" />
  17. <Setter Property="Margin" Value="5"/>
  18. </Style>
  19. <Style Selector="ComboBox">
  20. <Setter Property="Foreground" Value="#759242" />
  21. <Setter Property="Background" Value="#FFDED3A6" />
  22. <Setter Property="Margin" Value="5"/>
  23. </Style>
  24. <Style Selector="RadioButton">
  25. <Setter Property="Foreground" Value="#000000"/>
  26. <Setter Property="HorizontalAlignment" Value="Center" />
  27. <Setter Property="Margin" Value="10"/>
  28. </Style>
  29. <Style Selector="Button.buttonWriteToFile">
  30. <Setter Property="Foreground" Value="#000000"/>
  31. <Setter Property="Background" Value="#FFDED3A6" />
  32. <Setter Property="HorizontalAlignment" Value="Center" />
  33. <Setter Property="Margin" Value="10"/>
  34. </Style>
  35. </Window.Styles>
  36. <Grid Background="#F2F2EF">
  37. <StackPanel IsVisible="True" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" Width="400" Name="form">
  38. <StackPanel>
  39. <TextBox Classes="textBoxesFIO" Name="tbSurname" Watermark="Фамилия"></TextBox>
  40. </StackPanel>
  41. <StackPanel>
  42. <TextBox Classes="textBoxesFIO" Name="tbName" Watermark="Имя"></TextBox>
  43. </StackPanel>
  44. <StackPanel>
  45. <TextBox Classes="textBoxesFIO" Name="tbPatronymic" Watermark="Отчество"></TextBox>
  46. </StackPanel>
  47. <StackPanel>
  48. <TextBox Classes="textBoxesNum" Name="tbPhone" Watermark="8(XXX)XXX-XX-XX"></TextBox>
  49. </StackPanel>
  50. <StackPanel>
  51. <TextBox Classes="textBoxesNum" Name="tbBirthday" Watermark="01"></TextBox>
  52. </StackPanel>
  53. <ComboBox Name="cbMonth" SelectedIndex="0" Width="389">
  54. <ComboBoxItem IsEnabled="false">Выберите месяц рождения</ComboBoxItem>
  55. <ComboBoxItem>Январь</ComboBoxItem>
  56. <ComboBoxItem>Февраль</ComboBoxItem>
  57. <ComboBoxItem>Март</ComboBoxItem>
  58. <ComboBoxItem>Апрель</ComboBoxItem>
  59. <ComboBoxItem>Май</ComboBoxItem>
  60. <ComboBoxItem>Июнь</ComboBoxItem>
  61. <ComboBoxItem>Июль</ComboBoxItem>
  62. <ComboBoxItem>Август</ComboBoxItem>
  63. <ComboBoxItem>Сентябрь</ComboBoxItem>
  64. <ComboBoxItem>Октябрь</ComboBoxItem>
  65. <ComboBoxItem>Ноябрь</ComboBoxItem>
  66. <ComboBoxItem>Декабрь</ComboBoxItem>
  67. </ComboBox>
  68. <StackPanel>
  69. <TextBox Classes="textBoxesNum" Name="tbBirthyear" Watermark="0001"></TextBox>
  70. </StackPanel>
  71. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  72. <RadioButton Name="rbM">Мужской</RadioButton>
  73. <RadioButton Name="rbF">Женский</RadioButton>
  74. </StackPanel>
  75. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  76. <Button HorizontalAlignment="Center" Classes="buttonWriteToFile" Name="bWrite" Click="getUser">Записать в файл</Button>
  77. <Button HorizontalAlignment="Center" Classes="buttonWriteToFile" Name="bRead" Click="showUsers">Показать содержимое файла</Button>
  78. </StackPanel>
  79. <StackPanel>
  80. <Button Classes="buttonWriteToFile" HorizontalAlignment="Center" VerticalAlignment="Center" Click="hideSuccess" Name="bSuccess" IsVisible="false">
  81. Данные успешно записаны!
  82. </Button>
  83. </StackPanel>
  84. </StackPanel>
  85. <StackPanel Name="userlist" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" Width="400">
  86. <Button Name="buttonReturn" Classes="buttonWriteToFile" VerticalAlignment="Top" Click="bReturn" IsVisible="False">Назад</Button>
  87. </StackPanel>
  88. </Grid>
  89. </Window>