Skip to content

Commit d1d95c4

Browse files
committed
interface mods
1 parent 10502b0 commit d1d95c4

File tree

2 files changed

+77
-13
lines changed

2 files changed

+77
-13
lines changed

TranslateXML/MainWindow.xaml

Lines changed: 75 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,90 @@
77
mc:Ignorable="d"
88
Title="Translate XML" Height="543.4" Width="525" Icon="AppIcon.ico" WindowStartupLocation="CenterScreen">
99
<Grid>
10-
<Button x:Name="buttonTranslate" Content="Translate" Margin="0,10,100.4,0" VerticalAlignment="Top" Click="buttonTranslate_Click" HorizontalAlignment="Right" Width="85" Height="19"/>
11-
<Label x:Name="label1" Content="Input" HorizontalAlignment="Left" Margin="10,40,0,0" VerticalAlignment="Top" Width="86" Height="26"/>
12-
<Label x:Name="label1_Copy" Content="Output folder" HorizontalAlignment="Left" Margin="9,71,0,0" VerticalAlignment="Top" Width="86" Height="26"/>
13-
<TextBox x:Name="textBoxOutput" Height="23" Margin="99,75,10.4,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top"/>
14-
<ComboBox x:Name="comboBox" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="85" SelectionChanged="comboBox_SelectionChanged" Height="22">
10+
<Grid.Background>
11+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
12+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
13+
<GradientStop Color="White"/>
14+
</LinearGradientBrush>
15+
</Grid.Background>
16+
<Button x:Name="buttonTranslate" Content="Translate" Margin="0,10,100.4,0" VerticalAlignment="Top" Click="buttonTranslate_Click" HorizontalAlignment="Right" Width="85" Height="22">
17+
<Button.Background>
18+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
19+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
20+
<GradientStop Color="White"/>
21+
</LinearGradientBrush>
22+
</Button.Background>
23+
</Button>
24+
<Label x:Name="label1" Content="Input" HorizontalAlignment="Left" Margin="10,40,0,0" VerticalAlignment="Top" Width="86" Height="26" HorizontalContentAlignment="Right"/>
25+
<Label x:Name="label1_Copy" Content="Output folder" HorizontalAlignment="Left" Margin="9,71,0,0" VerticalAlignment="Top" Width="86" Height="26" HorizontalContentAlignment="Right"/>
26+
<TextBox x:Name="textBoxOutput" Height="23" Margin="99,75,10.4,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top">
27+
<TextBox.Background>
28+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
29+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
30+
<GradientStop Color="White"/>
31+
</LinearGradientBrush>
32+
</TextBox.Background>
33+
</TextBox>
34+
<ComboBox x:Name="comboBox" HorizontalAlignment="Left" Margin="99,10,0,0" VerticalAlignment="Top" Width="85" SelectionChanged="comboBox_SelectionChanged" Height="22">
35+
<ComboBox.Background>
36+
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
37+
<GradientStop Color="#FFF0F0F0"/>
38+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
39+
</LinearGradientBrush>
40+
</ComboBox.Background>
1541
<ComboBoxItem Content="SB xml"/>
1642
<ComboBoxItem Content="SB resx"/>
1743
</ComboBox>
18-
<Button x:Name="buttonHelp" Content="Help" Margin="0,10,10.4,0" VerticalAlignment="Top" Click="buttonHelp_Click" HorizontalAlignment="Right" Width="85" RenderTransformOrigin="0.502,0.5" Height="19"/>
19-
<ComboBox x:Name="comboBoxInput" Margin="99,43,10.4,0" VerticalAlignment="Top" SelectionChanged="comboBoxInput_SelectionChanged" Height="22"/>
20-
<Button x:Name="buttonAddXML" Content="Add xml" Margin="0,10,190.4,0" VerticalAlignment="Top" Click="buttonAdd_Click" HorizontalAlignment="Right" Width="85" RenderTransformOrigin="0.502,0.5" ToolTip="Add a file to the Input list" Height="19"/>
21-
<ProgressBar x:Name="progress" Margin="10,0,10.4,9.6" Foreground="#FF4EBFCA" VerticalAlignment="Bottom" Height="16" RenderTransformOrigin="0.5,0.5"/>
44+
<Button x:Name="buttonHelp" Content="Help" Margin="0,10,10.4,0" VerticalAlignment="Top" Click="buttonHelp_Click" HorizontalAlignment="Right" Width="85" Height="22">
45+
<Button.Background>
46+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
47+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
48+
<GradientStop Color="White"/>
49+
</LinearGradientBrush>
50+
</Button.Background>
51+
</Button>
52+
<ComboBox x:Name="comboBoxInput" Margin="99,43,10.4,0" VerticalAlignment="Top" SelectionChanged="comboBoxInput_SelectionChanged" Height="22">
53+
<ComboBox.Background>
54+
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
55+
<GradientStop Color="#FFF0F0F0" Offset="0"/>
56+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
57+
</LinearGradientBrush>
58+
</ComboBox.Background>
59+
</ComboBox>
60+
<Button x:Name="buttonAddXML" Content="Add xml" Margin="0,10,190.4,0" VerticalAlignment="Top" Click="buttonAdd_Click" HorizontalAlignment="Right" Width="85" ToolTip="Add a file to the Input list" Height="22">
61+
<Button.Background>
62+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
63+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
64+
<GradientStop Color="White"/>
65+
</LinearGradientBrush>
66+
</Button.Background>
67+
</Button>
68+
<ProgressBar x:Name="progress" Margin="10,0,10.4,9.6" Foreground="#FF327D85" VerticalAlignment="Bottom" Height="16" />
2269
<TextBox x:Name="textBoxProgress" Margin="10,0,10.4,9.6" HorizontalContentAlignment="Center" FontSize="10" IsReadOnly="True" TextOptions.TextFormattingMode="Display" Background="Transparent" BorderBrush="#00ABADB3" Height="16" VerticalAlignment="Bottom" VerticalContentAlignment="Center"/>
2370
<Grid Margin="0,102,0.4,25.6">
2471
<Grid.ColumnDefinitions>
2572
<ColumnDefinition/>
2673
<ColumnDefinition/>
2774
</Grid.ColumnDefinitions>
28-
<ListBox x:Name="listBoxFrom" Margin="10,40,10.2,10" SelectionChanged="listBoxFrom_SelectionChanged"/>
29-
<Label x:Name="label" Content="Translate From" Margin="10,10,10.2,0" VerticalAlignment="Top" RenderTransformOrigin="-0.323,0.059" Height="25" HorizontalContentAlignment="Center"/>
30-
<Label x:Name="label_Copy" Content="Translate To" Margin="9.8,10,11.4,0" VerticalAlignment="Top" RenderTransformOrigin="-0.323,0.059" Height="25" Grid.Column="1" HorizontalContentAlignment="Center"/>
31-
<ListBox x:Name="listBoxTo" Margin="8.8,40,10.4,10" SelectionChanged="listBoxTo_SelectionChanged" Grid.Column="1"/>
75+
<ListBox x:Name="listBoxFrom" Margin="10,40,10.2,10" SelectionChanged="listBoxFrom_SelectionChanged">
76+
<ListBox.Background>
77+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
78+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
79+
<GradientStop Color="White"/>
80+
</LinearGradientBrush>
81+
</ListBox.Background>
82+
</ListBox>
83+
<Label x:Name="labelFrom" Content="Translate From" Margin="10,10,10.2,0" VerticalAlignment="Top" RenderTransformOrigin="-0.323,0.059" Height="25" HorizontalContentAlignment="Center"/>
84+
<Label x:Name="labelTo" Content="Translate To" Margin="9.8,10,11.4,0" VerticalAlignment="Top" RenderTransformOrigin="-0.323,0.059" Height="25" Grid.Column="1" HorizontalContentAlignment="Center"/>
85+
<ListBox x:Name="listBoxTo" Margin="8.8,40,10.4,10" SelectionChanged="listBoxTo_SelectionChanged" Grid.Column="1">
86+
<ListBox.Background>
87+
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
88+
<GradientStop Color="#FF9CC3C7" Offset="1"/>
89+
<GradientStop Color="White"/>
90+
</LinearGradientBrush>
91+
</ListBox.Background>
92+
</ListBox>
3293
</Grid>
94+
<Label x:Name="label1_Copy1" Content="File type" HorizontalAlignment="Left" Margin="8,10,0,0" VerticalAlignment="Top" Width="86" Height="26" HorizontalContentAlignment="Right"/>
3395
</Grid>
3496
</Window>

TranslateXML/MainWindow.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ private void listBoxFrom_SelectionChanged(object sender, SelectionChangedEventAr
211211
{
212212
ListBox listbox = (ListBox)sender;
213213
iFrom = listbox.SelectedIndex;
214+
labelFrom.Content = "Translate from " + languageNames[iFrom];
214215
}
215216

216217
private void listBoxTo_SelectionChanged(object sender, SelectionChangedEventArgs e)
217218
{
218219
ListBox listbox = (ListBox)sender;
219220
iTo = listbox.SelectedIndex;
221+
labelTo.Content = "Translate to " + languageNames[iTo];
220222
}
221223

222224
private void comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)

0 commit comments

Comments
 (0)