//工具条前五个按钮绑定的公共事件 private void selectToolButton_Click(object sender, EventArgs e) { ToolButton nowButton = sender as ToolButton; plColorBox.Visible = nowButton.IsSelected; tBtn_TextFont.Visible = fontBox.Visible = nowButton.Equals(btnText); if (plColorBox.Visible) { imageProcessBox.CanReset = false; } else { imageProcessBox.CanReset = historyLayer.Count == 0; } this.SetToolBarLocation(); }