当前位置: 首页>>代码示例>>C#>>正文


C# Input.Cancel方法代码示例

本文整理汇总了C#中Input.Cancel方法的典型用法代码示例。如果您正苦于以下问题:C# Input.Cancel方法的具体用法?C# Input.Cancel怎么用?C# Input.Cancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Input的用法示例。


在下文中一共展示了Input.Cancel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Handle

        protected void Handle(Input.RevertClick Action)
        {
            Action.Cancel();

            for (var x = 0; x < this.Matrix.Count; x++) {
                var row = this.Matrix[x];

                for (var y = 0; y < row.Count; y++) {
                    row[y].IntegerValue = 9 - row[y].IntegerValue;
                }
            }
        }
开发者ID:miyconst,项目名称:Playground,代码行数:12,代码来源:MatrixPage.json.cs

示例2: Handle

        protected void Handle(Input.SaveAndMessageClick Action)
        {
            Action.Cancel();

            this.ErrorMessage = string.Empty;
            this.SuccessMessage = string.Empty;
            System.Threading.Thread.CurrentThread.Join(timeout);

            if (DateTime.Now.Ticks%2 == 0)
            {
                this.SuccessMessage = "The changes are successfully saved";
            }
            else
            {
                this.ErrorMessage = "Failed to save changes";
            }
        }
开发者ID:StarcounterSamples,项目名称:KitchenSink,代码行数:17,代码来源:CallbackPage.json.cs

示例3: Handle

        void Handle(Input.Submit Action)
        {
            Action.Cancel();
            this.Message = null;

            if (string.IsNullOrEmpty(this.Email)) {
                this.Message = "E-mail can't be blank";
                return;
            }

            if (!System.Text.RegularExpressions.Regex.IsMatch(this.Email, emailPatternt)) {
                this.Message = "This is not a valid e-mail";
                return;
            }

            if (string.IsNullOrEmpty(this.Username)) {
                this.Message = "Username can't be blank";
                return;
            }

            if (string.IsNullOrEmpty(this.Password)) {
                this.Message = "Password can't be blank";
                return;
            }

            if (this.Password != this.RepeatPassword) {
                this.Message = "Passwords don't match";
                return;
            }

            SystemUser user = null;

            Db.Transact(() => {
                if (SystemUser.GetSystemUser(this.Username) != null) {
                    this.Message = "This username is not free";
                } else if (SystemUser.GetSystemUserByEmail(this.Email) != null) {
                    this.Message = "This email has already been registered";
                } else {
                    user = SystemUser.RegisterSystemUser(this.Username, this.Email, this.Password);
                }
            });

            if (user != null) {
                this.IsRequireSignIn = true;
            }
        }
开发者ID:StarcounterPrefabs,项目名称:Registration,代码行数:46,代码来源:RegisterPage.json.cs

示例4: Handle

 void Handle(Input.TakeOneFakeRegeneratingCarrot action)
 {
     Thread.Sleep(500);
     action.Cancel();
 }
开发者ID:StarcounterSamples,项目名称:KitchenSink,代码行数:5,代码来源:ButtonPage.json.cs

示例5: Handle

        void Handle(Input.ChangeHtmlSubPage Action)
        {
            Action.Cancel();
            SubPage page = this.SubPage as SubPage;

            if (page == null) {
                return;
            }

            switch (page.Html) {
                case "/Playground/SubPage.html":
                    page.Html = "/Playground/SubStyledPage.html";
                    break;
                case "/Playground/SubStyledPage.html":
                    page.Html = "";
                    break;
                case "":
                    page.Html = "/Playground/SubPage.html";
                    break;
            }
        }
开发者ID:miyconst,项目名称:Playground,代码行数:21,代码来源:IndexPage.json.cs

示例6: Handle

        void Handle(Input.OpenClick Action)
        {
            Action.Cancel();

            this.Opened = true;
        }
开发者ID:StarcounterSamples,项目名称:KitchenSink,代码行数:6,代码来源:DialogPage.json.cs


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