public void ToolMouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { actor = new Actor(new Point(e.X, e.Y)); actor.finishPoint = new Point(e.X, e.Y); DrawingObject drawingObject = canvas.GetObject(e.X, e.Y); if (drawingObject == null) { canvas.AddDrawingObject(actor); } else { textValue = drawingObject.GetText(); using (TextForm textForm = new TextForm(textValue, drawingObject, canvas)) { if (textForm.ShowDialog() == DialogResult.OK) { textForm.ShowDialog(); } } } } }
// // Plugin specific methods // private void chartBox_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { X = e.X; Y = e.Y; TextForm textForm = new TextForm(); textForm.Closed += new EventHandler(TextForm_Closed); textForm.ShowDialog(); }
private void btnOpenUserMetadataForm_Click(object sender, EventArgs e) { using (var form = new TextForm(UserMetadata, txtUserMetadata.Text)) { if (form.ShowDialog() == DialogResult.OK) { txtUserMetadata.Text = form.Content; } } }
private void btnEdit_Click(object sender, EventArgs e) { TextForm form = new TextForm(); form.TextValue = textBox.Text; if (form.ShowDialog() == DialogResult.OK) { textBox.Text = form.TextValue.Trim(); } }
public static string GetStringFromDialog() { TextForm stringForm = new TextForm(); if (stringForm.ShowDialog() == DialogResult.OK) { return(stringForm.StringValue); } return(""); }
public void ToolMouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { this.useCase = new UseCase(e.X, e.Y); DrawingObject drawingObject = canvas.GetObject(e.X, e.Y); if (drawingObject == null) { canvas.AddDrawingObject(useCase); } else { textValue = drawingObject.GetText(); using (TextForm textForm = new TextForm(textValue, drawingObject, canvas)) { if (textForm.ShowDialog() == DialogResult.OK) { textForm.ShowDialog(); } } } } }
// [2bytes] mov ecx,esi // [7bytes] mov [esi+48],0 // [6bytes] mov eax,[edi+158] <--- B8 X X X X 90 public static bool Process(ref byte[] buffer) { var index = BinScanner.FindPattern(buffer, "8B CE C7 46 48 00 00 00 00 8B 87 58 01 00 00"); if (index == 0) { return(false); } var textFrm = new TextForm(); textFrm.titleLbl.Text = $"FOV Value:{Environment.NewLine}(45 - default)"; textFrm.ShowDialog(); if (!textFrm.Success) { return(false); } var valueStr = textFrm.valueLbl.Text.Trim(); if (!float.TryParse(valueStr, out var value)) { return(false); } var valueBin = BitConverter.GetBytes(value); buffer[index + 9] = 0xB8; buffer[index + 10] = valueBin[0]; buffer[index + 11] = valueBin[1]; buffer[index + 12] = valueBin[2]; buffer[index + 13] = valueBin[3]; buffer[index + 14] = 0x90; return(true); }