• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ContentDialogButtonClickEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ContentDialogButtonClickEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ContentDialogButtonClickEventArgs类的具体用法?C# ContentDialogButtonClickEventArgs怎么用?C# ContentDialogButtonClickEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ContentDialogButtonClickEventArgs类属于命名空间,在下文中一共展示了ContentDialogButtonClickEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CancelButtonClick

        private void CancelButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
#if DEBUG
            System.Diagnostics.Debug.WriteLine("CancelButton");
#endif
            Application.Current.Exit();
        }
开发者ID:HumaMilisic,项目名称:MA-Baze_Phone,代码行数:7,代码来源:LoginPage.xaml.cs


示例2: Tela_PrimaryButtonClick

        private async static void Tela_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            var tela = sender.Content as MyUserControl1;
            var readDataa = await ReadWrite.readStringFromLocalFile("data");
            Profile profile = JsonSerilizer.ToProfile(readDataa);

            if (tela.passwordBoxSenha.Password == profile.Password)
            {

            }
            else
            {

                var acessar = new MyUserControl1();
                ContentDialog dialogo = new ContentDialog();

                dialogo.PrimaryButtonText = "Войти";
                dialogo.PrimaryButtonClick += Tela_PrimaryButtonClick;





                dialogo.Content = acessar;

                await dialogo.ShowAsync();


            }

        }
开发者ID:SuchGlasha,项目名称:CashManagerDGK,代码行数:31,代码来源:MyUserControl1.xaml.cs


示例3: ContentDialog_PrimaryButtonClick

        private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            // Disable the primary button
            IsPrimaryButtonEnabled = false;

            // Force the dialog to stay open until the operation completes.
            // We will call Hide() when the api calls are done.
            args.Cancel = true;

            try
            {
                // Change the passphrase
                await KryptPadApi.ChangePassphraseAsync(OldPassphrase, NewPassphrase);

                // Done
                await DialogHelper.ShowMessageDialogAsync("Profile passphrase changed successfully.");

                // Hide dialog
                Hide();
            }
            catch (WarningException ex)
            {
                // Operation failed
                await DialogHelper.ShowMessageDialogAsync(ex.Message);
            }
            catch (WebException ex)
            {
                // Operation failed
                await DialogHelper.ShowMessageDialogAsync(ex.Message);
            }

            // Restore the button
            IsPrimaryButtonEnabled = CanChangePassphrase;
        }
开发者ID:NeptuneCenturyStudios,项目名称:KryptPad,代码行数:34,代码来源:ChangePassphraseDialog.xaml.cs


示例4: ContentDialog_PrimaryButtonClick

 private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     try
     {
         selection = int.Parse(number.Text);
         if (selection > 0 && selection <= MainPage.newestComic)
             canClose = true;
         else
             throw new OverflowException();
     }
     catch (ArgumentNullException)
     {
         errorText.Text = "Please enter a number between 1 and " + MainPage.newestComic;
         canClose = false;
     }
     catch (FormatException)
     {
         errorText.Text = "Please enter a number between 1 and " + MainPage.newestComic;
         canClose = false;
     }
     catch (OverflowException)
     {
         errorText.Text = "Please enter a number between 1 and " + MainPage.newestComic;
         canClose = false;
     }
 }
开发者ID:ChineseElectricPanda,项目名称:xkcd-viewer,代码行数:26,代码来源:JumpToComicDialog.xaml.cs


示例5: ContentDialog_PrimaryButtonClick

        //Sign in button
        private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            // Ensure the user name and password fields aren't empty. If a required field
            // is empty, set args.Cancel = true to keep the dialog open.
            if (string.IsNullOrEmpty(userNameTextBox.Text))
            {
                args.Cancel = true;
                errorTextBlock.Text = "User name is required.";
            }
            else if (string.IsNullOrEmpty(passwordTextBox.Password))
            {
                args.Cancel = true;
                errorTextBlock.Text = "Password is required.";
            }

            // If you're performing async operations in the button click handler,
            // get a deferral before you await the operation. Then, complete the
            // deferral when the async operation is complete.

            ContentDialogButtonClickDeferral deferral = args.GetDeferral();
            //if (await SomeAsyncSignInOperation())
            //{
            this.Result = SignInResult.SignInOK;
            //}
            //else
            //{
            //    this.Result = SignInResult.SignInFail;
            //}
            deferral.Complete();
        }
开发者ID:Eltabu,项目名称:Logins-Management-System,代码行数:31,代码来源:SignIn.xaml.cs


