Skip to content

Commit

Permalink
v1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed May 28, 2021
1 parent 5347b2e commit 560fac4
Show file tree
Hide file tree
Showing 25 changed files with 1,431 additions and 1,412 deletions.
1 change: 1 addition & 0 deletions Fo76ini/Fo76ini.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\xbox_hover.png" />
<None Include="Resources\steam_hover.png" />
<None Include="Resources\msstore_hover.png" />
<None Include="Resources\help-128_hover.png" />
Expand Down
65 changes: 7 additions & 58 deletions Fo76ini/Forms/ExceptionDialog/FormExceptionDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,75 +24,24 @@ public static FormExceptionDialog OpenDialog(Exception ex)
{
string currentIniPrefix = "Fallout76";
string currentGamePath = null;
GameEdition currentGameEdition = GameEdition.Unknown;

if (ProfileManager.SelectedGame != null)
{
currentIniPrefix = ProfileManager.SelectedGame.IniPrefix;
if (ProfileManager.SelectedGame.ValidateGamePath())
currentGamePath = ProfileManager.SelectedGame.GamePath;
currentGameEdition = ProfileManager.SelectedGame.Edition;
}

form.textBoxDebugText.Text = "*********** System information ***********\r\n" +
$"Operating system: {Utils.GetOSName()} {Utils.GetOSArchitecture()}\r\n" +
form.textBoxDebugText.Text = $"Operating system: {Utils.GetOSName()} {Utils.GetOSArchitecture()}\r\n" +
$"Program version: {Shared.VERSION}\r\n" +
$"User agent: {Shared.AppUserAgent}\r\n" +
$"Running as admin: " + (Utils.HasAdminRights() ? "Yes" : "No") + "\r\n" +
$"Game edition: {currentGameEdition}" +
$"System locale: {System.Globalization.CultureInfo.CurrentUICulture.Name}\r\n" +
"\r\n"; /*+
"************ Available files ************\r\n" +
"config.ini: " + (File.Exists(IniFiles.ConfigPath) ? "Yes" : "No") + "\r\n" +
"profiles.xml: " + (File.Exists(ProfileManager.XMLPath) ? "Yes" : "No") + "\r\n";
if (currentGamePath != null)
{
form.textBoxDebugText.Text += "Mods\\managed.xml: " + (File.Exists(Path.Combine(currentGamePath, "Mods", "managed.xml")) ? "Yes" : "No") + "\r\n" +
"Mods\\manifest.xml: " + (File.Exists(Path.Combine(currentGamePath, "Mods", "manifest.xml")) ? "Yes" : "No") + "\r\n" +
"Mods\\resources.txt: " + (File.Exists(Path.Combine(currentGamePath, "Mods", "resources.txt")) ? "Yes" : "No") + "\r\n";
}
if (File.Exists(Path.Combine(IniFiles.ParentPath, $"Fallout76.ini")))
form.textBoxDebugText.Text += "Fallout76.ini\r\n";
if (File.Exists(Path.Combine(IniFiles.ParentPath, $"Fallout76Prefs.ini")))
form.textBoxDebugText.Text += "Fallout76Prefs.ini\r\n";
if (File.Exists(Path.Combine(IniFiles.ParentPath, $"Fallout76Custom.ini")))
form.textBoxDebugText.Text += "Fallout76Custom.ini\r\n";
if (File.Exists(Path.Combine(IniFiles.ParentPath, $"Project76.ini")))
form.textBoxDebugText.Text += "Project76.ini\r\n";
if (File.Exists(Path.Combine(IniFiles.ParentPath, $"Project76Prefs.ini")))
form.textBoxDebugText.Text += "Project76Prefs.ini\r\n";
if (File.Exists(Path.Combine(IniFiles.ParentPath, $"Project76Custom.ini")))
form.textBoxDebugText.Text += "Project76Custom.ini\r\n";
if (currentIniPrefix != "Fallout76" && currentIniPrefix != "Project76")
{
form.textBoxDebugText.Text += $"{currentIniPrefix}.ini: " + (File.Exists(Path.Combine(IniFiles.ParentPath, $"{currentIniPrefix}.ini")) ? "Yes" : "No") + "\r\n" +
$"{currentIniPrefix}Prefs.ini: " + (File.Exists(Path.Combine(IniFiles.ParentPath, $"{currentIniPrefix}Prefs.ini")) ? "Yes" : "No") + "\r\n" +
$"{currentIniPrefix}Custom.ini: " + (File.Exists(Path.Combine(IniFiles.ParentPath, $"{currentIniPrefix}Custom.ini")) ? "Yes" : "No") + "\r\n";
}*/

/*form.textBoxDebugText.Text += "\r\n************* Game profiles *************";
int gameIndex = 0;
foreach (GameInstance game in ProfileManager.Games)
{
form.textBoxDebugText.Text += $"\r\nProfile #{gameIndex}" + (ProfileManager.SelectedGameIndex == gameIndex ? " (selected)" : "") + "\r\n" +
$" Edition: {game.Edition}\r\n" +
$" *.ini prefix: {game.IniPrefix}\r\n" +
$" Executable: {game.ExecutableName}\r\n" +
$" Game path: " + (game.ValidateGamePath() ? "valid" : "invalid") + "\r\n" +
$" Launch option: {game.PreferredLaunchOption}\r\n";
gameIndex++;
}
if (gameIndex == 0)
form.textBoxDebugText.Text += "\r\nNone or not loaded yet\r\n";
form.textBoxDebugText.Text += "\r\n"; */
$"App locale: {Localization.Locale}" +
"\r\n";
}
catch { }

