private void LoadOnlineClient() { ApWin.StartupForm.Visible = false; this.Visible = false; frmOnlineClient = new OnlineClient(); frmOnlineClient.Show(); }
private void LoginGuest() { try { DataSet ds = SocketClient.LoginGuest(); if (ds != null && ds.Tables.Count > 0) { Kv kv = new Kv(ds.Tables[0]); int statusID = User.LoginMsg(kv, true); Srv.SetCurrentUser(kv); //if (IsValidUser(kv, statusID)) //{ // return; //} //if (LoginMsg(kv1)) //{ // return; //} //Srv.SetCurrentUser(kv); SocketClient.LoginUser(Ap.CurrentUserID, UserStatusE.Blank); Options.Instance.LoginID = "Guest"; Options.Instance.Password = ""; Options.Instance.Save(); ApWin.StartupForm.Visible = false; this.Visible = false; this.Close(); OnlineClient frm = new OnlineClient(); frm.Show(); } else { MessageForm.Error(this, MsgE.ErrorServerConnection); } } catch (Exception ex) { TestDebugger.Instance.WriteError(ex); MessageForm.Show(ex); } }
private void Save() { UserKv.Password = UCrypto.Encrypt(txtPassword.Text); UserKv.PasswordHint = txtPasswordHint.Text; DataSet ds = SocketClient.AddUser(UserKv); if (ds != null && ds.Tables.Count > 0) { Kv kv = new Kv(ds.Tables[0]); Srv.SetCurrentUser(kv); SocketClient.LoginUser(Ap.CurrentUserID, UserStatusE.Blank); this.Visible = false; ApWin.StartupForm.Visible = false; OnlineClient frm = new OnlineClient(); frm.Show(); } this.Close(); }