Ejemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            pictureBox2.Visible = true;
            pictureBox3.Visible = false;
            pictureBox4.Visible = false;
            pictureBox5.Visible = false;
            pictureBox6.Visible = false;
            pictureBox7.Visible = false;
            CloseAllPanelForm();
            ISMPanel ismPanel = new ISMPanel();

            ismPanel.TopLevel = false;
            this.panel1.Controls.Add(ismPanel);
            ismPanel.WindowState     = FormWindowState.Maximized;
            ismPanel.FormBorderStyle = FormBorderStyle.None;
            ismPanel.BringToFront();
            ismPanel.Show();
        }
Ejemplo n.º 2
0
        private void MainFrm_Load(object sender, EventArgs e)
        {
            StaticForm.MainForm = this;    //将主窗体对象静态存储

            LoginFrm myl = new LoginFrm(); //Main窗口加载前先加载登录窗口对象

            if (myl.ShowDialog() != DialogResult.OK)
            {
                this.Close();
            }
            myl.Close();

            pictureBox1.Image   = Image.FromFile(@"Picture/mainLogo.png");
            pictureBox2.Image   = Image.FromFile(@"Picture/cursor.png");
            pictureBox3.Image   = Image.FromFile(@"Picture/cursor.png");
            pictureBox4.Image   = Image.FromFile(@"Picture/cursor.png");
            pictureBox5.Image   = Image.FromFile(@"Picture/cursor.png");
            pictureBox6.Image   = Image.FromFile(@"Picture/cursor.png");
            pictureBox7.Image   = Image.FromFile(@"Picture/cursor.png");
            pictureBox3.Visible = false;
            pictureBox4.Visible = false;
            pictureBox5.Visible = false;
            pictureBox6.Visible = false;
            pictureBox7.Visible = false;

            try
            {
                ISMPanel ismPanel = new ISMPanel();
                ismPanel.TopLevel = false;
                this.panel1.Controls.Add(ismPanel);
                ismPanel.WindowState     = FormWindowState.Maximized;
                ismPanel.FormBorderStyle = FormBorderStyle.None;
                ismPanel.BringToFront();
                ismPanel.Show();
                //toolStripStatusLabel1.Text = FormObject.account + ",欢迎您登录智慧城市火灾风险评估系统!";
                toolStripStatusLabel2.Text = DateTime.Now.ToString();
            }
            catch
            {
                this.Close();
            }
        }