Example #1
0
        void ReleaseDesignerOutlets()
        {
            if (DoneButton != null)
            {
                DoneButton.Dispose();
                DoneButton = null;
            }

            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (DescriptionLabel != null)
            {
                DescriptionLabel.Dispose();
                DescriptionLabel = null;
            }
        }
Example #2
0
        public AngleChooserPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
        {
            AngleChooserPhase offsetByPi;
            DoubleProperty    property = (DoubleProperty)propInfo.Property;

            if ((property.MaxValue - property.MinValue) > 360.0)
            {
                throw new ArgumentException($"The difference between the property's minimum and maximum values cannot exceed 360.0. (Property.MinValue={property.MinValue}, Property.MaxValue={property.MaxValue}, Delta={property.MaxValue - property.MinValue})");
            }
            double minValue = property.MinValue;
            double maxValue = property.MaxValue;

            if ((property.MinValue >= -180.0) && (property.MaxValue <= 180.0))
            {
                offsetByPi = AngleChooserPhase.OffsetByPi;
            }
            else
            {
                if ((property.MinValue < 0.0) || (property.MaxValue > 360.0))
                {
                    throw new ArgumentException($"The property minimum and maximum values must either fall into the range [-180, +180] or [0, +360]. (Property.MinValue={property.MinValue}, Property.MaxValue={property.MaxValue})");
                }
                offsetByPi = AngleChooserPhase.Regular;
            }
            this.header                     = new HeadingLabel();
            this.header.Name                = "header";
            this.header.RightMargin         = 0;
            this.header.Text                = base.DisplayName;
            this.angleChooser               = new AngleChooser();
            this.angleChooser.Name          = "angleChooser";
            this.angleChooser.Phase         = offsetByPi;
            this.angleChooser.MinValue      = minValue;
            this.angleChooser.MaxValue      = maxValue;
            this.angleChooser.ValueChanged += new EventHandler(this.OnAngleChooserValueChanged);
            this.valueNud                   = new PdnNumericUpDown();
            this.valueNud.Name              = "numericUpDown";
            this.valueNud.Minimum           = (decimal)base.Property.MinValue;
            this.valueNud.Maximum           = (decimal)base.Property.MaxValue;
            this.valueNud.DecimalPlaces     = (int)propInfo.ControlProperties[ControlInfoPropertyNames.DecimalPlaces].Value;
            this.valueNud.ValueChanged     += new EventHandler(this.OnValueNudValueChanged);
            this.valueNud.TextAlign         = HorizontalAlignment.Right;
            if ((maxValue - minValue) == 360.0)
            {
                this.valueNud.RangeWraps = true;
            }
            this.resetButton         = new PdnPushButton();
            this.resetButton.Name    = "resetButton";
            this.resetButton.Click  += new EventHandler(this.OnResetButtonClick);
            this.resetButton.Image   = PdnResources.GetImageResource("Icons.ResetIcon.png").Reference;
            this.resetButton.Visible = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.ShowResetButton].Value;
            base.ToolTip.SetToolTip(this.resetButton, PdnResources.GetString("Form.ResetButton.Text").Replace("&", ""));
            this.description          = new PdnLabel();
            this.description.Name     = "descriptionText";
            this.description.AutoSize = false;
            this.description.Text     = base.Description;
            base.SuspendLayout();
            Control[] controls = new Control[] { this.header, this.angleChooser, this.valueNud, this.resetButton, this.description };
            base.Controls.AddRange(controls);
            base.ResumeLayout(false);
        }
Example #3
0
 public StaticListRadioButtonPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header             = new HeadingLabel();
     this.header.Name        = "header";
     this.header.RightMargin = 0;
     this.header.Text        = base.DisplayName;
     object[] valueChoices = base.Property.ValueChoices;
     this.radioButtons = new PdnRadioButton[valueChoices.Length];
     for (int i = 0; i < this.radioButtons.Length; i++)
     {
         this.radioButtons[i]                   = new PdnRadioButton();
         this.radioButtons[i].Name              = "radioButton" + i.ToString(CultureInfo.InvariantCulture);
         this.radioButtons[i].IsCheckedChanged += new EventHandler(this.OnRadioButtonCheckedChanged);
         string valueDisplayName = propInfo.GetValueDisplayName(valueChoices[i]);
         this.radioButtons[i].Text = valueDisplayName;
     }
     this.descriptionText          = new PdnLabel();
     this.descriptionText.Name     = "descriptionText";
     this.descriptionText.AutoSize = false;
     this.descriptionText.Text     = base.Description;
     base.Controls.Add(this.header);
     base.Controls.AddRange(this.radioButtons);
     base.Controls.Add(this.descriptionText);
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Example #4
0
        void ReleaseDesignerOutlets()
        {
            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (IntoImageView != null)
            {
                IntoImageView.Dispose();
                IntoImageView = null;
            }

            if (ContentLabel != null)
            {
                ContentLabel.Dispose();
                ContentLabel = null;
            }

            if (PageControl != null)
            {
                PageControl.Dispose();
                PageControl = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }
        }
Example #5
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityIndicatorView != null)
            {
                ActivityIndicatorView.Dispose();
                ActivityIndicatorView = null;
            }

            if (CreateWorkspaceButton != null)
            {
                CreateWorkspaceButton.Dispose();
                CreateWorkspaceButton = null;
            }

            if (TryAgainButton != null)
            {
                TryAgainButton.Dispose();
                TryAgainButton = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (TextLabel != null)
            {
                TextLabel.Dispose();
                TextLabel = null;
            }
        }
