コード例 #1
0
ファイル: fMainWindow.cs プロジェクト: fjknc/giaThuZ119
        private void tsmenuItemControlOxilo_Click(object sender, EventArgs e)
        {
            (sender as ToolStripMenuItem).Enabled = false;
            fOxiloForm foxilo = new fOxiloForm();

            foxilo.FormClosing += Foxilo_FormClosing;
            foxilo.MdiParent    = this;
            foxilo.Show();
        }
コード例 #2
0
ファイル: fScheme.cs プロジェクト: kimphg/giaThuZ119
        private bool CheckPointSelection(Point checkPoint)
        {
            bool foundSeleted = false;

            foreach (schemePoint p in Z119.ATK.Common.Const.schemePointList)
            {
                Point center;
                if (mType == 1)
                {
                    center = toFormPos(p.PositionNL);
                }
                else
                {
                    center = toFormPos(p.PositionLR);
                }

                if ((Math.Abs(center.X - checkPoint.X) < 5)
                    & (Math.Abs(center.Y - checkPoint.Y) < 5)
                    & (!foundSeleted))
                {
                    if (!p.selected)
                    {
                        p.Selected     = true;
                        isPointChanged = true;
                        Form fc = Application.OpenForms["fOxiloForm"];

                        if (fc == null)
                        {
                            foxilo = new fOxiloForm();
                            //foxilo.MdiParent = this.MdiParent;
                            foxilo.StartPosition = FormStartPosition.Manual;
                            foxilo.Show();
                        }
                        p.DisplayDataToOscillo(fOxiloForm.dataArrayRef, fOxiloForm.dataArrayOld, fOxiloForm.dataArray);
                        fOxiloForm.setScaleX(p.ScaleX);
                        fOxiloForm.setScaleY(p.ScaleY);
                    }
                    foundSeleted = true;
                }
                else
                {
                    p.Selected = false;
                }
            }
            return(foundSeleted);
        }
コード例 #3
0
ファイル: fMainWindow.cs プロジェクト: kimphg/giaThuZ119
        private void tsmenuItemControlOxilo_Click(object sender, EventArgs e)
        {
            //(sender as ToolStripMenuItem).Enabled = false;
            Form fc = Application.OpenForms["fOxiloForm"];

            if (fc == null)
            {
                fOxiloForm foxilo = new fOxiloForm();
                foxilo.FormClosing  += Foxilo_FormClosing;
                foxilo.MdiParent     = this;
                foxilo.StartPosition = FormStartPosition.Manual;
                foxilo.Show();
            }
            else
            {
                fc.Show();
                fc.BringToFront();
            }
        }
コード例 #4
0
ファイル: fScheme.cs プロジェクト: kimphg/giaThuZ119
        void pictureBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            pOld = this.panel1.PointToClient(Cursor.Position);
            if (!CheckPointSelection(pOld))
            {
                CheckElementSelection(pOld);
            }
            Form fc = Application.OpenForms["fOxiloForm"];

            if (fc == null)
            {
                fOxiloForm foxilo = new fOxiloForm();
                //foxilo.MdiParent = this.MdiParent;
                foxilo.StartPosition = FormStartPosition.Manual;
                foxilo.Show();
            }
            else
            {
                fc.BringToFront();
            }
        }