private void MainForm_SysBottomClick(object sender, SysButtonEventArgs e) { if (e.SysButton.Name == "SysMenu") { sysMenu.Show(MousePosition); } }
private void FrmQQChat_SysBottomClick(object sender, SysButtonEventArgs e) { if (e.SysButton.Name == "SysSet") { Point l = PointToScreen(e.SysButton.Location); l.Y += e.SysButton.Size.Height + 1; SysMenu.Show(l); } }
private void MainForm_SysBottomClick(object sender, SysButtonEventArgs e) { Point loc = PointToScreen(e.SysButton.Location);//获得弹出坐标 loc.Y += e.SysButton.Size.Height + 1; if (e.SysButton.Name == "Skin")//皮肤菜单 { SkinMenu.Show(loc); } else if (e.SysButton.Name == "Settings")//设置菜单 { SettingsMenu.Show(loc); } }
private void LoginForm_SysBottomClick(object sender, SysButtonEventArgs e) { if (e.SysButton.Name == "Help") { string now = Environment.CurrentDirectory; if (System.IO.File.Exists(now + "/EasyLife V0.1.0.chm") == false) { MessageBoxEx.Show("帮助文档不存在!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { System.Diagnostics.Process.Start(now + "/EasyLife V0.1.0.chm"); } } }
//如果点击的是工具菜单按钮 private void FrmMain_SysBottomClick(object sender, SysButtonEventArgs e) { Point l = PointToScreen(e.SysButton.Location); l.Y += e.SysButton.Size.Height + 1; switch (e.SysButton.Name) { case "SysTool": ToolMenu.Show(l); break; case "SysMsg": FrmFeedBack frmFeedBack = new FrmFeedBack(); frmFeedBack.ShowDialog(); break; default: break; } }
protected virtual void OnSysBottomClick(object sender, SysButtonEventArgs e) { if (this.SysBottomClick != null) SysBottomClick(this, e); }
public void SysbottomAv(object sender, SysButtonEventArgs e) { //引发事件 OnSysBottomClick(sender, e); }
private void Frm_Main_SysBottomClick(object sender, SysButtonEventArgs e) { contextMenuStrip4.Show(e.SysButton.Location.X, e.SysButton.Location.Y + 30); }
private void MainForm_SysBottomClick(object sender, SysButtonEventArgs e) { this.contextMenuStrip_SysBtn1.Show(e.SysButton.OwnerForm, e.SysButton.Location.X, e.SysButton.Location.Y + 20); }