Exemple #1
0
        private void SettingDialogCommand()
        {
            ISettingDialogView     view              = container.GetExportedValue <ISettingDialogView>();
            IDataService           dataService       = container.GetExportedValue <IDataService>();
            IFileDialogService     fileDialogService = container.GetExportedValue <IFileDialogService>();
            SettingDialogViewModel settingDialog     = new SettingDialogViewModel(view, dataService, fileDialogService);

            settingDialog.BeforeAlertMinutes = Settings.Default.DefaultAlertBeforeMinutes;
            settingDialog.ExpiredMinutes     = Settings.Default.DefaultExpiredMinutes;
            settingDialog.HasAlertSound      = Settings.Default.HasAlertSound;
            settingDialog.SoundPath          = Settings.Default.SoundPath;
            settingDialog.ResetCountDownData = Settings.Default.ResetCountDownData;

            bool?result = settingDialog.ShowDialog(this.shellViewModel.View);

            if (result == true)
            {
                Settings.Default.DefaultAlertBeforeMinutes = settingDialog.BeforeAlertMinutes;
                Settings.Default.DefaultExpiredMinutes     = settingDialog.ExpiredMinutes;
                Settings.Default.HasAlertSound             = settingDialog.HasAlertSound;
                Settings.Default.SoundPath          = settingDialog.SoundPath;
                Settings.Default.ResetCountDownData = settingDialog.ResetCountDownData;
                Settings.Default.Save();

                this.newItemsViewModel.ResetCountDownData = Settings.Default.ResetCountDownData;
                this.newItemsViewModel.AlertBeforeMinutes = Settings.Default.DefaultAlertBeforeMinutes;
            }
        }
Exemple #2
0
        protected override void OnTestInitialize()
        {
            this.beforeAlertMinutes = Settings.Default.DefaultAlertBeforeMinutes;
            this.expiredMinutes     = Settings.Default.DefaultExpiredMinutes;
            this.hasAlertSound      = Settings.Default.HasAlertSound;
            this.soundPath          = Settings.Default.SoundPath;
            this.resetCountDownData = Settings.Default.ResetCountDownData;

            ISettingDialogView view              = Container.GetExportedValue <ISettingDialogView>();
            IDataService       dataService       = Container.GetExportedValue <IDataService>();
            IFileDialogService fileDialogService = Container.GetExportedValue <IFileDialogService>();

            viewModel = new SettingDialogViewModel(view, dataService, fileDialogService);

            viewModel.BeforeAlertMinutes = this.beforeAlertMinutes;
            viewModel.ExpiredMinutes     = this.expiredMinutes;
            viewModel.HasAlertSound      = this.hasAlertSound;
            viewModel.SoundPath          = this.soundPath;
            viewModel.ResetCountDownData = this.resetCountDownData;
        }
Exemple #3
0
        protected override void OnTestInitialize()
        {
            this.proxyService             = new ProxyService(Container.GetExportedValues <ITracingSystemProxy>());
            this.proxyService.ActiveProxy = this.proxyService.Proxies.First(x => x.ProxyName == activeProxy);
            foreach (var proxy in this.proxyService.Proxies)
            {
                proxy.Initialize();
            }

            ISettingsView settingsView = Container.GetExportedValue <ISettingsView>();

            this.settingsViewModel = new SettingsViewModel(settingsView, proxyService, teamMembersString);

            this.settingsViewModel.UserName          = this.userName;
            this.settingsViewModel.RefreshMinutes    = this.refreshMinutes;
            this.settingsViewModel.IsFilterCreatedBy = this.isFilterCreatedBy;

            ISettingDialogView dialogView = Container.GetExportedValue <ISettingDialogView>();

            this.dialogViewModel = new SettingDialogViewModel(dialogView, proxyService, new MockMessageService(), settingsViewModel);
        }