Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ProgramMainHelper.EnableLogListeners();
            //MyWebMind.Debug.IconListCreator.GenerateIconXML();
            MainCtrl mainCtrl = new MainCtrl();
            MainForm form     = new MainForm();

            ProgramMainHelper.SetFileToOpenFromAppArguments(args, form);
            mainCtrl.InitMindMate(form, new DialogManager());

            // specific to WinXP
            MainMenuCtrl mainMenuCtrl = new MainMenuCtrl(form.MainMenu, mainCtrl);

            form.MainMenuCtrl = mainMenuCtrl;

            // specific to WinXP

            Application.ThreadException += ProgramMainHelper.Application_ThreadException;
            Application.Run(form);
            ProgramMainHelper.CloseLogListeners();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ProgramMainHelper.EnableLogListeners();
            //MyWebMind.Debug.IconListCreator.GenerateIconXML();
            MainCtrl mainCtrl = new MainCtrl();
            MainForm form     = new MainForm(mainCtrl);

            ProgramMainHelper.SetFileToOpenFromAppArguments(args, form);
            mainCtrl.InitMindMate(form, new DialogManager());

            // specific to win7
            var ribbonHandler = new View.Ribbon.Ribbon(form.Ribbon, mainCtrl, form);

            form.RibbonCtrl = ribbonHandler;
            form.Load      += (sender, arguments) => ribbonHandler.OnRibbonLoaded();
            // specific to win7

            Application.ThreadException += ProgramMainHelper.Application_ThreadException;
            Application.Run(form);
            ProgramMainHelper.CloseLogListeners();
        }
Exemplo n.º 3
0
 public void Logging_NoException()
 {
     ProgramMainHelper.EnableLogListeners();
     ProgramMainHelper.Application_ThreadException(null, new System.Threading.ThreadExceptionEventArgs(new Exception("Test exception")));
     ProgramMainHelper.CloseLogListeners();
 }