private void OnCopyOrMoveItemTap(object sender, ContextMenuItemSelectedEventArgs e)
        {
            // Needed on every UI interaction
            SdkService.MegaSdk.retryPendingConnections();

            this.CopyOrMoveItemTapAction();

            this.SetApplicationBarData();
        }
Exemple #2
0
 private void DeleteBookmark(object sender, ContextMenuItemSelectedEventArgs e)
 {
     var menuItem = sender as RadContextMenuItem;
     if (menuItem != null)
     {
         if (menuItem.DataContext != null)
             QuranApp.MainViewModel.DeleteBookmark(menuItem.DataContext as ItemViewModel);
     }
 }
        private void OpenSelectedImageInWebBrowser(object sender, ContextMenuItemSelectedEventArgs e)
        {
            string url = this.PageManager.SelectedImageUrl;

            if (url.IsStringUrlHttpOrHttps())
            {
                var imageUri = new Uri(url);
                try
                {
                    var webtask = new WebBrowserTask();
                    webtask.Uri = imageUri;
                    webtask.Show();
                }
                catch (Exception) { }
            }
        }
 void OnToggleTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     this.FavoritesChanged.Fire(this);
 }
Exemple #5
0
        private void OnDeleteClick(object sender, ContextMenuItemSelectedEventArgs e)
        {
            ErrorReporting.Log("OnDeleteClick");

            var lecture = (Lecture)((RadContextMenuItem)sender).DataContext;
            ErrorReporting.Log("Lecture = " + lecture.Title + " [" + lecture.Id + "]");

            lecture.DownloadInfo.DeleteVideo();
        }
 void OnJumpTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     this._jump.Tag = this.SelectedThread;
     this.JumpToPageRequest.Fire(this, e);
 }
 private void Trip_Delete_Tapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     TripModel trip = (TripModel)((RadContextMenuItem)e.VisualContainer).Tag;
     App.MainViewModel.Remove(trip);
 }
        private void PageCommandMenuTapped(object sender, ContextMenuItemSelectedEventArgs e)
        {
            var element = sender as FrameworkElement;
            SAThread thread = element.Tag as SAThread;

            ThreadNavigator.Thread = thread;
            navVisible = true;
            this.OnVisualStateFinish("ShowNav", showNav, () =>
            {
                ThreadsList.IsHitTestVisible = false;
            });
        }
Exemple #9
0
 void OnJumpToPageTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     var context = this.DataContext as ThreadDataSource;
     OnJumpToPageRequest(context);
 }
 private void OpenSelectedImageInWebBrowser(object sender, ContextMenuItemSelectedEventArgs e)
 {
     string url = this.PageManager.SelectedImageUrl;
     if (url.IsStringUrlHttpOrHttps())
     {
             var imageUri = new Uri(url);
             try 
             {
                 var webtask = new WebBrowserTask();
                 webtask.Uri = imageUri;
                 webtask.Show();
             }
             catch (Exception) { }
     }
 }
 private void OnRecentItemRemoveClick(object sender, ContextMenuItemSelectedEventArgs e)
 {
     ErrorReporting.Log("OnRecentItemRemoveClick");
     var dataContext = (DeparturesAndArrivalsTable)((RadContextMenuItem)sender).DataContext;
     RecentItems.Remove(dataContext);
     RefreshRecentItemsList();
 }
        private async void AyahContextMenuClick(object sender, ContextMenuItemSelectedEventArgs e)
        {
            var menuItem = e.SelectedItem as string;
            if (menuItem == null)
                return;

            if (sender is RadContextMenuItem)
            {
                var menu = sender as RadContextMenuItem;
                var data = menu.DataContext as VerseViewModel;
                if (data != null)
                {
                    QuranApp.DetailsViewModel.SelectedAyah = new QuranAyah(data.Surah, data.Ayah) { Translation = data.Text };
                }
            }

            if (menuItem == AppResources.bookmark_ayah)
            {
                QuranApp.DetailsViewModel.AddAyahBookmark(QuranApp.DetailsViewModel.SelectedAyah);
                QuranApp.DetailsViewModel.SelectedAyah = null;                
            } 
            else if (menuItem == AppResources.copy)
            {
                QuranApp.DetailsViewModel.CopyAyahToClipboard(QuranApp.DetailsViewModel.SelectedAyah);
                QuranApp.DetailsViewModel.SelectedAyah = null;
            }

            else if (menuItem == AppResources.share_ayah)
            {
                string ayah = await QuranApp.DetailsViewModel.GetAyahString(QuranApp.DetailsViewModel.SelectedAyah);
                ShareAyah(ayah);
            }
            else if (menuItem == AppResources.recite_ayah)
            {
                Recite_Click(this, null);
            }
        }
Exemple #13
0
        void OnJumpToPageTapped(object sender, ContextMenuItemSelectedEventArgs e)
        {
            var context = this.DataContext as ThreadDataSource;

            OnJumpToPageRequest(context);
        }
Exemple #14
0
 void OnEditCommandTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     this.EditTapped.Fire(this);
 }
Exemple #15
0
 void OnByAuthorTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     this.FilterByAuthorTapped.Fire(this);
     this.AuthorFilterEnabled = !this.AuthorFilterEnabled;
 }