private void OptionMenuAction(String sender) { switch (sender) { case "next": var nextList = dataAccess.GetBible(BibleDataAccess.Mode.Next); if (nextList != null) { var next = new ObservableCollection <Bible>(nextList); Bible.Clear(); Bible = next; } break; case "prev": var prevList = dataAccess.GetBible(BibleDataAccess.Mode.Prev); if (prevList != null) { var prev = new ObservableCollection <Bible>(prevList); Bible.Clear(); Bible = prev; } break; case "note": break; case "sermon": break; } }
public BibleViewModel(TabbedPageViewModel rootViewModel) { MasterViewModel = rootViewModel; dataAccess = BibleDataAccess.Instance(); dataAccess.TOP_CASE = LanguageHelper.GetTopVersion(Settings.Languages.Split(',')); bible = new ObservableCollection <Bible>(dataAccess.GetBible(BibleDataAccess.Mode.Init)); dashedBibles = new List <Bible>(); colors = dataAccess.GetColors(); searchPageViewModel = new SearchViewModel(this); for (int i = 0; i < languageName.Length; i++) { Language languase = new Language() { Kind = languageName[i], IsChecked = Settings.Languages.Contains(languageName[i]) }; languages.Add(languase); } NavigationBarCommand = new Command <string>(NavigationBarChanged); BibleSettingMenuCommand = new Command <string>(BibleSettingAction); OptionMenuCommand = new Command <string>(OptionMenuAction); if (Settings.LightMode) { CellTextColor = "#000000"; CellBackgroundColor = "#ffffff"; searchPageViewModel.TextColor = "#000000"; searchPageViewModel.BackgroundColor = "#ffffff"; } else { CellTextColor = "#ffffff"; CellBackgroundColor = "#343434"; searchPageViewModel.TextColor = "#fffffff"; searchPageViewModel.BackgroundColor = "#343434"; } }