Пример #1
0
        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
        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
        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
        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();
            }
        }