public Dialog(string dialogStatus, DialogProcessor dialogProcessor, string btn = " ") { this.dialogStatus = dialogStatus; this.dialogProcessor = dialogProcessor; this.btn = btn; InitializeComponent(); switch (dialogStatus) { case "rotate": hight_label.Visible = false; hight_textBox.Visible = false; allValue_label.Text = "Degree :"; break; case "resize": hight_label.Visible = true; hight_textBox.Visible = true; allValue_label.Text = "Width :"; break; case "opacity": hight_label.Visible = false; hight_textBox.Visible = false; allValue_label.Text = "Opacity :"; break; case "border width": hight_label.Visible = false; hight_textBox.Visible = false; allValue_label.Text = "Border Width :"; break; } }
public MainForm() { InitializeComponent( ); ShapeBase tempShape = new Empty("temp"); propertyDict = new Dictionary <TextBox, string>( ) { { nameTextbox, nameof(tempShape.Name) }, { scaleYTextBox, nameof(tempShape.ScaleY) }, { scaleXTextBox, nameof(tempShape.ScaleX) }, { LocXTextbox, nameof(tempShape.LocationX) }, { LocYTextbox, nameof(tempShape.LocationY) }, { rotationTextbox, nameof(tempShape.Rotation) }, { fillAlphaTextbox, nameof(tempShape.FillAlpha) }, { borderAlphaTextbox, nameof(tempShape.BorderAlpha) }, { borderThicknessTextbox, nameof(tempShape.BorderThickness) }, }; timer = new System.Timers.Timer(17) { AutoReset = false }; dialogProcessor = new DialogProcessor( ); manipulationTools = new List <ToolStripButton>( ); OnUIUpdate( ); SetManipulationTools( ); }