Example #6
0
        void ReleaseDesignerOutlets()
        {
            if (UpdateButton != null)
            {
                UpdateButton.Dispose();
                UpdateButton = null;
            }

            if (WebsiteButton != null)
            {
                WebsiteButton.Dispose();
                WebsiteButton = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (TextLabel != null)
            {
                TextLabel.Dispose();
                TextLabel = null;
            }
        }
Example #7
0
 public StaticListDropDownPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header                         = new HeadingLabel();
     this.header.Name                    = "header";
     this.header.RightMargin             = 0;
     this.header.Text                    = base.DisplayName;
     this.comboBox                       = new PdnDropDownList();
     this.comboBox.Name                  = "comboBox";
     this.comboBox.SelectedIndexChanged += new EventHandler(this.OnComboBoxSelectedIndexChanged);
     this.comboBox.BeginUpdate();
     foreach (object obj2 in base.Property.ValueChoices)
     {
         string valueDisplayName = propInfo.GetValueDisplayName(obj2);
         this.comboBox.Items.Add(valueDisplayName);
     }
     this.comboBox.EndUpdate();
     this.descriptionText          = new PdnLabel();
     this.descriptionText.Name     = "descriptionText";
     this.descriptionText.AutoSize = false;
     this.descriptionText.Text     = base.Description;
     Control[] controls = new Control[] { this.header, this.comboBox, this.descriptionText };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
     base.PerformLayout();
 }
        void ReleaseDesignerOutlets()
        {
            if (ContinueWithoutAccessButton != null)
            {
                ContinueWithoutAccessButton.Dispose();
                ContinueWithoutAccessButton = null;
            }

            if (EnableAccessButton != null)
            {
                EnableAccessButton.Dispose();
                EnableAccessButton = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (MessageLabel != null)
            {
                MessageLabel.Dispose();
                MessageLabel = null;
            }
        }
 public VectorSliderPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     this.decimalPlaces = 2;
     base.SuspendLayout();
     this.header                       = new HeadingLabel();
     this.sliderX                      = new PdnTrackBar();
     this.numericUpDownX               = new PdnNumericUpDown();
     this.resetButtonX                 = new PdnPushButton();
     this.sliderY                      = new PdnTrackBar();
     this.numericUpDownY               = new PdnNumericUpDown();
     this.resetButtonY                 = new PdnPushButton();
     this.descriptionText              = new PdnLabel();
     this.header.Name                  = "header";
     this.header.RightMargin           = 0;
     this.header.Text                  = base.DisplayName;
     this.sliderX.Name                 = "sliderX";
     this.sliderX.AutoSize             = false;
     this.sliderX.ValueChanged        += new EventHandler(this.OnSliderXValueChanged);
     this.SliderShowTickMarksX         = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.SliderShowTickMarksX].Value;
     this.sliderX.ResetRequested      += new EventHandler(this.OnResetButtonXClick);
     this.numericUpDownX.Name          = "numericUpDownX";
     this.numericUpDownX.ValueChanged += new EventHandler(this.OnNumericUpDownXValueChanged);
     this.numericUpDownX.TextAlign     = HorizontalAlignment.Right;
     this.resetButtonX.Name            = "resetButtonX";
     this.resetButtonX.AutoSize        = false;
     this.resetButtonX.Click          += new EventHandler(this.OnResetButtonXClick);
     this.resetButtonX.Image           = PdnResources.GetImageResource("Icons.ResetIcon.png").Reference;
     this.resetButtonX.Visible         = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.ShowResetButton].Value;
     base.ToolTip.SetToolTip(this.resetButtonX, PdnResources.GetString("Form.ResetButton.Text").Replace("&", ""));
     this.sliderY.Name                 = "sliderY";
     this.sliderY.AutoSize             = false;
     this.sliderY.ValueChanged        += new EventHandler(this.OnSliderYValueChanged);
     this.SliderShowTickMarksY         = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.SliderShowTickMarksY].Value;
     this.sliderY.ResetRequested      += new EventHandler(this.OnResetButtonYClick);
     this.numericUpDownY.Name          = "numericUpDownY";
     this.numericUpDownY.ValueChanged += new EventHandler(this.OnNumericUpDownYValueChanged);
     this.numericUpDownY.TextAlign     = HorizontalAlignment.Right;
     this.resetButtonY.Name            = "resetButtonY";
     this.resetButtonY.AutoSize        = false;
     this.resetButtonY.Click          += new EventHandler(this.OnResetButtonYClick);
     this.resetButtonY.Image           = PdnResources.GetImageResource("Icons.ResetIcon.png").Reference;
     this.resetButtonY.Visible         = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.ShowResetButton].Value;
     base.ToolTip.SetToolTip(this.resetButtonY, PdnResources.GetString("Form.ResetButton.Text").Replace("&", ""));
     this.descriptionText.Name     = "descriptionText";
     this.descriptionText.AutoSize = false;
     this.descriptionText.Text     = base.Description;
     this.ValidateUIRanges();
     this.ResetUIRanges();
     Control[] controls = new Control[] { this.header, this.sliderX, this.numericUpDownX, this.resetButtonX, this.sliderY, this.numericUpDownY, this.resetButtonY, this.descriptionText };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
 }
 public SliderPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     this.header          = new HeadingLabel();
     this.slider          = new PdnTrackBar();
     this.numericUpDown   = new PdnNumericUpDown();
     this.resetButton     = new PdnPushButton();
     this.descriptionText = new PdnLabel();
     this.slider.BeginInit();
     base.SuspendLayout();
     this.header.Name                 = "header";
     this.header.RightMargin          = 0;
     this.header.Text                 = base.DisplayName;
     this.numericUpDown.DecimalPlaces = 0;
     this.numericUpDown.Name          = "numericUpDown";
     this.numericUpDown.TextAlign     = HorizontalAlignment.Right;
     this.numericUpDown.TabIndex      = 1;
     this.RangeWraps             = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.RangeWraps].Value;
     this.slider.Name            = "slider";
     this.slider.AutoSize        = false;
     this.slider.TabIndex        = 0;
     this.SliderShowTickMarks    = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.SliderShowTickMarks].Value;
     this.ControlStyle           = (int)propInfo.ControlProperties[ControlInfoPropertyNames.ControlStyle].Value;
     this.ControlColors          = propInfo.ControlProperties[ControlInfoPropertyNames.ControlColors].Value;
     this.slider.ResetRequested += new EventHandler(this.OnResetButtonClick);
     this.resetButton.AutoSize   = false;
     this.resetButton.Name       = "resetButton";
     this.resetButton.Click     += new EventHandler(this.OnResetButtonClick);
     this.resetButton.Image      = PdnResources.GetImageResource("Icons.ResetIcon.png").Reference;
     this.resetButton.TabIndex   = 2;
     this.resetButton.Visible    = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.ShowResetButton].Value;
     base.ToolTip.SetToolTip(this.resetButton, PdnResources.GetString("Form.ResetButton.Text").Replace("&", ""));
     this.descriptionText.Name     = "descriptionText";
     this.descriptionText.AutoSize = false;
     this.descriptionText.Text     = base.Description;
     this.ValidateUIRanges();
     this.ResetUIRanges();
     Control[] controls = new Control[] { this.header, this.slider, this.numericUpDown, this.resetButton, this.descriptionText };
     base.Controls.AddRange(controls);
     this.slider.EndInit();
     base.ResumeLayout(false);
     this.numericUpDown.ValueChanged += new EventHandler(this.OnNumericUpDownValueChanged);
     this.slider.ValueChanged        += new EventHandler(this.OnSliderValueChanged);
 }
