public void ShowNote(StickyForm window) { if (window.InvokeRequired) { window.Invoke(window.ShowWindow); } else { window.ShowWindow(); } }
public StickyForm RegistNewWindow() { StickyForm window = new StickyForm(); MenuItem mi = new MenuItem(); mi.Click += delegate(object sender, EventArgs e) { if (window.InvokeRequired) { window.Invoke(window.ShowWindow); } else { window.ShowWindow(); } }; IconMenuItem.MenuItems.Add(mi); window.BelongModule = this; window.NotifierMenuItem = mi; Windows.Add(window); IconMenuItem.Text = IconMenuItemText + " - " + Windows.Count; return(window); }
public StickyForm RegistNewWindow() { StickyForm window = new StickyForm(); MenuItem mi = new MenuItem(); mi.Click += delegate(object sender, EventArgs e) { if (window.InvokeRequired) { window.Invoke(window.ShowWindow); } else { window.ShowWindow(); } }; IconMenuItem.MenuItems.Add(mi); window.BelongModule = this; window.NotifierMenuItem = mi; Windows.Add(window); IconMenuItem.Text = IconMenuItemText + " - " + Windows.Count; return window; }