//手动测试 private void button1_Click(object sender, EventArgs e) { BrushDialog dlg = new BrushDialog(brushData); if (dlg.ShowDialog() == DialogResult.OK) { brushData = dlg.BrushData; } panel1.Invalidate(); }
private void ShowDialogToSetBrushParameter() { if (Host.Global.SlectedTool != null) { if (Host.Global.SlectedTool.Compare((new MyTools.BrushTool()).ToString())) { BrushDialog dialog = new BrushDialog(); dialog.ShowDialog(); Host.Global.SlectedTool.CustomBrush = dialog.CustomBrush; Host.Global.SlectedTool.CustomBrushHeight = dialog.BrushHeight; Host.Global.SlectedTool.CustomBrushWidth = dialog.BrushWidth; } } }