private void button1_Click(object sender, EventArgs e) { if (this.textBox1.Text == "rpimscommpassword") { tx1 = 通讯.InstanceObject(this); tx1.Focus(); tx1.Show(); tx1.Visible = true; this.Close(); this.Dispose(); } else { this.textBox1.Text = ""; MessageBox.Show(" 密码错误,请重新输入!","警告"); } }
private void RPIMS数据采集及管理系统_Load(object sender, EventArgs e) { alarm_status = this.toolStripStatusLabel1; this.toolStripStatusLabel1.Text = ""; asf.controllInitializeSize(this); this.WindowState = FormWindowState.Maximized; Tools.SetIsOpen();//读取配置文件,判断是否启动报警 butt = this.button1; switch (login.OP) { case "普通用户": this.系统设置ToolStripMenuItem.Enabled = false; this.用户管理ToolStripMenuItem1.Enabled = false; this.toolStripButton14.Enabled = false; this.toolStripButton9.Enabled = false; this.toolStripButton11.Enabled = false; this.toolStripButton2.Enabled = false; this.toolStripButton1.Enabled = false; this.数据管理ToolStripMenuItem.Enabled = false; break; case "超级管理员": break; default: MessageBox.Show("用户权限读取失败!请重新登录!"); System.Environment.Exit(0); break; } //-------------实时曲线初始化----------------------------- //支柱压力 zedGrahp_initializer(zedGraph_zzyldata1, ref list1, "支柱压力实时曲线图-前柱", "时 间", "压 力/ MPa", ""); zedGrahp_initializer(zedGraph_zzyldata2, ref list2, "支柱压力实时曲线图-后柱", "时 间", "压 力/ MPa", ""); zedGrahp_initializer(zedGraph_zzyldata3, ref list3, "支柱压力实时曲线图-前悬梁", "时 间", "压 力/ MPa", ""); zedGrahp_initializer(zedGraph_zzyldata, ref list3, "支柱压力实时曲线图-前悬梁", "时 间", "压 力/ MPa", ""); //顶板离层 zedGrahp_initializer(zedGraph_dblcdata1, ref list4, "顶板离层实时曲线图-深基点", "时 间", "距 离/ mm", ""); zedGrahp_initializer(zedGraph_dblcdata2, ref list5, "顶板离层实时曲线图-浅基点", "时 间", "距 离/ mm", ""); zedGrahp_initializer(zedGraph_dblcdata, ref list5, "顶板离层实时曲线图-综合图", "时 间", "距 离/ mm", ""); //锚杆锚索 zedGrahp_initializer_mz(zedGraph_mgmsdata, ref list6, "锚杆(索)实时曲线图", "时 间", "压 力/ KN", ""); //钻孔应力 zedGrahp_initializer_mz(zedGraph_zkyldata, ref list7, "钻孔应力实时曲线图", "时 间", "压 力/ MPa", ""); //------------实时曲线初始化------------------------------- //timer3.Enabled = true; tabControl1.TabPages[0].Show(); tabControl1.TabPages[1].Show(); tabControl1.TabPages[2].Show(); tabControl1.TabPages[3].Show(); loadFz(); // comboBox1_S(); //comboBox1_SelectedIndexChanged(new object(), new EventArgs()); //comboBox4_SelectedIndexChanged(new object(), new EventArgs()); //comboBox6_SelectedIndexChanged(new object(), new EventArgs()); //comboBox8_SelectedIndexChanged(new object(), new EventArgs()); //string sql_fzhan = "select 监测分站编号 from 监测分站信息表"; //string fenzhan_ss = (string)db.QueryScalar(sql_fzhan); try { string sql_fzhan = "select count(监测分站编号) from 监测分站信息表"; int fenzhan_ss = (int)db.QueryScalar(sql_fzhan); if (fenzhan_ss != 0) { tx1 = 通讯.InstanceObject(this); tx1.Focus(); tx1.Show(); tx1.Visible = false; tx1.buttonQDing_copy(); } } catch { } // comboBox1_SelectedIndexChanged(this, new EventArgs()); }