MainWindow.xaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <Window x:Class="N3.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:N3"
  7. mc:Ignorable="d"
  8. Title="Калькулятор" Height="500" Width="450">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition></ColumnDefinition>
  12. <ColumnDefinition></ColumnDefinition>
  13. <ColumnDefinition></ColumnDefinition>
  14. <ColumnDefinition></ColumnDefinition>
  15. <ColumnDefinition></ColumnDefinition>
  16. </Grid.ColumnDefinitions>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="2*"></RowDefinition>
  19. <RowDefinition></RowDefinition>
  20. <RowDefinition></RowDefinition>
  21. <RowDefinition></RowDefinition>
  22. <RowDefinition></RowDefinition>
  23. <RowDefinition></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <Grid Grid.Column="0" Grid.ColumnSpan="5">
  26. <StackPanel>
  27. <TextBlock Name="TBshow" Style="{StaticResource TBusually}"/>
  28. <TextBlock Name="TBanswer" FontSize="24" Style="{StaticResource TBusually}" Visibility="Collapsed" />
  29. </StackPanel>
  30. </Grid>
  31. <Grid Grid.Row="1" Grid.Column="0">
  32. <Button Click="OperationClick">√x</Button>
  33. </Grid>
  34. <Grid Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2">
  35. <Button Click="ActClick">C</Button>
  36. </Grid>
  37. <Grid Grid.Row="1" Grid.Column="3">
  38. <Button Click="OperationClick">%</Button>
  39. </Grid>
  40. <Grid Grid.Row="1" Grid.Column="4">
  41. <Button Click="OperationClick">/</Button>
  42. </Grid>
  43. <Grid Grid.Row="2" Grid.Column="0">
  44. <Button Click="OperationClick">x^2</Button>
  45. </Grid>
  46. <Grid Grid.Row="2" Grid.Column="1">
  47. <Button Click="NumClick">7</Button>
  48. </Grid>
  49. <Grid Grid.Row="2" Grid.Column="2">
  50. <Button Click="NumClick">8</Button>
  51. </Grid>
  52. <Grid Grid.Row="2" Grid.Column="3">
  53. <Button Click="NumClick">9</Button>
  54. </Grid>
  55. <Grid Grid.Row="2" Grid.Column="4">
  56. <Button Click="OperationClick">*</Button>
  57. </Grid>
  58. <Grid Grid.Row="3" Grid.Column="0">
  59. <Button Click="OperationClick">log10(x)</Button>
  60. </Grid>
  61. <Grid Grid.Row="3" Grid.Column="1">
  62. <Button Click="NumClick">4</Button>
  63. </Grid>
  64. <Grid Grid.Row="3" Grid.Column="2">
  65. <Button Click="NumClick">5</Button>
  66. </Grid>
  67. <Grid Grid.Row="3" Grid.Column="3">
  68. <Button Click="NumClick">6</Button>
  69. </Grid>
  70. <Grid Grid.Row="3" Grid.Column="4">
  71. <Button Click="OperationClick">-</Button>
  72. </Grid>
  73. <Grid Grid.Row="4" Grid.Column="0">
  74. <Button Click="OperationClick">sin</Button>
  75. </Grid>
  76. <Grid Grid.Row="4" Grid.Column="1">
  77. <Button Click="NumClick">1</Button>
  78. </Grid>
  79. <Grid Grid.Row="4" Grid.Column="2">
  80. <Button Click="NumClick">2</Button>
  81. </Grid>
  82. <Grid Grid.Row="4" Grid.Column="3">
  83. <Button Click="NumClick">3</Button>
  84. </Grid>
  85. <Grid Grid.Row="4" Grid.Column="4">
  86. <Button Click="OperationClick">+</Button>
  87. </Grid>
  88. <Grid Grid.Row="5" Grid.Column="0">
  89. <Button Click="OperationClick">ctg</Button>
  90. </Grid>
  91. <Grid Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2">
  92. <Button Click="NumClick">0</Button>
  93. </Grid>
  94. <Grid Grid.Row="5" Grid.Column="3">
  95. <Button Click="ActClick">,</Button>
  96. </Grid>
  97. <Grid Grid.Row="5" Grid.Column="4">
  98. <Button Click="ActClick">=</Button>
  99. </Grid>
  100. </Grid>
  101. </Window>