public static OsdText CreateAndShow(string text, Color?textColor = null, Color?backColor = null, int fontSize = 36, Screen screen = null, int showTime = -1) { var osd = new OsdText(); osd.Show(text, textColor, backColor, fontSize, screen, showTime); return(osd); }
void SetIsReady() { if (_isReady) { return; } _isReady = true; if (chb_ShowOsdIsReady.Checked) { _activityHandler.GotActivity += _activityHandler_GotActivity; foreach (var screen in Screen.AllScreens) { _osdWindows.Add(OsdText.CreateAndShow($"PlugIr is {(IsPortOpened ? "" : "not ")}ready", IsPortOpened ? Color.LightGreen : Color.LightSalmon, Color.FromArgb(37, 37, 37), 72, screen)); } } }