public TextTool(ScrapPaintWindow parent) : base(parent) { this.Text = ""; this.TextFont = new Font("Arial", 10f); this.StartPoint = Point.Empty; this.parentCommand = null; this.cmd = null; this.textbox = new TextArea(); this.ClearCommand(); }
public override void Dispose() { base.Dispose(); if (this.textbox != null) { base._parent.Controls.Remove(this.textbox); this.textbox.Dispose(); this.textbox = null; } this.parentCommand = null; }
// Token: 0x06000519 RID: 1305 RVA: 0x00024328 File Offset: 0x00022528 public override void MouseUp(MouseEventArgs e) { if (!base.IsActive) { StartPoint = e.Location; textbox.Clear(); ResetTextBox(); ClearCommand(); base.Start(); parentCommand = new AddTextLayerCommand("文字层", _parent.SelectionLayerIndex()); _parent.AddLayerCommand(parentCommand); textbox.Parent = _parent; _parent.Controls.Add(textbox); if (Editing != null) { Editing(true, textbox); } textbox.Focus(); return; } EditEnd(); }
public override void MouseUp(MouseEventArgs e) { if (!base.IsActive) { this.StartPoint = e.Location; this.textbox.Clear(); this.ResetTextBox(); this.ClearCommand(); base.Start(); this.parentCommand = new AddTextLayerCommand("文字层", base._parent.SelectionLayerIndex()); base._parent.AddLayerCommand(this.parentCommand); this.textbox.Parent = base._parent; base._parent.Controls.Add(this.textbox); if (this.Editing != null) { this.Editing(true, this.textbox); } this.textbox.Focus(); } else { this.EditEnd(); } }