Example #11
0
 public BooleanCheckBoxPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header                     = new HeadingLabel();
     this.header.Name                = "header";
     this.header.RightMargin         = 0;
     this.header.Text                = base.DisplayName;
     this.checkBox                   = new PdnCheckBox();
     this.checkBox.Name              = "checkBox";
     this.checkBox.IsCheckedChanged += new EventHandler(this.OnCheckBoxCheckedChanged);
     this.checkBox.Text              = string.IsNullOrEmpty(base.Description) ? base.DisplayName : base.Description;
     this.footnoteLabel              = new PdnLabel();
     this.footnoteLabel.Name         = "footnoteLabel";
     this.footnoteLabel.AutoSize     = false;
     this.footnoteLabel.Text         = (string)propInfo.ControlProperties[ControlInfoPropertyNames.Footnote].Value;
     Control[] controls = new Control[] { this.header, this.checkBox, this.footnoteLabel };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
 }
Example #12
0
        void ReleaseDesignerOutlets()
        {
            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (ShowAllButton != null)
            {
                ShowAllButton.Dispose();
                ShowAllButton = null;
            }

            if (WidgetList != null)
            {
                WidgetList.Dispose();
                WidgetList = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (WorkspacesTableView != null)
            {
                WorkspacesTableView.Dispose();
                WorkspacesTableView = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (DescriptionLabel != null)
            {
                DescriptionLabel.Dispose();
                DescriptionLabel = null;
            }
        }
Example #14
0
            public ToolConfigRow(AppSettings.ToolsSection toolSettings, PaintDotNet.ToolBarConfigItems toolBarConfigItems)
            {
                Validate.IsNotNull <AppSettings.ToolsSection>(toolSettings, "toolSettings");
                this.toolSettings       = toolSettings;
                this.toolBarConfigItems = toolBarConfigItems;
                this.headerLabel        = new HeadingLabel();
                this.headerLabel.Name   = "headerLabel:" + toolBarConfigItems.ToString();
                string str2 = PdnResources.GetString(this.GetHeaderResourceName());

                this.headerLabel.Text                           = str2;
                this.headerLabel.RightMargin                    = 0;
                this.toolConfigStrip                            = new PaintDotNet.Controls.ToolConfigStrip(toolSettings);
                this.toolConfigStrip.Name                       = "toolConfigStrip:" + toolBarConfigItems.ToString();
                this.toolConfigStrip.AutoSize                   = false;
                this.toolConfigStrip.Dock                       = DockStyle.None;
                this.toolConfigStrip.GripStyle                  = ToolStripGripStyle.Hidden;
                this.toolConfigStrip.LayoutStyle                = ToolStripLayoutStyle.Flow;
                this.toolConfigStrip.ToolBarConfigItems         = this.toolBarConfigItems;
                this.toolConfigStrip.ShowFirstAndLastSeparators = false;
            }
Example #15
0
        void ReleaseDesignerOutlets()
        {
            if (ContentImageView != null)
            {
                ContentImageView.Dispose();
                ContentImageView = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (SubHeadingLabel != null)
            {
                SubHeadingLabel.Dispose();
                SubHeadingLabel = null;
            }
        }
Example #16
0
 public StringTextBoxPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header               = new HeadingLabel();
     this.textBox              = new TextBox();
     this.description          = new PdnLabel();
     this.header.Name          = "header";
     this.header.Text          = base.DisplayName;
     this.header.RightMargin   = 0;
     this.description.Name     = "description";
     this.description.Text     = base.Description;
     this.textBox.Name         = "textBox";
     this.textBox.TextChanged += new EventHandler(this.OnTextBoxTextChanged);
     this.textBox.MaxLength    = base.Property.MaxLength;
     this.baseTextBoxHeight    = this.textBox.Height;
     this.Multiline            = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.Multiline].Value;
     Control[] controls = new Control[] { this.header, this.textBox, this.description };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
 }
        void ReleaseDesignerOutlets()
        {
            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (LoginButton != null)
            {
                LoginButton.Dispose();
                LoginButton = null;
            }

            if (LoginLabel != null)
            {
                LoginLabel.Dispose();
                LoginLabel = null;
            }
        }
Example #18
0
 public Int32IncrementButtonPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header                   = new HeadingLabel();
     this.header.Name              = "header";
     this.header.Text              = base.DisplayName;
     this.header.RightMargin       = 0;
     this.incrementButton          = new PdnPushButton();
     this.incrementButton.Name     = "incrementButton";
     this.incrementButton.AutoSize = true;
     this.incrementButton.Text     = (string)propInfo.ControlProperties[ControlInfoPropertyNames.ButtonText].Value;
     this.incrementButton.Click   += new EventHandler(this.OnIncrementButtonClick);
     this.descriptionText          = new PdnLabel();
     this.descriptionText.Name     = "descriptionText";
     this.descriptionText.AutoSize = false;
     this.descriptionText.Text     = base.Description;
     Control[] controls = new Control[] { this.header, this.incrementButton, this.descriptionText };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
     base.PerformLayout();
 }
 public DoubleVector3RollBallAndSliderPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header                    = new HeadingLabel();
     this.header.Name               = "header";
     this.header.RightMargin        = 0;
     this.header.Text               = base.DisplayName;
     this.rollControl               = new RollControl();
     this.rollControl.Name          = "rollControl";
     this.rollControl.ValueChanged += new EventHandler(this.OnRollControlValueChanged);
     this.rollControl.Size          = new Size(1, 1);
     this.sliders                   = new DoubleVector3SliderPropertyControl(propInfo);
     this.sliders.Name              = "sliders";
     this.sliders.DisplayName       = "";
     this.sliders.Description       = "";
     this.textDescription           = new PdnLabel();
     this.textDescription.Name      = "textDescription";
     this.textDescription.Text      = base.Description;
     Control[] controls = new Control[] { this.header, this.rollControl, this.sliders, this.textDescription };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
 }
