|
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 | xmlns:vm="clr-namespace:BitcoinTransactionTool.ViewModels" |
5 | | - Title="Bitcoin Transaction Tool - Version Beta" Height="666" Width="673.164" FontSize="14" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen"> |
| 5 | + Title="{Binding TitleVersion}" Height="680" Width="680" |
| 6 | + FontSize="14" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen"> |
| 7 | + |
6 | 8 | <Window.DataContext> |
7 | 9 | <vm:MainWindowViewModel/> |
8 | 10 | </Window.DataContext> |
| 11 | + |
9 | 12 | <Window.Resources> |
10 | 13 | <CollectionViewSource x:Key="AddressViewSource" Source="{Binding UtxoList}" IsLiveGroupingRequested="True"> |
11 | 14 | <CollectionViewSource.GroupDescriptions> |
12 | 15 | <PropertyGroupDescription PropertyName="Address" /> |
13 | 16 | </CollectionViewSource.GroupDescriptions> |
14 | 17 | </CollectionViewSource> |
15 | 18 | </Window.Resources> |
| 19 | + |
16 | 20 | <Window.InputBindings> |
17 | 21 | <KeyBinding Key="F2" Command="{Binding ShowEditWindowCommand}"/> |
18 | 22 | <KeyBinding Key="F3" Command="{Binding ShowScriptWindowCommand}"/> |
19 | 23 | </Window.InputBindings> |
| 24 | + |
20 | 25 | <Grid> |
21 | | - <Menu VerticalAlignment="Top" FontSize="14"> |
| 26 | + <Grid.RowDefinitions> |
| 27 | + <!--Menu:--> |
| 28 | + <RowDefinition Height="auto"/> |
| 29 | + <!--Inputs:--> |
| 30 | + <RowDefinition Height="130"/> |
| 31 | + <!--UTXOs:--> |
| 32 | + <RowDefinition Height="*"/> |
| 33 | + <!--Outputs + result:--> |
| 34 | + <RowDefinition Height="220"/> |
| 35 | + <!--Status bar:--> |
| 36 | + <RowDefinition Height="auto"/> |
| 37 | + </Grid.RowDefinitions> |
| 38 | + |
| 39 | + <Menu FontSize="14" Grid.Row="0"> |
22 | 40 | <MenuItem Header="_Tools"> |
23 | 41 | <MenuItem Header="Edit Transactions" InputGestureText="F2" Command="{Binding ShowEditWindowCommand, Mode=OneWay}"/> |
24 | 42 | <MenuItem Header="Script builder" InputGestureText="F3" Command="{Binding ShowScriptWindowCommand, Mode=OneWay}"/> |
|
31 | 49 | </MenuItem> |
32 | 50 | </Menu> |
33 | 51 |
|
34 | | - <DataGrid HorizontalAlignment="Left" Margin="10,38,0,0" VerticalAlignment="Top" Height="100" Width="430" ItemsSource="{Binding SendAddressList, Mode=TwoWay}" AutoGenerateColumns="False" VerticalScrollBarVisibility="Visible"> |
35 | | - <DataGrid.Columns> |
36 | | - <DataGridTextColumn Header="Address" Width="310" Binding="{Binding Address, Mode=TwoWay}"/> |
37 | | - <DataGridTextColumn Header="Balance" Width="90" Binding="{Binding Balance, Mode=OneWay, StringFormat=\{0:F8\}}"/> |
38 | | - </DataGrid.Columns> |
39 | | - </DataGrid> |
40 | | - |
41 | | - <ComboBox HorizontalAlignment="Left" Margin="448,37,0,0" VerticalAlignment="Top" Width="116" ItemsSource="{Binding ApiList}" Height="32" SelectedItem="{Binding SelectedApi}" VerticalContentAlignment="Center"/> |
42 | | - <Button Content="Get UTXOs" HorizontalAlignment="Left" Margin="569,37,0,0" VerticalAlignment="Top" Width="73" Height="32" Command="{Binding GetUTXOCommand, Mode=OneWay}"/> |
43 | | - |
44 | | - <Label Content="Version:" HorizontalAlignment="Left" Margin="449,80,0,0" VerticalAlignment="Top" FontFamily="Comic Sans MS" FontWeight="Bold"/> |
45 | | - <TextBox Text="{Binding TxVersion, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="26" Margin="537,81,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="105"/> |
46 | | - <Label Content="LockTime:" HorizontalAlignment="Left" Margin="449,110,0,0" VerticalAlignment="Top" FontFamily="Comic Sans MS" FontWeight="Bold"/> |
47 | | - <TextBox Text="{Binding LockTime, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="26" Margin="537,112,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="105"/> |
48 | | - |
49 | | - <ListView x:Name="listView" HorizontalAlignment="Left" Height="190" Margin="10,149,0,0" VerticalAlignment="Top" Width="632" |
50 | | - ItemsSource="{Binding Source={StaticResource AddressViewSource}}" SelectionMode="Multiple" |
51 | | - SelectionChanged="ListView_SelectionChanged"> |
52 | | - <ListView.Resources> |
| 52 | + <Grid Grid.Row="1"> |
| 53 | + <Grid.ColumnDefinitions> |
| 54 | + <ColumnDefinition Width="455"/> |
| 55 | + <ColumnDefinition/> |
| 56 | + </Grid.ColumnDefinitions> |
| 57 | + |
| 58 | + <DataGrid ItemsSource="{Binding SendAddressList, Mode=TwoWay}" AutoGenerateColumns="False" |
| 59 | + VerticalScrollBarVisibility="Visible" Margin="5"> |
| 60 | + <DataGrid.Columns> |
| 61 | + <DataGridTextColumn Header="Address" Width="330" Binding="{Binding Address, Mode=TwoWay}"/> |
| 62 | + <DataGridTextColumn Header="Balance" Width="90" Binding="{Binding Balance, Mode=OneWay, StringFormat=\{0:F8\}}"/> |
| 63 | + </DataGrid.Columns> |
| 64 | + </DataGrid> |
| 65 | + |
| 66 | + <Grid Grid.Column="1"> |
| 67 | + <Grid.ColumnDefinitions> |
| 68 | + <ColumnDefinition Width="auto"/> |
| 69 | + <ColumnDefinition/> |
| 70 | + </Grid.ColumnDefinitions> |
| 71 | + <Grid.RowDefinitions> |
| 72 | + <RowDefinition/> |
| 73 | + <RowDefinition/> |
| 74 | + <RowDefinition/> |
| 75 | + </Grid.RowDefinitions> |
| 76 | + |
| 77 | + <Button Content="Get UTXOs" Command="{Binding GetUTXOCommand, Mode=OneWay}" |
| 78 | + Height="32" Width="75" Margin="3" Grid.Column="0" Grid.Row="0"/> |
| 79 | + <ComboBox ItemsSource="{Binding ApiList}" SelectedItem="{Binding SelectedApi}" |
| 80 | + VerticalContentAlignment="Center" Height="32" Width="116" Margin="3" Grid.Column="1" Grid.Row="0"/> |
| 81 | + |
| 82 | + <Label Content="Version:" FontFamily="Comic Sans MS" FontWeight="Bold" |
| 83 | + VerticalContentAlignment="Center" Grid.Column="0" Grid.Row="1"/> |
| 84 | + <TextBox Text="{Binding TxVersion, UpdateSourceTrigger=PropertyChanged}" |
| 85 | + Height="27" Width="110" Grid.Column="1" Grid.Row="1"/> |
| 86 | + <Label Content="LockTime:" FontFamily="Comic Sans MS" FontWeight="Bold" |
| 87 | + VerticalContentAlignment="Center" Grid.Column="0" Grid.Row="2"/> |
| 88 | + <TextBox Text="{Binding LockTime, UpdateSourceTrigger=PropertyChanged}" |
| 89 | + Height="27" Width="110" Grid.Column="1" Grid.Row="2"/> |
| 90 | + </Grid> |
| 91 | + </Grid> |
| 92 | + |
| 93 | + |
| 94 | + <ListView x:Name="listView" ItemsSource="{Binding Source={StaticResource AddressViewSource}}" SelectionMode="Multiple" |
| 95 | + SelectionChanged="ListView_SelectionChanged" Margin="5" Grid.Row="2"> |
| 96 | + <ListView.Resources> |
53 | 97 | <Style TargetType="{x:Type GridViewColumnHeader}"> |
54 | 98 | <Setter Property="HorizontalContentAlignment" Value="Left" /> |
55 | 99 | </Style> |
|
76 | 120 | <TextBlock Text=" UTXO(s)" FontSize="18" Foreground="Silver" FontStyle="Italic" VerticalAlignment="Bottom" /> |
77 | 121 | </StackPanel> |
78 | 122 | </Expander.Header> |
79 | | - <ItemsPresenter /> |
| 123 | + <ItemsPresenter/> |
80 | 124 | </Expander> |
81 | 125 | </ControlTemplate> |
82 | 126 | </Setter.Value> |
|
87 | 131 | </ListView.GroupStyle> |
88 | 132 | </ListView> |
89 | 133 |
|
90 | | - <DataGrid HorizontalAlignment="Left" Margin="10,344,0,0" VerticalAlignment="Top" Height="137" Width="444" ItemsSource="{Binding ReceiveList}" AutoGenerateColumns="False" VerticalScrollBarVisibility="Visible"> |
91 | | - <DataGrid.Columns> |
92 | | - <DataGridTextColumn Header="Receiving Address" Width="310" Binding="{Binding Address, Mode=TwoWay}"/> |
93 | | - <DataGridTextColumn Header="Payment" Width="90" Binding="{Binding Payment, Mode=TwoWay, StringFormat=\{0:F8\}}"/> |
94 | | - </DataGrid.Columns> |
95 | | - </DataGrid> |
96 | | - |
97 | | - <TextBlock HorizontalAlignment="Left" Margin="459,344,0,0" TextWrapping="Wrap" Text="Size:" VerticalAlignment="Top" FontWeight="Bold"/> |
98 | | - <TextBlock HorizontalAlignment="Left" Margin="494,344,0,0" TextWrapping="Wrap" Text="{Binding TransactionSize, Mode=OneWay}" VerticalAlignment="Top" ToolTip="Estimated final transaction size in Bytes"/> |
99 | | - <TextBlock HorizontalAlignment="Left" Margin="556,344,0,0" TextWrapping="Wrap" Text="Count:" VerticalAlignment="Top" FontWeight="Bold"/> |
100 | | - <TextBlock HorizontalAlignment="Left" Margin="604,344,0,0" TextWrapping="Wrap" Text="{Binding SelectedUTXOs.Count, Mode=OneWay}" VerticalAlignment="Top"/> |
101 | | - <TextBlock HorizontalAlignment="Left" Margin="459,375,0,0" TextWrapping="Wrap" Text="Balance Sum:" VerticalAlignment="Top" FontWeight="Bold"/> |
102 | | - <TextBlock HorizontalAlignment="Left" Margin="556,375,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="{Binding TotalBalance, Mode=OneWay, StringFormat=\{0:F8\}}"/> |
103 | | - <TextBlock HorizontalAlignment="Left" Margin="459,399,0,0" TextWrapping="Wrap" Text="Selected Sum:" VerticalAlignment="Top" FontWeight="Bold"/> |
104 | | - <TextBlock HorizontalAlignment="Left" Margin="556,399,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Text="{Binding TotalSelectedBalance, Mode=OneWay, StringFormat=\{0:F8\}}"/> |
105 | | - <TextBlock HorizontalAlignment="Left" Margin="459,432,0,0" TextWrapping="Wrap" Text="To Send:" VerticalAlignment="Top" FontWeight="Bold"/> |
106 | | - <TextBlock HorizontalAlignment="Left" Margin="556,432,0,0" TextWrapping="Wrap" Text="{Binding TotalToSend, Mode=OneWay, StringFormat=\{0:F8\}}" VerticalAlignment="Top"/> |
107 | | - <TextBlock HorizontalAlignment="Left" Margin="459,456,0,0" TextWrapping="Wrap" Text="Fee:" VerticalAlignment="Top" FontWeight="Bold"/> |
108 | | - <TextBlock HorizontalAlignment="Left" Margin="556,456,0,0" TextWrapping="Wrap" Text="{Binding Fee, Mode=OneWay, StringFormat=\{0:F8\}}" VerticalAlignment="Top" ToolTip="{Binding FeePerByte, Mode=OneWay}"/> |
109 | | - |
110 | | - <TextBox Text="{Binding RawTx, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="85" Margin="10,486,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="444" VerticalScrollBarVisibility="Visible"/> |
111 | | - |
112 | | - <ComboBox HorizontalAlignment="Left" Margin="539,486,0,0" VerticalAlignment="Top" Width="103" ItemsSource="{Binding WalletTypeList}" SelectedItem="{Binding SelectedWalletType}"/> |
113 | | - |
114 | | - <Button Content="Make Tx" HorizontalAlignment="Left" Margin="459,486,0,0" VerticalAlignment="Top" Width="75" |
115 | | - Command="{Binding MakeTxCommand, Mode=OneWay}"/> |
116 | | - <Button Content="QR" HorizontalAlignment="Left" Margin="459,516,0,0" VerticalAlignment="Top" Width="75" Command="{Binding ShowQrWindowCommand, Mode=OneWay}"/> |
117 | | - <Button Content="Copy" HorizontalAlignment="Left" Margin="459,546,0,0" VerticalAlignment="Top" Width="75" Command="{Binding CopyTxCommand, Mode=OneWay}"/> |
118 | | - <Button Content="JSON" HorizontalAlignment="Left" Margin="569,546,0,0" VerticalAlignment="Top" Width="75" Command="{Binding ShowJsonWindowCommand, Mode=OneWay}"/> |
119 | | - |
120 | | - <TextBlock Text="{Binding Errors}" HorizontalAlignment="Left" Margin="10,576,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="52" Width="647"/> |
| 134 | + |
| 135 | + <Grid Grid.Row="3"> |
| 136 | + <Grid.ColumnDefinitions> |
| 137 | + <ColumnDefinition Width="455"/> |
| 138 | + <ColumnDefinition/> |
| 139 | + </Grid.ColumnDefinitions> |
| 140 | + <Grid.RowDefinitions> |
| 141 | + <RowDefinition Height="1.5*"/> |
| 142 | + <RowDefinition/> |
| 143 | + </Grid.RowDefinitions> |
| 144 | + |
| 145 | + <DataGrid ItemsSource="{Binding ReceiveList}" AutoGenerateColumns="False" |
| 146 | + VerticalScrollBarVisibility="Visible" Margin="5" Grid.Column="0" Grid.Row="0"> |
| 147 | + <DataGrid.Columns> |
| 148 | + <DataGridTextColumn Header="Receiving Address" Width="330" Binding="{Binding Address, Mode=TwoWay}"/> |
| 149 | + <DataGridTextColumn Header="Payment" Width="90" Binding="{Binding Payment, Mode=TwoWay, StringFormat=\{0:F8\}}"/> |
| 150 | + </DataGrid.Columns> |
| 151 | + </DataGrid> |
| 152 | + |
| 153 | + <TextBox Text="{Binding RawTx, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" |
| 154 | + VerticalScrollBarVisibility="Visible" Margin="3" Grid.Column="0" Grid.Row="1"/> |
| 155 | + |
| 156 | + <Grid Margin="10,0,0,0" Grid.Column="1" Grid.Row="0"> |
| 157 | + <Grid.ColumnDefinitions> |
| 158 | + <ColumnDefinition/> |
| 159 | + <ColumnDefinition/> |
| 160 | + </Grid.ColumnDefinitions> |
| 161 | + <Grid.RowDefinitions> |
| 162 | + <RowDefinition Height="1.5*"/> |
| 163 | + <RowDefinition/> |
| 164 | + <RowDefinition Height="1.5*"/> |
| 165 | + <RowDefinition/> |
| 166 | + <RowDefinition/> |
| 167 | + </Grid.RowDefinitions> |
| 168 | + |
| 169 | + <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="0"> |
| 170 | + <TextBlock Text="Size:" FontWeight="Bold" Margin="0,0,5,0"/> |
| 171 | + <TextBlock Text="{Binding TransactionSize, Mode=OneWay}" ToolTip="Estimated final transaction size in Bytes"/> |
| 172 | + </StackPanel> |
| 173 | + <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0"> |
| 174 | + <TextBlock Text="Count:" FontWeight="Bold" Margin="0,0,5,0"/> |
| 175 | + <TextBlock Text="{Binding SelectedUTXOs.Count, Mode=OneWay}"/> |
| 176 | + </StackPanel> |
| 177 | + |
| 178 | + <TextBlock Text="Balance Sum:" FontWeight="Bold" Grid.Column="0" Grid.Row="1"/> |
| 179 | + <TextBlock Text="Selected Sum:" FontWeight="Bold" Grid.Column="0" Grid.Row="2"/> |
| 180 | + <TextBlock Text="To Send:" FontWeight="Bold" Grid.Column="0" Grid.Row="3"/> |
| 181 | + <TextBlock Text="Fee:" FontWeight="Bold" Grid.Column="0" Grid.Row="4"/> |
| 182 | + |
| 183 | + <TextBlock Text="{Binding TotalBalance, Mode=OneWay, StringFormat=\{0:F8\}}" |
| 184 | + Grid.Column="1" Grid.Row="1"/> |
| 185 | + <TextBlock Text="{Binding TotalSelectedBalance, Mode=OneWay, StringFormat=\{0:F8\}}" |
| 186 | + Grid.Column="1" Grid.Row="2"/> |
| 187 | + <TextBlock Text="{Binding TotalToSend, Mode=OneWay, StringFormat=\{0:F8\}}" |
| 188 | + Grid.Column="1" Grid.Row="3"/> |
| 189 | + <TextBlock Text="{Binding Fee, Mode=OneWay, StringFormat=\{0:F8\}}" ToolTip="{Binding FeePerByte, Mode=OneWay}" |
| 190 | + Grid.Column="1" Grid.Row="4"/> |
| 191 | + </Grid> |
| 192 | + |
| 193 | + <Grid Grid.Column="1" Grid.Row="1"> |
| 194 | + <Grid.ColumnDefinitions> |
| 195 | + <ColumnDefinition/> |
| 196 | + <ColumnDefinition/> |
| 197 | + </Grid.ColumnDefinitions> |
| 198 | + |
| 199 | + <StackPanel Orientation="Vertical" Grid.Column="0"> |
| 200 | + <Button Content="JSON" Command="{Binding ShowJsonWindowCommand, Mode=OneWay}" Width="75" Margin="2"/> |
| 201 | + <Button Content="QR" Command="{Binding ShowQrWindowCommand, Mode=OneWay}" Width="75" Margin="2"/> |
| 202 | + <Button Content="Copy" Command="{Binding CopyTxCommand, Mode=OneWay}" Width="75" Margin="2"/> |
| 203 | + </StackPanel> |
| 204 | + <StackPanel Orientation="Vertical" Grid.Column="1"> |
| 205 | + <ComboBox ItemsSource="{Binding WalletTypeList}" SelectedItem="{Binding SelectedWalletType}" Margin="5"/> |
| 206 | + <Button Content="Make Tx" Command="{Binding MakeTxCommand, Mode=OneWay}" Height="45" Width="75" Margin="2"/> |
| 207 | + </StackPanel> |
| 208 | + |
| 209 | + </Grid> |
| 210 | + </Grid> |
| 211 | + |
| 212 | + <DockPanel LastChildFill="False" Height="52" Margin="5,0,5,0" Grid.Row="4"> |
| 213 | + <TextBlock Text="{Binding Errors}" TextWrapping="Wrap" DockPanel.Dock="Left"/> |
| 214 | + <TextBlock Text="{Binding VerString}" VerticalAlignment="Bottom" DockPanel.Dock="Right"/> |
| 215 | + </DockPanel> |
| 216 | + |
121 | 217 | </Grid> |
122 | 218 | </Window> |
0 commit comments