|
11 | 11 | d:DesignHeight="420" |
12 | 12 | d:DesignWidth="580"> |
13 | 13 | <UserControl.Resources> |
14 | | - <converter:MiscToolReplaceCharConverter x:Key="MTRCConverter" /> |
15 | | - </UserControl.Resources> |
16 | | - <d:UserControl.Resources> |
17 | 14 | <ResourceDictionary> |
18 | 15 | <ResourceDictionary.MergedDictionaries> |
19 | 16 | <ResourceDictionary Source="/GlobalResDictionary.xaml" /> |
20 | 17 | </ResourceDictionary.MergedDictionaries> |
21 | 18 | </ResourceDictionary> |
22 | | - </d:UserControl.Resources> |
23 | | - <Grid Margin="5"> |
24 | | - <Grid.RowDefinitions> |
25 | | - <RowDefinition /> |
26 | | - <RowDefinition /> |
27 | | - </Grid.RowDefinitions> |
28 | | - <Grid.ColumnDefinitions> |
29 | | - <ColumnDefinition /> |
30 | | - <ColumnDefinition /> |
31 | | - </Grid.ColumnDefinitions> |
32 | | - <Grid Margin="0,0,5,5" |
33 | | - Grid.Row="0" |
34 | | - Grid.Column="0"> |
35 | | - <Grid.RowDefinitions> |
36 | | - <RowDefinition Height="25" /> |
37 | | - <RowDefinition Height="*" /> |
38 | | - <RowDefinition Height="*" /> |
39 | | - </Grid.RowDefinitions> |
40 | | - <StackPanel Grid.Row="0" |
41 | | - Orientation="Horizontal"> |
42 | | - <Label Content="Replace" |
43 | | - FontSize="14" |
44 | | - Foreground="White" |
45 | | - Margin="0,-2,0,0" /> |
46 | | - <TextBox Style="{DynamicResource UniTextBoxStyle}" |
47 | | - Name="ReplaceFrom" |
48 | | - FontSize="14" |
49 | | - Text="{}{}" |
50 | | - VerticalContentAlignment="Center" |
51 | | - Height="20" |
52 | | - Width="25" |
53 | | - Margin="0,0,0,2" |
54 | | - Padding="0,-3,0,0" /> |
55 | | - <Label Content="with" |
56 | | - FontSize="14" |
57 | | - Foreground="White" |
58 | | - Margin="0,-2,0,0" /> |
59 | | - <TextBox Style="{DynamicResource UniTextBoxStyle}" |
60 | | - Name="ReplaceTo" |
61 | | - FontSize="14" |
62 | | - Text="()" |
63 | | - VerticalContentAlignment="Center" |
64 | | - Height="20" |
65 | | - Width="25" |
66 | | - Margin="0,0,0,2" |
67 | | - Padding="0,-3,0,0" /> |
68 | | - <Button Style="{DynamicResource UniBtnStyle}" |
69 | | - Content="🔰" |
70 | | - Height="20" |
71 | | - Width="20" |
72 | | - Margin="20,0,0,2" |
73 | | - ToolTip="It's character-based.
By default, it will replace all '{' with '(' and all '}' with ')'." |
74 | | - Command="{Binding MiscTools.ReplaceCharCommand}"> |
75 | | - <Button.CommandParameter> |
76 | | - <MultiBinding Converter="{StaticResource MTRCConverter}"> |
77 | | - <Binding ElementName="ReplaceFrom" |
78 | | - Path="Text" /> |
79 | | - <Binding ElementName="ReplaceTo" |
80 | | - Path="Text" /> |
81 | | - <Binding ElementName="TextBefore" |
82 | | - Path="Text" /> |
83 | | - <Binding ElementName="TextAfter" /> |
84 | | - </MultiBinding> |
85 | | - </Button.CommandParameter> |
86 | | - </Button> |
87 | | - </StackPanel> |
88 | | - <TextBox Name="TextBefore" |
89 | | - Grid.Row="1" |
90 | | - AcceptsReturn="True" |
91 | | - Style="{DynamicResource UniTextBoxStyle}" |
92 | | - Margin="0,0,0,2" /> |
93 | | - <TextBox Name="TextAfter" |
94 | | - Grid.Row="2" |
95 | | - AcceptsReturn="True" |
96 | | - Style="{DynamicResource UniTextBoxStyle}" |
97 | | - Margin="0,2,0,0" /> |
98 | | - </Grid> |
99 | | - </Grid> |
| 19 | + </UserControl.Resources> |
| 20 | + <TabControl Background="Transparent" |
| 21 | + TabStripPlacement="Left"> |
| 22 | + <TabItem Header="Replace Char" |
| 23 | + Foreground="White" |
| 24 | + Style="{StaticResource TabItemStyle1}" |
| 25 | + Background="#1E1E1E"> |
| 26 | + <Grid Margin="5,2,5,5" |
| 27 | + Grid.Row="0" |
| 28 | + Grid.Column="0"> |
| 29 | + <Grid.RowDefinitions> |
| 30 | + <RowDefinition Height="25" /> |
| 31 | + <RowDefinition Height="*" /> |
| 32 | + <RowDefinition Height="*" /> |
| 33 | + </Grid.RowDefinitions> |
| 34 | + <StackPanel Grid.Row="0" |
| 35 | + Orientation="Horizontal"> |
| 36 | + <Label Content="Replace" |
| 37 | + FontSize="14" |
| 38 | + Foreground="White" |
| 39 | + Margin="0,-2,0,0" /> |
| 40 | + <TextBox Style="{DynamicResource UniTextBoxStyle}" |
| 41 | + Name="ReplaceFrom" |
| 42 | + FontSize="14" |
| 43 | + Text="{}{}" |
| 44 | + VerticalContentAlignment="Center" |
| 45 | + Height="20" |
| 46 | + Width="25" |
| 47 | + Margin="0,0,0,2" |
| 48 | + Padding="0,-3,0,0" /> |
| 49 | + <Label Content="with" |
| 50 | + FontSize="14" |
| 51 | + Foreground="White" |
| 52 | + Margin="0,-2,0,0" /> |
| 53 | + <TextBox Style="{DynamicResource UniTextBoxStyle}" |
| 54 | + Name="ReplaceTo" |
| 55 | + FontSize="14" |
| 56 | + Text="()" |
| 57 | + VerticalContentAlignment="Center" |
| 58 | + Height="20" |
| 59 | + Width="25" |
| 60 | + Margin="0,0,0,2" |
| 61 | + Padding="0,-3,0,0" /> |
| 62 | + <Button Style="{DynamicResource UniBtnStyle}" |
| 63 | + Content="🔰" |
| 64 | + Height="20" |
| 65 | + Width="20" |
| 66 | + Margin="20,0,0,2" |
| 67 | + ToolTip="It's character-based.
By default, it will replace all '{' with '(' and all '}' with ')'." |
| 68 | + Command="{Binding MiscTools.ReplaceCharCommand}"> |
| 69 | + <Button.CommandParameter> |
| 70 | + <MultiBinding Converter="{StaticResource MTRCConverter}"> |
| 71 | + <Binding ElementName="ReplaceFrom" |
| 72 | + Path="Text" /> |
| 73 | + <Binding ElementName="ReplaceTo" |
| 74 | + Path="Text" /> |
| 75 | + <Binding ElementName="TextBefore" |
| 76 | + Path="Text" /> |
| 77 | + <Binding ElementName="TextAfter" /> |
| 78 | + </MultiBinding> |
| 79 | + </Button.CommandParameter> |
| 80 | + </Button> |
| 81 | + </StackPanel> |
| 82 | + <TextBox Name="TextBefore" |
| 83 | + Grid.Row="1" |
| 84 | + AcceptsReturn="True" |
| 85 | + Style="{DynamicResource UniTextBoxStyle}" |
| 86 | + Margin="0,0,0,2" /> |
| 87 | + <TextBox Name="TextAfter" |
| 88 | + Grid.Row="2" |
| 89 | + AcceptsReturn="True" |
| 90 | + Style="{DynamicResource UniTextBoxStyle}" |
| 91 | + Margin="0,2,0,0" /> |
| 92 | + </Grid> |
| 93 | + </TabItem> |
| 94 | + <TabItem Header="Emb. List" |
| 95 | + Foreground="White" |
| 96 | + Style="{StaticResource TabItemStyle1}" |
| 97 | + Background="#1E1E1E"> |
| 98 | + <Grid Margin="5"> |
| 99 | + <Grid.ColumnDefinitions> |
| 100 | + <ColumnDefinition Width="2*" /> |
| 101 | + <ColumnDefinition Width="*" /> |
| 102 | + </Grid.ColumnDefinitions> |
| 103 | + <Grid.RowDefinitions> |
| 104 | + <RowDefinition Height="*" /> |
| 105 | + <RowDefinition Height="25" /> |
| 106 | + </Grid.RowDefinitions> |
| 107 | + <DockPanel Grid.Row="1" |
| 108 | + Grid.Column="0" |
| 109 | + Grid.ColumnSpan="2"> |
| 110 | + <Label Content="Path" |
| 111 | + Foreground="WhiteSmoke" |
| 112 | + DockPanel.Dock="Left" |
| 113 | + Padding="0,4,5,0" /> |
| 114 | + <TextBox DockPanel.Dock="Left" |
| 115 | + Background="Transparent" |
| 116 | + VerticalContentAlignment="Center" |
| 117 | + Style="{DynamicResource UniTextBoxStyle}" |
| 118 | + Text="{Binding MiscTools.EmbDir, UpdateSourceTrigger=PropertyChanged}" /> |
| 119 | + </DockPanel> |
| 120 | + <Grid Grid.Column="0"> |
| 121 | + <Grid.RowDefinitions> |
| 122 | + <RowDefinition Height="25" /> |
| 123 | + <RowDefinition Height="*" /> |
| 124 | + </Grid.RowDefinitions> |
| 125 | + <DockPanel Grid.Row="0"> |
| 126 | + <Label DockPanel.Dock="Left" |
| 127 | + Content="Positive Embeddings" |
| 128 | + Foreground="WhiteSmoke" |
| 129 | + FontSize="14" |
| 130 | + Padding="5,0,0,0" /> |
| 131 | + <Button DockPanel.Dock="Right" |
| 132 | + Width="60" |
| 133 | + Style="{DynamicResource UniBtnStyle}" |
| 134 | + Content="Save All" |
| 135 | + HorizontalAlignment="Right" |
| 136 | + Margin="0,0,5,3" |
| 137 | + Padding="0,0,0,1.4" |
| 138 | + Command="{Binding MiscTools.UpdateEmbJsonCommand}" /> |
| 139 | + </DockPanel> |
| 140 | + <ListBox Grid.Row="1" |
| 141 | + Background="Transparent" |
| 142 | + Margin="0,0,5,5" |
| 143 | + ItemsSource="{Binding MiscTools.PEmbList}" |
| 144 | + d:ItemsSource="{d:SampleData ItemCount=8}"> |
| 145 | + <ListBox.ItemTemplate> |
| 146 | + <DataTemplate> |
| 147 | + <StackPanel Orientation="Horizontal"> |
| 148 | + <Label Foreground="White" |
| 149 | + FontSize="13" |
| 150 | + Content="{Binding EmbName}" |
| 151 | + ToolTip="{Binding EmbName}" /> |
| 152 | + <TextBox Foreground="White" |
| 153 | + VerticalContentAlignment="Center" |
| 154 | + Style="{DynamicResource UniTextBoxStyle}" |
| 155 | + Text="{Binding EmbTag}" |
| 156 | + ToolTip="{Binding EmbTag}" /> |
| 157 | + </StackPanel> |
| 158 | + </DataTemplate> |
| 159 | + </ListBox.ItemTemplate> |
| 160 | + </ListBox> |
| 161 | + </Grid> |
| 162 | + <Grid Grid.Column="1"> |
| 163 | + <Grid.RowDefinitions> |
| 164 | + <RowDefinition Height="25" /> |
| 165 | + <RowDefinition Height="*" /> |
| 166 | + </Grid.RowDefinitions> |
| 167 | + <Label Grid.Row="0" |
| 168 | + Content="Negative Embeddings" |
| 169 | + Foreground="WhiteSmoke" |
| 170 | + FontSize="14" |
| 171 | + Padding="5,0,0,0" /> |
| 172 | + <ListBox Grid.Row="1" |
| 173 | + Background="Transparent" |
| 174 | + Margin="0,0,5,5" |
| 175 | + ItemsSource="{Binding MiscTools.NEmbList}" |
| 176 | + d:ItemsSource="{d:SampleData ItemCount=8}"> |
| 177 | + <ListBox.ItemTemplate> |
| 178 | + <DataTemplate> |
| 179 | + <StackPanel Orientation="Horizontal"> |
| 180 | + <Label Foreground="White" |
| 181 | + FontSize="13" |
| 182 | + Content="{Binding EmbName}" |
| 183 | + ToolTip="{Binding EmbName}" /> |
| 184 | + <TextBox Foreground="White" |
| 185 | + VerticalContentAlignment="Center" |
| 186 | + Style="{DynamicResource UniTextBoxStyle}" |
| 187 | + Text="{Binding EmbTag}" |
| 188 | + ToolTip="{Binding EmbTag}" /> |
| 189 | + </StackPanel> |
| 190 | + </DataTemplate> |
| 191 | + </ListBox.ItemTemplate> |
| 192 | + </ListBox> |
| 193 | + </Grid> |
| 194 | + </Grid> |
| 195 | + </TabItem> |
| 196 | + <TabItem Header="TBD" |
| 197 | + Foreground="White" |
| 198 | + Style="{StaticResource TabItemStyle1}" |
| 199 | + Background="#1E1E1E"> |
| 200 | + </TabItem> |
| 201 | + </TabControl> |
100 | 202 | </UserControl> |
0 commit comments