Esempio n. 1
0
        public static void Main()
        {
            try
            {
                var app = new CradiatorApp();
                var configSettings = new ConfigSettings();
                configSettings.Load();
                var mainWindow = new CradiatorWindow(configSettings);
                var bootstrapper = new Bootstrapper(configSettings, mainWindow);
                var kernel = bootstrapper.CreateKernel();
                var presenter = kernel.Get<CradiatorPresenter>();

                mainWindow.Show();
                presenter.Init();

                app.Run();
            }
            catch (Exception exception)
            {
                _log.Error(exception.Message, exception);

                var messageWindow = new MessageWindow(null);
                messageWindow.ShowMessage(5, "Application Exception - see log for details\nShutting down...");
            }
        }
 void ICradiatorView.ShowMessage(string message)
 {
     var messageWindow = new MessageWindow(this);
     messageWindow.ShowMessage(_pollFrequency, message);
 }
Esempio n. 3
0
 void ICradiatorView.ShowMessage(string message)
 {
     // TODO add the dependency on IConfigSettings can move to the MessageWindow
     var messageWindow = new MessageWindow(_pollFrequency, message);
     messageWindow.Show();
     messageWindow.Focus();
 }