void volumeProgress_HoveredPositionChanged(double val) { int hoverVol = (int)(val / 100); string tip = Translator.Translate("TXT_VOLSCALE", hoverVol); _tip.SetSimpleToolTip(volumeProgress, tip); }
void OnSearchTextChanged(object sender, EventArgs e) { bool validText = false; MediaBrowserPage selectedPage = GetSelectedPage(); if (selectedPage != null) { _tt.SetSimpleToolTip(cmbSearch, selectedPage.GetSearchBoxTip()); validText = selectedPage.PreValidateSearch(cmbSearch.Text); } btnSearch.Enabled = validText; cmbSearch.BackColor = validText ? ThemeManager.WndValidColor : ThemeManager.ColorValidationFailed; }
void timeProgress_HoveredPositionChanged(double val) { double hoverSeconds = _total * val / timeProgress.Maximum; TimeSpan hoverTime = TimeSpan.FromSeconds((int)hoverSeconds); int range = (int)(MediaRenderer.DefaultInstance.MediaLength / 40); Bookmark bmk = MediaRenderer.DefaultInstance.RenderedMediaInfo.GetNearestBookmarkInRange((int)hoverSeconds, range); string tip = string.Empty; if (bmk != null) { tip = Translator.Translate("TXT_TIMESCALE_BOOKMARK", bmk.PlaybackTime, bmk.Title); } else { tip = Translator.Translate("TXT_TIMESCALE", hoverTime); } _tip.SetSimpleToolTip(timeProgress, tip); }