private void RefreshPicture3_Click(object sender, EventArgs e) { SearchTextbox3.ResetText(); UserIDTextbox.ResetText(); bunifuCards1.Select(); DisplayUsersListInHumanReadableFormat(); }
private void DisableTeacherForm_Load(object sender, EventArgs e) { UserIDTextbox.Focus(); int BoundsWidth = Screen.PrimaryScreen.Bounds.Width; int BoundsHeight = Screen.PrimaryScreen.Bounds.Height; int X_Coordinate = BoundsWidth - this.Width; int Y_Coordinate = BoundsHeight - this.Height; Location = new Point(X_Coordinate / 2, (Y_Coordinate / 2) + 10); bunifuCards1.Select(); //EXCEPTION 1 try { variables = new Variables(); opacityform = new OpacityForm(); cryptography = new Cryptography(); sqlconnectionconfig = new SQLConnectionConfig(); RegistryKey registrykey = Registry.CurrentUser.OpenSubKey(@variables.pathname); string tempdata = registrykey.GetValue("SQLServerConnectionString").ToString(); //USER SQLSERVER CONNECTION SETTINGS sqlconnectionconfig.SqlConnectionString = cryptography.Decrypt(tempdata); sqlconnection = new SqlConnection(sqlconnectionconfig.SqlConnectionString); sqlconnection.Open(); DisplayUsersListInHumanReadableFormat(); } catch (Exception exception) { opacityform.Show(); MessageBox.Show(exception.Message.ToString(), "Disable Teacher Form Exception 1", MessageBoxButtons.OK, MessageBoxIcon.Error); opacityform.Hide(); } }