public LineRemoveDialog(LineRemoveCommand lineRemoveCommand, int XResolution, int YResolution) { InitializeComponent(); _LineRemoveCommand = lineRemoveCommand; this.XResolution = XResolution; this.YResolution = YResolution; InitializeUI(); }
public void LineRemoveCommand(LineRemoveCommandType type, RasterImage image) { LineRemoveCommand command = new LineRemoveCommand { Type = type, Flags = LineRemoveCommandFlags.RemoveEntire, MaximumLineWidth = 6, MinimumLineLength = 30, MaximumWallPercent = 10, Wall = 10 }; command.Run(image); }
private void LineRemoveDialog_Load(object sender, System.EventArgs e) { if (_firstTimer) { _firstTimer = false; LineRemoveCommand command = new LineRemoveCommand(); _initialFlags = command.Flags; _initialRemove = command.Type; _initialGapLength = command.GapLength; _initialLineVariance = command.Variance; _initialMaxLineWidth = command.MaximumLineWidth; _initialMaxWallPercent = command.MaximumWallPercent; _initialMinLineLength = command.MinimumLineLength; _initialWall = command.Wall; } Flags = _initialFlags; Remove = _initialRemove; GapLength = _initialGapLength; LineVariance = _initialLineVariance; MaxLineWidth = _initialMaxLineWidth; MaxWallPercent = _initialMaxWallPercent; MinLineLength = _initialMinLineLength; Wall = _initialWall; _cbImageUnchanged.Checked = (Flags & LineRemoveCommandFlags.ImageUnchanged) == LineRemoveCommandFlags.ImageUnchanged; _cbRemoveEntire.Checked = (Flags & LineRemoveCommandFlags.RemoveEntire) == LineRemoveCommandFlags.RemoveEntire; _cbUseVariance.Checked = (Flags & LineRemoveCommandFlags.UseVariance) == LineRemoveCommandFlags.UseVariance; _cbUseGap.Checked = (Flags & LineRemoveCommandFlags.UseGap) == LineRemoveCommandFlags.UseGap; _cbUseDpi.Checked = (Flags & LineRemoveCommandFlags.UseDpi) == LineRemoveCommandFlags.UseDpi; _rbHorizontal.Checked = Remove == LineRemoveCommandType.Horizontal; _rbVertical.Checked = Remove == LineRemoveCommandType.Vertical; _numGapLength.Value = GapLength; _numLineVariance.Value = LineVariance; _numMaxLineWidth.Value = MaxLineWidth; _numMaxWallPercent.Value = MaxWallPercent; _numMinLineLength.Value = MinLineLength; _numWall.Value = Wall; UpdateControls(); }
public LineRemoveDialog() { InitializeComponent(); _LineRemoveCommand = new LineRemoveCommand(); InitializeUI(); }