Ejemplo n.º 1
0
        public MainWindow()
        {
            CheckIsRunning();

            _logManager = UserConfig.Instance.CreateLogger();

            Mouse.OverrideCursor = Cursors.Wait;

            InitializeComponent();

            _logManager.Listeners.Add(new GuiLogListener(MonitorControl));
            _logManager.Listeners.Add(this);

            _emailListener = new HydraEmailLogListener(this);
            _logManager.Listeners.Add(_emailListener);

            MemoryStatMenuItem.IsChecked = MemoryStatistics.IsEnabled;

            Title = TypeHelper.ApplicationNameWithVersion;

            if (AutomaticUpdater.ClosingForInstall)
            {
                Application.Current.Shutdown();
                return;
            }

            AutomaticUpdater.MenuItem = MnuCheckForUpdates;
            AutomaticUpdater.Translate();

            //DockSite.DocumentWindows.CollectionChanged += DocumentWindows_OnCollectionChanged;

            _logManager.Sources.Add(UserConfig.Instance);

            Instance = this;

            UserConfig.Instance.Load();

            OnUpdateUi(null, null);
        }
Ejemplo n.º 2
0
		public MainWindow()
		{
			CheckIsRunning();

			_logManager = UserConfig.Instance.CreateLogger();

			Mouse.OverrideCursor = Cursors.Wait;

			InitializeComponent();

			_logManager.Listeners.Add(new GuiLogListener(MonitorControl));
			_logManager.Listeners.Add(this);

			_emailListener = new HydraEmailLogListener(this);
			_logManager.Listeners.Add(_emailListener);

			MemoryStatMenuItem.IsChecked = MemoryStatistics.IsEnabled;

			Title = TypeHelper.ApplicationNameWithVersion;

			if (AutomaticUpdater.ClosingForInstall)
			{
				Application.Current.Shutdown();
				return;
			}

			AutomaticUpdater.MenuItem = MnuCheckForUpdates;
			AutomaticUpdater.Translate();

			//DockSite.DocumentWindows.CollectionChanged += DocumentWindows_OnCollectionChanged;

			_logManager.Sources.Add(UserConfig.Instance);

			Instance = this;

			UserConfig.Instance.Load();
		}