public bool HasEntered(int CompK) { try { CompEntry ce = new CompEntry(CompK, this.K); return true; } catch { return false; } }
public void Enter(object o, CommandEventArgs e) { Usr.KickUserIfNotLoggedIn(); if (CurrentComp != null && !Usr.Current.HasEntered(CompK) && CurrentComp.Running) { int answer = int.Parse(e.CommandArgument.ToString()); if (answer < 1 || answer > 3) throw new Exception("fdkjhdsflkjh"); CompEntry ce = new CompEntry(); ce.UsrK = Usr.Current.K; ce.Answer = answer; ce.CompK = CompK; ce.Update(); CurrentComp.Entries++; CurrentComp.Update(); //CurrentComp_PreRender(null, null); } }