Пример #1
0
        [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);
            }
        }
Пример #2
0
        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();
            }
        }
Пример #3
0
        /// <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());
        }
Пример #4
0
 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();
     }
 }
Пример #5
0
 static DiagramControlUI()
 {
     Sci.LoadDll(@"\lib\$(platform)\$(config)\");
     View3d.LoadDll(@"\lib\$(platform)\$(config)\");
 }
Пример #6
0
        // 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);
        }
Пример #7
0
 public App()
 {
     View3d.LoadDll();
     Xml_.Config.SupportWPFTypes();
 }
Пример #8
0
 static FormView3d()
 {
     Sci.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
     View3d.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
 }
Пример #9
0
 static LdrEditorUI()
 {
     Sci.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
     View3d.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
 }
Пример #10
0
 static MainWindow()
 {
     View3d.LoadDll();
 }
Пример #11
0
 static View3dUI()
 {
     View3d.LoadDll();
 }
Пример #12
0
 public App()
 {
     View3d.LoadDll();
 }
Пример #13
0
 static DiagramUI()
 {
     View3d.LoadDll(@"\sdk\lib\$(platform)\$(config)\");
 }