|
@@ -8,9 +8,17 @@
|
|
Title="Система счислений" Height="550" Width="350" ResizeMode="NoResize" Icon="/icon.png" FontFamily="Montserrat Light">
|
|
Title="Система счислений" Height="550" Width="350" ResizeMode="NoResize" Icon="/icon.png" FontFamily="Montserrat Light">
|
|
<Window.Resources>
|
|
<Window.Resources>
|
|
<Style TargetType="Button">
|
|
<Style TargetType="Button">
|
|
- <Setter Property="ItemsControl.Background" Value="#8888d7"/>
|
|
|
|
- <Setter Property="ItemsControl.Foreground" Value="White"/>
|
|
|
|
- <Setter Property="ItemsControl.Margin" Value="10"/>
|
|
|
|
|
|
+ <Style.Setters>
|
|
|
|
+ <Setter Property="ItemsControl.Background" Value="#8888d7"/>
|
|
|
|
+ <Setter Property="ItemsControl.Foreground" Value="White"/>
|
|
|
|
+ <Setter Property="ItemsControl.Margin" Value="10"/>
|
|
|
|
+ </Style.Setters>
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ </Style.Triggers>
|
|
</Style>
|
|
</Style>
|
|
</Window.Resources>
|
|
</Window.Resources>
|
|
<Grid>
|
|
<Grid>
|
|
@@ -33,40 +41,66 @@
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
- <TextBox IsReadOnly="True" Grid.Row="0" Grid.ColumnSpan="4" Margin="10"
|
|
|
|
|
|
+ <TextBox x:Name="str" IsReadOnly="True" Grid.Row="0" Grid.ColumnSpan="4" Margin="10"
|
|
FontSize="16" HorizontalScrollBarVisibility="Auto"
|
|
FontSize="16" HorizontalScrollBarVisibility="Auto"
|
|
- VerticalContentAlignment="Center" HorizontalContentAlignment="Right"/>
|
|
|
|
|
|
+ VerticalContentAlignment="Center" HorizontalContentAlignment="Right"
|
|
|
|
+ PreviewTextInput="str_PreviewTextInput"
|
|
|
|
+ KeyDown="str_KeyDown" PreviewKeyDown="str_KeyDown"/>
|
|
<Label Content="Выберите СС:" Grid.Row="1" Grid.ColumnSpan="2" Margin="10,10,43,10" FontSize="14"/>
|
|
<Label Content="Выберите СС:" Grid.Row="1" Grid.ColumnSpan="2" Margin="10,10,43,10" FontSize="14"/>
|
|
- <ComboBox Margin="48,10,10,30" Grid.ColumnSpan="3" Grid.Column="1" Grid.Row="1">
|
|
|
|
- <TextBlock Text="Двоичная"/>
|
|
|
|
- <TextBlock Text="Троичная"/>
|
|
|
|
- <TextBlock Text="Восьмеричная"/>
|
|
|
|
- <TextBlock Text="Шестнадцатиричная"/>
|
|
|
|
|
|
+ <ComboBox x:Name="comboBox" Margin="48,10,10,30" Grid.ColumnSpan="3" Grid.Column="1" Grid.Row="1"
|
|
|
|
+ SelectionChanged="ComboBox_SelectionChanged">
|
|
|
|
+ <ComboBoxItem Content="Двоичная"/>
|
|
|
|
+ <ComboBoxItem Content="Восьмеричная"/>
|
|
|
|
+ <ComboBoxItem Content="Шестнадцатиричная"/>
|
|
</ComboBox>
|
|
</ComboBox>
|
|
- <Button Content="CA" Grid.Row="5" Grid.Column="0"/>
|
|
|
|
- <Button Content="0" Grid.Row="5" Grid.Column="1"/>
|
|
|
|
- <Button Content="⌫" Grid.Row="5" Grid.Column="2"/>
|
|
|
|
- <Button Content="1" Grid.Row="4" Grid.Column="0"/>
|
|
|
|
- <Button Content="2" Grid.Row="4" Grid.Column="1"/>
|
|
|
|
- <Button Content="3" Grid.Row="4" Grid.Column="2"/>
|
|
|
|
- <Button Content="4" Grid.Row="3" Grid.Column="0"/>
|
|
|
|
- <Button Content="5" Grid.Row="3" Grid.Column="1"/>
|
|
|
|
- <Button Content="6" Grid.Row="3" Grid.Column="2"/>
|
|
|
|
- <Button Content="7" Grid.Row="2" Grid.Column="0"/>
|
|
|
|
- <Button Content="8" Grid.Row="2" Grid.Column="1"/>
|
|
|
|
- <Button Content="9" Grid.Row="2" Grid.Column="2"/>
|
|
|
|
- <Button Content="A" Grid.Row="6" Grid.Column="0" Background="#6c6cdf"/>
|
|
|
|
- <Button Content="B" Grid.Row="6" Grid.Column="1" Background="#6c6cdf"/>
|
|
|
|
- <Button Content="C" Grid.Row="6" Grid.Column="2" Background="#6c6cdf"/>
|
|
|
|
- <Button Content="D" Grid.Row="7" Grid.Column="0" Background="#6c6cdf"/>
|
|
|
|
- <Button Content="E" Grid.Row="7" Grid.Column="1" Background="#6c6cdf"/>
|
|
|
|
- <Button Content="F" Grid.Row="7" Grid.Column="2" Background="#6c6cdf"/>
|
|
|
|
- <Button Content="+" Grid.Row="2" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
- <Button Content="-" Grid.Row="3" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
- <Button Content="×" Grid.Row="4" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
- <Button Content="÷" Grid.Row="5" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
- <Button Content="%" Grid.Row="6" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
- <Button Content="=" Grid.Row="7" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
|
|
+ <Button x:Name="ca"
|
|
|
|
+ Content="CA" Grid.Row="5" Grid.Column="0"/>
|
|
|
|
+ <Button x:Name="zero"
|
|
|
|
+ Content="0" Grid.Row="5" Grid.Column="1"/>
|
|
|
|
+ <Button x:Name="erase"
|
|
|
|
+ Content="⌫" Grid.Row="5" Grid.Column="2"/>
|
|
|
|
+ <Button x:Name="one"
|
|
|
|
+ Content="1" Grid.Row="4" Grid.Column="0"/>
|
|
|
|
+ <Button x:Name="two"
|
|
|
|
+ Content="2" Grid.Row="4" Grid.Column="1"/>
|
|
|
|
+ <Button x:Name="three"
|
|
|
|
+ Content="3" Grid.Row="4" Grid.Column="2"/>
|
|
|
|
+ <Button x:Name="four"
|
|
|
|
+ Content="4" Grid.Row="3" Grid.Column="0"/>
|
|
|
|
+ <Button x:Name="five"
|
|
|
|
+ Content="5" Grid.Row="3" Grid.Column="1"/>
|
|
|
|
+ <Button x:Name="six"
|
|
|
|
+ Content="6" Grid.Row="3" Grid.Column="2"/>
|
|
|
|
+ <Button x:Name="seven"
|
|
|
|
+ Content="7" Grid.Row="2" Grid.Column="0"/>
|
|
|
|
+ <Button x:Name="eight"
|
|
|
|
+ Content="8" Grid.Row="2" Grid.Column="1"/>
|
|
|
|
+ <Button x:Name="nine"
|
|
|
|
+ Content="9" Grid.Row="2" Grid.Column="2"/>
|
|
|
|
+ <Button x:Name="a"
|
|
|
|
+ Content="A" Grid.Row="6" Grid.Column="0" Background="#6c6cdf"/>
|
|
|
|
+ <Button x:Name="b"
|
|
|
|
+ Content="B" Grid.Row="6" Grid.Column="1" Background="#6c6cdf"/>
|
|
|
|
+ <Button x:Name="c"
|
|
|
|
+ Content="C" Grid.Row="6" Grid.Column="2" Background="#6c6cdf"/>
|
|
|
|
+ <Button x:Name="d"
|
|
|
|
+ Content="D" Grid.Row="7" Grid.Column="0" Background="#6c6cdf"/>
|
|
|
|
+ <Button x:Name="e"
|
|
|
|
+ Content="E" Grid.Row="7" Grid.Column="1" Background="#6c6cdf"/>
|
|
|
|
+ <Button x:Name="f"
|
|
|
|
+ Content="F" Grid.Row="7" Grid.Column="2" Background="#6c6cdf"/>
|
|
|
|
+ <Button x:Name="plus"
|
|
|
|
+ Content="+" Grid.Row="2" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
+ <Button x:Name="minus"
|
|
|
|
+ Content="-" Grid.Row="3" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
+ <Button x:Name="multiply"
|
|
|
|
+ Content="×" Grid.Row="4" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
+ <Button x:Name="division"
|
|
|
|
+ Content="÷" Grid.Row="5" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
+ <Button x:Name="remains"
|
|
|
|
+ Content="%" Grid.Row="6" Grid.Column="3" Background="#4040bf"/>
|
|
|
|
+ <Button x:Name="equal"
|
|
|
|
+ Content="=" Grid.Row="7" Grid.Column="3" Background="#4040bf"/>
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
</TabItem>
|
|
<TabItem Header="История" FontFamily="Montserrat Light">
|
|
<TabItem Header="История" FontFamily="Montserrat Light">
|