Esempio n. 1
0
 private void MarkSeenMark_Tapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
     e.Handled = true;
 }
Esempio n. 2
0
 private void ImageGridRightTapped_OpenFlyout(object sender, RightTappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
 }
Esempio n. 3
0
 private void TabViewItem_Tapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as TabViewItem);
     //((sender as TabViewItem).Resources["FileClickFlyout"] as FlyoutPresenter).ShowAt((sender as TabViewItem));
 }
 private void Item_Holding(object sender, HoldingRoutedEventArgs e) =>
 FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
Esempio n. 5
0
 private void PreviousPostsButton_OnClick(object sender, RoutedEventArgs e)
 {
     _vm.GetPreviousPosts();
     FlyoutBase.ShowAttachedFlyout(ContentRoot);
 }
Esempio n. 6
0
 private void Mindmap_RenameClicked(object sender, RoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)((FrameworkElement)sender).DataContext);
 }
Esempio n. 7
0
 private void RouteStopPanel_Holding(object sender, HoldingRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 8
0
 private void OnOpenLegend(object sender, RoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 9
0
 private void ShowFlyout(object sender, RoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(PlayTrackStackPanel);
 }
Esempio n. 10
0
 private void NotebookPanel_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
 }
Esempio n. 11
0
 private void pic_Tapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(pic);
 }
Esempio n. 12
0
 private void ReleaseName_Tapped(object sender, TappedRoutedEventArgs e) => FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
Esempio n. 13
0
 private void OpenInExternalPlayer_Tapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
 }
Esempio n. 14
0
 private void ReleaseAdditionalActions_Tapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
 }
 private void OnShowFlyout(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(AttachedFlyoutTest);
 }
Esempio n. 16
0
 void OnOpenContext(object sender, RightTappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(CellContent);
 }
Esempio n. 17
0
 private void Mindmap_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 18
0
 private void AddListButton_Click(object sender, RoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 19
0
 private void BtnSave_Click(object sender, RoutedEventArgs e)
 {
     GameManager.Save();
     txtSaveResult.Text = "저장 완료!";
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 20
0
 private void MenuButton_OnTapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
        private void InitControls()
        {
            ToolTipService.SetToolTip(ExitCompactOverlayButton, _resourceLoader.GetString("App_ExitCompactOverlayMode_Text"));
            RootSplitView.PaneOpening       += delegate { SettingsFrame.Navigate(typeof(SettingsPage), null, new SuppressNavigationTransitionInfo()); };
            RootSplitView.PaneClosed        += delegate { NotepadsCore.FocusOnSelectedTextEditor(); };
            NewSetButton.Click              += delegate { NotepadsCore.OpenNewTextEditor(_defaultNewFileName); };
            MainMenuButton.Click            += (sender, args) => FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
            MenuCreateNewButton.Click       += (sender, args) => NotepadsCore.OpenNewTextEditor(_defaultNewFileName);
            MenuCreateNewWindowButton.Click += async(sender, args) => await OpenNewAppInstance();

            MenuOpenFileButton.Click += async(sender, args) => await OpenNewFiles();

            MenuSaveButton.Click += async(sender, args) => await Save(NotepadsCore.GetSelectedTextEditor(), saveAs : false);

            MenuSaveAsButton.Click += async(sender, args) => await Save(NotepadsCore.GetSelectedTextEditor(), saveAs : true);

            MenuSaveAllButton.Click += async(sender, args) => { foreach (var textEditor in NotepadsCore.GetAllTextEditors())
                                                                {
                                                                    await Save(textEditor, saveAs : false, ignoreUnmodifiedDocument : true);
                                                                }
            };
            MenuFindButton.Click           += (sender, args) => NotepadsCore.GetSelectedTextEditor()?.ShowFindAndReplaceControl(showReplaceBar: false);
            MenuReplaceButton.Click        += (sender, args) => NotepadsCore.GetSelectedTextEditor()?.ShowFindAndReplaceControl(showReplaceBar: true);
            MenuFullScreenButton.Click     += (sender, args) => EnterExitFullScreenMode();
            MenuCompactOverlayButton.Click += (sender, args) => EnterExitCompactOverlayMode();
            MenuSettingsButton.Click       += (sender, args) => RootSplitView.IsPaneOpen = true;

            MainMenuButtonFlyout.Opening += (sender, o) =>
            {
                var selectedTextEditor = NotepadsCore.GetSelectedTextEditor();
                if (selectedTextEditor == null)
                {
                    MenuSaveButton.IsEnabled    = false;
                    MenuSaveAsButton.IsEnabled  = false;
                    MenuFindButton.IsEnabled    = false;
                    MenuReplaceButton.IsEnabled = false;
                    //MenuPrintButton.IsEnabled = false;
                }
                else if (selectedTextEditor.IsEditorEnabled() == false)
                {
                    MenuSaveButton.IsEnabled    = selectedTextEditor.IsModified;
                    MenuSaveAsButton.IsEnabled  = true;
                    MenuFindButton.IsEnabled    = false;
                    MenuReplaceButton.IsEnabled = false;
                    //MenuPrintButton.IsEnabled = true;
                }
                else
                {
                    MenuSaveButton.IsEnabled    = selectedTextEditor.IsModified;
                    MenuSaveAsButton.IsEnabled  = true;
                    MenuFindButton.IsEnabled    = true;
                    MenuReplaceButton.IsEnabled = true;
                    //MenuPrintButton.IsEnabled = true;
                }

                MenuFullScreenButton.Text = _resourceLoader.GetString(ApplicationView.GetForCurrentView().IsFullScreenMode ?
                                                                      "App_ExitFullScreenMode_Text" : "App_EnterFullScreenMode_Text");
                MenuCompactOverlayButton.Text = _resourceLoader.GetString(ApplicationView.GetForCurrentView().ViewMode == ApplicationViewMode.CompactOverlay ?
                                                                          "App_ExitCompactOverlayMode_Text" : "App_EnterCompactOverlayMode_Text");
                MenuSaveAllButton.IsEnabled = NotepadsCore.HaveUnsavedTextEditor();
            };

            if (!App.IsFirstInstance)
            {
                MainMenuButton.Foreground    = new SolidColorBrush(ThemeSettingsService.AppAccentColor);
                MenuSettingsButton.IsEnabled = false;
            }
        }
Esempio n. 22
0
 private void ShowFlyout(object sender, RoutedEventArgs e)
 {
     ActiveFlyout = FlyoutBase.GetAttachedFlyout((FrameworkElement)sender);
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 23
0
 private void Item_RightTapped(object sender, RightTappedRoutedEventArgs e) =>
 FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
Esempio n. 24
0
 private static void HandleElementTapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 25
0
 private void BbCodesButton_OnClick(object sender, RoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(BbCodesButton);
 }
Esempio n. 26
0
 public object Execute(object sender, object parameter)
 {
     FlyoutBase.ShowAttachedFlyout(TargetObject ?? (FrameworkElement)sender);
     return(null);
 }
Esempio n. 27
0
 private void ListTapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
 }
Esempio n. 28
0
 /// <summary>
 /// Shows the help flyout.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private new void Tapped(object sender, TappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
 }
Esempio n. 29
0
 private void Image_Tapped(object sender, TappedRoutedEventArgs e)
 {
     _clickData = (sender as FrameworkElement).DataContext as ImageData;
     FlyoutBase.ShowAttachedFlyout(sender as FrameworkElement);
 }
Esempio n. 30
0
 private void YearLabel_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     FlyoutBase.ShowAttachedFlyout(YearFiltersMenuTextBlock);
     e.Handled = true;
 }