Remove old fixed Eto workaround, bring back logger ref to not crash

pull/32/head
Miepee 4 years ago
parent 4a43827174
commit b97792f717

@ -9,6 +9,8 @@ using System.Text.RegularExpressions;
using AM2RLauncherLib; using AM2RLauncherLib;
using Application = Eto.Forms.Application; using Application = Eto.Forms.Application;
using FileInfo = System.IO.FileInfo; using FileInfo = System.IO.FileInfo;
using log4net.Repository.Hierarchy;
// ReSharper disable LocalizableElement - we want hardcoded strings for console writes. // ReSharper disable LocalizableElement - we want hardcoded strings for console writes.
namespace AM2RLauncher.Gtk; namespace AM2RLauncher.Gtk;

@ -4,6 +4,8 @@ using log4net.Config;
using System; using System;
using System.IO; using System.IO;
using AM2RLauncherLib; using AM2RLauncherLib;
using log4net.Repository.Hierarchy;
// ReSharper disable LocalizableElement - we want hardcoded strings for console writes. // ReSharper disable LocalizableElement - we want hardcoded strings for console writes.
namespace AM2RLauncher.Mac; namespace AM2RLauncher.Mac;

@ -4,6 +4,8 @@ using log4net.Config;
using System; using System;
using System.IO; using System.IO;
using AM2RLauncherLib; using AM2RLauncherLib;
using log4net.Repository.Hierarchy;
// ReSharper disable LocalizableElement - we want hardcoded strings for console writes. // ReSharper disable LocalizableElement - we want hardcoded strings for console writes.
namespace AM2RLauncher.Wpf; namespace AM2RLauncher.Wpf;

@ -110,12 +110,8 @@ public partial class MainForm : Form
} }
} }
// This needs to be made invisible, otherwise a tray indicator will be visible (on linux?) that clicking crashes the application
//TODO: this sounds like an eto issue. check if this can get reproduced.
trayIndicator.Visible = false;
if (e.Cancel) if (e.Cancel)
log.Info("Cancelled MainForm closing event during UpdateState." + updateState + "."); log.Info($"Cancelled MainForm closing event during UpdateState.{updateState}.");
else else
log.Info("Successfully closed MainForm. Exiting main thread."); log.Info("Successfully closed MainForm. Exiting main thread.");
} }
@ -172,12 +168,12 @@ public partial class MainForm : Form
MessageBox.Show(this, Text.InternetConnectionDrop, Text.WarningWindowTitle, MessageBoxType.Warning); MessageBox.Show(this, Text.InternetConnectionDrop, Text.WarningWindowTitle, MessageBoxType.Warning);
} }
// Error message on protected folders. See this for more info: https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/controlled-folders // Error message on protected folders. See this for more info: https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/controlled-folders
else if (errMessage.Contains("access is denied")) /*else if (errMessage.Contains("access is denied")) TODO: implement this
{ {
// Needs localizable text, logging and message box // Needs localizable text, logging and message box
// Also, check if this is the right place for it. // Also, check if this is the right place for it.
throw new NotImplementedException(); throw new NotImplementedException();
} }*/
else else
{ {
log.Error(ex.Message + "\n*****Stack Trace*****\n\n" + ex.StackTrace); log.Error(ex.Message + "\n*****Stack Trace*****\n\n" + ex.StackTrace);

@ -412,6 +412,7 @@ public static class Profile
// Delete 1.1's data.win, we don't need it anymore! // Delete 1.1's data.win, we don't need it anymore!
// TODO: *theoretically* if someone would make some game like serradius in gms2 and push that as a yyc am2r mod, this *will* break! // TODO: *theoretically* if someone would make some game like serradius in gms2 and push that as a yyc am2r mod, this *will* break!
// Becauase GMS2 YYC *does* ship the data.win file, contrary to GMS1.4
File.Delete($"{profilePath}/data.win"); File.Delete($"{profilePath}/data.win");
} }
else else

Loading…
Cancel
Save