-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
81 lines (80 loc) · 2.89 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<Window x:Class="IEEE754Inspector.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:IEEE754Inspector"
mc:Ignorable="d"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen"
ResizeMode="CanMinimize">
<StackPanel>
<TabControl Name="FloatModeTabControl" SelectedIndex="0" BorderThickness="0">
<TabItem Header="单精度"/>
<TabItem Header="双精度"/>
</TabControl>
<StackPanel Orientation="Horizontal">
<StackPanel Width="60">
<Label HorizontalAlignment="Center">符号位</Label>
<TextBox
Name="SignBitBox"
Text="0"
KeyUp="BitBoxesKeyUp"
MaxLength="1"
FontSize="18"
Width="30"
TextAlignment="Center"
MaxLines="1"/>
<TextBox Name="SignValBox" IsReadOnly="True" TextAlignment="Center" BorderThickness="0"/>
</StackPanel>
<StackPanel>
<Label>指数位</Label>
<TextBox
Name="ExponentBitBox"
Text="00000000"
KeyUp="BitBoxesKeyUp"
MaxLength="8"
FontSize="18"
TextAlignment="Right"
Margin="5,0"
MaxLines="1"/>
<TextBox Name="ExponentValBox" IsReadOnly="True" TextAlignment="Center" BorderThickness="0"/>
</StackPanel>
<StackPanel>
<Label>尾数位</Label>
<TextBox
Name="MantissaBitBox"
Text="00000000000000000000000"
KeyUp="BitBoxesKeyUp"
MaxLength="23"
FontSize="18"
Margin="5,0"
TextAlignment="Right"
MaxLines="1"/>
<TextBox x:Name="MantissaValBox" IsReadOnly="True" TextAlignment="Center" BorderThickness="0"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label>非规约浮点:</Label>
<Label Name="IsNormalLabel">是</Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label>十进制字符串:</Label>
<Rectangle Width="5"></Rectangle>
<TextBox Name="RealValueBox" Text="0.0" MaxLines="1" FontSize="18" MinWidth="300" KeyUp="RealValueBox_KeyUp"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button Name="IncrementButton" Content="最小增量" Click="IncrementButton_Click" />
<Label>值:</Label>
<Rectangle Width="5"></Rectangle>
<TextBox Name="BitIncrementBox" IsReadOnly="True" BorderThickness="0" MaxLines="1" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button Name="DecrementButton" Content="最小负增" Click="DecrementButton_Click" />
<Label>值:</Label>
<Rectangle Width="5"></Rectangle>
<TextBox Name="BitDecrementBox" IsReadOnly="True" BorderThickness="0" MaxLines="1"/>
</StackPanel>
<TextBox Name="MsgBox" IsReadOnly="True"/>
</StackPanel>
</Window>