private void Form1_Load(object sender, EventArgs e) { Assistance.Init(); Assistance.LoadSettings(); BindingDatas(); //NameNumLength = FileLength(numpath); spb.obj = toolStripStatusLabel1; pastDBSHA1 = Assistance.Settings.ShA1OfDB; if (SECURITY_Enabled == true) { if (pastDBSHA1 != Assistance.GetSHA1Hash(Settings.DBpath)) { var pib = new PasswordInputDialog(this, "检测到不安全的数据修改,请输入管理员密码", true); pib.Owner = this; pib.Show(); } } conn.ConnectionString = "Data Source=" + Settings.DBpath; TBOutput.Location = pictureBox1.Location; TBOutput.Size = pictureBox1.Size; TBOutput.Visible = false; ReadDataFromDatabase(); LoadConfig_SelectedClassroom(); ShowSelectedClassroomCheckbox(); }
private void 执行命令ToolStripMenuItem_Click(object sender, EventArgs e) { if (SECURITY_Enabled == true) { var pib = new PasswordInputDialog(this, "请输入密码以执行命令", true); pib.Show(); } textBox1.Enabled = true; textBox1.Visible = true; button11.Enabled = true; button11.Visible = true; BTExcCmd.Enabled = true; BTExcCmd.Visible = true; HideListView(); this.Width = 1215; }