本文整理汇总了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;
}
}
}
示例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";
}
}
示例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;
}
}
示例4: Handle
void Handle(Input.TakeOneFakeRegeneratingCarrot action)
{
Thread.Sleep(500);
action.Cancel();
}
示例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;
}
}
示例6: Handle
void Handle(Input.OpenClick Action)
{
Action.Cancel();
this.Opened = true;
}