Skip to content

Commit 03f18c8

Browse files
committed
Started adding new buttons, currently only used for CSharpCollection and C64 Title Loader
1 parent 2159c34 commit 03f18c8

13 files changed

Lines changed: 83 additions & 37 deletions

NCX-Installer/NCX-Core.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
<None Remove="CSharp.png" />
2121
<None Remove="image\banner\csharpcollection.png" />
2222
<None Remove="image\banner\ncxnewsplus.png" />
23+
<None Remove="image\button\download-beta.png" />
24+
<None Remove="image\button\download-release.png" />
25+
<None Remove="image\button\download.png" />
26+
<None Remove="image\button\launch.png" />
27+
<None Remove="image\button\source.png" />
28+
<None Remove="image\button\user.png" />
2329
<None Remove="image\c64titleloader.png" />
2430
<None Remove="image\coreupdater.png" />
2531
<None Remove="image\csharpcol.png" />
@@ -57,6 +63,12 @@
5763
<ItemGroup>
5864
<Resource Include="image\banner\csharpcollection.png" />
5965
<Resource Include="image\banner\ncxnewsplus.png" />
66+
<Resource Include="image\button\download-beta.png" />
67+
<Resource Include="image\button\download-release.png" />
68+
<Resource Include="image\button\download.png" />
69+
<Resource Include="image\button\launch.png" />
70+
<Resource Include="image\button\source.png" />
71+
<Resource Include="image\button\user.png" />
6072
<Resource Include="image\c64titleloader.png" />
6173
<Resource Include="image\coreupdater.png" />
6274
<Resource Include="image\csharpcol.png" />

NCX-Installer/XSC64TL.xaml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,23 @@
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="User Page" HorizontalAlignment="Left" Margin="178,78,0,0" VerticalAlignment="Top" Width="74" Height="23" Click="Button_Click_1" Background="{x:Null}" Foreground="White"/>
48-
<Button x:Name="btn12" Content="GitHub" HorizontalAlignment="Left" Margin="257,78,0,0" VerticalAlignment="Top" Width="74" Height="23" Click="Button_Click" Background="{x:Null}" Foreground="White"/>
49-
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="336,80,0,0" VerticalAlignment="Top" Width="175" Foreground="#FF00FFC9"/>
50-
<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"/>
51-
<Button x:Name="btn8" Content="Release" HorizontalAlignment="Left" Margin="336,78,0,0" VerticalAlignment="Top" Height="23" Width="87" Click="Button_Click_4" Foreground="White" Background="Black" Visibility="Hidden"/>
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">
48+
<Button.Background>
49+
<ImageBrush ImageSource="image/button/user.png"/>
50+
</Button.Background>
51+
</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">
53+
<Button.Background>
54+
<ImageBrush ImageSource="image/button/source.png"/>
55+
</Button.Background>
56+
</Button>
57+
<ProgressBar x:Name="progressBar1" HorizontalAlignment="Left" Height="20" Margin="248,82,0,0" VerticalAlignment="Top" Width="175" Foreground="#FF00FFC9" Visibility="Hidden"/>
58+
<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">
60+
<Button.Background>
61+
<ImageBrush ImageSource="image/button/download-release.png"/>
62+
</Button.Background>
63+
</Button>
5264
<TextBlock x:Name="label2" HorizontalAlignment="Left" Margin="73,118,0,0" Text="One disk to rule them all... A program to load all of IanSkinner1982's Commodore 64 Programs. Requires External Software, Vice Emulator, and downloads to your desktop as &quot;loader.d64&quot;" TextWrapping="Wrap" VerticalAlignment="Top" Height="101" Width="388" FontSize="18" Foreground="White"/>
5365
<Image x:Name="img1" HorizontalAlignment="Left" Height="202" Margin="422,202,0,0" VerticalAlignment="Top" Width="362" Source="image/screen/c64tl1.png" Stretch="Uniform"/>
5466
<Button x:Name="btn6" Content="" HorizontalAlignment="Left" Margin="284,232,0,0" VerticalAlignment="Top" Height="82" Width="133" Click="btn6_Click">
@@ -61,8 +73,16 @@
6173
<ImageBrush ImageSource="image/screen/c64tl2.png" Stretch="Uniform"/>
6274
</Button.Background>
6375
</Button>
64-
<Button x:Name="btn10" Content="Nightly" HorizontalAlignment="Left" Width="86" Height="23" Margin="424,78,0,0" VerticalAlignment="Top" Foreground="White" Background="Black" Visibility="Hidden" Click="Button_Click_7"/>
65-
<Button x:Name="btn11" Content="Download" HorizontalAlignment="Left" Margin="336,78,0,0" VerticalAlignment="Top" Width="174" Height="23" Background="Black" Foreground="White" Click="Button_Click_6"/>
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">
77+
<Button.Background>
78+
<ImageBrush ImageSource="image/button/download-beta.png"/>
79+
</Button.Background>
80+
</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">
82+
<Button.Background>
83+
<ImageBrush ImageSource="image/button/download.png"/>
84+
</Button.Background>
85+
</Button>
6686
<Button x:Name="btn13" Content="" HorizontalAlignment="Left" Margin="146,320,0,0" VerticalAlignment="Top" Height="82" Width="133" Click="btn13_Click">
6787
<Button.Background>
6888
<ImageBrush ImageSource="image/screen/c64tl3.png" Stretch="Uniform"/>

