public ResizeDialog() { this.SuspendLayout(); // ResumeLayout() called in OnLoad(). This helps with layout w.r.t. visual inheritance (CanvasSizeDialog and NewFileDialog) // // Required for Windows Form Designer support // InitializeComponent(); this.Text = PdnResources.GetString("ResizeDialog.Text"); this.asteriskLabel.Text = PdnResources.GetString("ResizeDialog.AsteriskLabel.Text"); this.percentSignLabel.Text = PdnResources.GetString("ResizeDialog.PercentSignLabel.Text"); this.pixelSizeHeader.Text = PdnResources.GetString("ResizeDialog.PixelSizeHeader.Text"); this.printSizeHeader.Text = PdnResources.GetString("ResizeDialog.PrintSizeHeader.Text"); this.pixelsLabel1.Text = PdnResources.GetString("ResizeDialog.PixelsLabel1.Text"); this.pixelsLabel2.Text = PdnResources.GetString("ResizeDialog.PixelsLabel2.Text"); this.percentRB.Text = PdnResources.GetString("ResizeDialog.PercentRB.Text"); this.absoluteRB.Text = PdnResources.GetString("ResizeDialog.AbsoluteRB.Text"); this.resamplingLabel.Text = PdnResources.GetString("ResizeDialog.ResamplingLabel.Text"); this.cancelButton.Text = PdnResources.GetString("Form.CancelButton.Text"); this.okButton.Text = PdnResources.GetString("Form.OkButton.Text"); this.newWidthLabel1.Text = PdnResources.GetString("ResizeDialog.NewWidthLabel1.Text"); this.newHeightLabel1.Text = PdnResources.GetString("ResizeDialog.NewHeightLabel1.Text"); this.newWidthLabel2.Text = PdnResources.GetString("ResizeDialog.NewWidthLabel1.Text"); this.newHeightLabel2.Text = PdnResources.GetString("ResizeDialog.NewHeightLabel1.Text"); this.constrainCheckBox.Text = PdnResources.GetString("ResizeDialog.ConstrainCheckBox.Text"); upDownValueChangedDelegate = new EventHandler(upDown_ValueChanged); this.constrainer = new ResizeConstrainer(new Size((int)this.pixelWidthUpDown.Value, (int)this.pixelHeightUpDown.Value)); SetupConstrainerEvents(); resamplingAlgorithmComboBox.Items.Clear(); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.Bicubic)); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.Bilinear)); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.NearestNeighbor)); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.SuperSampling)); resamplingAlgorithmComboBox.SelectedItem = new ResampleMethod(ResamplingAlgorithm.SuperSampling); layers = 1; this.percentUpDown.Enabled = false; this.Icon = Utility.ImageToIcon(PdnResources.GetImageResource("Icons.MenuImageResizeIcon.png").Reference, Utility.TransparentKey); PopulateAsteriskLabels(); OnRadioButtonCheckedChanged(this, EventArgs.Empty); }
public ResizeDialog() { this.SuspendLayout(); // ResumeLayout() called in OnLoad(). This helps with layout w.r.t. visual inheritance (CanvasSizeDialog and NewFileDialog) // // Required for Windows Form Designer support // InitializeComponent(); this.Text = PdnResources.GetString("ResizeDialog.Text"); this.asteriskLabel.Text = PdnResources.GetString("ResizeDialog.AsteriskLabel.Text"); this.percentSignLabel.Text = PdnResources.GetString("ResizeDialog.PercentSignLabel.Text"); this.pixelSizeHeader.Text = PdnResources.GetString("ResizeDialog.PixelSizeHeader.Text"); this.printSizeHeader.Text = PdnResources.GetString("ResizeDialog.PrintSizeHeader.Text"); this.pixelsLabel1.Text = PdnResources.GetString("ResizeDialog.PixelsLabel1.Text"); this.pixelsLabel2.Text = PdnResources.GetString("ResizeDialog.PixelsLabel2.Text"); this.resolutionLabel.Text = PdnResources.GetString("ResizeDialog.ResolutionLabel.Text"); this.percentRB.Text = PdnResources.GetString("ResizeDialog.PercentRB.Text"); this.absoluteRB.Text = PdnResources.GetString("ResizeDialog.AbsoluteRB.Text"); this.resamplingLabel.Text = PdnResources.GetString("ResizeDialog.ResamplingLabel.Text"); this.cancelButton.Text = PdnResources.GetString("Form.CancelButton.Text"); this.okButton.Text = PdnResources.GetString("Form.OkButton.Text"); this.newWidthLabel1.Text = PdnResources.GetString("ResizeDialog.NewWidthLabel1.Text"); this.newHeightLabel1.Text = PdnResources.GetString("ResizeDialog.NewHeightLabel1.Text"); this.newWidthLabel2.Text = PdnResources.GetString("ResizeDialog.NewWidthLabel1.Text"); this.newHeightLabel2.Text = PdnResources.GetString("ResizeDialog.NewHeightLabel1.Text"); this.constrainCheckBox.Text = PdnResources.GetString("ResizeDialog.ConstrainCheckBox.Text"); this.unitsLabel1.Text = unitsComboBox1.UnitsText; upDownValueChangedDelegate = new EventHandler(upDown_ValueChanged); this.constrainer = new ResizeConstrainer(new Size((int)this.pixelWidthUpDown.Value, (int)this.pixelHeightUpDown.Value)); SetupConstrainerEvents(); resamplingAlgorithmComboBox.Items.Clear(); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.Bicubic)); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.Bilinear)); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.NearestNeighbor)); resamplingAlgorithmComboBox.Items.Add(new ResampleMethod(ResamplingAlgorithm.SuperSampling)); resamplingAlgorithmComboBox.SelectedItem = new ResampleMethod(ResamplingAlgorithm.SuperSampling); layers = 1; this.percentUpDown.Enabled = false; this.Icon = Utility.ImageToIcon(PdnResources.GetImage("Icons.MenuImageResizeIcon.png"), Utility.TransparentKey); PopulateAsteriskLabels(); OnRadioButtonCheckedChanged(this, EventArgs.Empty); }