Example #20
0
        void ReleaseDesignerOutlets()
        {
            if (AnswerLabel != null)
            {
                AnswerLabel.Dispose();
                AnswerLabel = null;
            }

            if (BButton != null)
            {
                BButton.Dispose();
                BButton = null;
            }

            if (CButton != null)
            {
                CButton.Dispose();
                CButton = null;
            }

            if (DButton != null)
            {
                DButton.Dispose();
                DButton = null;
            }

            if (HeadingLabel != null)
            {
                HeadingLabel.Dispose();
                HeadingLabel = null;
            }

            if (QuestionLabel != null)
            {
                QuestionLabel.Dispose();
                QuestionLabel = null;
            }
        }
 public DoubleVectorPanAndSliderPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     base.SuspendLayout();
     this.header                         = new HeadingLabel();
     this.header.Name                    = "header";
     this.header.RightMargin             = 0;
     this.header.Text                    = base.DisplayName;
     this.panControl                     = new PanControl();
     this.panControl.Name                = "panControl";
     this.panControl.StaticImageUnderlay = (ImageResource)propInfo.ControlProperties[ControlInfoPropertyNames.StaticImageUnderlay].Value;
     this.panControl.PositionChanged    += new EventHandler(this.OnPanControlPositionChanged);
     this.panControl.Size                = new Size(1, 1);
     this.sliders                        = new DoubleVectorSliderPropertyControl(propInfo);
     this.sliders.Name                   = "sliders";
     this.sliders.DisplayName            = "";
     this.sliders.Description            = "";
     this.textDescription                = new PdnLabel();
     this.textDescription.Name           = "textDescription";
     this.textDescription.Text           = base.Description;
     Control[] controls = new Control[] { this.header, this.panControl, this.sliders, this.textDescription };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
 }
