private void SetPreview(bool state) { _gbData.UpdateButtons(state); _cbData.UpdateButtons(state); BibleViewModel.UpdateButtons(state); CustomizedViewModel.UpdateButtons(state); MinistryViewModel.UpdateButtons(state); if (state) { InsertWith = "535"; With = "1200"; Hight = "790"; PrviewVisibleFlag = true; OnPropertyChanged(nameof(InsertWith)); OnPropertyChanged(nameof(With)); OnPropertyChanged(nameof(Hight)); OnPropertyChanged(nameof(PrviewVisibleFlag)); return; } PrviewVisibleFlag = false; InsertWith = "583"; With = "600"; Hight = "550"; OnPropertyChanged(nameof(InsertWith)); OnPropertyChanged(nameof(With)); OnPropertyChanged(nameof(Hight)); OnPropertyChanged(nameof(PrviewVisibleFlag)); }
public WindowViewModel(PositionData positionData, BiblewordPositionData biblewordPositionData) { var fadeInWriter = new FadeInWriter(positionData, biblewordPositionData); HistoryViewModel = new HistoryViewModel(fadeInWriter); _log.Info("Load Data"); _gbData = new HymnalInputViewModel(HymnalJsonReader.LoadHymnalData($"{Directory.GetCurrentDirectory()}/DataSource/GB_Data.json"), "Gesangbuch", fadeInWriter, HistoryViewModel); _cbData = new HymnalInputViewModel(HymnalJsonReader.LoadHymnalData($"{Directory.GetCurrentDirectory()}/DataSource/CB_Data.json"), "Chorbuch", fadeInWriter, HistoryViewModel); HymnalInputVisible = true; BibleInputVisible = false; CustomInputVisible = false; MinistryInputVisible = false; _log.Info("Load Ministry"); MinistryViewModel = new MinistryViewModel(fadeInWriter, HistoryViewModel); CustomizedViewModel = new CustomizedInsertViewModel(fadeInWriter, HistoryViewModel); _log.Info("Load PreviewMode"); PreviewViewModel = new PreviewViewModel(fadeInWriter.CurrentFade); ConfigViewModel.OnLoadMinistries += UpdateMinistries; ConfigViewModel.OnResetMinistries += ResetMinistries; ConfigViewModel.OnUpdateFullscreenMode += UpdateFullscreenMode; ConfigViewModel.OnUpdatePreview += UpdatePreviewMode; ConfigViewModel.OnSaveMinistries += SaveMinistries; fadeInWriter.OnInsertUpdate += UpdatePreview; CurrentHymnalViewModel = _gbData; _previewWindow = new PreviewWindowController(PreviewViewModel); _log.Info("ReadBible"); BibleViewModel = new BibleViewModel(BibleJsonReader.LoadBibleData($"{Directory.GetCurrentDirectory()}/DataSource/Bible_Data.json"), fadeInWriter, HistoryViewModel); //BibleViewModel.OpenBibleBrowser += OnOpenBibleBrowser; _log.Info("Create Preview"); SetPreview(Properties.Settings.Default.ShowPreviewPicture); if (Properties.Settings.Default.ShowInsertInFullscreen) { _previewWindow.Show(); } }