Пример #1
0
 public ExplorerViewModel(IPhraseDataService phraseDataService, ISettingsService settingsService) : base(phraseDataService, settingsService)
 {
     this.LoadSelectedOperationsCommand   = new RelayCommand(async() => await this.LoadSelectedOperationsAsync(), this.CanLoadSelectedOperations);
     this.DeleteSelectedOperationsCommand = new RelayCommand(this.DeleteSelectedOperations, this.CanDeleteSelectedOperations);
     this.DeleteMarkedItemsCommand        = new RelayCommand(this.DeleteMarkedItems, this.CanDeleteMarkedItems);
     this.SearchPhrasesCommand            = new RelayCommand(async() => await this.SearchPhrasesAsync(), this.CanSearchPhrases);
     this.LoadAllOperationsCommand        = new RelayCommand(async() => await this.LoadAllOperationsAsync(), this.CanLoadAllOperations);
     this.LoadAllOrphansCommand           = new RelayCommand(async() => await this.LoadAllOrphansAsync(), this.CanLoadAllOrphans);
     this.phraseDataService = phraseDataService;
     this.SettingsService   = settingsService;
     if (this.SettingsService.SelectEnglish)
     {
         this.Alphabet |= Alphabet.English;
     }
     if (this.SettingsService.SelectHebrew)
     {
         this.Alphabet |= Alphabet.Hebrew;
     }
     if (this.SettingsService.SelectGreek)
     {
         this.Alphabet |= Alphabet.Greek;
     }
     if (this.SettingsService.SelectMixed)
     {
         this.Alphabet |= Alphabet.Mixed;
     }
 }
Пример #2
0
 public ScannerViewModel(IPhraseDataService phraseDataService, ISettingsService settingsService) : base(phraseDataService, settingsService)
 {
     this.ScanFileCommand        = new RelayCommand(async() => await this.ScanFileAsync(), this.CanScanFile);
     this.ScanTextCommand        = new RelayCommand(async() => await this.ScanTextAsync(), this.CanScanText);
     this.SaveMarkedItemsCommand = new RelayCommand(async() => await this.SaveMarkedItems(), this.CanSaveMarkedItems);
     this.GetFilePathCommand     = new RelayCommand(this.GetFilePath, this.CanGetFilePath);
     this.phraseDataService      = phraseDataService;
     this.SettingsService        = settingsService;
 }
Пример #3
0
 public CommonViewModel(IPhraseDataService phraseDataService, ISettingsService settingsService) : this()
 {
     this.phraseDataService = phraseDataService;
     this.SettingsService   = settingsService;
     if (this.SettingsService.SelectGematria && this.SettingsService.ShowGematria)
     {
         this.CalculationMethod |= CalculationMethod.Gematria;
     }
     if (this.SettingsService.SelectOrdinal && this.SettingsService.ShowOrdinal)
     {
         this.CalculationMethod |= CalculationMethod.Ordinal;
     }
     if (this.SettingsService.SelectReduced && this.SettingsService.ShowReduced)
     {
         this.CalculationMethod |= CalculationMethod.Reduced;
     }
     if (this.SettingsService.SelectSumerian && this.SettingsService.ShowSumerian)
     {
         this.CalculationMethod |= CalculationMethod.Sumerian;
     }
     if (this.SettingsService.SelectPrimes && this.SettingsService.ShowPrimes)
     {
         this.CalculationMethod |= CalculationMethod.Primes;
     }
     if (this.SettingsService.SelectSquared && this.SettingsService.ShowSquared)
     {
         this.CalculationMethod |= CalculationMethod.Squared;
     }
     if (this.SettingsService.SelectMisparGadol && this.SettingsService.ShowMisparGadol)
     {
         this.CalculationMethod |= CalculationMethod.MisparGadol;
     }
     if (this.SettingsService.SelectMisparShemi && this.SettingsService.ShowMisparShemi)
     {
         this.CalculationMethod |= CalculationMethod.MisparShemi;
     }
     Messenger.Default.Register <SettingsUpdatedMessage>(this, this.MessagesUpdated);
 }
Пример #4
0
 public CalculatorViewModel(IPhraseDataService phraseDataService, ISettingsService settingsService) : base(phraseDataService, settingsService)
 {
     this.SaveMarkedItemsCommand = new RelayCommand(async() => await this.SaveMarkedItemsAsync(), this.CanSaveMarkedItems);
     this.phraseDataService      = phraseDataService;
     this.SettingsService        = settingsService;
 }