NCX-Installer/XSC64TL.xaml.cs

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ public XSC64TL()
3030
{
3131
this.Background = Brushes.White;
3232
label1.Foreground = Brushes.Black; label2.Foreground = Brushes.Black; label3.Foreground = Brushes.Black;
33-
btn7.Foreground = Brushes.Black; btn12.Foreground = Brushes.Black; btn8.Foreground = Brushes.Black;
34-
btn8.Background = Brushes.White; btn10.Foreground = Brushes.Black; btn10.Background = Brushes.White;
35-
btn11.Foreground = Brushes.Black; btn11.Background = Brushes.White; label4.Foreground = Brushes.Black;
33+
}
34+
if (Settings1.Default.betaVer == true)
35+
{
36+
btn8.Visibility = Visibility.Visible;
37+
btn10.Visibility = Visibility.Visible;
38+
btn11.Visibility = Visibility.Hidden;
39+
3640
}
3741
}
3842

@@ -61,6 +65,7 @@ private void Button_Click_4(object sender, RoutedEventArgs e)
6165
btn8.Visibility = Visibility.Hidden;
6266
btn10.Visibility = Visibility.Hidden;
6367
label1.Visibility = Visibility.Visible;
68+
progressBar1.Visibility = Visibility.Visible;
6469
wc.DownloadFileCompleted += DownloadCompleted;
6570
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
6671
wc.DownloadFileAsync(
@@ -130,27 +135,19 @@ private void btn5_Click(object sender, RoutedEventArgs e)
130135

131136
private void Button_Click_6(object sender, RoutedEventArgs e)
132137
{
133-
if (Settings1.Default.betaVer == true)
138+
using (WebClient wc = new WebClient())
134139
{
135140
btn11.Visibility = Visibility.Hidden;
136-
btn10.Visibility = Visibility.Visible;
137-
btn8.Visibility = Visibility.Visible;
138-
}
139-
else
140-
{
141-
using (WebClient wc = new WebClient())
142-
{
143-
btn11.Visibility = Visibility.Hidden;
144-
label1.Visibility = Visibility.Visible;
145-
wc.DownloadFileCompleted += DownloadCompleted;
146-
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
147-
wc.DownloadFileAsync(
148-
// Param1 = Link of file
149-
new System.Uri("https://github.com/IanSkinner1982/C64-title-loader/releases/latest/download/loader.d64"),
150-
// Param2 = Path to save
151-
System.IO.Path.Combine(SavePath, "loader.d64")
152-
);
153-
}
141+
label1.Visibility = Visibility.Visible;
142+
progressBar1.Visibility = Visibility.Visible;
143+
wc.DownloadFileCompleted += DownloadCompleted;
144+
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
145+
wc.DownloadFileAsync(
146+
// Param1 = Link of file
147+
new System.Uri("https://github.com/IanSkinner1982/C64-title-loader/releases/latest/download/loader.d64"),
148+
// Param2 = Path to save
149+
System.IO.Path.Combine(SavePath, "loader.d64")
150+
);
154151
}
155152
}
156153

@@ -161,6 +158,7 @@ private void Button_Click_7(object sender, RoutedEventArgs e)
161158
btn8.Visibility = Visibility.Hidden;
162159
btn10.Visibility = Visibility.Hidden;
163160
label1.Visibility = Visibility.Visible;
161+
progressBar1.Visibility = Visibility.Visible;
164162
wc.DownloadFileCompleted += DownloadCompleted;
165163
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
166164
wc.DownloadFileAsync(

NCX-Installer/XSCSharpCol.xaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,29 @@
4343
<Image HorizontalAlignment="Left" Height="100" Margin="73,10,0,0" VerticalAlignment="Top" Width="100" Source="image/csharpcol.png"/>
4444
<Label x:Name="label2" Content="CSharpCollection" HorizontalAlignment="Left" Margin="173,4,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="32" Foreground="White"/>
4545
<Label x:Name="label3" Content="By NinjaCheetah" HorizontalAlignment="Left" Margin="173,40,0,0" VerticalAlignment="Top" FontSize="23" Foreground="White"/>
46-
<Button x:Name="btn10" 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="btn11" 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 and Install" 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="btn10" Content="" HorizontalAlignment="Left" Margin="173,75,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="Button_Click_1" Foreground="White" BorderBrush="#00707070" ToolTip="User Page">
47+
<Button.Background>
48+
<ImageBrush ImageSource="image/button/user.png"/>
49+
</Button.Background>
50+
</Button>
51+
<Button x:Name="btn11" 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="label4" HorizontalAlignment="Left" Margin="73,118,0,0" Text="The CSharp Collection is a collection of small programs that I wrote just for fun, ranging from simple games to useful utilities." TextWrapping="Wrap" VerticalAlignment="Top" Height="84" Width="388" FontSize="18" Foreground="White"/>
52-
<Button x:Name="btn7" Content="Launch" HorizontalAlignment="Left" Margin="73,196,0,0" VerticalAlignment="Top" Width="74" Height="24" Click="btn7_Click" Background="{x:Null}" Visibility="Visible" Foreground="White"/>
64+
<Button x:Name="btn7" Content="" HorizontalAlignment="Left" Margin="73,190,0,0" VerticalAlignment="Top" Width="35" Height="35" Click="btn7_Click" Visibility="Visible" Foreground="White" BorderBrush="#00707070" ToolTip="Launch CSharpCollection">
65+
<Button.Background>
66+
<ImageBrush ImageSource="image/button/launch.png"/>
67+
</Button.Background>
68+
</Button>
5369
<Image x:Name="img1" HorizontalAlignment="Left" Height="202" Margin="422,202,0,0" VerticalAlignment="Top" Width="362" Source="image/screen/cscol1.png" Stretch="Uniform"/>
5470
<Button x:Name="btn6" Content="" HorizontalAlignment="Left" Margin="284,232,0,0" VerticalAlignment="Top" Height="82" Width="133" Click="btn6_Click">
5571
<Button.Background>

NCX-Installer/XSCSharpCol.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public XSCSharpCol()
3636
{
3737
this.Background = Brushes.White;
3838
label1.Foreground = Brushes.Black; label2.Foreground = Brushes.Black; label3.Foreground = Brushes.Black;
39-
label4.Foreground = Brushes.Black; btn7.Foreground = Brushes.Black; btn10.Foreground = Brushes.Black;
40-
btn11.Foreground = Brushes.Black; btn8.Foreground = Brushes.Black; btn8.Background = Brushes.White;
39+
label4.Foreground = Brushes.Black;
4140
}
4241
}
4342

@@ -64,6 +63,7 @@ private void Button_Click_4(object sender, RoutedEventArgs e)
6463
using (WebClient wc = new WebClient())
6564
{
6665
btn8.Visibility = Visibility.Hidden;
66+
progressBar1.Visibility = Visibility.Visible;
6767
label1.Visibility = Visibility.Visible;
6868
wc.DownloadFileCompleted += DownloadCompleted;
6969
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
140 KB
Loading
43.3 KB
Loading
17.6 KB
Loading
18.5 KB
Loading
8.81 KB
Loading

0 commit comments

Comments
 (0)