Example #22
0
 private void InitializeComponent()
 {
     this.saveConfigPanel  = new Panel();
     this.defaultsButton   = new PdnPushButton();
     this.saveConfigWidget = new SaveConfigWidget();
     this.previewHeader    = new HeadingLabel();
     this.canvasControl    = new ScrollableCanvasControl();
     this.settingsHeader   = new HeadingLabel();
     this.footerSeparator  = new PaintDotNet.Controls.SeparatorLine();
     base.SuspendLayout();
     base.baseOkButton.Anchor                           = AnchorStyles.Right | AnchorStyles.Bottom;
     base.baseOkButton.Name                             = "baseOkButton";
     base.baseOkButton.TabIndex                         = 2;
     base.baseOkButton.Click                           += new EventHandler(this.OnBaseOkButtonClick);
     base.baseCancelButton.Anchor                       = AnchorStyles.Right | AnchorStyles.Bottom;
     base.baseCancelButton.Name                         = "baseCancelButton";
     base.baseCancelButton.TabIndex                     = 3;
     base.baseCancelButton.Click                       += new EventHandler(this.OnBaseCancelButtonClick);
     this.footerSeparator.Name                          = "footerSeparator";
     this.saveConfigPanel.AutoScroll                    = true;
     this.saveConfigPanel.Name                          = "saveConfigPanel";
     this.saveConfigPanel.TabIndex                      = 0;
     this.saveConfigPanel.TabStop                       = false;
     this.defaultsButton.Name                           = "defaultsButton";
     this.defaultsButton.AutoSize                       = true;
     this.defaultsButton.TabIndex                       = 1;
     this.defaultsButton.Click                         += new EventHandler(this.OnDefaultsButtonClick);
     this.saveConfigWidget.Name                         = "saveConfigWidget";
     this.saveConfigWidget.TabIndex                     = 9;
     this.saveConfigWidget.Token                        = null;
     this.previewHeader.Name                            = "previewHeader";
     this.previewHeader.RightMargin                     = 0;
     this.previewHeader.TabIndex                        = 11;
     this.previewHeader.TabStop                         = false;
     this.previewHeader.Text                            = "Header";
     this.canvasControl.Name                            = "documentView";
     this.canvasControl.CanvasControl.MouseDown        += new MouseEventHandler(this.OnCanvasViewMouseDown);
     this.canvasControl.CanvasControl.MouseMove        += new MouseEventHandler(this.OnCanvasViewMouseMove);
     this.canvasControl.CanvasControl.MouseUp          += new MouseEventHandler(this.OnCanvasViewMouseUp);
     this.canvasControl.CanvasView.IsCanvasFrameEnabled = false;
     this.settingsHeader.Name                           = "settingsHeader";
     this.settingsHeader.TabIndex                       = 13;
     this.settingsHeader.TabStop                        = false;
     this.settingsHeader.Text                           = "Header";
     base.AutoScaleDimensions                           = new SizeF(96f, 96f);
     base.AutoScaleMode = AutoScaleMode.Dpi;
     base.Controls.Add(this.defaultsButton);
     base.Controls.Add(this.settingsHeader);
     base.Controls.Add(this.previewHeader);
     base.Controls.Add(this.canvasControl);
     base.Controls.Add(this.footerSeparator);
     base.Controls.Add(this.saveConfigPanel);
     base.FormBorderStyle = FormBorderStyle.Sizable;
     base.MinimizeBox     = false;
     base.MaximizeBox     = true;
     base.Name            = "SaveConfigDialog";
     base.StartPosition   = FormStartPosition.Manual;
     base.Controls.SetChildIndex(this.saveConfigPanel, 0);
     base.Controls.SetChildIndex(this.canvasControl, 0);
     base.Controls.SetChildIndex(base.baseOkButton, 0);
     base.Controls.SetChildIndex(base.baseCancelButton, 0);
     base.Controls.SetChildIndex(this.previewHeader, 0);
     base.Controls.SetChildIndex(this.settingsHeader, 0);
     base.Controls.SetChildIndex(this.defaultsButton, 0);
     base.ResumeLayout(false);
 }
 public Int32ColorWheelPropertyControl(PropertyControlInfo propInfo) : base(propInfo)
 {
     if ((base.Property.MinValue != 0) || (base.Property.MaxValue != 0xffffff))
     {
         object[] objArray1 = new object[] { "The only range allowed for this control is [", 0, ", ", 0xffffff, "]" };
         throw new ArgumentException(string.Concat(objArray1));
     }
     base.SuspendLayout();
     this.header                         = new HeadingLabel();
     this.header.Name                    = "header";
     this.header.RightMargin             = 0;
     this.header.Text                    = base.DisplayName;
     this.colorRectangle                 = new ColorRectangleControl();
     this.colorRectangle.Name            = "colorRectangle";
     this.colorRectangle.TabStop         = false;
     this.colorRectangle.TabIndex        = 0;
     this.hsvColorWheel                  = new ColorWheel();
     this.hsvColorWheel.Name             = "hsvColorWheel";
     this.hsvColorWheel.ColorChanged    += new EventHandler(this.OnHsvColorWheelColorChanged);
     this.hsvColorWheel.TabStop          = false;
     this.hsvColorWheel.TabIndex         = 1;
     this.saturationSlider               = new ColorGradientControl();
     this.saturationSlider.Name          = "saturationSlider";
     this.saturationSlider.Orientation   = Orientation.Vertical;
     this.saturationSlider.ValueChanged += new IndexEventHandler(this.OnSaturationSliderValueChanged);
     this.saturationSlider.TabStop       = false;
     this.saturationSlider.TabIndex      = 2;
     this.valueSlider                    = new ColorGradientControl();
     this.valueSlider.Name               = "valueSlider";
     this.valueSlider.Orientation        = Orientation.Vertical;
     this.valueSlider.ValueChanged      += new IndexEventHandler(this.OnValueSliderValueChanged);
     this.valueSlider.TabStop            = false;
     this.valueSlider.TabIndex           = 3;
     this.redLabel                       = new PdnLabel();
     this.redLabel.Name                  = "redLabel";
     this.redLabel.AutoSize              = true;
     this.redLabel.Text                  = PdnResources.GetString("ColorsForm.RedLabel.Text");
     this.redNud                         = new PdnNumericUpDown();
     this.redNud.Name                    = "redNud";
     this.redNud.Minimum                 = decimal.Zero;
     this.redNud.Maximum                 = 255M;
     this.redNud.TextAlign               = HorizontalAlignment.Right;
     this.redNud.ValueChanged           += new EventHandler(this.OnRedNudValueChanged);
     this.redNud.TabIndex                = 4;
     this.greenLabel                     = new PdnLabel();
     this.greenLabel.Name                = "greenLabel";
     this.greenLabel.AutoSize            = true;
     this.greenLabel.Text                = PdnResources.GetString("ColorsForm.GreenLabel.Text");
     this.greenNud                       = new PdnNumericUpDown();
     this.greenNud.Name                  = "greenNud";
     this.greenNud.Minimum               = decimal.Zero;
     this.greenNud.Maximum               = 255M;
     this.greenNud.TextAlign             = HorizontalAlignment.Right;
     this.greenNud.ValueChanged         += new EventHandler(this.OnGreenNudValueChanged);
     this.greenNud.TabIndex              = 5;
     this.blueLabel                      = new PdnLabel();
     this.blueLabel.Name                 = "blueLabel";
     this.blueLabel.AutoSize             = true;
     this.blueLabel.Text                 = PdnResources.GetString("ColorsForm.BlueLabel.Text");
     this.blueNud                        = new PdnNumericUpDown();
     this.blueNud.Name                   = "blueNud";
     this.blueNud.Minimum                = decimal.Zero;
     this.blueNud.Maximum                = 255M;
     this.blueNud.TextAlign              = HorizontalAlignment.Right;
     this.blueNud.ValueChanged          += new EventHandler(this.OnBlueNudValueChanged);
     this.blueNud.TabIndex               = 6;
     this.resetButton                    = new PdnPushButton();
     this.resetButton.AutoSize           = true;
     this.resetButton.Name               = "resetButton";
     this.resetButton.Click             += new EventHandler(this.OnResetButtonClick);
     this.resetButton.Image              = PdnResources.GetImage("Icons.ResetIcon.png");
     this.resetButton.Width              = 1;
     this.resetButton.Visible            = (bool)propInfo.ControlProperties[ControlInfoPropertyNames.ShowResetButton].Value;
     base.ToolTip.SetToolTip(this.resetButton, PdnResources.GetString("Form.ResetButton.Text").Replace("&", ""));
     this.resetButton.TabIndex = 7;
     this.description          = new PdnLabel();
     this.description.Name     = "description";
     this.description.Text     = base.Description;
     Control[] controls = new Control[] { this.header, this.hsvColorWheel, this.saturationSlider, this.valueSlider, this.colorRectangle, this.redLabel, this.redNud, this.greenLabel, this.greenNud, this.blueLabel, this.blueNud, this.resetButton, this.description };
     base.Controls.AddRange(controls);
     base.ResumeLayout(false);
 }
