public void SetTrack(MrItem aTrack) { iMutex.WaitOne(); iTrack = aTrack; iIndex = -1; for (int i = 0; i < iPlaylist.Count; ++i) { if (iPlaylist[i] == aTrack) { iIndex = i; iTargetIndex = i; break; } } if (iIndex > -1) { iPixelsPerMs = (iOffset - (iTargetIndex * kItemWidth)) / 200.0f; if (Math.Abs(iPixelsPerMs) > 0) { iTicker.Reset(); iLastTime = 0; iScrollTimer.Start(); } } iMutex.ReleaseMutex(); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { MrItem item = value as MrItem; if (item != null && item.DidlLite.Count > 0) { return(iDidlLiteConverter.Convert(item.DidlLite[0], targetType, parameter, culture)); } return(null); }
public FormStatus(Form aForm, IArtworkCache aArtworkCache, IViewSupport aViewSupport) { iViewSupport = aViewSupport; iMutex = new Mutex(false); iPlaylist = new List <MrItem>(); iTrack = null; iPresets = new List <MrItem>(); iPresetIndex = -1; iStartIndex = 0; iOffset = 0; iIndex = -1; iTicker = new Ticker(); iScrollTimer = new Linn.Timer(); iScrollTimer.AutoReset = false; iScrollTimer.Interval = 20; iScrollTimer.Elapsed += ScrollTimerElapsed; iTimer = new Linn.Timer(); iTimer.AutoReset = false; iTimer.Interval = 500; iTimer.Elapsed += TimerElapsed; iArtworkCache = aArtworkCache; iArtworkCache.EventUpdated += EventUpdated; kImageNoArtwork = Linn.Kinsky.Properties.Resources.NoAlbumArt; kImageReflectedNoArtwork = iArtworkCache.ReflectImage(kImageNoArtwork); iArtwork = kImageNoArtwork; iReflectedArtwork = kImageReflectedNoArtwork; iMicroFont = new Font(iViewSupport.FontSmall.FontFamily, ClientSize.Height / 50.0f, FontStyle.Regular); iSmallFont = new Font(iViewSupport.FontSmall.FontFamily, ClientSize.Height / 30.0f, FontStyle.Regular); iMediumFont = new Font(iViewSupport.FontMedium.FontFamily, ClientSize.Height / 25.0f, FontStyle.Regular); iLargeFont = new Font(iViewSupport.FontLarge.FontFamily, ClientSize.Height / 15.0f, FontStyle.Bold); InitializeComponent(); kItemWidth = ClientSize.Width; }
public EventArgsSetPreset(MrItem aPreset) { Preset = aPreset; }