예제 #1
0
        async void OnMoreSwipeItemInvoked(object sender, EventArgs e)
        {
            var item = (MLangWord)((SwipeItem)sender).BindingContext;
            var a    = await DisplayActionSheet("More", "Cancel", null, "Delete", "Edit", "Retrieve Note", "Clear Note", "Copy Word", "Google Word", "Online Dictionary");

            switch (a)
            {
            case "Delete":
                break;

            case "Edit":
                await Edit(item);

                break;

            case "Retrieve Note":
                await vm.RetrieveNote(item);

                break;

            case "Clear Note":
                await vm.ClearNote(item);

                break;

            case "Copy Word":
                CrossClipboard.Current.SetText(item.WORD);
                break;

            case "Google Word":
                await item.WORD.GoogleXamarin();

                break;

            case "Online Dictionary":
                var url = vm.vmSettings.SelectedDictReference.UrlString(item.WORD, vm.vmSettings.AutoCorrects);
                await Launcher.OpenAsync(new Uri(url));

                break;
            }
        }
예제 #2
0
 public async void miClearNote_Click(object sender, RoutedEventArgs e) =>
 await vmWordsLang.ClearNote(SelectedWordItem);