예제 #1
0
        private static void Main()
        {
            if (InstanceExists())
                return;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);

            // TODO: Resolve factory as a depenedency by means of some DI solution.
            DefaultFactory Factory = new DefaultFactory();

            try
            {
                HoloCore Core = new HoloCore(Factory);

                MainForm MainForm = new MainForm(Core)
                                        {
                                            Icon = Resource.HOLO
                                        };
                Core.SetView(MainForm);

                Application.Run(MainForm);

                Core.SaveDatabase();
            }
            catch (Exception E)
            {
                Logger.FatalException("Unhandled exception at the top level.", E);

                MessageBox.Show(E.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: ForesThule/HOLO
        private static void Main()
        {
            if (InstanceExists())
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);

            // TODO: Resolve factory as a depenedency by means of some DI solution.
            DefaultFactory Factory = new DefaultFactory();

            try
            {
                HoloCore Core = new HoloCore(Factory);

                MainForm MainForm = new MainForm(Core)
                {
                    Icon = Resource.HOLO
                };
                Core.SetView(MainForm);

                Application.Run(MainForm);

                Core.SaveDatabase();
            }
            catch (Exception E)
            {
                Logger.FatalException("Unhandled exception at the top level.", E);

                MessageBox.Show(E.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }