Skip to content

Commit

Permalink
UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Mag-nus committed Nov 13, 2018
1 parent 15fafc0 commit 85d9330
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 5 additions & 9 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</TabItem>
<TabItem Header="Bulk Launcher" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid Background="#FFE5E5E5">
<ComboBox x:Name="cboBulkLauncherServerList" Margin="10,10,114,0" VerticalAlignment="Top"/>
<ComboBox x:Name="cboBulkLauncherServerList" Margin="10,10,114,0" VerticalAlignment="Top" SelectionChanged="cboBulkLauncherServerList_SelectionChanged"/>
<Label Content="Quantity to launch" HorizontalAlignment="Left" Margin="10,44,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="txtBulkLaunchQuantity" Margin="163,47,0,0" TextWrapping="Wrap" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="53" RenderTransformOrigin="1.927,-3.718" Text="{Binding BulkLaunchQuantity, Mode=TwoWay, Source={x:Static p:Settings.Default}}" MaxLength="5" MaxLines="1"/>
<Label Content="Start launch at index" HorizontalAlignment="Left" Margin="10,72,0,0" VerticalAlignment="Top"/>
Expand All @@ -54,20 +54,16 @@
</TabItem>
<TabItem Header="Options">
<Grid Background="#FFE5E5E5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="113*"/>
<ColumnDefinition Width="388*"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtACClientLocation" HorizontalAlignment="Left" Height="23" Margin="10,36,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="300" IsReadOnly="True" Text="{Binding ACClientLocation, Mode=TwoWay, Source={x:Static p:Settings.Default}}" Grid.ColumnSpan="2"/>
<Label Content="ACClient.exe Location" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
<Button x:Name="btnACClientLocation" Content="..." HorizontalAlignment="Left" Margin="201.568,37,0,0" VerticalAlignment="Top" Width="28" Click="btnACClientLocation_Click" Grid.Column="1"/>
<Button x:Name="btnACClientLocation" Content="..." HorizontalAlignment="Left" Margin="315,37,0,0" VerticalAlignment="Top" Width="28" Click="btnACClientLocation_Click"/>
<TextBox x:Name="txtDecalInjectLocation" HorizontalAlignment="Left" Height="23" Margin="10,95,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="300" IsReadOnly="True" Text="{Binding DecalInjectLocation, Mode=TwoWay, Source={x:Static p:Settings.Default}}" Grid.ColumnSpan="2"/>
<Label Content="Decal Location" HorizontalAlignment="Left" Margin="10,69,0,0" VerticalAlignment="Top"/>
<Button x:Name="btnDecalInjectLocation" Content="..." HorizontalAlignment="Left" Margin="201.568,96,0,0" VerticalAlignment="Top" Width="28" Click="btnDecalLocation_Click" Grid.Column="1"/>
<Button x:Name="btnDecalInjectLocation" Content="..." HorizontalAlignment="Left" Margin="315,96,0,0" VerticalAlignment="Top" Width="28" Click="btnDecalLocation_Click"/>
<CheckBox x:Name="chkInjectDecal" Content="Inject Decal" HorizontalAlignment="Left" Margin="10,128,0,0" VerticalAlignment="Top" RenderTransformOrigin="1.041,3.396" IsChecked="{Binding InjectDecal, Mode=TwoWay, Source={x:Static p:Settings.Default}}"/>
<Label Content="Interval between launches" HorizontalAlignment="Left" Margin="10,157,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
<TextBox x:Name="txtBulkLaunchInterval" Margin="49.568,160,0,0" TextWrapping="Wrap" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="38" RenderTransformOrigin="1.927,-3.718" Text="{Binding IntervalBetweenLaunches, Mode=TwoWay, Source={x:Static p:Settings.Default}}" MaxLines="1" MaxLength="2" Grid.Column="1"/>
<Label Content="s" HorizontalAlignment="Left" Margin="84.568,160,0,0" VerticalAlignment="Top" Grid.Column="1"/>
<TextBox x:Name="txtBulkLaunchInterval" Margin="158,160,0,0" TextWrapping="Wrap" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="38" RenderTransformOrigin="1.927,-3.718" Text="{Binding IntervalBetweenLaunches, Mode=TwoWay, Source={x:Static p:Settings.Default}}" MaxLines="1" MaxLength="2"/>
<Label Content="s" HorizontalAlignment="Left" Margin="193,160,0,0" VerticalAlignment="Top"/>
</Grid>
</TabItem>
</TabControl>
Expand Down
8 changes: 7 additions & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private bool DoLaunch(Server server, Account account)
private void cboLauncherServerList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (cboLauncherServerList.SelectedItem is Server server)
SetListAccountsSource(server.Accounts);
SelectServer(server.Id);
}

private void cmdAddServer_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -353,6 +353,12 @@ private async void cmdLaunchAll_Click(object sender, RoutedEventArgs e)
// ========== BULK LAUNCH TAB ==========
// =====================================

private void cboBulkLauncherServerList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (cboBulkLauncherServerList.SelectedItem is Server server)
SelectServer(server.Id);
}

private async void cmdBulkLaunch_Click(object sender, RoutedEventArgs e)
{
if (cmdBulkLaunch.Content.ToString() == "Cancel")
Expand Down

0 comments on commit 85d9330

Please sign in to comment.