private void AddLabel(int icon) { Label lbl = CreateLabel(icon, UISymbolType.FontAwesomeV4); lpCustom.Controls.Add(lbl); SymbolValue symbol = (SymbolValue)lbl.Tag; toolTip.SetToolTip(lbl, symbol.ToString()); }
private void timer_Tick(object sender, EventArgs e) { timer.Stop(); while (!FontAwesomeV4Labels.IsEmpty) { if (FontAwesomeV4Labels.TryDequeue(out Label lbl)) { lpAwesome.Controls.Add(lbl); SymbolValue symbol = (SymbolValue)lbl.Tag; toolTip.SetToolTip(lbl, symbol.ToString()); } } while (!ElegantIconsLabels.IsEmpty) { if (ElegantIconsLabels.TryDequeue(out Label lbl)) { lpElegant.Controls.Add(lbl); SymbolValue symbol = (SymbolValue)lbl.Tag; toolTip.SetToolTip(lbl, symbol.ToString()); } } while (!FontAwesomeV5SolidLabels.IsEmpty) { if (FontAwesomeV5SolidLabels.TryDequeue(out Label lbl)) { lpV5Solid.Controls.Add(lbl); SymbolValue symbol = (SymbolValue)lbl.Tag; toolTip.SetToolTip(lbl, symbol.ToString()); } } while (!FontAwesomeV5RegularLabels.IsEmpty) { if (FontAwesomeV5RegularLabels.TryDequeue(out Label lbl)) { lpV5Regular.Controls.Add(lbl); SymbolValue symbol = (SymbolValue)lbl.Tag; toolTip.SetToolTip(lbl, symbol.ToString()); } } while (!FontAwesomeV5BrandsLabels.IsEmpty) { if (FontAwesomeV5BrandsLabels.TryDequeue(out Label lbl)) { lpV5Brands.Controls.Add(lbl); SymbolValue symbol = (SymbolValue)lbl.Tag; toolTip.SetToolTip(lbl, symbol.ToString()); } } timer.Start(); }