Skip to content

Commit

Permalink
Updated What's new? URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed Feb 21, 2023
1 parent ca74d6e commit 3ebf646
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions Fo76ini/Forms/FormMain/Views/UserControlHome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,10 @@ private void PictureBoxButtonUpdate_Click(object sender, EventArgs e)

private void LoadWhatsNew()
{
#if DEBUG
string debugFile = Path.Combine(Shared.AppConfigFolder, "What's new" + (Theming.CurrentTheme == ThemeType.Dark ? " - Dark" : "") + ".html");
if (File.Exists(debugFile))
this.webBrowserWhatsNew.DocumentText = File.ReadAllText(debugFile);
if (Theming.CurrentTheme == ThemeType.Dark)
this.webBrowserWhatsNew.Url = new Uri(Shared.URLs.RemoteWhatsNewDarkURL);
else
#endif
this.webBrowserWhatsNew.Url = new Uri(Shared.URLs.RemoteWhatsNewHTMLURL + (Theming.CurrentTheme == ThemeType.Dark ? "%20-%20Dark" : ""));
//this.webBrowserWhatsNew.Navigate(new Uri(Shared.URLs.RemoteWhatsNewHTMLURL + (Theming.CurrentTheme == ThemeType.Dark ? "%20-%20Dark" : "")));
this.webBrowserWhatsNew.Url = new Uri(Shared.URLs.RemoteWhatsNewURL);
}

private void styledButtonWhatsNew_Click(object sender, EventArgs e)
Expand All @@ -188,7 +184,10 @@ private void styledButtonWhatsNew_Click(object sender, EventArgs e)
else
{
// Open users web browser on Windows 7 instead:
Utils.OpenURL(Shared.URLs.RemoteWhatsNewHTMLURL);
if (Theming.CurrentTheme == ThemeType.Dark)
Utils.OpenURL(Shared.URLs.RemoteWhatsNewDarkURL);
else
Utils.OpenURL(Shared.URLs.RemoteWhatsNewURL);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Fo76ini/Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class URLs
// Remote files:
// (These files are downloaded by the tool)
public const string RemoteLatestVersionURL = "https://raw.githubusercontent.com/FelisDiligens/Fallout76-QuickConfiguration/master/VERSION";
public const string RemoteWhatsNewRTFURL = "https://raw.githubusercontent.com/FelisDiligens/Fallout76-QuickConfiguration/master/What's%20new.rtf";
public const string RemoteWhatsNewHTMLURL = "https://felisdiligens.github.io/Fo76ini/What%27s%20new";
public const string RemoteWhatsNewURL = "https://felisdiligens.github.io/Fo76ini/whatsnew";
public const string RemoteWhatsNewDarkURL = "https://felisdiligens.github.io/Fo76ini/whatsnewdark";
public const string RemoteLanguageFolderURL = "https://raw.githubusercontent.com/FelisDiligens/Fallout76-QuickConfiguration/master/Fo76ini/languages/";
}

Expand Down

0 comments on commit 3ebf646

Please sign in to comment.