コード例 #1
0
        static void Main()
        {
            Application.AddMessageFilter(new MouseWheelMessageFilter());

            try
            {
                SemanticTypeSystem = new STS();
                Skin      = new Membrane(SemanticTypeSystem);
                Skin.Name = "Skin";
                // Receptors = new ReceptorsContainer();
                // Receptors.SemanticTypeSystem = SemanticTypeSystem;

                DropReceptor = new DropReceptor(Skin.ReceptorSystem);
                // Program.Skin.RegisterReceptor("DropReceptor", dr);

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                AppState = new StatePersistence();
                AppState.ReadState("appState.xml");                                                                                                                                                     // Load the last application state.
                MainForm = MycroParser.InstantiateFromFile <Form>("mainform.xml", null);
                Application.Run(MainForm);
                AppState.WriteState("appState.xml");                                                                                                                                            // Save the application state.
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debugger.Break();
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: yamamushi/ceptr
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Cef.Initialize();

            try
            {
                AppState = new StatePersistence();
                AppState.ReadState("appState.xml");                                                                                                                                                     // Load the last application state.
                MainForm = MycroParser.InstantiateFromFile <Form>("mainform.xml", null);
                Application.Run(MainForm);
                AppState.WriteState("appState.xml");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace, "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }