@@ -41,16 +41,31 @@ public MainWindow()
4141 {
4242 btn9 . Visibility = Visibility . Visible ;
4343 }
44- using ( WebClient wc = new WebClient ( ) )
44+
45+ if ( NavSettings . Default . mainReload == false )
4546 {
46- wc . DownloadFileCompleted += DownloadCompleted ;
47- wc . DownloadFileAsync (
48- // Param1 = Link of file
49- new System . Uri ( "https://github.com/NinjaCheetah/NCX-Installer-News/releases/latest/download/newsLatest.txt" ) ,
50- // Param2 = Path to save
51- System . IO . Path . Combine ( SavePath , "newsLatest.txt" )
52- ) ;
47+ using ( WebClient wc = new WebClient ( ) )
48+ {
49+ wc . DownloadFileCompleted += DownloadCompleted ;
50+ wc . DownloadFileAsync (
51+ // Param1 = Link of file
52+ new System . Uri ( "https://github.com/NinjaCheetah/NCX-Installer-News/releases/latest/download/newsLatest.txt" ) ,
53+ // Param2 = Path to save
54+ System . IO . Path . Combine ( SavePath , "newsLatest.txt" )
55+ ) ;
56+ }
5357 }
58+ else if ( NavSettings . Default . mainReload == true )
59+ {
60+ NavSettings . Default . mainReload = false ;
61+ TextReader tr = new StreamReader ( System . IO . Path . Combine ( SavePath , "newsLatest.txt" ) ) ;
62+ string newsString = tr . ReadLine ( ) ;
63+ newstext = Convert . ToString ( newsString ) ;
64+ tr . Close ( ) ;
65+ label3 . Text = newsString ;
66+ }
67+
68+
5469 if ( File . Exists ( "C:/Program Files/NCX/CSharp Collection/CSharpCollectionVol1.exe" ) )
5570 {
5671 btn1 . Visibility = Visibility . Visible ;
@@ -144,5 +159,12 @@ private void Button_Click_1_Copy(object sender, RoutedEventArgs e)
144159 //no code here it just closes the box
145160 }
146161 }
162+
163+ private void btn10_Click ( object sender , RoutedEventArgs e )
164+ {
165+ if ( File . Exists ( System . IO . Path . Combine ( SavePath , "NCX-Core/NCXNewsPlus/XWare.exe" ) ) ) {
166+ Process . Start ( System . IO . Path . Combine ( SavePath , "NCX-Core/NCXNewsPlus/XWare.exe" ) ) ;
167+ }
168+ }
147169 }
148170}
0 commit comments