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

            this.CopyOrMoveItemTapAction();

            this.SetApplicationBarData();
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
        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) { }
            }
        }
Ejemplo n.º 4
0
 void OnToggleTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     this.FavoritesChanged.Fire(this);
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 6
0
 void OnJumpTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     this._jump.Tag = this.SelectedThread;
     this.JumpToPageRequest.Fire(this, e);
 }
Ejemplo n.º 7
0
 private void Trip_Delete_Tapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     TripModel trip = (TripModel)((RadContextMenuItem)e.VisualContainer).Tag;
     App.MainViewModel.Remove(trip);
 }
Ejemplo n.º 8
0
        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;
            });
        }
Ejemplo n.º 9
0
 void OnJumpToPageTapped(object sender, ContextMenuItemSelectedEventArgs e)
 {
     var context = this.DataContext as ThreadDataSource;
     OnJumpToPageRequest(context);
 }
Ejemplo n.º 10
0
 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) { }
     }
 }
Ejemplo n.º 11
0
 private void OnRecentItemRemoveClick(object sender, ContextMenuItemSelectedEventArgs e)
 {
     ErrorReporting.Log("OnRecentItemRemoveClick");
     var dataContext = (DeparturesAndArrivalsTable)((RadContextMenuItem)sender).DataContext;
     RecentItems.Remove(dataContext);
     RefreshRecentItemsList();
 }
Ejemplo n.º 12
0
        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);
            }
        }
Ejemplo n.º 13
0
        void OnJumpToPageTapped(object sender, ContextMenuItemSelectedEventArgs e)
        {
            var context = this.DataContext as ThreadDataSource;

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