private static void Main()
        {
            if (!AppMutex.WaitOne(TimeSpan.Zero, true)) return;

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

            IIoManager ioManager = new IoManager();
            ITimeHelper timeHelper = new TimeHelper();
            ISettings settings = new Settings();
            presenter = new LauncherPresenter(ioManager, timeHelper, settings);
            var form = new LauncherForm(presenter);
            presenter.SetView(form);

            Application.Idle += Application_Idle;
            Application.Run(form);

            AppMutex.ReleaseMutex();
        }
Пример #2
0
        private static void Main()
        {
            if (!AppMutex.WaitOne(TimeSpan.Zero, true))
            {
                return;
            }

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

            IIoManager  ioManager  = new IoManager();
            ITimeHelper timeHelper = new TimeHelper();
            ISettings   settings   = new Settings();

            presenter = new LauncherPresenter(ioManager, timeHelper, settings);
            var form = new LauncherForm(presenter);

            presenter.SetView(form);

            Application.Idle += Application_Idle;
            Application.Run(form);

            AppMutex.ReleaseMutex();
        }