예제 #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
        public ScintillaUI()
        {
            InitializeComponent();
            Sci.LoadDll(".\\lib\\$(platform)\\debug");
            Controls.Add(m_text = new ScintillaCtrl()
            {
                Dock = DockStyle.Fill
            });

            m_text.Text = "Hello World!";
        }
예제 #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
        public VT100UI()
        {
            InitializeComponent();

            Sci.LoadDll(".\\lib\\$(platform)\\$(config)");

            var settings = new VT100.Settings();
            var buffer   = new VT100.Buffer(settings);
            var term     = new VT100Display(buffer)
            {
                Dock = DockStyle.Fill
            };

            buffer.Output(VT100.Buffer.TestConsoleString0);
            buffer.Output(VT100.Buffer.TestConsoleString1);
            buffer.Output("This string should be deleted " + "\x1b[0G\x1b[K" + "Replaced by this string");

            Controls.Add(term);
        }
예제 #5
0
 static DiagramControlUI()
 {
     Sci.LoadDll(@"\lib\$(platform)\$(config)\");
     View3d.LoadDll(@"\lib\$(platform)\$(config)\");
 }
예제 #6
0
 static FormView3d()
 {
     Sci.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
     View3d.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
 }
예제 #7
0
 static LdrEditorUI()
 {
     Sci.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
     View3d.LoadDll(@"..\..\..\..\lib\$(platform)\$(config)\");
 }