コード例 #1
0
ファイル: ContentPopup.cs プロジェクト: UnigramDev/Unigram
 private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (Window.Current.Content is RootPage root)
     {
         root.PopupClosed();
     }
 }
コード例 #2
0
 private static void ActiveDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (!DialogAwaiter.Task.IsCompleted)
     {
         DialogAwaiter.TrySetResult(true);
     }
 }
コード例 #3
0
 void DevicePickerDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (SelectedDevice == null)
     {
         _owner.OnDevicePickerDismissed();
     }
 }
コード例 #4
0
 private async void ShowZoneCustomizedDialog(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     addDeviceDialog.Closed -= ShowZoneCustomizedDialog;
     ZoneCustomizedDialog zoneCustomizedDialog =
         new ZoneCustomizedDialog(MyDevice);
     var result = await zoneCustomizedDialog.ShowAsync();
 }
コード例 #5
0
 private async void C_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (args.Result == ContentDialogResult.Secondary)
     {
         //BooksGridView.ItemsSource = await APIServices.GetBooksAsync();
     }
 }
コード例 #6
0
 private async static void FeedbackDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (args.Result == ContentDialogResult.Primary)
     {
         await Launcher.LaunchUriAsync(new Uri("mailto:[email protected]?subject=Year%20Progress%20Feedback&body=<Write%20your%20feedback%20here>"));
     }
 }
コード例 #7
0
 void DevicePickerDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (SelectedDevice == null)
     {
         _owner.OnDevicePickerDismissed();
     }
 }
コード例 #8
0
 /// <summary>
 /// Recover navigation view selected item after settings dialog closed.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SettingsDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs e)
 {
     if (lastSelectedItem != null)
     {
         NavigationViewControl.SelectedItem = lastSelectedItem;
     }
 }
コード例 #9
0
        private void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            var procedureResult = (sender as BleDeviceSelectorDialog).Result;

            GyroscopeRfcommServiceConnection = new GyroscopeRfcommServiceConnectionWrapper(procedureResult[GyroscopeRfcommServiceConnectionWrapper.RfcommServiceId].RfcommConnection);
            GyroscopeRfcommServiceConnection.OnReadingUpdated += GyroscopeRfcommServiceConnection_OnReadingUpdated;
        }
コード例 #10
0
 private void OnLoginDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (Result == null)
     {
         Result = LoginDialogResult.Cancel;
     }
 }
コード例 #11
0
        void dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            KnjigaDetaljiViewModel model2 = (KnjigaDetaljiViewModel)defaultViewModel["detalji"];

            HttpResponseMessage response = knjigaDetaljiService.GetResponse(model2.KnjigaID + "/" + Global.prijavljeniKorisnik.Id);

            if (response.IsSuccessStatusCode)
            {
                KnjigaDetaljiViewModel model = response.Content.ReadAsAsync <KnjigaDetaljiViewModel>().Result;
                defaultViewModel["detalji"] = model;

                if (model.IsInPolica)
                {
                    dodajBtn.Visibility  = Visibility.Collapsed;
                    ukloniBtn.Visibility = Visibility.Visible;
                }
                else
                {
                    dodajBtn.Visibility  = Visibility.Visible;
                    ukloniBtn.Visibility = Visibility.Collapsed;
                }

                HttpResponseMessage r = reklamaService.GetResponse();

                if (r.IsSuccessStatusCode)
                {
                    Reklama reklama = r.Content.ReadAsAsync <Reklama>().Result;
                    reklamaS.Source = new BitmapImage(new Uri(reklama.URL, UriKind.Absolute));
                }
            }
        }
コード例 #12
0
        private void OnDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            this.LoginWebView.LoadCompleted      -= OnWebViewLoadCompleted;
            this.LoginWebView.NavigationStarting -= OnWebViewNavigationStarting;

            this.ViewModel.Dispose();
            this.DataContext = null;
        }
コード例 #13
0
ファイル: Popups.cs プロジェクト: tgckpg/libpenguin
 private static void Dlg_Closed( ContentDialog sender, ContentDialogClosedEventArgs args )
 {
     sender.Closed -= Dlg_Closed;
     if( sender is IDisposable )
     {
         ( sender as IDisposable ).Dispose();
     }
 }
