Skip to content

Commit 2379724

Browse files
committed
Added quick theme changing, meaning that the theme changes right when you save your settings, rather than when you change pages
1 parent 03f18c8 commit 2379724

5 files changed

Lines changed: 55 additions & 16 deletions

File tree

NCX-Installer/Settings.xaml.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ private void btn6_Click(object sender, RoutedEventArgs e)
5050
else if (radioButton2.IsChecked == true) Settings1.Default.lightTheme = true;
5151
Settings1.Default.Save();
5252

53+
if(Settings1.Default.lightTheme == true)
54+
{
55+
this.Background = Brushes.White;
56+
label1.Foreground = Brushes.Black; label2.Foreground = Brushes.Black; label3.Foreground = Brushes.Black;
57+
btn6.Foreground = Brushes.Black; btn7.Foreground = Brushes.Black; checkBox1.Foreground = Brushes.Black;
58+
checkBox2.Foreground = Brushes.Black; radioButton1.Foreground = Brushes.Black; radioButton2.Foreground = Brushes.Black;
59+
}
60+
else if(Settings1.Default.lightTheme == false)
61+
{
62+
this.Background = Brushes.Black;
63+
label1.Foreground = Brushes.White; label2.Foreground = Brushes.White; label3.Foreground = Brushes.White;
64+
btn6.Foreground = Brushes.White; btn7.Foreground = Brushes.White; checkBox1.Foreground = Brushes.White;
65+
checkBox2.Foreground = Brushes.White; radioButton1.Foreground = Brushes.White; radioButton2.Foreground = Brushes.White;
66+
}
67+
5368
string message = "Your settings have been saved. Some changes might require a restart to take effect.";
5469
string caption = "Changes Saved";
5570
MessageBoxButton buttons = MessageBoxButton.OK;

NCX-Installer/XSC64TL.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@
4444
<Image HorizontalAlignment="Left" Height="100" Margin="73,10,0,0" VerticalAlignment="Top" Width="100" Source="image/c64titleloader.png"/>
4545
<Label x:Name="label4" Content="C64 Title Loader" HorizontalAlignment="Left" Margin="173,4,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="32" Foreground="White"/>
4646
<Label x:Name="label3" Content="By IanSkinner1982" HorizontalAlignment="Left" Margin="173,40,0,0" VerticalAlignment="Top" FontSize="23" Foreground="White"/>
47-
<Button x:Name="btn7" Content="" HorizontalAlignment="Left" Margin="173,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click_1" Foreground="White" BorderBrush="#00707070">
47+
<Button x:Name="btn7" Content="" HorizontalAlignment="Left" Margin="173,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click_1" Foreground="White" BorderBrush="#00707070" ToolTip="User Profile">
4848
<Button.Background>
4949
<ImageBrush ImageSource="image/button/user.png"/>
5050
</Button.Background>
5151
</Button>
52-
<Button x:Name="btn12" Content="" HorizontalAlignment="Left" Margin="208,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click" Foreground="White" BorderBrush="#00707070">
52+
<Button x:Name="btn12" Content="" HorizontalAlignment="Left" Margin="208,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click" Foreground="White" BorderBrush="#00707070" ToolTip="Source (GitHub Repo)">
5353
<Button.Background>
5454
<ImageBrush ImageSource="image/button/source.png"/>
5555
</Button.Background>
5656
</Button>
5757
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="248,82,0,0" VerticalAlignment="Top" Width="175" Foreground="#FF00FFC9" Visibility="Hidden"/>
5858
<Label x:Name="label1" Content="Downloading... Please wait." HorizontalAlignment="Left" Margin="243,98,0,0" VerticalAlignment="Top" Width="174" FontSize="13" Visibility="Hidden" Foreground="White"/>
59-
<Button x:Name="btn8" Content="" HorizontalAlignment="Left" Margin="243,75,0,0" VerticalAlignment="Top" Height="35" Width="35" Click="Button_Click_4" Foreground="White" Visibility="Hidden" BorderBrush="#00707070">
59+
<Button x:Name="btn8" Content="" HorizontalAlignment="Left" Margin="243,75,0,0" VerticalAlignment="Top" Height="35" Width="35" Click="Button_Click_4" Foreground="White" Visibility="Hidden" BorderBrush="#00707070" ToolTip="Download Release">
6060
<Button.Background>
6161
<ImageBrush ImageSource="image/button/download-release.png"/>
6262
</Button.Background>
@@ -73,12 +73,12 @@
7373
<ImageBrush ImageSource="image/screen/c64tl2.png" Stretch="Uniform"/>
7474
</Button.Background>
7575
</Button>
76-
<Button x:Name="btn10" Content="" HorizontalAlignment="Left" Width="35" Height="35" Margin="278,75,0,0" VerticalAlignment="Top" Foreground="White" Visibility="Hidden" Click="Button_Click_7" BorderBrush="#00707070">
76+
<Button x:Name="btn10" Content="" HorizontalAlignment="Left" Width="35" Height="35" Margin="278,75,0,0" VerticalAlignment="Top" Foreground="White" Visibility="Hidden" Click="Button_Click_7" BorderBrush="#00707070" ToolTip="Download Nightly">
7777
<Button.Background>
7878
<ImageBrush ImageSource="image/button/download-beta.png"/>
7979
</Button.Background>
8080
</Button>
81-
<Button x:Name="btn11" Content="" HorizontalAlignment="Left" Margin="243,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Foreground="White" Click="Button_Click_6" BorderBrush="#00707070">
81+
<Button x:Name="btn11" Content="" HorizontalAlignment="Left" Margin="243,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Foreground="White" Click="Button_Click_6" BorderBrush="#00707070" ToolTip="Download">
8282
<Button.Background>
8383
<ImageBrush ImageSource="image/button/download.png"/>
8484
</Button.Background>

