Skip to content

Commit 9a357b8

Browse files
committed
81: v3.0 Commit 5: Finished the Library page, it can now launch all apps (except NCX-Core Updater) and can navigate to the store pages... which will be fixed in the next commit hopefully
1 parent 7ec941c commit 9a357b8

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

NCX-Installer/Library.xaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,30 @@
3030
<ImageBrush ImageSource="image/menu/home.png"/>
3131
</Button.Background>
3232
</Button>
33+
<Button x:Name="btn5" Content="" HorizontalAlignment="Left" Margin="78,57,0,0" VerticalAlignment="Top" Width="90" Height="90" Foreground="White" Visibility="Hidden" Click="btn5_Click">
34+
<Button.Background>
35+
<ImageBrush ImageSource="image/csharpcol.png"/>
36+
</Button.Background>
37+
</Button>
38+
<Label Content="Library" HorizontalAlignment="Left" Margin="61,10,0,0" VerticalAlignment="Top" Foreground="White" FontWeight="Bold" FontSize="24"/>
39+
<Button x:Name="btn6" Content="View in Store" HorizontalAlignment="Left" Margin="78,152,0,0" VerticalAlignment="Top" Width="90" Height="21" Background="Black" Foreground="White" Visibility="Hidden" Click="btn6_Click"/>
40+
<Button x:Name="btn7" Content="" HorizontalAlignment="Left" Margin="173,57,0,0" VerticalAlignment="Top" Width="90" Height="90" Foreground="White" Visibility="Hidden" Click="btn7_Click">
41+
<Button.Background>
42+
<ImageBrush ImageSource="image/coreupdater.png"/>
43+
</Button.Background>
44+
</Button>
45+
<Button x:Name="btn9" Content="" HorizontalAlignment="Left" Margin="268,57,0,0" VerticalAlignment="Top" Width="90" Height="90" Foreground="White" Visibility="Hidden" Click="btn9_Click">
46+
<Button.Background>
47+
<ImageBrush ImageSource="image/ncxnewsplus.png"/>
48+
</Button.Background>
49+
</Button>
50+
<Button x:Name="btn10" Content="View in Store" HorizontalAlignment="Left" Margin="268,152,0,0" VerticalAlignment="Top" Width="90" Height="21" Background="Black" Foreground="White" Visibility="Hidden" Click="btn10_Click"/>
51+
<Button x:Name="btn11" Content="" HorizontalAlignment="Left" Margin="363,57,0,0" VerticalAlignment="Top" Width="90" Height="90" Background="Black" Foreground="White" Visibility="Hidden"/>
52+
<Button x:Name="btn12" Content="View in Store" HorizontalAlignment="Left" Margin="363,152,0,0" VerticalAlignment="Top" Width="90" Height="21" Background="Black" Foreground="White" Visibility="Hidden"/>
53+
54+
<Button x:Name="btn13" Content="" HorizontalAlignment="Left" Margin="458,57,0,0" VerticalAlignment="Top" Width="90" Height="90" Background="Black" Foreground="White" Visibility="Hidden"/>
55+
<Button x:Name="btn8" Content="View in Store" HorizontalAlignment="Left" Margin="173,152,0,0" VerticalAlignment="Top" Width="90" Height="21" Background="Black" Foreground="White" Visibility="Hidden" Click="btn8_Click"/>
56+
<Button x:Name="btn14" Content="View in Store" HorizontalAlignment="Left" Margin="458,152,0,0" VerticalAlignment="Top" Width="90" Height="21" Background="Black" Foreground="White" Visibility="Hidden"/>
57+
3358
</Grid>
3459
</Page>

NCX-Installer/Library.xaml.cs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
using System.Windows.Media.Imaging;
1111
using System.Windows.Navigation;
1212
using System.Windows.Shapes;
13+
using System.IO;
14+
using System.Diagnostics;
1315

1416
namespace NCX_Installer
1517
{
@@ -18,9 +20,26 @@ namespace NCX_Installer
1820
/// </summary>
1921
public partial class Library : Page
2022
{
23+
static readonly string SavePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
24+
2125
public Library()
2226
{
2327
InitializeComponent();
28+
if (File.Exists("C:/Program Files/NCX/CSharpCollection/CSharpCollection.exe"))
29+
{
30+
btn5.Visibility = Visibility.Visible;
31+
btn6.Visibility = Visibility.Visible;
32+
}
33+
if (File.Exists(System.IO.Path.Combine(SavePath, "NCX-Core/NCXCoreUpdater/NCX-Core Updater.exe")))
34+
{
35+
btn7.Visibility = Visibility.Visible;
36+
btn8.Visibility = Visibility.Visible;
37+
}
38+
if (File.Exists(System.IO.Path.Combine(SavePath, "NCX-Core/NCXNewsPlus/NCXNewsPlus.exe")))
39+
{
40+
btn9.Visibility = Visibility.Visible;
41+
btn10.Visibility = Visibility.Visible;
42+
}
2443
}
2544

2645
private void btn4_Click(object sender, RoutedEventArgs e)
@@ -34,5 +53,47 @@ private void btn3_Click(object sender, RoutedEventArgs e)
3453
XStoreHome page = new XStoreHome();
3554
NavigationService.Navigate(page);
3655
}
56+
57+
private void btn5_Click(object sender, RoutedEventArgs e)
58+
{
59+
if (File.Exists("C:/Program Files/NCX/CSharpCollection/CSharpCollection.exe"))
60+
{
61+
Process.Start("C:/Program Files/NCX/CSharpCollection/CSharpCollection.exe");
62+
}
63+
}
64+
65+
private void btn6_Click(object sender, RoutedEventArgs e)
66+
{
67+
XSCSharpCol page = new XSCSharpCol();
68+
NavigationService.Navigate(page);
69+
}
70+
71+
private void btn7_Click(object sender, RoutedEventArgs e)
72+
{
73+
if (File.Exists(System.IO.Path.Combine(SavePath, "NCX-Core/NCXCoreUpdater/NCX-Core Updater.exe")))
74+
{
75+
Process.Start(System.IO.Path.Combine(SavePath, "NCX-Core/NCXCoreUpdater/NCX-Core Updater.exe"));
76+
}
77+
}
78+
79+
private void btn8_Click(object sender, RoutedEventArgs e)
80+
{
81+
XWareUpdater page = new XWareUpdater();
82+
NavigationService.Navigate(page);
83+
}
84+
85+
private void btn9_Click(object sender, RoutedEventArgs e)
86+
{
87+
if (File.Exists(System.IO.Path.Combine(SavePath, "NCX-Core/NCXNewsPlus/NCXNewsPlus.exe")))
88+
{
89+
Process.Start(System.IO.Path.Combine(SavePath, "NCX-Core/NCXNewsPlus/NCXNewsPlus.exe"));
90+
}
91+
}
92+
93+
private void btn10_Click(object sender, RoutedEventArgs e)
94+
{
95+
XWareNews page = new XWareNews();
96+
NavigationService.Navigate(page);
97+
}
3798
}
3899
}

0 commit comments

Comments
 (0)