public static SendPanelToScreen ( |
||
Panel | ||
Screen | ||
return | void |
private static void cMenConnectionPanelScreen_Click(object sender, EventArgs e) { Screen screen = null; DockContent panel = null; try { var tagEnumeration = (IEnumerable)((ToolStripMenuItem)sender).Tag; if (tagEnumeration != null) { foreach (var obj in tagEnumeration) { var screen1 = obj as Screen; if (screen1 != null) { screen = screen1; } else if (obj is DockContent) { panel = (DockContent)obj; } } Screens.SendPanelToScreen(panel, screen); } } catch (Exception ex) { MessageCollector.AddExceptionStackTrace("cMenConnectionPanelScreen_Click: Caught Exception: ", ex); } }
private static void cMenConnectionPanelScreen_Click(object sender, EventArgs e) { Screen screen = null; DockContent panel = null; try { IEnumerable tagEnumeration = (IEnumerable)((ToolStripMenuItem)sender).Tag; if (tagEnumeration != null) { foreach (Object obj in tagEnumeration) { if (obj is Screen) { screen = (Screen)obj; } else if (obj is DockContent) { panel = (DockContent)obj; } } Screens.SendPanelToScreen(panel, screen); } } catch (Exception ex) { MessageCollector.AddMessage(MessageClass.ErrorMsg, "Caught Exception: " + Environment.NewLine + ex.Message); } }