public static void AddLabelToEMGPanel(PanelLabel lab) { foreach (var panel in Globals.panelreg.panellistraw) { if (panel is IPanelwithLabels) //not the best idea { IPanelwithLabels panelwithLabels = panel as IPanelwithLabels; panelwithLabels.PushLabel(lab); break; } } }
public void PushLabel(PanelLabel lab) { dispbuf[dispbuf.maxlen - 1].labels.Add(lab); }