@@ -11,23 +11,13 @@ namespace ZuneModdingHelper
1111 /// </summary>
1212 public partial class App : Application
1313 {
14- public static string Title => "Zune Modding Helper" ;
14+ public static readonly string Title = "Zune Modding Helper" ;
1515
16- public static Version VersionNum => new ( 2021 , 5 , 6 , 0 ) ;
17- public static string VersionStatus => "alpha" ;
18- public static string Version => VersionNum . ToString ( ) + ( VersionStatus != string . Empty ? "-" + VersionStatus : string . Empty ) ;
16+ public static readonly Version VersionNum = new ( 2021 , 5 , 6 , 0 ) ;
17+ public static readonly string VersionStatus = "alpha" ;
18+ public static readonly string Version = VersionNum . ToString ( ) + ( VersionStatus != string . Empty ? "-" + VersionStatus : string . Empty ) ;
1919
20- public static bool CheckIfNewerVersion ( string otherStr )
21- {
22- int idxSplit = otherStr . IndexOf ( '-' ) ;
23- Version otherNum = new ( otherStr [ ..idxSplit ] ) ;
24- string otherStatus = otherStr [ ( idxSplit + 1 ) ..] ;
25-
26- // TODO: This assumes that the VersionStatus is "alpha"
27- bool isNotAlpha = otherStatus != VersionStatus ;
28- bool isNewer = otherNum > VersionNum ;
29- return isNotAlpha || isNewer ;
30- }
20+ public static readonly string DonateLink = "https://www.paypal.com/donate?business=38QWBDS9PJUAQ¤cy_code=USD" ;
3121
3222 protected override void OnStartup ( StartupEventArgs e )
3323 {
@@ -42,5 +32,25 @@ protected override void OnStartup(StartupEventArgs e)
4232 AppCenter . SetEnabledAsync ( false ) ;
4333#endif
4434 }
35+
36+ public static void OpenInBrowser ( string url )
37+ {
38+ System . Diagnostics . Process . Start ( new System . Diagnostics . ProcessStartInfo ( url )
39+ {
40+ UseShellExecute = true
41+ } ) ;
42+ }
43+
44+ public static bool CheckIfNewerVersion ( string otherStr )
45+ {
46+ int idxSplit = otherStr . IndexOf ( '-' ) ;
47+ Version otherNum = new ( otherStr [ ..idxSplit ] ) ;
48+ string otherStatus = otherStr [ ( idxSplit + 1 ) ..] ;
49+
50+ // TODO: This assumes that the VersionStatus is "alpha"
51+ bool isNotAlpha = otherStatus != VersionStatus ;
52+ bool isNewer = otherNum > VersionNum ;
53+ return isNotAlpha || isNewer ;
54+ }
4555 }
4656}
0 commit comments