public AddOrganizationMenu(SoftMonitoring softMonitoring, ListView selectListView) { this.softMonitoring = softMonitoring; this.selectListView = selectListView; ToolStripDropDownItem tsi1 = (ToolStripDropDownItem)Items.Add("移除"); //添加第一级菜单 tsi1.Click += DelMonitoring; }
public AddOrganizationMenu(SoftMonitoring softMonitoring, ListView listView, ListView selectListView) { this.softMonitoring = softMonitoring; this.listView = listView; this.selectListView = selectListView; ToolStripDropDownItem tsi1 = (ToolStripDropDownItem)Items.Add("添加监控"); //添加第一级菜单 ToolStripDropDownItem tsi2 = (ToolStripDropDownItem)Items.Add("打开程序位置"); //添加第一级菜单 ToolStripDropDownItem tsi3 = (ToolStripDropDownItem)Items.Add("刷新"); //添加第一级菜单 tsi1.Click += addMonitoring; tsi2.Click += OpenSoftLocation; tsi3.Click += RefreshList; }
public SoftMonitoring() { InitializeComponent(); softMonitoring = this; }