コード例 #14
0
 private async void OnDialogClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     sender.Closed -= OnDialogClosed;
     isDialogOpened = false;
     if (dialogQueue != null && dialogQueue.Count > 0)
     {
         await DisplayContentDialog(dialogQueue.Dequeue());
     }
 }
コード例 #15
0
        private void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            Window.Current.CoreWindow.SizeChanged -= this.CoreWindow_SizeChanged;

            foreach (var overlay in this.overlays)
            {
                overlay.Visibility = Visibility.Collapsed;
            }
        }
コード例 #16
0
 private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     currentViewItem     = null;
     Title               = "Create New";
     configLabel.Content = "Config Name: ";
     authorNameTxt.Text  = "";
     websiteNameTxt.Text = "";
     configNameTxt.Text  = "";
     successKeysTxt.Text = "";
 }
コード例 #17
0
ファイル: Properties.xaml.cs プロジェクト: lyrl/files-uwp
 private void PropertiesDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChanged;
     sender.Closed -= PropertiesDialog_Closed;
     if (tokenSource != null && !tokenSource.IsCancellationRequested)
     {
         tokenSource.Cancel();
         tokenSource = null;
     }
     propertiesDialog.Hide();
 }
コード例 #18
0
ファイル: DialogHelper.cs プロジェクト: ethanbrews/Furnace
        private static async void DialogOnClosedAsync(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            if (_dialogQueue.Count == 0)
            {
                _dialogLock = false;
                return;
            }

            var next = _dialogQueue.Dequeue();
            await next.ShowAsync();
        }
コード例 #19
0
 private void ContentDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (args.Result == ContentDialogResult.Primary)
     {
         ViewModel.AcceptCommand.Execute(null);
     }
     else
     {
         ViewModel.CancelCommand.Execute(null);
     }
 }
コード例 #20
0
        private void ContentDialogOnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            sender.Closed -= ContentDialogOnClosed;
            var signInDialog = sender.Content as SignInDialog;

            if (signInDialog != null)
            {
                signInDialog.Cancel(); // be sure the SignInDialog is deactivated when pressing back button
                sender.Content = null;
            }
        }
コード例 #21
0
 private static void ActiveDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     try
     {
         _dialogAwaiter.SetResult(true);
     }
     catch (Exception)
     {
         // Ignore
     }
 }
コード例 #22
0
 //Since process is async if a user signs in and then exits the dialog, a post may still be created
 //So this is just a warning explaining that
 private async void ContentDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (shareCancelled)
     {
         var dialog = new WarningDialog();
         dialog.Title             = "Share";
         dialog.Text              = "Share Cancelled. If you signed into your social media account, a post may have still been created";
         dialog.PrimaryButtonText = "";
         await dialog.ShowAsync();
     }
 }
コード例 #23
0
 private void PropertiesDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChanged;
     sender.Closed -= PropertiesDialog_Closed;
     this.FindDescendants().Where(x => x is SettingsBlockControl).Cast <SettingsBlockControl>().Select(x => (x.ExpandableContent as Frame).Content as PropertiesTab).Where(x => x != null).ForEach(tab => tab.Dispose());
     if (tokenSource != null && !tokenSource.IsCancellationRequested)
     {
         tokenSource.Cancel();
         tokenSource = null;
     }
     propertiesDialog.Hide();
 }
コード例 #24
0
 private static async void ReviewDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (args.Result == ContentDialogResult.Primary)
     {
         RemovePromptsForever();
         await Launcher.LaunchUriAsync(new Uri("ms-windows-store://review/?ProductId=9PDQ5MLJFVSX"));
     }
     else
     {
         await ShowFeedbackDialog();
     }
 }
コード例 #25
0
        private void BleDeviceSelectorDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            BluetoothManager.LEScanner.Added   -= LEScanner_Added;
            BluetoothManager.LEScanner.Removed -= LEScanner_Removed;
            BluetoothManager.LEScanner.EnumerationCompleted -= LEScanner_EnumerationCompleted;
            BluetoothManager.LEScanner.Stopped -= LEScanner_Stopped;

            if (BluetoothManager.LEScanner.Status == BluetoothLEScannerState.Started || BluetoothManager.LEScanner.Status == BluetoothLEScannerState.EnumerationCompleted)
            {
                BluetoothManager.LEScanner.Stop();
            }
        }
