Ejemplo n.º 1
0
        public override void OnDoubleClick(Object sender, EventArgs e)
        {
            DrawArea drawArea = (DrawArea)sender;
            EditorDialog dlg = new EditorDialog(_logicIDTail, this, "", drawArea.GraphicsList.BomVerify, DeviceTypeEnum.BOM, DeviceTypeEnum.BOM, drawArea.GraphicsList.IPVerify);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (this._tagIDBase != 0)
                {
                    drawArea.GraphicsList.BomVerify.Remove(_logicIDTail);
                }
                _logicIDTail = dlg.IDvalues;

                this.x_axis = dlg.X_axis;
                this.y_axis = dlg.Y_axis;
                this.width = dlg.RWidth;
                this.height = dlg.RHeight;
                RecID = dlg.RecID;
                DeviceID = dlg.DeviceID;
                DeviceName = dlg.DeviceName;
                IpAdd = dlg.IpAdd;
                this.Device_H = dlg.Device_H;
                this.Device_W = dlg.Device_W;
                if (_tagIDBase == 0)
                    _flag = _objIdInc++;
                if (drawArea.AddText(this))
                {
                    _tagIDBase = _flag;
                    this.SetRectangle(x_axis, y_axis, width, height);
                    drawArea.SetDirty();
                    drawArea.Refresh();
                }
            }
        }
Ejemplo n.º 2
0
        public override void OnDoubleClick(Object sender, EventArgs e)
        {
            DrawArea         drawArea = (DrawArea)sender;
            SwitchEditDialog dlg      = new SwitchEditDialog(_switchID, this);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                SwitchID = dlg.MonitorID;

                if (drawArea.AddText(this))
                {
                    drawArea.SetDirty();
                }
            }
        }
Ejemplo n.º 3
0
        public override void OnDoubleClick(Object sender, EventArgs e)
        {
            DrawArea     drawArea = (DrawArea)sender;
            EditorDialog dlg      = new EditorDialog(logicIDTail, this, "", drawArea.GraphicsList.TVMVerify, DeviceTypeEnum.TVM, DeviceTypeEnum.TVM, drawArea.GraphicsList.IPVerify);

            dlg.ArrayId = arrayId;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (this.TagIDBase != 0)
                {
                    drawArea.GraphicsList.TVMVerify.Remove(logicIDTail);
                }
                logicIDTail   = dlg.IDvalues;
                arrayId       = dlg.ArrayId;
                this.x_axis   = dlg.X_axis;
                this.y_axis   = dlg.Y_axis;
                this.width    = dlg.RWidth;
                this.height   = dlg.RHeight;
                RecID         = dlg.RecID;
                StationID     = dlg.StationID;
                DeviceID      = dlg.DeviceID;
                DeviceName    = dlg.DeviceName;
                IpAdd         = dlg.IpAdd;
                DeviceType    = dlg.DeviceType;
                DeviceSubType = dlg.DeviceSubType;
                GroupID       = dlg.GroupID;
                this.Device_H = dlg.Device_H;
                this.Device_W = dlg.Device_W;
                if (TagIDBase == 0)
                {
                    flag = objIdInc++;
                }
                if (drawArea.AddText(this))
                {
                    TagIDBase = flag;//与颜色变化有关

                    this.SetRectangle(x_axis, y_axis, width, height);
                    drawArea.SetDirty();
                    drawArea.SetDirty();
                }
            }
        }
Ejemplo n.º 4
0
        public override void OnDoubleClick(Object sender, EventArgs e)
        {
            DrawArea         drawArea = (DrawArea)sender;
            SwitchEditDialog dlg      = new SwitchEditDialog(_monitorID, PortID, DeviceID, this);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                MonitorID = dlg.MonitorID;
                PortID    = dlg.PortID;
                DeviceID  = dlg.DeviceID;
                int i = 0;
                if (TagID == 0)
                {
                    i = _objIdInc++;
                }
                if (drawArea.AddText(this))
                {
                    TagID = i;
                    drawArea.SetDirty();
                }
            }
        }
Ejemplo n.º 5
0
        public override void OnDoubleClick(Object sender, EventArgs e)
        {
            string entryValue;

            if (_entry == EDirection.Left)
            {
                entryValue = "Left";
            }
            else if (_entry == EDirection.Right)
            {
                entryValue = "Right";
            }
            else if (_entry == EDirection.Up)
            {
                entryValue = "Up";
            }
            else
            {
                entryValue = "Down";
            }

            DrawArea drawArea = (DrawArea)sender;

            EditorDialog dlg = new EditorDialog(_logicIDTail, this, entryValue, drawArea.GraphicsList.AGMVerify, DeviceTypeEnum.AGM, DeviceTypeEnum.AGM_Sub_AGMChannelDual, drawArea.GraphicsList.IPVerify);

            // dlg.ArrayId = arrayId;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (this._tagIDBase != 0)
                {
                    drawArea.GraphicsList.AGMVerify.Remove(_logicIDTail);
                }
                _logicIDTail = dlg.IDvalues;
                arrayId      = dlg.ArrayId;
                this.x_axis  = dlg.X_axis;
                this.y_axis  = dlg.Y_axis;
                this.width   = dlg.RWidth;
                this.height  = dlg.RHeight;

                RecID         = dlg.RecID;
                StationID     = dlg.StationID;
                DeviceID      = dlg.DeviceID;
                DeviceName    = dlg.DeviceName;
                IpAdd         = dlg.IpAdd;
                DeviceType    = dlg.DeviceType;
                DeviceSubType = dlg.DeviceSubType;
                GroupID       = dlg.GroupID;
                this.Device_H = dlg.Device_H;
                this.Device_W = dlg.Device_W;

                if (dlg.Entryvalues == "Left")
                {
                    this.Entry = EDirection.Left;
                }
                else if (dlg.Entryvalues == "Right")
                {
                    this.Entry = EDirection.Right;
                }
                else if (dlg.Entryvalues == "Up")
                {
                    this.Entry = EDirection.Up;
                }
                else
                {
                    this.Entry = EDirection.Down;
                }

                if (_tagIDBase == 0)
                {
                    _flag = _objIdInc++;
                }
                if (drawArea.AddText(this))
                {
                    _tagIDBase = _flag;

                    this.SetRectangle(x_axis, y_axis, width, height);
                    drawArea.SetDirty();
                    drawArea.Refresh();
                }
            }
        }