MainWindow.xaml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <Window x:Class="Control_DB_Railway.Views.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Control_DB_Railway"
  7. mc:Ignorable="d"
  8. WindowStartupLocation="CenterScreen"
  9. ResizeMode="NoResize"
  10. Title="Интерфейс для ведения информационной базы 'Железная дорога'"
  11. Height="500"
  12. Width="600">
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="30"/>
  16. <RowDefinition Height="*"/>
  17. </Grid.RowDefinitions>
  18. <Button Background="WhiteSmoke"
  19. HorizontalAlignment="Right"
  20. BorderBrush="Black"
  21. Grid.Row="0"
  22. Content="Выйти"
  23. Margin="0,5,5,5"
  24. Width="157"
  25. Click="Button_Click"/>
  26. <!--Вкладки-->
  27. <TabControl Grid.Row="1">
  28. <!--Вкладка "Станции"-->
  29. <TabItem Name="StationsTab">
  30. <!--Заголовок вкладки "Станции"-->
  31. <TabItem.Header>
  32. <TextBlock Text=" Станции "/>
  33. </TabItem.Header>
  34. <!--Сетка для вкладки "Станция"-->
  35. <Grid>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="25"/>
  38. <RowDefinition Height="*"/>
  39. <RowDefinition Height="250"/>
  40. </Grid.RowDefinitions>
  41. <!--Отображение данных из сущности "Станции"-->
  42. <ListBox Name="listBox_Station"
  43. Grid.Row="1"
  44. BorderBrush="Black"
  45. BorderThickness="2"
  46. Background="WhiteSmoke"
  47. SelectionChanged="listBox_Station_SelectionChanged"/>
  48. <!--GroupBox с кнопками-->
  49. <GroupBox Grid.Row="2"
  50. Header="Кнопки вызова"
  51. FontSize="15"
  52. Width="250"
  53. Height="180"
  54. HorizontalAlignment="Right"
  55. Margin="0 0 40 0"
  56. BorderThickness="2"
  57. BorderBrush="Black">
  58. <Grid>
  59. <!--Сетка для GroupBox-->
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="50"/>
  62. <RowDefinition Height="50"/>
  63. <RowDefinition Height="50"/>
  64. </Grid.RowDefinitions>
  65. <Button Name="button_AddRecord_Station"
  66. Content="Добавить/Изменить станцию"
  67. VerticalAlignment="Center"
  68. HorizontalAlignment="Center"
  69. Click="button_AddRecord_Station_Click"
  70. Width="218"/>
  71. <Button Name="button_DeleteRecord_Station"
  72. Content="Удалить станцию"
  73. VerticalAlignment="Center"
  74. HorizontalAlignment="Center"
  75. Grid.Row="1"
  76. Click="button_DeleteRecord_Station_Click"
  77. Width="218"/>
  78. <Button x:Name="button_ClearStation"
  79. Content="Очистить"
  80. HorizontalAlignment="Center"
  81. Grid.Row="2"
  82. VerticalAlignment="Center"
  83. Width="218"
  84. Click="button_ClearStation_Click"/>
  85. </Grid>
  86. </GroupBox>
  87. <!--GroupBox с элементами ввода-->
  88. <GroupBox Grid.Row="2"
  89. Header="Элементы ввода"
  90. FontSize="15"
  91. Width="230"
  92. Height="220"
  93. HorizontalAlignment="Left"
  94. Margin="30 0 0 0"
  95. BorderThickness="2"
  96. BorderBrush="Black">
  97. <Grid>
  98. <!--Сетка для GroupBox-->
  99. <Grid.RowDefinitions>
  100. <RowDefinition Height="50"/>
  101. <RowDefinition Height="30"/>
  102. <RowDefinition Height="50"/>
  103. <RowDefinition Height="50"/>
  104. </Grid.RowDefinitions>
  105. <TextBlock HorizontalAlignment="Left"
  106. Margin="20 5 0 0"
  107. Grid.Row="0"
  108. Text="Название:"
  109. VerticalAlignment="Top"/>
  110. <TextBox Name="textBox_Station"
  111. HorizontalAlignment="Center"
  112. VerticalAlignment="Top"
  113. Margin="0,25,0,0"
  114. Grid.Row="0"
  115. Background="WhiteSmoke"
  116. Width="179"/>
  117. <CheckBox Name="checkBox_overheadTransition"
  118. Margin="20 5 0 0"
  119. Content="Надземный переход"
  120. HorizontalAlignment="Left"
  121. VerticalAlignment="Center"
  122. Grid.Row="1" />
  123. <TextBlock HorizontalAlignment="Left"
  124. Margin="20 5 0 0"
  125. Grid.Row="2"
  126. Text="Местоположение:"
  127. VerticalAlignment="Top"/>
  128. <TextBox Name="textBox_Location"
  129. Margin="0,25,0,0"
  130. HorizontalAlignment="Center"
  131. Grid.Row="2"
  132. Background="WhiteSmoke"
  133. VerticalAlignment="Top"
  134. Width="178"/>
  135. <TextBlock HorizontalAlignment="Left"
  136. Margin="20 5 0 0"
  137. Grid.Row="3"
  138. Text="Тип станции:"
  139. VerticalAlignment="Top"
  140. Height="17"/>
  141. <ComboBox x:Name="comboBox_TypeStation"
  142. Margin="0,25,0,0"
  143. HorizontalAlignment="Center"
  144. Grid.Row="3"
  145. VerticalAlignment="Top"
  146. Width="178"/>
  147. </Grid>
  148. </GroupBox>
  149. <!--Поиск-->
  150. <TextBox Name="textBox_Search_Stations"
  151. Grid.Row="0"
  152. HorizontalAlignment="Right"
  153. Margin="0,0,40,0"
  154. Background="WhiteSmoke"
  155. VerticalAlignment="Center"
  156. Height="18"
  157. Width="120"/>
  158. <Button Name="buttonSearch_Stations"
  159. Content="Искать"
  160. HorizontalAlignment="Right"
  161. Margin="0 0 0 0"
  162. Grid.Row="0"
  163. VerticalAlignment="Center"
  164. FontSize="10"
  165. Height="18"
  166. Click="buttonSearch_Stations_Click"/>
  167. <!--Кнопка открытия таблицы DataGrid_Station-->
  168. <Label Content="Открыть DataGrid Stations:"
  169. Grid.Row="2"
  170. HorizontalAlignment="Right"
  171. VerticalAlignment="Top"
  172. Margin="0 2 25 0"/>
  173. <Button Name="button_OpenDisplayData"
  174. Grid.Row="2"
  175. Content="..."
  176. HorizontalAlignment="Right"
  177. VerticalAlignment="Top"
  178. Height="20"
  179. Width="20"
  180. Margin="0 5 5 0"
  181. Click="button_OpenDisplayData_Click"/>
  182. </Grid>
  183. </TabItem>
  184. <!--Вкладка "Тип станции"-->
  185. <TabItem Name="TypeStationsTab">
  186. <!--Заголовок вкладки "Тип станции"-->
  187. <TabItem.Header>
  188. <TextBlock Text=" Тип станции "/>
  189. </TabItem.Header>
  190. <Grid>
  191. <!--Сетка для вкладки "Тип станции"-->
  192. <Grid.RowDefinitions>
  193. <RowDefinition Height="25"/>
  194. <RowDefinition Height="*"/>
  195. <RowDefinition Height="250"/>
  196. </Grid.RowDefinitions>
  197. <!--Отображение данных из сущности "Тип станции"-->
  198. <ListBox Name="listBox_TypeStation"
  199. Grid.Row="1"
  200. BorderBrush="Black"
  201. BorderThickness="2"
  202. Background="WhiteSmoke"
  203. SelectionChanged="listBox_TypeStation_SelectionChanged"/>
  204. <!--GroupBox с кнопками-->
  205. <GroupBox Grid.Row="2"
  206. Header="Кнопки вызова"
  207. FontSize="15"
  208. Width="260"
  209. Height="180"
  210. HorizontalAlignment="Right"
  211. Margin="0 0 20 0"
  212. BorderThickness="2"
  213. BorderBrush="Black">
  214. <Grid>
  215. <!--Сетка для GroupBox-->
  216. <Grid.RowDefinitions>
  217. <RowDefinition Height="50"/>
  218. <RowDefinition Height="50"/>
  219. <RowDefinition Height="50"/>
  220. </Grid.RowDefinitions>
  221. <Button Name="button_AddRecord_TypeStation"
  222. Content="Добавить/изменить тип станции"
  223. HorizontalAlignment="Center"
  224. VerticalAlignment="Center"
  225. Width="228"
  226. Click="button_AddRecord_TypeStation_Click"/>
  227. <Button Name="button_DeleteRecord_TypeStation"
  228. Content="Удалить тип станции"
  229. HorizontalAlignment="Center"
  230. Grid.Row="1"
  231. VerticalAlignment="Center"
  232. Width="228"
  233. Click="button_DeleteRecord_TypeStation_Click"/>
  234. <Button x:Name="button_ClearTypeStation"
  235. Content="Очистить"
  236. HorizontalAlignment="Center"
  237. Grid.Row="2"
  238. VerticalAlignment="Center"
  239. Width="228"
  240. Click="button_ClearTypeStation_Click"/>
  241. </Grid>
  242. </GroupBox>
  243. <!--GroupBox с элементами ввода-->
  244. <GroupBox Grid.Row="2"
  245. Header="Элементы ввода"
  246. FontSize="15"
  247. Width="250"
  248. Height="120"
  249. HorizontalAlignment="Left"
  250. Margin="30,50,0,50"
  251. BorderThickness="2"
  252. BorderBrush="Black">
  253. <Grid>
  254. <!--Сетка для GroupBox-->
  255. <Grid.RowDefinitions>
  256. <RowDefinition Height="*"/>
  257. <RowDefinition Height="*"/>
  258. </Grid.RowDefinitions>
  259. <TextBlock HorizontalAlignment="Left"
  260. Grid.Row="0"
  261. Margin="25 5 0 0"
  262. Text="Название:"
  263. VerticalAlignment="Top"/>
  264. <TextBox Name="textBox_TypeStation"
  265. HorizontalAlignment="Center"
  266. Grid.Row="0"
  267. Margin="0,25,0,0"
  268. Background="WhiteSmoke"
  269. VerticalAlignment="Top"
  270. Width="188"/>
  271. <CheckBox Name="checkBox_passagerService"
  272. Content="Обслуж. пассажиров"
  273. HorizontalAlignment="Left"
  274. Margin="25,5,0,0"
  275. Grid.Row="1"
  276. VerticalAlignment="Center"/>
  277. </Grid>
  278. </GroupBox>
  279. <!--Поиск-->
  280. <TextBox Name="textBox_Search_TypeStations"
  281. Grid.Row="0"
  282. HorizontalAlignment="Right"
  283. Margin="0,0,40,0"
  284. Background="WhiteSmoke"
  285. VerticalAlignment="Center"
  286. Height="18"
  287. Width="120"/>
  288. <Button Name="buttonSearch_TypeStations"
  289. Content="Искать"
  290. HorizontalAlignment="Right"
  291. Margin="0 0 0 0"
  292. Grid.Row="0"
  293. VerticalAlignment="Center"
  294. FontSize="10"
  295. Height="18"
  296. Click="buttonSearch_TypeStation_Click"/>
  297. </Grid>
  298. </TabItem>
  299. <!--Вкладка "Дороги"-->
  300. <TabItem Name="RoadsTab">
  301. <!--Заголовок вкладки "Дорога"-->
  302. <TabItem.Header>
  303. <TextBlock Text="Дорога"/>
  304. </TabItem.Header>
  305. <Grid>
  306. <!--Сетка для вкладки "Дорога"-->
  307. <Grid.RowDefinitions>
  308. <RowDefinition Height="25"/>
  309. <RowDefinition Height="*"/>
  310. <RowDefinition Height="250"/>
  311. </Grid.RowDefinitions>
  312. <!--Отображение данных из сущности "Дорога"-->
  313. <ListBox Name="listBox_Road"
  314. Grid.Row="1"
  315. BorderBrush="Black"
  316. BorderThickness="2"
  317. Background="WhiteSmoke"
  318. SelectionChanged="listBox_Road_SelectionChanged">
  319. </ListBox>
  320. <!--GroupBox с кнопками-->
  321. <GroupBox Grid.Row="2"
  322. Header="Кнопки вызова"
  323. FontSize="15"
  324. Width="250"
  325. Height="180"
  326. HorizontalAlignment="Right"
  327. Margin="0 0 40 0"
  328. BorderThickness="2"
  329. BorderBrush="Black">
  330. <Grid>
  331. <!--Сетка для GroupBox-->
  332. <Grid.RowDefinitions>
  333. <RowDefinition Height="50"/>
  334. <RowDefinition Height="50"/>
  335. <RowDefinition Height="50"/>
  336. </Grid.RowDefinitions>
  337. <!--Кнопки-->
  338. <Button Name="button_AddRecord_Road"
  339. Content="Добавить/Изменить дорогу"
  340. VerticalAlignment="Center"
  341. HorizontalAlignment="Center"
  342. Width="218"
  343. Click="button_AddRecord_Road_Click"/>
  344. <Button Name="button_DeleteRecord_Road"
  345. Content="Удалить дорогу"
  346. VerticalAlignment="Center"
  347. HorizontalAlignment="Center"
  348. Grid.Row="1"
  349. Width="218"
  350. Click="button_DeleteRecord_Road_Click"/>
  351. <Button x:Name="button_ClearRoad"
  352. Content="Очистить"
  353. HorizontalAlignment="Center"
  354. Grid.Row="2"
  355. VerticalAlignment="Center"
  356. Width="218"
  357. Click="button_ClearRoad_Click"/>
  358. </Grid>
  359. </GroupBox>
  360. <!--GroupBox с элементами ввода-->
  361. <GroupBox Grid.Row="2"
  362. Header="Элементы ввода"
  363. FontSize="15"
  364. Width="230"
  365. Height="210"
  366. HorizontalAlignment="Left"
  367. Margin="30 0 0 0"
  368. BorderThickness="2"
  369. BorderBrush="Black">
  370. <Grid>
  371. <!--Сетка для GroupBox-->
  372. <Grid.RowDefinitions>
  373. <RowDefinition Height="*"/>
  374. <RowDefinition Height="*"/>
  375. <RowDefinition Height="*"/>
  376. </Grid.RowDefinitions>
  377. <TextBlock HorizontalAlignment="Left"
  378. Margin="20 5 0 0"
  379. Grid.Row="0"
  380. Text="Название:"
  381. VerticalAlignment="Top"/>
  382. <TextBox Name="textBox_NameRoad"
  383. HorizontalAlignment="Center"
  384. VerticalAlignment="Top"
  385. Margin="0,25,0,0"
  386. Grid.Row="0"
  387. Background="WhiteSmoke"
  388. Width="179"/>
  389. <TextBlock HorizontalAlignment="Left"
  390. Margin="20 5 0 0"
  391. Grid.Row="1"
  392. Text="Тип:"
  393. VerticalAlignment="Top"/>
  394. <TextBox Name="textBox_TypeRoad"
  395. HorizontalAlignment="Center"
  396. VerticalAlignment="Top"
  397. Margin="0,25,0,0"
  398. Grid.Row="1"
  399. Background="WhiteSmoke"
  400. Width="179"/>
  401. <TextBlock HorizontalAlignment="Left"
  402. Margin="20 5 0 0"
  403. Grid.Row="2"
  404. Text="Категория качества:"
  405. VerticalAlignment="Top"/>
  406. <TextBox x:Name="textBox_CategoryQuality"
  407. HorizontalAlignment="Center"
  408. VerticalAlignment="Top"
  409. Margin="0,25,0,0"
  410. Grid.Row="2"
  411. Background="WhiteSmoke"
  412. Width="179"/>
  413. </Grid>
  414. </GroupBox>
  415. <!--Поиск-->
  416. <TextBox Name="textBox_Search_Road"
  417. Grid.Row="0"
  418. HorizontalAlignment="Right"
  419. Margin="0,0,40,0"
  420. Background="WhiteSmoke"
  421. VerticalAlignment="Center"
  422. Height="18"
  423. Width="120"/>
  424. <Button Name="buttonSearch_Road"
  425. Content="Искать"
  426. HorizontalAlignment="Right"
  427. Margin="0 0 0 0"
  428. Grid.Row="0"
  429. VerticalAlignment="Center"
  430. FontSize="10"
  431. Height="18"
  432. Click="buttonSearch_Road_Click"/>
  433. </Grid>
  434. </TabItem>
  435. </TabControl>
  436. </Grid>
  437. </Window>