Пример #1
0
        private void MenuUserManager_Click(object sender, EventArgs e)
        {
            if (false == SystemConfig._IsLogin)
            {
                FormManagerLogin formLogin = new FormManagerLogin();
                if (DialogResult.Yes != formLogin.ShowDialog())
                {
                    return;
                }
            }

            Form form = new FormUserManager();

            if (activeFrom != null)
            {
                activeFrom.Close();
            }

            form.TopLevel = false;
            form.Dock     = DockStyle.Fill;
            form.Parent   = this.panelMain;
            form.Show();

            activeFrom = form;
        }
Пример #2
0
        private void MenuEasyErrorChapterManager_Click(object sender, System.EventArgs e)
        {
            if (false == SystemConfig._IsLogin)
            {
                FormManagerLogin formLogin = new FormManagerLogin();
                if (DialogResult.Yes != formLogin.ShowDialog())
                {
                    return;
                }
            }

            Form form = new FormSkillManager();

            ((FormSkillManager)form).SetType(3);

            if (activeFrom != null)
            {
                activeFrom.Close();
            }

            form.TopLevel = false;
            form.Dock     = DockStyle.Fill;
            form.Parent   = this.panelMain;
            form.Show();

            activeFrom = form;
            //if (false == SystemConfig._IsLogin)
            //{
            //    FormManagerLogin formLogin = new FormManagerLogin();
            //    if (DialogResult.Yes != formLogin.ShowDialog())
            //        return;
            //}

            //Form form = new FormEasyErrorManager();
            //if (activeFrom != null)
            //    activeFrom.Close();

            //form.TopLevel = false;
            //form.Dock = DockStyle.Fill;
            //form.Parent = this.panelMain;
            //form.Show();

            //activeFrom = form;
        }
Пример #3
0
        private void pictureBoxMenu_Click(object sender, EventArgs e)
        {
            if (false == SystemConfig._IsLogin)
            {
                FormManagerLogin formLogin = new FormManagerLogin();
                if (DialogResult.Yes != formLogin.ShowDialog())
                {
                    return;
                }
            }

            Point dp = new Point(); //定义一个坐标结构

            int top  = pictureBoxMenu.Top + pictureBoxMenu.Height;
            int left = pictureBoxMenu.Left + pictureBoxMenu.Width;

            dp.X = left;
            dp.Y = top;

            Point dpScreen = this.PointToScreen(dp);

            contextMenuStrip1.Show(dpScreen.X - 22, dpScreen.Y);
        }