コード例 #26
0
        /// <summary>
        /// Whenever the dialog as close continu with operation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private async void BackupDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            if (args.Result == ContentDialogResult.Primary)
            {
                //Make a field book bakcup
                await BackupFieldBook();

                DeleteFieldBook();
            }
            else
            {
                DeleteFieldBook();
            }
        }
コード例 #27
0
 private void ContentDialogNotification_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     this.isopen                          = false;
     this.Title                           = null;
     this.Content                         = null;
     this.PrimaryButtonText               = "";
     this.PrimaryButtonCommand            = null;
     this.PrimaryButtonCommandParameter   = null;
     this.SecondaryButtonText             = "";
     this.SecondaryButtonCommand          = null;
     this.SecondaryButtonCommandParameter = null;
     this.CloseButtonText                 = "";
     this.DefaultButton                   = ContentDialogButton.None;
 }
コード例 #28
0
        void dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            #region lame

            HttpResponseMessage response = hubService.GetResponse(Global.prijavljeniKorisnik.Id.ToString());
            HubPageViewModel    model    = new HubPageViewModel();

            if (response.IsSuccessStatusCode)
            {
                model = new HubPageViewModel(response.Content.ReadAsAsync <HubPageViewModel>().Result);
                defaultViewModel["BookShelves"] = model.BookShelves;
            }

            #endregion
        }
コード例 #29
0
        async void EditBulbDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            LifxLabelMessage llm = await StorageHelper.SelectedBulbs[0].SetLabelCommand(((sender.Content as StackPanel).Children[1] as TextBox).Text);

            StorageHelper.SelectedBulbs[0].Label = llm.BulbLabel;
            StorageHelper.SaveToStorage();

            await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                if (StorageHelper.SelectedType == SelectionType.IndividualBulb)
                {
                    MainPivot.Title = APP_HEADING_TEXT + llm.BulbLabel;
                }
            });
        }
コード例 #30
0
        // Event handler for when ContentDialog is closed.
        private static async void Dialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs e)
        {
            // Remove the ContentDialog that has just closed from the queue.
            App.DialogueQueue.RemoveAll(x => x.ContentDialog == sender);

            // Check if there's more ContentDialogs in queue.
            if (App.DialogueQueue.Count > 0)
            {
                var callback = App.DialogueQueue[0].Callback;

                var result = await App.DialogueQueue[0].ContentDialog.ShowAsync();

                // Check if there's any callbacks, and execute if so.
                callback?.DynamicInvoke(result);
            }
        }
コード例 #31
0
ファイル: MainPage.xaml.cs プロジェクト: daniel-joh/ImapMail
        /// <summary>
        /// Handles the dialog closed event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void ErrorDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
        {
            //If the user´s search for mail returned null
            if (!MailHandler.isMailSearchSuccess && sender.Title.Equals("Mail error"))
            {
                errorDialog.Closed -= ErrorDialog_Closed;
                errorDialog         = null;
                return;
            }

            //If no mail exists on server, navigate to SettingsPage so that the user can check settings
            if (sender.Title.Equals("Mail error"))
            {
                errorDialog.Closed -= ErrorDialog_Closed;
                errorDialog         = null;
                Frame.Navigate(typeof(SettingsPage));
            }
        }
コード例 #32
0
 private void ContentDialogOnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     sender.Closed -= ContentDialogOnClosed;
     var signInDialog = sender.Content as SignInDialog;
     if (signInDialog != null)
     {
         signInDialog.Cancel(); // be sure the SignInDialog is deactivated when pressing back button
         sender.Content = null;
     }
 }
コード例 #33
0
 private async void TagsDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     await MainViewModel.Current.SaveTagsAsync();
     await ReloadQuestions();
 }
コード例 #34
0
 private void ContentDialog_Closed (ContentDialog sender, ContentDialogClosedEventArgs args) {
   cancellationTokenSource.Cancel();
 }
コード例 #35
0
ファイル: AddContactDialog.xaml.cs プロジェクト: rrsc/uwp
 private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     this.ViewModel.ContactInvited -= OnContactInvited;
     this.ViewModel.Canceled       -= OnCanceled;
     this.ViewModel.EmailError     -= OnEmailError;
 }
コード例 #36
0
 private void AccordDialog_Closed(ContentDialog sender, ContentDialogClosedEventArgs args)
 {
     if (clickedButton != null)
     {
         clickedButton.Focus(FocusState.Pointer);
     }
 }