private void OnButtonLeft(object obj) { if (_studioMode) { var bibleword = new BibleData(SelectedBook, SelectedChapter, SelectedVerses, BibleText); _historyViewModel.AddToHistory(bibleword); ClearView(); return; } _fadeInWriter.ResetFade(); _historyViewModel.SelectedIndex = -1; }
private void OnButtonLeft(object obj) { if (_studioMode) { var hymnal = new HymnalData(_bookname, InputNumber, InputText, MelodieAutor, TextAutor, VerseList); _historyViewModel.AddToHistory(hymnal); ClearView(); return; } _fadeInWriter.ResetFade(); _historyViewModel.SelectedIndex = -1; }
private void OnButtonLeft(object obj) { if (_studioMode) { _historyViewModel.AddToHistory(SelectedItem); FilterText = ""; SelectedItem = null; return; } _fadeInWriter.ResetFade(); _historyViewModel.SelectedIndex = -1; SelectedItem = null; }
private void OnButtonLeft(object obj) { if (_studioMode) { var fade = new CustomInsert(TextLaneOne, TextLaneTwo); _historyViewModel.AddToHistory(fade); AddFade(); return; } _fadeInWriter.ResetFade(); SelectedIndex = -1; _historyViewModel.SelectedIndex = -1; TextLaneOne = ""; TextLaneTwo = ""; }
private void OnReset(object obj) { _fadeInWriter.ResetFade(); SelectedIndex = -1; }
protected override void OnStartup(StartupEventArgs e) { _log.Info("Startup App"); string path = $"{Environment.GetEnvironmentVariable("userprofile")}/InsertCreator"; string positionPath = $"{Environment.GetEnvironmentVariable("userprofile")}/InsertCreator/Position.Json"; string bibleTextPositionPath = $"{Environment.GetEnvironmentVariable("userprofile")}/InsertCreator/BibleTextPosition.Json"; PositionJsonReaderWriter positionDatajsonReaderWriter = new PositionJsonReaderWriter(); PositionData positionData = new PositionData(); BiblewordPositionData biblewordPositionData = new BiblewordPositionData(); _log.Info("Check InsertCreator Directory"); if (!Directory.Exists(path)) { _log.Info("Create InsertCreator Directory"); Directory.CreateDirectory(path); } _log.Info("Check Position Data file"); if (!File.Exists(positionPath)) { _log.Info("Create Position Data file"); var file = File.Create(positionPath, 1024); file.Close(); positionDatajsonReaderWriter.WritePositionData(positionData, positionPath); } else { positionDatajsonReaderWriter.LoadPositionData(ref positionData, positionPath); } _log.Info("Check Bible Position Data file"); if (!File.Exists(bibleTextPositionPath)) { _log.Info("Create Bible Position Data file"); var file = File.Create(bibleTextPositionPath, 1024); file.Close(); positionDatajsonReaderWriter.WritePositionData(biblewordPositionData, bibleTextPositionPath); } else { positionDatajsonReaderWriter.LoadPositionData(ref biblewordPositionData, bibleTextPositionPath); } FadeInWriter fadeInWriter = new FadeInWriter(positionData, biblewordPositionData); _log.Info("Create Ministry.json"); FileCreate("Ministry.json", path); FileCreate("Insert.json", path); _log.Info("Load Images"); fadeInWriter.ResetFade(); var vm = new WindowViewModel(positionData, biblewordPositionData); _log.Info("Open Window"); var window = new MainWindow(vm); window.Show(); }