Exemplo n.º 1
0
        private void SetSelectionValuesAndMode()
        {
            PinboardFileV1.RectangleInfo rectInfo = pinboardControl.Selection;

            if (rectInfo != null)
            {
                this.nameTextBox.Text       = rectInfo.Name;
                this.xTextBox.Text          = rectInfo.Rectangle.X.ToString();
                this.yTextBox.Text          = rectInfo.Rectangle.Y.ToString();
                this.widthTextBox.Text      = rectInfo.Rectangle.Width.ToString();
                this.heightTextBox.Text     = rectInfo.Rectangle.Height.ToString();
                this.depthTextBox.Text      = pinboardControl.SelectionIndex.ToString();
                this.redColorPicker.Value   = rectInfo.Color.R;
                this.greenColorPicker.Value = rectInfo.Color.G;
                this.blueColorPicker.Value  = rectInfo.Color.B;
                this.alphaColorPicker.Value = rectInfo.Color.A;
            }

            PropertiesFormMode mode;

            if (pinboardControl.SelectionIndex == -1)
            {
                mode = PropertiesFormMode.PartialEdit;
            }
            else
            {
                mode = PropertiesFormMode.FullEdit;
            }

            if (this.Mode != mode)
            {
                this.Mode = mode;
            }
        }
Exemplo n.º 2
0
        private void SetSelectionValuesAndMode()
        {
            PinboardFileV1.RectangleInfo rectInfo = pinboardControl.Selection;

            if (rectInfo != null)
            {
                this.nameTextBox.Text = rectInfo.Name;
                this.xTextBox.Text = rectInfo.Rectangle.X.ToString();
                this.yTextBox.Text = rectInfo.Rectangle.Y.ToString();
                this.widthTextBox.Text = rectInfo.Rectangle.Width.ToString();
                this.heightTextBox.Text = rectInfo.Rectangle.Height.ToString();
                this.depthTextBox.Text = pinboardControl.SelectionIndex.ToString();
                this.redColorPicker.Value = rectInfo.Color.R;
                this.greenColorPicker.Value = rectInfo.Color.G;
                this.blueColorPicker.Value = rectInfo.Color.B;
                this.alphaColorPicker.Value = rectInfo.Color.A;
            }

            PropertiesFormMode mode;

            if (pinboardControl.SelectionIndex == -1)
                mode = PropertiesFormMode.PartialEdit;
            else
                mode = PropertiesFormMode.FullEdit;

            if (this.Mode != mode)
                this.Mode = mode;
        }