NCX-Installer/XSDSiD.xaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,23 @@
4343
<Image HorizontalAlignment="Left" Height="100" Margin="73,10,0,0" VerticalAlignment="Top" Width="100" Source="image/dsidownloader.png"/>
4444
<Label x:Name="label2" Content="Lazy DSi File Downloader" HorizontalAlignment="Left" Margin="173,4,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="32" Foreground="White"/>
4545
<Label x:Name="label4" Content="By YourKalamity" HorizontalAlignment="Left" Margin="173,40,0,0" VerticalAlignment="Top" FontSize="23" Foreground="White"/>
46-
<Button x:Name="btn7" Content="User Page" HorizontalAlignment="Left" Margin="178,78,0,0" VerticalAlignment="Top" Width="74" Height="23" Click="Button_Click_1" Background="{x:Null}" Foreground="White"/>
47-
<Button x:Name="btn10" Content="GitHub" HorizontalAlignment="Left" Margin="257,78,0,0" VerticalAlignment="Top" Width="74" Height="23" Click="Button_Click" Background="{x:Null}" Foreground="White"/>
48-
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="336,80,0,0" VerticalAlignment="Top" Width="175" Foreground="#FF00FFC9"/>
49-
<Label x:Name="label1" Content="Downloading... Please wait." HorizontalAlignment="Left" Margin="336,98,0,0" VerticalAlignment="Top" Width="174" FontSize="13" Visibility="Hidden" Foreground="White"/>
50-
<Button x:Name="btn8" Content="Download" HorizontalAlignment="Left" Margin="336,78,0,0" VerticalAlignment="Top" Height="23" Width="174" Click="Button_Click_4" Foreground="White" Background="Black"/>
46+
<Button x:Name="btn7" Content="" HorizontalAlignment="Left" Margin="173,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click_1" Foreground="White" BorderBrush="#00707070" ToolTip="User Profile">
47+
<Button.Background>
48+
<ImageBrush ImageSource="image/button/user.png"/>
49+
</Button.Background>
50+
</Button>
51+
<Button x:Name="btn10" Content="" HorizontalAlignment="Left" Margin="208,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click" Foreground="White" BorderBrush="#00707070" ToolTip="Source (GitHub Repo)">
52+
<Button.Background>
53+
<ImageBrush ImageSource="image/button/source.png"/>
54+
</Button.Background>
55+
</Button>
56+
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="248,82,0,0" VerticalAlignment="Top" Width="175" Foreground="#FF00FFC9" Visibility="Hidden"/>
57+
<Label x:Name="label1" Content="Downloading... Please wait." HorizontalAlignment="Left" Margin="243,98,0,0" VerticalAlignment="Top" Width="174" FontSize="13" Visibility="Hidden" Foreground="White"/>
58+
<Button x:Name="btn8" Content="" HorizontalAlignment="Left" Margin="243,75,0,0" VerticalAlignment="Top" Height="35" Width="35" Click="Button_Click_4" Foreground="White" BorderBrush="#00707070" ToolTip="Download">
59+
<Button.Background>
60+
<ImageBrush ImageSource="image/button/download.png"/>
61+
</Button.Background>
62+
</Button>
5163
<TextBlock x:Name="label3" HorizontalAlignment="Left" Margin="73,118,0,0" Text="A downloader for homebrew files for the Nintendo DSi. Requires External Software, 7-zip, and will download to your desktop as &quot;lazy-dsi-file-downloader-v.X.X.X.exe&quot;" TextWrapping="Wrap" VerticalAlignment="Top" Height="95" Width="388" FontSize="18" Foreground="White"/>
5264
<Image x:Name="img1" HorizontalAlignment="Left" Height="202" Margin="422,202,0,0" VerticalAlignment="Top" Width="362" Source="image/screen/ldsi1.png" Stretch="Uniform"/>
5365
<Button x:Name="btn6" Content="" HorizontalAlignment="Left" Margin="284,232,0,0" VerticalAlignment="Top" Height="82" Width="133" Click="btn6_Click">