Expand Down
52 changes: 9 additions & 43 deletions Fo76ini/Forms/Form1/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,27 +412,27 @@ private void OnProfileChanged(object sender, ProfileEventArgs e)
switch (e.ActiveGameInstance.Edition)
{
case GameEdition.Steam:
this.pictureBoxGameEdition.Image = Resources.steam;
this.pictureBoxGameEdition.Image = GameInstance.Get128pxBitmap(GameEdition.Steam);
this.toolStripStatusLabelEditionText.Text = "Steam";
this.labelGameEdition.Text = "Steam";
break;
case GameEdition.BethesdaNet:
this.pictureBoxGameEdition.Image = Resources.bethesda;
this.pictureBoxGameEdition.Image = GameInstance.Get128pxBitmap(GameEdition.BethesdaNet);
this.toolStripStatusLabelEditionText.Text = "Bethesda.net";
this.labelGameEdition.Text = "Bethesda";
break;
case GameEdition.BethesdaNetPTS:
this.pictureBoxGameEdition.Image = Resources.bethesda_pts;
this.pictureBoxGameEdition.Image = GameInstance.Get128pxBitmap(GameEdition.BethesdaNetPTS);
this.toolStripStatusLabelEditionText.Text = "Bethesda.net (PTS)";
this.labelGameEdition.Text = "Bethesda\n(PTS)";
break;
case GameEdition.MSStore:
this.pictureBoxGameEdition.Image = Resources.msstore;
this.toolStripStatusLabelEditionText.Text = "Microsoft Store";
this.labelGameEdition.Text = "Microsoft\nStore";
this.pictureBoxGameEdition.Image = GameInstance.Get128pxBitmap(GameEdition.MSStore);
this.toolStripStatusLabelEditionText.Text = "Xbox / Microsoft Store";
this.labelGameEdition.Text = "Xbox";
break;
default:
this.pictureBoxGameEdition.Image = Resources.help_128;
this.pictureBoxGameEdition.Image = GameInstance.Get128pxBitmap(GameEdition.Unknown);
this.toolStripStatusLabelEditionText.Text = Localization.GetString("unknown");
this.labelGameEdition.Text = Localization.GetString("unknown");
break;
Expand Down Expand Up @@ -803,46 +803,12 @@ private void showProfiles_OnClick(object sender, EventArgs e)

private void pictureBoxGameEdition_MouseEnter(object sender, EventArgs e)
{
switch (this.game.Edition)
{
case GameEdition.Steam:
this.pictureBoxGameEdition.Image = Resources.steam_hover;
break;
case GameEdition.BethesdaNet:
this.pictureBoxGameEdition.Image = Resources.bethesda_hover;
break;
case GameEdition.BethesdaNetPTS:
this.pictureBoxGameEdition.Image = Resources.bethesda_pts_hover;
break;
case GameEdition.MSStore:
this.pictureBoxGameEdition.Image = Resources.msstore_hover;
break;
default:
this.pictureBoxGameEdition.Image = Resources.help_128_hover;
break;
}
this.pictureBoxGameEdition.Image = this.game.Get128pxHoverBitmap();
}

private void pictureBoxGameEdition_MouseLeave(object sender, EventArgs e)
{
switch (this.game.Edition)
{
case GameEdition.Steam:
this.pictureBoxGameEdition.Image = Resources.steam;
break;
case GameEdition.BethesdaNet:
this.pictureBoxGameEdition.Image = Resources.bethesda;
break;
case GameEdition.BethesdaNetPTS:
this.pictureBoxGameEdition.Image = Resources.bethesda_pts;
break;
case GameEdition.MSStore:
this.pictureBoxGameEdition.Image = Resources.msstore;
break;
default:
this.pictureBoxGameEdition.Image = Resources.help_128;
break;
}
this.pictureBoxGameEdition.Image = this.game.Get128pxBitmap();
}

#endregion
Expand Down
Loading

0 comments on commit 560fac4

Please sign in to comment.