Example #1
0
        private void CtlClear_Click(object sender, RoutedEventArgs e)
        {
            var track = MainModel.Instance.CurrentTrack;

            this.StopSearch();

            this.ctlSearchResults.Visibility   = Visibility.Visible;
            this.ctlSearchNoResults.Visibility = Visibility.Hidden;

            this.m_searchResults.Clear();
            this.m_currentTrack           = track;
            this.ctlNowPlayingTitle.Text  = MainModel.Instance.CurrentTrack?.Title;
            this.ctlNowPlayingArtist.Text = MainModel.Instance.CurrentTrack?.ArtistAndAlbum;

            if (track == null)
            {
                this.ctlSearch.IsEnabled = false;
                return;
            }

            this.ctlSearchTitle.Text  = track.Title;
            this.ctlSearchArtist.Text = track.Artist;

            this.ctlSearch.IsEnabled = true;
        }
        public LyricArchive(IITTrackWrapper track)
        {
            this.LyricArchiveId = GetID(track);

            this.Artist   = track.Artist;
            this.Title    = track.Title;
            this.Album    = track.Album;
            this.Duration = track.Duration;

            this.Cached = DateTime.Now;
        }
Example #3
0
        public SetTrackLyricWindow(IITTrackWrapper track, LyricLineGroupCollection lyric)
        {
            this.InitializeComponent();

            this.m_track      = track;
            this.m_lyricGroup = lyric;

            this.ctlNowPlayingTitle.Text = track.Title;
            this.ctlNowPlayingAlbum.Text = track.ArtistAndAlbum;

            this.CheckBox_IsCheckedChanged(null, null);

            this.ctlLyricShowTime.Checked    += this.CheckBox_IsCheckedChanged;
            this.ctlLyricShowTime.Unchecked  += this.CheckBox_IsCheckedChanged;
            this.ctlLyricBlankLine.Checked   += this.CheckBox_IsCheckedChanged;
            this.ctlLyricBlankLine.Unchecked += this.CheckBox_IsCheckedChanged;
        }
 public static string GetID(IITTrackWrapper track)
 => $"{track.Artist}|{track.Title}|{track.Album}|{track.Duration}|{track.BitRate}";