public User() { this.idNumber = 0; this.lInType = LogInType.None; this.fname = ""; this.lname = ""; }
private void FormMain_Load(object sender, EventArgs e) { currentLogInType = LogInType.None; SetUiToLoginType(); Connection con = new Connection(); Connection.Instance = con; Connection.Instance.Connect(); }
/// <summary> /// log in into the control /// </summary> /// <param name="loginType"></param> void LogIN(LogInType loginType) { currentLogInType = loginType; SetUiToLoginType(); if (currentLogInType == LogInType.Admin) { textBoxMenu.Text = "Admin"; } else { textBoxMenu.Text = "Super Admin"; } }
/// <summary> /// Shows whenever player logged in or just registered /// </summary> /// <param name="logInType"></param> public void ShowPlayerLoggedIn(LogInType logInType) { switch (logInType) { case LogInType.Registered: Debug.Log("Welcome to Match3Fighter, new player!"); break; case LogInType.SignedIn: Debug.Log("Welcome back!"); break; default: throw new ArgumentOutOfRangeException(nameof(logInType), logInType, null); } }
private void bunifuFlatButtonLogOut_Click_1(object sender, EventArgs e) { if (panelSideMenu.Width == 100) { panelSideMenu.Width = 335; } else { List <int> test = new List <int>(); for (int i = 0; i < panelLogin.Controls.Count; i++) { if (panelLogin.Controls[i] is UcInsertData) { test.Add(i); } else if (panelLogin.Controls[i] is UcInsertCommission) { test.Add(i); } else if (panelLogin.Controls[i] is UcReport) { test.Add(i); } else if (panelLogin.Controls[i] is UcSetting) { test.Add(i); } } for (int i = 0; i < test.Count; i++) { panelLogin.Controls.RemoveAt(test[i]); } currentLogInType = LogInType.None; SetUiToLoginType(); ClearUI(); ClosePanel(); } }
/// <summary> /// logs out of the control /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void bunifuFlatButtonLogOut_Click(object sender, EventArgs e) { currentLogInType = LogInType.None; SetUiToLoginType(); ClearUI(); }