public MainViewMessageFilter(MainView owner) { this.owner = owner; }
private static void Main(string[] args) { Platform.Initialize(); Options.Initialize(args); Scripting.Initialize(); Encoding.Initalize(FalloutSnip.Framework.Properties.Settings.Default.UseUTF8); try { //AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; // Add an event handler for unhandled exception AppDomain.CurrentDomain.UnhandledException += Program.CurrentDomainUnhandledException; // Add an event handler for handling UI thread exceptions to the event //Application.ThreadException += Program.ApplicationThreadException; FalloutSnip.Properties.Settings.Default.Reload(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var main = new MainView(); foreach (string arg in Options.Value.Plugins) { main.LoadPlugin(arg); } try { Application.Run(main); FalloutSnip.Properties.Settings.Default.Save(); } catch (Exception ex) { MessageBox.Show("Error running main window: \n" + ex, Resources.ErrorText); } } catch (Exception ex) { MessageBox.Show("Error initializing main view: \n" + ex, Resources.ErrorText); } }