public ListItemPage() { InitializeComponent(); // digunakan untuk mengarahkan sumber data yang akan ditampilkan pada halaman xaml. BindingContext = new ViewModels.ListItemViewModel(); }
public ViewModels.ListItemViewModel[] GetOptionalItems() { var tabpage = UIHelper.GetCurrentTabPage(this); var loader = Managers.ResourceManager.Loader; //Info.Info.Translation var result = new ViewModels.ListItemViewModel[] { new ViewModels.ListItemViewModel(loader.GetString("AppName"), loader.GetString("Info/Info/AboutThisApp/Description"), new DelegateCommand(async _ => await OpenLicenseContentDialogAboutThisApp())) { GroupTag = "Info/Info/Title" }, new ViewModels.ListItemViewModel(loader.GetString("Info/Info/Privacy/Title"), loader.GetString("Info/Info/Privacy/Description"), new OpenWebCommand(tabpage, "https://github.com/kurema/BookViewerApp3/blob/master/PrivacyPolicy.md")) { GroupTag = "Info/Info/Title" }, new ViewModels.ListItemViewModel(loader.GetString("Info/Info/ThirdParty/Title"), loader.GetString("Info/Info/ThirdParty/Description"), new DelegateCommand(async _ => await OpenLicenseContentDialogThirdParty())) { GroupTag = "Info/Info/Title" }, new ViewModels.ListItemViewModel(loader.GetString("Info/Info/Contributors"), loader.GetString("Info/Info/ShowContributors/Description"), new DelegateCommand(async _ => await OpenLicenseContentDialogContributors())) { GroupTag = "Info/Info/Title" }, new ViewModels.ListItemViewModel(loader.GetString("Info/Info/BeSponsor/Title"), loader.GetString("Info/Info/BeSponsor/Description"), new OpenWebCommand(tabpage, "https://github.com/sponsors/kurema/")) { GroupTag = "Info/Info/Title" }, new ViewModels.ListItemViewModel(loader.GetString("Info/Info/ReleaseNotes/Title"), string.Format(loader.GetString("Info/Info/ReleaseNotes/Description"), VersionText), new OpenWebCommand(tabpage, "https://github.com/kurema/BookViewerApp3/releases")) { GroupTag = "Info/Info/Title" }, }.ToList(); result.AddRange(new[] { new ViewModels.ListItemViewModel(loader.GetString("Info/Debug/OpenAppData/Title"), loader.GetString("Info/Debug/OpenAppData/Description"), new DelegateCommand(async _ => await Windows.System.Launcher.LaunchFolderAsync(Windows.Storage.ApplicationData.Current.LocalFolder))) { GroupTag = "Info/Debug/Title" }, new ViewModels.ListItemViewModel(loader.GetString("Info/Debug/DeleteThumbnails/Title"), loader.GetString("Info/Debug/DeleteThumbnails/Description"), new DelegateCommand(async _ => await DeleteThumbnail())) { GroupTag = "Info/Debug/Title" }, }); #if DEBUG result.Add(new ViewModels.ListItemViewModel(loader.GetString("Info/Debug/CopyFAL/Title"), loader.GetString("Info/Debug/CopyFAL/Description"), new DelegateCommand(async _ => await CopyFutureAccessListToClipboard())) { GroupTag = "Info/Debug/Title" }); #endif return(result.ToArray()); }
public ListItemView() { InitializeComponent(); BindingContext = new ViewModels.ListItemViewModel(); }