Permalink
Browse files

Hide Setup tab and make the Settings tab the default tab.

  • Loading branch information...
ElementalCrisis committed Jul 3, 2018
1 parent 3511693 commit e6a83956f62d831b3adfc1f3bb601b414bed6524
Showing with 20 additions and 21 deletions.
  1. +19 −20 Shoko.UI/MainWindow.xaml
  2. +1 −1 Shoko.UI/MainWindow.xaml.cs
@@ -308,12 +308,18 @@
<forms:Integrity />
</TabItem>
<!-- Settings tab-->
<TabItem Header="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Tab_Settings}"
Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<TabItem Header="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Tab_Settings}">

<!-- Server Port -->

<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5">

<!--Server Status Message-->
<StackPanel Orientation="Horizontal" Margin="5,5,5,10">
<TextBlock Text="{Binding Source={x:Static server:ServerState.Instance}, Path=CurrentSetupStatus}" FontWeight="DemiBold" VerticalAlignment="Center" />
</StackPanel>

<!-- Server Port -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_ServerPort}"
VerticalAlignment="Center" />
<TextBox Name="txtServerPort" Width="100" Margin="10,0,0,0" />
@@ -330,7 +336,7 @@
</StackPanel>

<!-- Image Path -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5,10,5,5">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5,10,5,5" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_ImagePath}"
VerticalAlignment="Center" />
<Button Name="btnSetDefault" Style="{DynamicResource RoundButtonStyle}"
@@ -354,7 +360,7 @@
</StackPanel>

<!-- Image Patch Location -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5,0,5,5">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5,0,5,5" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock
Text="{Binding Source={x:Static server:ServerState.Instance}, Path=BaseImagePath}"
Name="txtImagesPath" VerticalAlignment="Center" Margin="20,0,5,0" Foreground="DarkGray">
@@ -370,7 +376,7 @@
<Button Margin="2,10,2,2" Style="{DynamicResource FlatButtonStyle}" Name="btnMaxOnStartup"
Width="180" HorizontalAlignment="Left"
Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=MinOnStartup, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<Image Height="16" Width="16" Source="/Images/16_tick.png" Margin="0,0,5,0" />
<TextBlock VerticalAlignment="Center"
Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_Minimize}"
@@ -382,7 +388,7 @@
<Button Margin="2,10,2,2" Style="{DynamicResource FlatButtonStyle}" Name="btnMinOnStartup"
Width="180" HorizontalAlignment="Left"
Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=MaxOnStartup, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">

<TextBlock VerticalAlignment="Center"
Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_Minimize}"
@@ -396,7 +402,7 @@
Name="btnJMMEnableStartWithWindows" HorizontalAlignment="Left" IsEnabled="True"
VerticalAlignment="Center"
Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=IsAutostartDisabled, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock VerticalAlignment="Center"
Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_Windows}"
Foreground="DarkGray" Margin="0,0,5,0" />
@@ -408,7 +414,7 @@
Name="btnJMMDisableStartWithWindows" HorizontalAlignment="Left" IsEnabled="True"
VerticalAlignment="Center"
Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=IsAutostartEnabled, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<Image Height="16" Width="16" Source="/Images/16_tick.png" Margin="0,0,5,0" />
<TextBlock VerticalAlignment="Center"
Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_Windows}"
@@ -419,7 +425,7 @@

<!-- Update AniDB Info -->
<Button Margin="2,10,2,2" Style="{DynamicResource FlatButtonStyle}" Name="btnUpdateAniDBLogin"
HorizontalAlignment="Left" IsEnabled="True" VerticalAlignment="Center">
HorizontalAlignment="Left" IsEnabled="True" VerticalAlignment="Center" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock VerticalAlignment="Center"
Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_AniDB}"
@@ -429,7 +435,7 @@

<!-- Launch Web UI -->
<Button Margin="2,10,2,2" Style="{DynamicResource FlatButtonStyle}" Name="btnLaunchWebUI"
HorizontalAlignment="Left" IsEnabled="True" VerticalAlignment="Center">
HorizontalAlignment="Left" IsEnabled="True" VerticalAlignment="Center" Visibility="{Binding Source={x:Static server:ServerState.Instance}, Path=ServerOnline, Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock VerticalAlignment="Center"
Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Settings_WebUI}"
@@ -483,7 +489,7 @@
</TabItem>

<!-- Setup tab-->
<TabItem Header="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Tab_Setup}">
<TabItem Header="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Tab_Setup}" Visibility="Hidden">

<Grid>
<Grid.ColumnDefinitions>
@@ -502,13 +508,6 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
Margin="5,5,5,10">
<TextBlock
Text="{Binding Source={x:Static server:ServerState.Instance}, Path=CurrentSetupStatus}"
FontWeight="DemiBold" VerticalAlignment="Center" />
</StackPanel>

<!-- Database type combo-->
<TextBlock Text="{Resx ResxName=Shoko.Commons.Properties.Resources, Key=Setup_DatabaseType}"
Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Margin="5,5,5,5" />
@@ -845,7 +845,7 @@ void MainWindow_Loaded(object sender, RoutedEventArgs e)

if (ServerSettings.MinimizeOnStartup) MinimizeToTray();

tabControl1.SelectedIndex = 6; // setup
tabControl1.SelectedIndex = 4; // Settings

logger.Info("Clearing Cache...");

0 comments on commit e6a8395

Please sign in to comment.