Пример #1
0
        public MainWindow(InstanceType instance, AppType appType)
        {
            InitializeComponent();

            var gallifrey = new Backend(instance, appType);

            modelHelpers        = new ModelHelpers(gallifrey, FlyoutsControl);
            exceptionlessHelper = new ExceptionlessHelper(modelHelpers);
            exceptionlessHelper.RegisterExceptionless();
            var viewModel = new MainViewModel(modelHelpers);

            modelHelpers.RefreshModel();
            modelHelpers.SelectRunningTimer();
            DataContext = viewModel;

            gallifrey.NoActivityEvent   += GallifreyOnNoActivityEvent;
            gallifrey.ExportPromptEvent += GallifreyOnExportPromptEvent;
            SystemEvents.SessionSwitch  += SessionSwitchHandler;

            Height = gallifrey.Settings.UiSettings.Height;
            Width  = gallifrey.Settings.UiSettings.Width;
            Title  = gallifrey.VersionControl.AppName;
            ThemeHelper.ChangeTheme(gallifrey.Settings.UiSettings.Theme, gallifrey.Settings.UiSettings.Accent);

            if (gallifrey.VersionControl.IsAutomatedDeploy)
            {
                PerformUpdate(false, true);
                var updateHeartbeat = new Timer(60000);
                updateHeartbeat.Elapsed += AutoUpdateCheck;
                updateHeartbeat.Enabled  = true;
            }
        }
Пример #2
0
        public MainWindow(InstanceType instance)
        {
            InitializeComponent();

            var gallifrey = new Backend(instance);

            modelHelpers = new ModelHelpers(gallifrey, FlyoutsControl);

            exceptionlessHelper = new ExceptionlessHelper(modelHelpers);
            exceptionlessHelper.RegisterExceptionless();

            progressDialogHelper = new ProgressDialogHelper(modelHelpers);

            var viewModel = new MainViewModel(modelHelpers);

            DataContext = viewModel;

            Height = gallifrey.Settings.UiSettings.Height;
            Width  = gallifrey.Settings.UiSettings.Width;
            ThemeHelper.ChangeTheme(gallifrey.Settings.UiSettings.Theme);

            updateHeartbeat          = new Timer(TimeSpan.FromMinutes(30).TotalMilliseconds);
            updateHeartbeat.Elapsed += AutoUpdateCheck;

            idleDetectionHeartbeat          = new Timer(TimeSpan.FromSeconds(30).TotalMilliseconds);
            idleDetectionHeartbeat.Elapsed += IdleDetectionCheck;

            flyoutOpenCheck          = new Timer(100);
            flyoutOpenCheck.Elapsed += FlyoutOpenCheck;
        }
Пример #3
0
 public void WriteError(string str, params string[] tags)
 {
     if (tags.Length == 0)
     {
         tags = new string[] { getMethodBaseName() }
     }
     ;
     ExceptionlessHelper.Error(str, tags);
 }
Пример #4
0
        public MainWindow(InstanceType instance)
        {
            InitializeComponent();

            var gallifrey = new Backend(instance);

            modelHelpers = new ModelHelpers(gallifrey, FlyoutsControl);

            exceptionlessHelper = new ExceptionlessHelper(modelHelpers);
            exceptionlessHelper.RegisterExceptionless();

            progressDialogHelper = new ProgressDialogHelper(modelHelpers.DialogContext);

            var viewModel = new MainViewModel(modelHelpers);

            modelHelpers.RefreshModel();
            modelHelpers.SelectRunningTimer();
            DataContext = viewModel;

            gallifrey.NoActivityEvent   += GallifreyOnNoActivityEvent;
            gallifrey.ExportPromptEvent += GallifreyOnExportPromptEvent;
            SystemEvents.SessionSwitch  += SessionSwitchHandler;

            Height = gallifrey.Settings.UiSettings.Height;
            Width  = gallifrey.Settings.UiSettings.Width;
            ThemeHelper.ChangeTheme(gallifrey.Settings.UiSettings.Theme, gallifrey.Settings.UiSettings.Accent);

            updateHeartbeat          = new Timer(TimeSpan.FromMinutes(1).TotalMilliseconds);
            updateHeartbeat.Elapsed += AutoUpdateCheck;

            idleDetectionHeartbeat          = new Timer(TimeSpan.FromSeconds(30).TotalMilliseconds);
            idleDetectionHeartbeat.Elapsed += IdleDetectionCheck;

            flyoutOpenCheck          = new Timer(100);
            flyoutOpenCheck.Elapsed += FlyoutOpenCheck;
        }