public Information(ModelHelpers modelHelpers) { this.modelHelpers = modelHelpers; InitializeComponent(); DataContext = new InformationModel(modelHelpers.Gallifrey); modelHelpers.Gallifrey.TrackEvent(TrackingType.InformationShown); }
public Export(ModelHelpers modelHelpers, Guid timerId, TimeSpan? exportTime, bool skipJiraCheck = false) { this.modelHelpers = modelHelpers; InitializeComponent(); progressDialogHelper = new ProgressDialogHelper(modelHelpers.DialogContext); SetupContext(modelHelpers.Gallifrey.JiraTimerCollection.GetTimer(timerId), exportTime, skipJiraCheck); }
public Settings(ModelHelpers modelHelpers) { this.modelHelpers = modelHelpers; InitializeComponent(); DataContext = new SettingModel(modelHelpers.Gallifrey.Settings, modelHelpers.Gallifrey.VersionControl); }
public BulkExport(ModelHelpers modelHelpers, List<JiraTimer> timers) { this.modelHelpers = modelHelpers; InitializeComponent(); progressDialogHelper = new ProgressDialogHelper(modelHelpers.DialogContext); DataContext = new BulkExportContainerModel(); SetupContext(timers); }
public LockedTimer(ModelHelpers modelHelpers) { this.modelHelpers = modelHelpers; InitializeComponent(); var idleTimers = modelHelpers.Gallifrey.IdleTimerCollection.GetUnusedLockTimers().ToList(); DataContext = new LockedTimerCollectionModel(idleTimers); }
public EditTimer(ModelHelpers modelHelpers, Guid selected) { this.modelHelpers = modelHelpers; InitializeComponent(); progressDialogHelper = new ProgressDialogHelper(modelHelpers.DialogContext); EditedTimerId = selected; DataContext = new EditTimerModel(modelHelpers.Gallifrey, EditedTimerId); }
public Search(ModelHelpers modelHelpers, bool openFromAdd = false, bool openFromEdit = false, DateTime? selectedDateTab = null) { this.modelHelpers = modelHelpers; this.openFromAdd = openFromAdd; this.openFromEdit = openFromEdit; this.selectedDateTab = selectedDateTab ?? DateTime.Now.Date; InitializeComponent(); progressDialogHelper = new ProgressDialogHelper(modelHelpers.DialogContext); LoadSearch(); }
public AddTimer(ModelHelpers modelHelpers, string jiraRef = null, DateTime? startDate = null, bool? enableDateChange = null, List<IdleTimer> idleTimers = null, bool? startNow = null) { this.modelHelpers = modelHelpers; InitializeComponent(); progressDialogHelper = new ProgressDialogHelper(modelHelpers.DialogContext); if (!modelHelpers.Gallifrey.Settings.InternalSettings.IsPremium && startNow.HasValue && startNow.Value) { startNow = false; } DataContext = new AddTimerModel(modelHelpers.Gallifrey, jiraRef, startDate, enableDateChange, idleTimers, startNow); AddedTimer = false; }
public MainViewModel(ModelHelpers modelHelpers) { ModelHelpers = modelHelpers; TimerDates = new ObservableCollection<TimerDateModel>(); var backgroundRefresh = new Timer(3600000); backgroundRefresh.Elapsed += (sender, args) => RefreshModel(); backgroundRefresh.Start(); modelHelpers.Gallifrey.VersionControl.NewVersionInstalled += (sender, args) => NewVersionInstalled(); modelHelpers.Gallifrey.IsPremiumChanged += (sender, args) => PremiumChanged(); modelHelpers.Gallifrey.BackendModifiedTimers += (sender, args) => BackendModification(); modelHelpers.Gallifrey.SettingsChanged += (sender, args) => SettingsChanged(); modelHelpers.Gallifrey.JiraConnection.LoggedIn += (sender, args) => UserLoggedIn(); modelHelpers.Gallifrey.JiraTimerCollection.GeneralTimerModification += (sender, args) => GeneralTimerModification(); modelHelpers.Gallifrey.DailyTrackingEvent += (sender, args) => DailyEvent(); modelHelpers.RefreshModelEvent += (sender, args) => RefreshModel(); modelHelpers.SelectRunningTimerEvent += (sender, args) => SelectRunningTimer(); modelHelpers.SelectTimerEvent += (sender, timerId) => SetSelectedTimer(timerId); }
public MainWindow(InstanceType instance) { InitializeComponent(); var gallifrey = new Backend(instance); 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; ThemeHelper.ChangeTheme(gallifrey.Settings.UiSettings.Theme, gallifrey.Settings.UiSettings.Accent); if (gallifrey.VersionControl.IsAutomatedDeploy) { PerformUpdate(false, true); var updateHeartbeat = new Timer(TimeSpan.FromMinutes(1).TotalMilliseconds); updateHeartbeat.Elapsed += AutoUpdateCheck; updateHeartbeat.Enabled = true; } var idleDetectionHeartbeat = new Timer(TimeSpan.FromSeconds(30).TotalMilliseconds); idleDetectionHeartbeat.Elapsed += IdleDetectionCheck; idleDetectionHeartbeat.Enabled = true; var flyoutOpenCheck = new Timer(100); flyoutOpenCheck.Elapsed += FlyoutOpenCheck; flyoutOpenCheck.Enabled = true; }
public Error(ModelHelpers modelHelpers, Event exceptionlessEvent) { this.modelHelpers = modelHelpers; InitializeComponent(); DataContext = new ErrorModel(exceptionlessEvent); }
public ProgressDialogHelper(ModelHelpers modelHelpers) { this.modelHelpers = modelHelpers; }
public ExceptionlessHelper(ModelHelpers modelHelpers) { this.modelHelpers = modelHelpers; modelHelpers.Gallifrey.DailyTrackingEvent += GallifreyOnDailyTrackingEvent; }