Пример #1
0
 private void confirmButton_Click(object sender, EventArgs e)
 {
     if (imageNameTextBox.Text != "")
     {
         flickeringImage img = new flickeringImage();
         img.imageName = imageNameTextBox.Text;
         HMIEditFlickeringImagesDialog.image.flickeringImages.Add(img);
         var flickeringImageBindingSource = new BindingSource();
         flickeringImageBindingSource.DataSource = HMIEditFlickeringImagesDialog.image.flickeringImages;
         hmiEditFlickeringImagesDialog.flickeringImagesDataGridView.DataSource = flickeringImageBindingSource;
         hmiEditFlickeringImagesDialog.Refresh();
         this.Close();
     }
     else
     {
         MessageBox.Show("Image Name을 입력해주세요.");
     }
 }
Пример #2
0
        public GUIO Clone()
        {
            GUIO clone = new GUIO();

            clone.name            = this.name;
            clone.gVariable       = this.gVariable;
            clone.tempGVariable   = this.tempGVariable;
            clone.initialState    = this.initialState;
            clone.backgroundColor = this.backgroundColor;
            clone.layer           = this.layer;

            clone.fillColor     = this.fillColor;
            clone.lineColor     = this.lineColor;
            clone.lineThickness = this.lineThickness;

            clone.buttonColor   = this.buttonColor;
            clone.thickness     = this.thickness;
            clone.borderColor   = this.borderColor;
            clone.fontSize      = this.fontSize;
            clone.fontColor     = this.fontColor;
            clone.fontBold      = this.fontBold;
            clone.fontUnderline = this.fontUnderline;
            clone.text          = this.text;

            clone.min         = this.min;
            clone.max         = this.max;
            clone.major       = this.major;
            clone.minor       = this.minor;
            clone.needleColor = this.needleColor;
            clone.dialColor   = this.dialColor;

            clone.progressColor = this.progressColor;
            clone.orientation   = this.orientation;

            clone.sliderColor = this.sliderColor;
            clone.handleColor = this.handleColor;

            clone.password         = this.password;
            clone.pageName         = this.pageName;
            clone.numColor         = this.numColor;
            clone.numButtonColor   = this.numButtonColor;
            clone.resetColor       = this.resetColor;
            clone.resetButtonColor = this.resetButtonColor;
            clone.loginColor       = this.loginColor;
            clone.loginButtonColor = this.loginButtonColor;
            clone.funcColor        = this.funcColor;
            clone.funcButtonColor  = this.funcButtonColor;
            clone.digitNumber      = this.digitNumber;
            clone.okColor          = this.okColor;
            clone.okButtonColor    = this.okButtonColor;
            clone.labelColor       = this.labelColor;
            clone.clockColor       = this.clockColor;
            clone.ipAddress        = this.ipAddress;
            clone.port             = this.port;

            clone.location.x  = this.location.x;
            clone.location.y  = this.location.y;
            clone.size.width  = this.size.width;
            clone.size.height = this.size.height;

            clone.type    = this.type;
            clone.groupID = this.groupID;

            clone.ledColor    = this.ledColor;
            clone.bodyColor   = this.bodyColor;
            clone.digitColor  = this.digitColor;
            clone.count       = this.count;
            clone.imageName   = this.imageName;
            clone.flickering  = this.flickering;
            clone.grayScale   = this.grayScale;
            clone.url         = this.url;
            clone.transparent = this.transparent;
            clone.angle       = this.angle;
            clone.alignment   = this.alignment;

            clone.direction = this.direction;
            clone.speed     = this.speed;

            clone.startPointID      = this.startPointID;
            clone.endPointID        = this.endPointID;
            clone.duration          = this.duration;
            clone.visibleDuration   = this.visibleDuration;
            clone.invisibleDuration = this.invisibleDuration;
            clone.state             = this.state;
            clone.scrollFlag        = this.scrollFlag;
            clone.startFrame        = this.startFrame;
            clone.endFrame          = this.endFrame;

            foreach (clickEvent Event in this.clickEvents)
            {
                clickEvent cloneEvent = new clickEvent();
                cloneEvent.type     = Event.type;
                cloneEvent.number   = Event.number;
                cloneEvent.gName    = Event.gName;
                cloneEvent.GUIOType = Event.GUIOType;
                cloneEvent.property = Event.property;
                cloneEvent.value    = Event.value;
                clone.clickEvents.Add(cloneEvent);
            }

            foreach (vertex vtx in this.vertexes)
            {
                vertex cloneVtx = new vertex();
                cloneVtx.x       = vtx.x;
                cloneVtx.y       = vtx.y;
                cloneVtx.angle   = vtx.angle;
                cloneVtx.pointID = vtx.pointID;
                cloneVtx.scale   = vtx.scale;
                clone.vertexes.Add(cloneVtx);
            }

            foreach (flickeringImage img in this.flickeringImages)
            {
                flickeringImage cloneImg = new flickeringImage();
                cloneImg.imageName = img.imageName;
                clone.flickeringImages.Add(cloneImg);
            }

            return(clone);
        }