示例6: ContentDialog_PrimaryButtonClick

 private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     if(Windows.Storage.ApplicationData.Current.LocalSettings.Values.Any(m => m.Key.Equals("username")))
         Windows.Storage.ApplicationData.Current.LocalSettings.Values.Remove("username");
     Windows.Storage.ApplicationData.Current.LocalSettings.Values.Add(new KeyValuePair<string, object>("username", this.name.Text));
     this.Username = this.name.Text;
 }
开发者ID:hn-dotnet,项目名称:codeweek-chat,代码行数:7,代码来源:Settings.xaml.cs


示例7: ContentDialog_PrimaryButtonClick

        private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            // Ensure the user name and password fields aren't empty. If a required field
            // is empty, set args.Cancel = true to keep the dialog open.
            if (string.IsNullOrEmpty(txtUsername.Text))
            {
                args.Cancel = true;
                txtError.Text = "User name is required";
                return;
            }
            else if (string.IsNullOrEmpty(txtPassword.Password))
            {
                args.Cancel = true;
                txtError.Text = "Password is required";
                return;
            }

            // If you're performing async operations in the button click handler,
            // get a deferral before you await the operation. Then, complete the
            // deferral when the async operation is complete.

            ContentDialogButtonClickDeferral deferral = args.GetDeferral();

            var rememberMe = chkRememberMe.IsChecked.Value;
            if( !await dataAccess.Login(txtUsername.Text, txtPassword.Password, rememberMe) )
            {
                args.Cancel = true;
                txtError.Text = "Login Failed";
            }

            deferral.Complete();
        }
开发者ID:ChrisBallard,项目名称:langtutor,代码行数:32,代码来源:LoginDialog.xaml.cs


示例8: DeleteItemClicked

 private void DeleteItemClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     if (DeleteTodoItemClicked != null)
     {
         DeleteTodoItemClicked(this, (TodoItemViewModel)this.DataContext);
     }
 }
开发者ID:MuffPotter,项目名称:201505-MVA,代码行数:7,代码来源:ToDoEditorContentDialog.xaml.cs


示例9: ContentDialog_PrimaryButtonClick

 /// <summary>
 /// 确定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     args.Cancel = true;
     UpLoading.Visibility = Visibility.Visible;
     IsPrimaryButtonEnabled = false;
     object[] result = await UserService.AddWZ(WZUrl.Text, WZTitle.Text, WZTags.Text, WZSummary.Text);
     if (result != null)
     {
         if ((bool)result[0])
         {
             Hide();
         }
         else
         {
             Tips.Text = result[1].ToString();
             UpLoading.Visibility = Visibility.Collapsed;
             IsPrimaryButtonEnabled = true;
         }
     }
     else
     {
         Tips.Text = "操作失败!";
         UpLoading.Visibility = Visibility.Collapsed;
         IsPrimaryButtonEnabled = true;
     }
 }
开发者ID:BourbonShi,项目名称:CNBlogs.UWP,代码行数:31,代码来源:AddWZDialog.xaml.cs


示例10: ContentDialog_PrimaryButtonClick

 private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     Dokument.statusBean = (Model.Status)statusi.SelectedItem;
     Dokument.vrstaDokumenta = (Model.VrstaDokumenta)vrsteDokumenata.SelectedItem;
     Dokument.kreiran = DateTime.Now;
     Dokument.istice = istice.Date.Date;
 }
开发者ID:HumaMilisic,项目名称:MA-Baze_Phone,代码行数:7,代码来源:DocDetailPage.xaml.cs


示例11: ContentDialog_PrimaryButtonClick

        private void ContentDialog_PrimaryButtonClick( ContentDialog sender, ContentDialogButtonClickEventArgs args )
        {
            args.Cancel = true;

            DetectInputLogin();
            Canceled = false;
        }
开发者ID:tgckpg,项目名称:wenku10,代码行数:7,代码来源:Register.xaml.cs


示例12: HandleContentDialogPrimaryButtonClick

        private void HandleContentDialogPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            if ((deleteSong.IsChecked.HasValue && deleteSong.IsChecked.Value) &&
                (deleteSongConfirm.IsChecked.HasValue && deleteSongConfirm.IsChecked.Value))
            {
                LibraryViewModel.Current.DeleteSong(Song);
            }
            else
            {
                Song.Name = editSongName.Text;

                Song.ArtistName = editArtistName.Text;

                string newAlbumName = editAlbumName.Text;
                string newAlbumAristName = editAlbumAritstName.Text;

                if (newAlbumName != Song.Album.Name || newAlbumAristName != Song.Album.ArtistName)
                {
                    ArtistViewModel albumArtistViewModel = LibraryViewModel.Current.LookupArtistByName(newAlbumAristName);
                    AlbumViewModel newAlbumViewModel = LibraryViewModel.Current.LookupAlbumByName(newAlbumName, albumArtistViewModel.ArtistId);

                    Song.UpdateAlbum(newAlbumViewModel);
                }

                uint newTrackNumber;

                if (uint.TryParse(editTrackNumber.Text, out newTrackNumber))
                {
                    Song.TrackNumber = newTrackNumber;
                }
            }
        }