Example #24
0
 private void InitializeComponent()
 {
     this.documentStrip      = new DocumentStrip();
     this.documentListHeader = new HeadingLabel();
     this.hScrollBar         = new HScrollBar();
     this.saveButton         = new CommandButton();
     this.dontSaveButton     = new CommandButton();
     this.cancelButton       = new CommandButton();
     this.infoLabel          = new PdnLabel();
     base.SuspendLayout();
     this.saveButton.SuspendLayout();
     this.dontSaveButton.SuspendLayout();
     this.cancelButton.SuspendLayout();
     this.documentStrip.BackColor               = SystemColors.ButtonHighlight;
     this.documentStrip.DocumentClicked        += new ValueEventHandler <Tuple <DocumentWorkspace, DocumentClickAction> >(this.OnDocumentListDocumentClicked);
     this.documentStrip.DrawDirtyOverlay        = false;
     this.documentStrip.EnsureSelectedIsVisible = false;
     this.documentStrip.ManagedFocus            = true;
     this.documentStrip.Name = "documentList";
     this.documentStrip.ScrollOffsetChanged += new EventHandler(this.OnDocumentListScrollOffsetChanged);
     this.documentStrip.ShowCloseButtons     = false;
     this.documentStrip.ShowScrollButtons    = false;
     this.documentStrip.TabIndex             = 0;
     this.documentListHeader.Name            = "documentListHeader";
     this.documentListHeader.RightMargin     = 0;
     this.documentListHeader.TabIndex        = 1;
     this.documentListHeader.TabStop         = false;
     this.hScrollBar.Name            = "hScrollBar";
     this.hScrollBar.TabIndex        = 2;
     this.hScrollBar.ValueChanged   += new EventHandler(this.OnHScrollBarValueChanged);
     this.saveButton.ActionImage     = null;
     this.saveButton.AutoSize        = true;
     this.saveButton.Name            = "saveButton3";
     this.saveButton.TabIndex        = 4;
     this.saveButton.Click          += new EventHandler(this.OnSaveButtonClick);
     this.dontSaveButton.ActionImage = null;
     this.dontSaveButton.AutoSize    = true;
     this.dontSaveButton.Name        = "dontSaveButton";
     this.dontSaveButton.TabIndex    = 5;
     this.dontSaveButton.Click      += new EventHandler(this.OnDontSaveButtonClick);
     this.cancelButton.ActionImage   = null;
     this.cancelButton.AutoSize      = true;
     this.cancelButton.Name          = "cancelButton";
     this.cancelButton.TabIndex      = 6;
     this.cancelButton.Click        += new EventHandler(this.OnCancelButtonClick);
     this.infoLabel.Name             = "infoLabel";
     this.infoLabel.TabIndex         = 7;
     base.AutoScaleDimensions        = new SizeF(96f, 96f);
     base.AutoScaleMode = AutoScaleMode.Dpi;
     base.ClientSize    = new Size(450, 100);
     base.Controls.Add(this.infoLabel);
     base.Controls.Add(this.documentListHeader);
     base.Controls.Add(this.cancelButton);
     base.Controls.Add(this.hScrollBar);
     base.Controls.Add(this.dontSaveButton);
     base.Controls.Add(this.documentStrip);
     base.Controls.Add(this.saveButton);
     base.AcceptButton    = this.saveButton;
     base.CancelButton    = this.cancelButton;
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     base.Location        = new Point(0, 0);
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.Name            = "UnsavedChangesDialog";
     base.ShowInTaskbar   = false;
     base.StartPosition   = FormStartPosition.CenterParent;
     base.Controls.SetChildIndex(this.saveButton, 0);
     base.Controls.SetChildIndex(this.documentStrip, 0);
     base.Controls.SetChildIndex(this.dontSaveButton, 0);
     base.Controls.SetChildIndex(this.hScrollBar, 0);
     base.Controls.SetChildIndex(this.cancelButton, 0);
     base.Controls.SetChildIndex(this.documentListHeader, 0);
     base.Controls.SetChildIndex(this.infoLabel, 0);
     this.LoadResources();
     this.saveButton.ResumeLayout(false);
     this.dontSaveButton.ResumeLayout(false);
     this.cancelButton.ResumeLayout(false);
     base.ResumeLayout(false);
 }
 private void InitializeComponent()
 {
     this.separatorLine   = new PaintDotNet.Controls.SeparatorLine();
     this.visibleCheckBox = new PdnCheckBox();
     this.nameBox         = new TextBox();
     this.nameLabel       = new PdnLabel();
     this.cancelButton    = new PdnPushButton();
     this.okButton        = new PdnPushButton();
     this.generalHeader   = new HeadingLabel();
     base.SuspendLayout();
     this.generalHeader.Location            = new Point(6, 8);
     this.generalHeader.Name                = "generalHeader";
     this.generalHeader.Margin              = new Padding(1, 3, 1, 1);
     this.generalHeader.Size                = new Size(0x10d, 0x11);
     this.generalHeader.TabIndex            = 4;
     this.generalHeader.TabStop             = false;
     this.nameLabel.Location                = new Point(6, 0x1b);
     this.nameLabel.Name                    = "nameLabel";
     this.nameLabel.Size                    = new Size(50, 0x10);
     this.nameLabel.TabIndex                = 2;
     this.nameBox.Location                  = new Point(0x40, 0x1b);
     this.nameBox.Name                      = "nameBox";
     this.nameBox.Size                      = new Size(200, 20);
     this.nameBox.TabIndex                  = 2;
     this.nameBox.Text                      = "";
     this.nameBox.Enter                    += new EventHandler(this.OnNameBoxEnter);
     this.visibleCheckBox.Location          = new Point(14, 0x2e);
     this.visibleCheckBox.Name              = "visibleCheckBox";
     this.visibleCheckBox.Size              = new Size(90, 0x10);
     this.visibleCheckBox.TabIndex          = 3;
     this.visibleCheckBox.IsCheckedChanged += new EventHandler(this.OnVisibleCheckBoxIsCheckedChanged);
     this.okButton.Anchor                   = AnchorStyles.Right | AnchorStyles.Bottom;
     this.okButton.Location                 = new Point(0x72, 0x48);
     this.okButton.Name                     = "okButton";
     this.okButton.TabIndex                 = 0;
     this.okButton.Click                   += new EventHandler(this.OnOkButtonClick);
     this.okButton.AutoSize                 = true;
     this.cancelButton.Anchor               = AnchorStyles.Right | AnchorStyles.Bottom;
     this.cancelButton.DialogResult         = DialogResult.Cancel;
     this.cancelButton.Location             = new Point(0xc2, 0x48);
     this.cancelButton.Name                 = "cancelButton";
     this.cancelButton.TabIndex             = 1;
     this.cancelButton.Click               += new EventHandler(this.OnCancelButtonClick);
     this.cancelButton.AutoSize             = true;
     base.AcceptButton                      = this.okButton;
     base.AutoScaleDimensions               = new SizeF(96f, 96f);
     base.AutoScaleMode                     = AutoScaleMode.Dpi;
     base.CancelButton                      = this.cancelButton;
     base.ClientSize = new Size(0x112, 0x60);
     base.ControlBox = true;
     base.Controls.Add(this.generalHeader);
     base.Controls.Add(this.okButton);
     base.Controls.Add(this.cancelButton);
     base.Controls.Add(this.nameBox);
     base.Controls.Add(this.visibleCheckBox);
     base.Controls.Add(this.nameLabel);
     base.Controls.Add(this.separatorLine);
     base.FormBorderStyle = FormBorderStyle.FixedSingle;
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.Name            = "LayerPropertiesDialog";
     base.ShowInTaskbar   = false;
     base.StartPosition   = FormStartPosition.CenterParent;
     base.Controls.SetChildIndex(this.nameLabel, 0);
     base.Controls.SetChildIndex(this.visibleCheckBox, 0);
     base.Controls.SetChildIndex(this.nameBox, 0);
     base.Controls.SetChildIndex(this.cancelButton, 0);
     base.Controls.SetChildIndex(this.okButton, 0);
     base.Controls.SetChildIndex(this.generalHeader, 0);
     base.ResumeLayout(false);
 }