NCX-Installer/XSDSiD.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public XSDSiD()
3030
{
3131
this.Background = Brushes.White;
3232
label1.Foreground = Brushes.Black; label2.Foreground = Brushes.Black; label3.Foreground = Brushes.Black;
33-
label4.Foreground = Brushes.Black; btn7.Foreground = Brushes.Black; btn10.Foreground = Brushes.Black;
34-
btn8.Foreground = Brushes.Black; btn8.Background = Brushes.White;
33+
label4.Foreground = Brushes.Black;
3534
}
3635
}
3736

@@ -53,6 +52,7 @@ private void Button_Click_4(object sender, RoutedEventArgs e)
5352
{
5453
btn8.Visibility = Visibility.Hidden;
5554
label1.Visibility = Visibility.Visible;
55+
progressBar1.Visibility = Visibility.Visible;
5656
wc.DownloadFileCompleted += DownloadCompleted;
5757
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
5858
wc.DownloadFileAsync(

NCX-Installer/XWareNews.xaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,23 @@
3737
<Image HorizontalAlignment="Left" Height="100" Margin="73,10,0,0" VerticalAlignment="Top" Width="100" Source="image/ncxnewsplus.png"/>
3838
<Label x:Name="label2" Content="NCX-News+" HorizontalAlignment="Left" Margin="173,4,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="32" Foreground="White"/>
3939
<Label x:Name="label4" Content="By NinjaCheetah" HorizontalAlignment="Left" Margin="173,40,0,0" VerticalAlignment="Top" FontSize="23" Foreground="White"/>
40-
<Button x:Name="btn6" Content="User Page" HorizontalAlignment="Left" Margin="178,78,0,0" VerticalAlignment="Top" Width="74" Height="23" Click="Button_Click_1" Background="{x:Null}" Foreground="White"/>
41-
<Button x:Name="btn9" Content="GitHub" HorizontalAlignment="Left" Margin="257,78,0,0" VerticalAlignment="Top" Width="74" Height="23" Click="Button_Click" Background="{x:Null}" Foreground="White"/>
42-
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="336,80,0,0" VerticalAlignment="Top" Width="175" Background="#FF323232"/>
40+
<Button x:Name="btn6" Content="" HorizontalAlignment="Left" Margin="173,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click_1" Foreground="White" BorderBrush="#00707070">
41+
<Button.Background>
42+
<ImageBrush ImageSource="image/button/user.png"/>
43+
</Button.Background>
44+
</Button>
45+
<Button x:Name="btn9" Content="" HorizontalAlignment="Left" Margin="208,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click" Foreground="White" BorderBrush="#00707070">
46+
<Button.Background>
47+
<ImageBrush ImageSource="image/button/source.png"/>
48+
</Button.Background>
49+
</Button>
50+
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="248,82,0,0" VerticalAlignment="Top" Width="175" Foreground="#FF00FFC9"/>
4351
<Label x:Name="label1" Content="Downloading... Please wait." HorizontalAlignment="Left" Margin="336,98,0,0" VerticalAlignment="Top" Width="174" FontSize="13" Visibility="Hidden" Foreground="White"/>
44-
<Button x:Name="btn8" Content="Add to NCX-Core" HorizontalAlignment="Left" Margin="336,78,0,0" VerticalAlignment="Top" Height="23" Width="174" Click="Button_Click_4" Foreground="White" Background="Black"/>
52+
<Button x:Name="btn8" Content="" HorizontalAlignment="Left" Margin="243,75,0,0" VerticalAlignment="Top" Height="35" Width="35" Click="Button_Click_4" Foreground="White" BorderBrush="#00707070">
53+
<Button.Background>
54+
<ImageBrush ImageSource="image/button/download.png"/>
55+
</Button.Background>
56+
</Button>
4557
<TextBlock x:Name="label3" HorizontalAlignment="Left" Margin="73,118,0,0" Text="NCX-News+ is the best place to read full length NCX-News stories with information about things like software updates. News kindly written by IanSkinner1982." TextWrapping="Wrap" VerticalAlignment="Top" Height="96" Width="388" FontSize="18" Foreground="White"/>
4658
<Button x:Name="btn7" Content="Launch" HorizontalAlignment="Left" Margin="73,214,0,0" VerticalAlignment="Top" Width="74" Height="24" Click="btn7_Click" Background="{x:Null}" Visibility="Hidden" Foreground="White"/>
4759
</Grid>

0 commit comments

Comments
 (0)