/
MissingMnemonicView.axaml
161 lines (144 loc) · 7.04 KB
/
MissingMnemonicView.axaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<UserControl xmlns="https://github.com/avaloniaui"
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:vm="clr-namespace:FinderOuter.ViewModels;assembly=FinderOuter"
mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="400"
x:CompileBindings="True"
x:DataType="vm:MissingMnemonicViewModel"
x:Class="FinderOuter.Views.MissingMnemonicView">
<Design.DataContext>
<vm:MissingMnemonicViewModel/>
</Design.DataContext>
<Grid ColumnDefinitions="*,auto" RowDefinitions="auto,auto,auto,auto">
<TextBox Text="{Binding Input}"
FontFamily="{Binding CjkFont}"
Watermark="Mnemonic (seed phrase), separate each word with a space and replace missing words with the MissingChar"
Grid.Column="0"
Grid.Row="0"/>
<Button Classes="Help"
CommandParameter="{Binding InputKb}"
Grid.Column="0"
Grid.Row="0"/>
<Grid ColumnDefinitions="*,auto" Grid.Column="0" Grid.Row="1">
<TextBox Text="{Binding CompareInput}"
Watermark="Compare results to: (a child private key, public key, or an address)"
Grid.Column="0"/>
<Button Classes="Help"
CommandParameter="{Binding ExtraInputKb}"
Grid.Column="0"
Grid.Row="2"/>
<ComboBox ItemsSource="{Binding CompareInputTypeList}"
SelectedItem="{Binding SelectedCompareInputType}"
Classes="DescriptiveItem"
Grid.Column="1"/>
</Grid>
<Grid ColumnDefinitions="*,*" Grid.Column="0" Grid.Row="2">
<TextBox Text="{Binding PassPhrase}"
Watermark="PassPhrase (optional)"
Grid.Column="0"/>
<TextBox Text="{Binding KeyPath}"
Watermark="Complete path of the given key/address below"
Grid.Column="1"/>
<Button Classes="Help"
CommandParameter="{Binding Bip32PathKb}"
Grid.Column="1"/>
</Grid>
<StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="0">
<ComboBox ItemsSource="{Binding MissingChars}"
SelectedItem="{Binding SelectedMissingChar}"
ToolTip.Tip="{Binding MissingToolTip}"
Margin="1"/>
<ComboBox ItemsSource="{Binding MnemonicTypesList}"
SelectedItem="{Binding SelectedMnemonicType}"
Margin="1"/>
</StackPanel>
<ComboBox ItemsSource="{Binding WordListsList}"
SelectedItem="{Binding SelectedWordListType}"
Margin="1"
Grid.Column="1"
Grid.Row="1"/>
<ComboBox ItemsSource="{Binding ElectrumMnemonicTypesList}"
SelectedItem="{Binding SelectedElectrumMnType}"
IsVisible="{Binding IsElectrumTypesVisible}"
ToolTip.Tip="Electrum mnemonic type"
Grid.Column="1"
Grid.Row="2"/>
<Expander Header="Advanced (limit search space)" IsExpanded="False" Grid.Column="0" Grid.Row="3">
<Grid ColumnDefinitions="auto,*,auto" RowDefinitions="auto,*">
<Grid ColumnDefinitions="auto,*" Grid.Column="0" Grid.Row="0">
<Button Content="Start"
Command="{Binding StartCommand}"
Width="70"
Grid.Column="0"/>
<ToggleSwitch Name="InputTypeToggle"
OffContent="Normal" OnContent="Auto Complete"
Margin="10,0,0,0"
Grid.Column="1"/>
</Grid>
<Grid ColumnDefinitions="auto,*,auto" Margin="5,0,5,0" Grid.Column="1" Grid.Row="0">
<Button Content="<"
Command="{Binding PreviousCommand}"
ToolTip.Tip="Previous missing word"
Width="50"
Grid.Column="0"/>
<TextBlock Text="{Binding SelectedStep}"
TextAlignment="Center"
Width="120"
Grid.Column="1"/>
<Button Content=">"
Command="{Binding NextCommand}"
ToolTip.Tip="Next missing word"
Width="50"
Grid.Column="2"/>
</Grid>
<StackPanel Orientation="Horizontal" Spacing="5" Grid.Column="2" Grid.Row="0">
<TextBlock Text="Total: "/>
<TextBlock Text="{Binding CurrentItems.Count}"/>
</StackPanel>
<Grid ColumnDefinitions="*,auto" Width="268" Grid.Column="0" Grid.Row="1"
IsVisible="{Binding ElementName=InputTypeToggle, Path=IsChecked}">
<AutoCompleteBox Text="{Binding ToAdd}"
ItemsSource="{Binding WordList}"
IsEnabled="{Binding ElementName=InputTypeToggle, Path=IsChecked}"
IsTextCompletionEnabled="True"
FilterMode="Contains"
MaxDropDownHeight="200"
Height="45"
VerticalAlignment="Top"
Grid.Column="0"/>
<Button Content="+" Command="{Binding AddExactCommand}"
Margin="2,0,0,0" Width="45" Height="45"
FontSize="20"
VerticalAlignment="Top"
Grid.Column="1"/>
</Grid>
<Grid ColumnDefinitions="*,*" RowDefinitions="*,*,*,*" Grid.Column="0" Grid.Row="1"
IsVisible="{Binding ElementName=InputTypeToggle, Path=!IsChecked}">
<Grid.Styles>
<Style Selector="Button">
<Setter Property="Margin" Value="2"/>
<Setter Property="Width" Value="130"/>
</Style>
</Grid.Styles>
<TextBox Text="{Binding ToAdd}" Grid.ColumnSpan="2" Grid.Row="0" MinHeight="30"/>
<Button Content="Similar words" Command="{Binding AddSimilarCommand}" Grid.Column="0" Grid.Row="1"/>
<Button Content="Exact word" Command="{Binding AddExactCommand}" Grid.Column="1" Grid.Row="1"/>
<Button Content="Words starting with" Command="{Binding AddStartCommand}" Grid.Column="0" Grid.Row="2"/>
<Button Content="Words ending in" Command="{Binding AddEndCommand}" Grid.Column="1" Grid.Row="2"/>
<Button Content="Words containing" Command="{Binding AddContainCommand}" Grid.Column="0" Grid.Row="3"/>
</Grid>
<ListBox ItemsSource="{Binding CurrentItems}"
SelectedItem="{Binding SelectedItem}"
Height="130"
Margin="3"
Grid.Column="1" Grid.Row="1"/>
<StackPanel Orientation="Vertical" Spacing="5" Grid.Column="2" Grid.Row="1">
<Button Content="Add all words" Command="{Binding AddAllCommand}"/>
<Button Content="Clear list" Command="{Binding ClearAllCommand}"/>
<Button Content="Remove selected" Command="{Binding RemoveSelectedCommand}"/>
</StackPanel>
</Grid>
</Expander>
</Grid>
</UserControl>