Exemple #1
0
        //
        //这是捕捉鼠标滚动事件
        //public void Panel_MouseWheel(object sender, MouseEventArgs e)
        //{
        //    float addsd=0;
        //    if (e.Delta > 0)
        //        addsd -= 0.1f;
        //    else
        //        addsd += 0.1f;
        //    if (addsd >= 3)
        //        addsd = 3;
        //    if (addsd <= 1)
        //        addsd = 1f;
        //    toolStripStatusLabel2.Text = addsd.ToString();

        //}



        private void 新建估价项目ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //if (!isExist("Xinjian"))
            //{
            //    Xinjian xinjian = new Xinjian();
            //    xinjian.MdiParent = this;
            //    xinjian.Show();

            //}

            Form f = Application.OpenForms["Xinjian"]; //查找是否打开过Form1窗体

            if (f == null)                             //没打开过
            {
                Xinjian xinjian = new Xinjian();
                xinjian.MdiParent = this;
                xinjian.Show();
            }
            else
            {
                f.Focus();   //打开过就让其获得焦点
            }
        }
Exemple #2
0
        //
        //这是捕捉鼠标滚动事件
        //public void Panel_MouseWheel(object sender, MouseEventArgs e)
        //{
        //    float addsd=0;
        //    if (e.Delta > 0)
        //        addsd -= 0.1f;
        //    else
        //        addsd += 0.1f;
        //    if (addsd >= 3)
        //        addsd = 3;
        //    if (addsd <= 1)
        //        addsd = 1f;
        //    toolStripStatusLabel2.Text = addsd.ToString();
        //}
        private void 新建估价项目ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //if (!isExist("Xinjian"))
            //{
            //    Xinjian xinjian = new Xinjian();
            //    xinjian.MdiParent = this;
            //    xinjian.Show();

            //}

            Form f = Application.OpenForms["Xinjian"];  //查找是否打开过Form1窗体
            if (f == null) //没打开过
            {
                Xinjian xinjian = new Xinjian();
                xinjian.MdiParent = this;
                xinjian.Show();

            }
            else
            {
                f.Focus();   //打开过就让其获得焦点
            }
        }