Example #26
0
 private void InitializeComponent()
 {
     this.blendModeLabel  = new PdnLabel();
     this.blendOpComboBox = new PdnDropDownList();
     this.opacityUpDown   = new NumericUpDown();
     this.opacityTrackBar = new TrackBar();
     this.opacityLabel    = new PdnLabel();
     this.blendingHeader  = new HeadingLabel();
     this.opacityUpDown.BeginInit();
     this.opacityTrackBar.BeginInit();
     base.SuspendLayout();
     base.nameLabel.Location                    = new Point(6, 30);
     base.nameLabel.Name                        = "nameLabel";
     base.nameBox.Name                          = "nameBox";
     base.visibleCheckBox.Location              = new Point(8, 0x33);
     base.visibleCheckBox.Name                  = "visibleCheckBox";
     this.blendingHeader.Location               = new Point(6, 0x4b);
     this.blendingHeader.Name                   = "blendingHeader";
     this.blendingHeader.Margin                 = new Padding(1, 3, 1, 1);
     this.blendingHeader.Size                   = new Size(0x10d, 0x11);
     this.blendingHeader.TabIndex               = 8;
     this.blendingHeader.TabStop                = false;
     this.blendModeLabel.Location               = new Point(6, 0x5f);
     this.blendModeLabel.Name                   = "blendModeLabel";
     this.blendModeLabel.AutoSize               = true;
     this.blendModeLabel.Size                   = new Size(50, 0x17);
     this.blendModeLabel.TabIndex               = 4;
     this.blendOpComboBox.DropDownStyle         = ComboBoxStyle.DropDownList;
     this.blendOpComboBox.Location              = new Point(0x40, 0x5b);
     this.blendOpComboBox.Name                  = "blendOpComboBox";
     this.blendOpComboBox.Size                  = new Size(0x79, 0x15);
     this.blendOpComboBox.TabIndex              = 4;
     this.blendOpComboBox.SelectedIndexChanged += new EventHandler(this.OnBlendOpComboBoxSelectedIndexChanged);
     this.blendOpComboBox.MaxDropDownItems      = 100;
     this.opacityLabel.Location                 = new Point(6, 0x7c);
     this.opacityLabel.AutoSize                 = true;
     this.opacityLabel.Name                     = "opacityLabel";
     this.opacityLabel.Size                     = new Size(0x30, 0x10);
     this.opacityLabel.TabIndex                 = 0;
     this.opacityUpDown.Location                = new Point(0x40, 0x7a);
     int[] bits = new int[4];
     bits[0] = 0xff;
     this.opacityUpDown.Maximum         = new decimal(bits);
     this.opacityUpDown.Name            = "opacityUpDown";
     this.opacityUpDown.Size            = new Size(0x38, 20);
     this.opacityUpDown.TabIndex        = 5;
     this.opacityUpDown.TextAlign       = HorizontalAlignment.Right;
     this.opacityUpDown.Enter          += new EventHandler(this.OnOpacityUpDownEnter);
     this.opacityUpDown.KeyUp          += new KeyEventHandler(this.OnOpacityUpDownKeyUp);
     this.opacityUpDown.ValueChanged   += new EventHandler(this.OnOpacityUpDownValueChanged);
     this.opacityUpDown.Leave          += new EventHandler(this.OnOpacityUpDownLeave);
     this.opacityTrackBar.AutoSize      = false;
     this.opacityTrackBar.LargeChange   = 0x20;
     this.opacityTrackBar.Location      = new Point(0x81, 0x7a);
     this.opacityTrackBar.Maximum       = 0xff;
     this.opacityTrackBar.Name          = "opacityTrackBar";
     this.opacityTrackBar.Size          = new Size(0x92, 0x18);
     this.opacityTrackBar.TabIndex      = 6;
     this.opacityTrackBar.TickStyle     = TickStyle.None;
     this.opacityTrackBar.ValueChanged += new EventHandler(this.OnOpacityTrackBarValueChanged);
     base.cancelButton.Location         = new Point(0xc1, 0x9e);
     base.cancelButton.Name             = "cancelButton";
     base.okButton.Location             = new Point(0x70, 0x9e);
     base.okButton.Name       = "okButton";
     base.AutoScaleDimensions = new SizeF(96f, 96f);
     base.AutoScaleMode       = AutoScaleMode.Dpi;
     base.ClientSize          = new Size(0x112, 190);
     base.Controls.Add(this.blendingHeader);
     base.Controls.Add(this.blendOpComboBox);
     base.Controls.Add(this.opacityUpDown);
     base.Controls.Add(this.opacityLabel);
     base.Controls.Add(this.blendModeLabel);
     base.Controls.Add(this.opacityTrackBar);
     base.Location = new Point(0, 0);
     base.Name     = "BitmapLayerPropertiesDialog";
     base.Controls.SetChildIndex(this.opacityTrackBar, 0);
     base.Controls.SetChildIndex(this.blendModeLabel, 0);
     base.Controls.SetChildIndex(this.opacityLabel, 0);
     base.Controls.SetChildIndex(this.opacityUpDown, 0);
     base.Controls.SetChildIndex(base.nameLabel, 0);
     base.Controls.SetChildIndex(base.visibleCheckBox, 0);
     base.Controls.SetChildIndex(base.nameBox, 0);
     base.Controls.SetChildIndex(this.blendingHeader, 0);
     base.Controls.SetChildIndex(this.blendOpComboBox, 0);
     base.Controls.SetChildIndex(base.cancelButton, 0);
     base.Controls.SetChildIndex(base.okButton, 0);
     this.opacityUpDown.EndInit();
     this.opacityTrackBar.EndInit();
     base.ResumeLayout(false);
 }