开发者ID:jevonsflash,项目名称:ProjectMato,代码行数:32,代码来源:EditSong.xaml.cs


示例13: ContentDialog_PrimaryButtonClick

        private void ContentDialog_PrimaryButtonClick( ContentDialog sender, ContentDialogButtonClickEventArgs args )
        {
            args.Cancel = true;

            if ( Keys.SelectedItem == null )
            {
                StringResources stx = new StringResources();
                ServerMessage.Text = "Please Select a key";
                return;
            }

            string PubKey = RSA.SelectedItem.GenPublicKey();
            string Remarks = RemarksInput.Text.Trim();

            if ( string.IsNullOrEmpty( Remarks ) )
            {
                Remarks = RemarksPlaceholder;
            }

            RCache.POST(
                Shared.ShRequest.Server
                , Shared.ShRequest.PlaceRequest( Target, PubKey, BindItem.Id, Remarks )
                , PlaceSuccess
                , ( c, Id, ex ) => { Error( ex.Message ); }
                , false
            );
        }
开发者ID:tgckpg,项目名称:wenku10,代码行数:27,代码来源:PlaceRequest.xaml.cs


示例14: ContentDialog_SecondaryButtonClick

 private void ContentDialog_SecondaryButtonClick( ContentDialog sender, ContentDialogButtonClickEventArgs args )
 {
     if ( Member.WillLogin || Member.IsLoggedIn )
     {
         args.Cancel = true;
     }
 }
开发者ID:tgckpg,项目名称:wenku10,代码行数:7,代码来源:Login.xaml.cs


示例15: Rate_Click

 private static async void Rate_Click(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     //throw new NotImplementedException();
     //if (ReadAppRatingSetting())
     //    return;
     //OpenStoreRating();
     await Launcher.LaunchUriAsync(new Uri(string.Format("ms-windows-store:REVIEW?PFN={0}", Windows.ApplicationModel.Package.Current.Id.FamilyName)));
 }
开发者ID:MohamedELSaQeR,项目名称:My-Apps,代码行数:8,代码来源:About.xaml.cs


示例16: ContentDialog_PrimaryButtonClick

 private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     // If the user entered a passphrase, return it and hide the dialog
     if (!await ValidateInput())
     {
         args.Cancel = true;
     }
 }
开发者ID:NeptuneCenturyStudios,项目名称:KryptPad,代码行数:8,代码来源:PassphrasePrompt.xaml.cs


示例17: Tela_PrimaryButtonClick

        private async void Tela_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {

            this.Frame.Navigate(
          typeof(SettingsPage),
          new Windows.UI.Xaml.Media.Animation.DrillInNavigationTransitionInfo());

        }
开发者ID:SuchGlasha,项目名称:CashManagerDGK,代码行数:8,代码来源:ChangePassword.xaml.cs


示例18: ContentDialog_PrimaryButtonClick

 private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     var dataPackage = new DataPackage();
     dataPackage.SetText(Result);
     Clipboard.SetContent(dataPackage);
     MessageHelper.ShowToastNotification("StoreLogo.png", "已复制到粘贴板!", NotificationAudioNames.Default);
     args.Cancel = true;
 }
开发者ID:zx648383079,项目名称:WPF-Regex,代码行数:8,代码来源:ResultDialog.xaml.cs


示例19: ContentDialog_PrimaryButtonClick

        private void ContentDialog_PrimaryButtonClick( ContentDialog sender, ContentDialogButtonClickEventArgs args )
        {
            args.Cancel = true;
            if ( Member.WillLogin || Member.IsLoggedIn ) return;

            DetectInputLogin();
            Canceled = false;
        }
开发者ID:tgckpg,项目名称:wenku10,代码行数:8,代码来源:Login.xaml.cs


示例20: ContentDialog_SaveEditButtonClick

 private async void ContentDialog_SaveEditButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     model.Akcija.naziv = naziv.Text;
     model.Akcija.id = Convert.ToInt32( id.Text);
     //model.Akcija.id = Convert.ToInt32(id.Text);
     await model.SaveEditAkcije();
     //await model.SacuvajAkciju();
 }
开发者ID:HumaMilisic,项目名称:MA-Baze_Phone,代码行数:8,代码来源:AkcijaDetailPage.xaml.cs



注:本文中的ContentDialogButtonClickEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ContentItem类代码示例发布时间:2022-05-24
下一篇:
C# ContentDialog类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap