[STAThread] static void Main() { try { // Create an event handle to prevent multiple instances bool was_created; using (var app_running = new EventWaitHandle(true, EventResetMode.AutoReset, "TradeeRunningEvent", out was_created)) { // Only run the app if we created the event handle if (was_created) { // Ensure required dlls are loaded View3d.LoadDll(); Sci.LoadDll(); Sqlite.LoadDll(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainUI()); } } } catch (Exception ex) { MsgBox.Show(null, ex.MessageFull(), "Crash!", MessageBoxButtons.OK); } }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); try { View3d.LoadDll(); Xml_.Config .SupportRylogicMathsTypes() .SupportRylogicGraphicsTypes() .SupportSystemDrawingPrimitiveTypes() .SupportSystemDrawingCommonTypes() .SupportWPFTypes() ; MainWindow = new MainWindow(new Model(e.Args)); MainWindow.Show(); } catch (Exception ex) { if (Debugger.IsAttached) { throw; } Log.Write(ELogLevel.Fatal, ex, Util.AppProductName, string.Empty, 0); MsgBox.Show(null, $"Application startup failure: {ex.MessageFull()}", "Solar Hot Water", MsgBox.EButtons.OK, MsgBox.EIcon.Error); Shutdown(); } }
/// <summary>The main entry point for the application.</summary> [STAThread] static void Main() { // Note! Running this in the debugger causes this to be run as a 32bit // process regardless of the selected solution platform Debug.WriteLine($"\n {Application.ExecutablePath} is a {(Environment.Is64BitProcess?"64":"32")}bit process\n"); Sci.LoadDll(); Sqlite.LoadDll(); View3d.LoadDll(); Audio.LoadDll(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainUI()); //Application.Run(new DgvUI()); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); try { View3d.LoadDll(); MainWindow = new MainWindow(); MainWindow.Show(); } catch (Exception ex) { if (Debugger.IsAttached) { throw; } Log.Write(ELogLevel.Fatal, ex, "Application startup failure"); MsgBox.Show(null, $"Application startup failure: {ex.MessageFull()}", Util.AppProductName, MsgBox.EButtons.OK, MsgBox.EIcon.Error); Shutdown(); } }
static DiagramControlUI() { Sci.LoadDll(@"\lib\$(platform)\$(config)\"); View3d.LoadDll(@"\lib\$(platform)\$(config)\"); }
// Notes: // - This control subclasses 'Image' because the D3DImage is an 'ImageSource' // - View3dControl does not have a 'Settings' class, state changes are immediate // and storing the state is left to the caller. (Unlike ChartControl). static View3dControl() { View3d.LoadDll(throw_if_missing: false); }
public App() { View3d.LoadDll(); Xml_.Config.SupportWPFTypes(); }
static FormView3d() { Sci.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\"); View3d.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\"); }
static LdrEditorUI() { Sci.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\"); View3d.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\"); }
static MainWindow() { View3d.LoadDll(); }
static View3dUI() { View3d.LoadDll(); }
public App() { View3d.LoadDll(); }
static DiagramUI() { View3d.LoadDll(@"\sdk\lib\$(platform)\$(config)\"); }