public FormBitmapTransformer(IObjectLabel label) : this() { ResourceService.Resources.LoadControlResources(this, ImageTransformations.Utils.ControlUtilites.Resources); this.label = label; trans = label.Object as BitmapTransformer; coord = userControlComboboxListCoordinates.Boxes.ToArray(); colors = userControlComboboxListColors.Boxes.ToArray(); string[, ,] se = trans.ExternalColors; if (se != null) { if (se.Length > 0) { numericUpDownL.Value = trans.Left; numericUpDownT.Value = trans.Top; numericUpDownR.Value = se.GetLength(0) - trans.Left - 1; numericUpDownB.Value = se.GetLength(1) - trans.Top - 1; } } setNumbers(); fill(); select(); performer = BitmapIndicator.Indicators.ObjectIndicator.Create(toolStripStatusLabel, null, panelImage); panelImage.Cursor = Cursors.Cross; this.UpdateFormUI(); }
public FormSourceBitmap(IObjectLabel label) : this() { ResourceService.Resources.LoadControlResources(this, ImageTransformations.Utils.ControlUtilites.Resources); panelBmp.Top = 0; panelBmp.Left = 0; this.label = label; bitmap = label.Object as AbstractBitmap; UpdateFormUI(); performer = BitmapIndicator.Indicators.LabelIndicator.Create( new Label[] { labelX, labelY }, new Label[] { labelR, labelG, labelB }, bitmap.GetBitmap(), panelBmp); if (bitmap is SourceImage) { openFileDialogBmp.Filter = "Image files |*.bmp;*.jpg;*.jpeg;*.gif"; } if (label is ImageProviderLabel) { il = label as ImageProviderLabel; toolStripButtonScale.Visible = true; toolStripButtonScale.Checked = il.IsScaled; } }