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; } } }
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"; } }
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; } }
protected void Handle(Input.SaveAndSpinClick Action) { Action.Cancel(); System.Threading.Thread.CurrentThread.Join(timeout); }
void Handle(Input.TakeOneFakeRegeneratingCarrot action) { Thread.Sleep(500); action.Cancel(); }
void Handle(Input.TakeOneRegeneratingCarrot action) { action.Cancel(); }
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; } }
void Handle(Input.UnloadSubPage Action) { Action.Cancel(); this.SubPage = new Json(); }
void Handle(Input.ReplaceSubPage Action) { Action.Cancel(); if (this.SubPages.Count > 0) { this.SubPages[0] = Self.GET("/playground/sub"); } }
void Handle(Input.ClearSubPages Action) { Action.Cancel(); this.SubPages.Clear(); }
void Handle(Input.AddSubPage Action) { Action.Cancel(); this.SubPages.Add(Self.GET("/playground/sub")); }
void Handle(Input.LoadDatePage Action) { Action.Cancel(); this.SubPage = Self.GET("/playground/date"); }
void Handle(Input.OpenClick Action) { Action.Cancel(); this.Opened = true; }
protected void Handle(Input.RemoveClick Action) { Action.Cancel(); this.Matrix.Data = null; }