private void InitActions() { pbdActions.AddDropDownItemAndHandle("全屏", (o, fe) => { pnlHead.Visible = false; pnlLeft.Visible = false; pnlRight.Visible = false; pnlTop.Visible = false; pnlBottom.Visible = false; fullScreenWB = xTabs.SelectedTab.Controls[0] as WebBrowser; fullScreenWB.Parent = this; fullScreenWB.Size = this.Size; fullScreenWB.Url = fullScreenWB.Url; fullScreenWB.BringToFront(); }); pbdActions.AddDropDownItemAndHandle("设置", (o, se) => { frmSettings settings = new frmSettings(); settings.ShowDialog(); }); pbdActions.AddDropDownItemAndHandle(new ToolStripMenuItem { Text = "辅助工具栏", CheckState = assistToolbarState }, (o, te) => { ToolStripMenuItem clickedItem = ((te as ToolStripItemClickedEventArgs).ClickedItem as ToolStripMenuItem); if (clickedItem.CheckState == CheckState.Checked) { clickedItem.CheckState = CheckState.Unchecked; } else { clickedItem.CheckState = CheckState.Checked; } assistToolbarState = clickedItem.CheckState; INIAdapter.WriteValue(Common.INI_SECTION_LOCAL, Common.INT_KEY_ASSIST_TOOLBAR_FLAG, assistToolbarState.ToString(), Common.INI_FILE_PATH); pnlAssistToolbarContainer.Visible = assistToolbarState == CheckState.Checked; }); }
private void llblSettings_Click(object sender, EventArgs e) { frmSettings settings = new frmSettings(); settings.ShowDialog(); }