コード例 #1
0
        /// <summary> Создание плэйта альбома. </summary>
        public override ListPlate CreateListPlate()
        {
            if (lp == null)
            {
                lp             = new ListPlate();
                lp.DataContext = this;

                lp.onClick       = () => App.MainWin.OpenSidePanel(this);
                lp.onDoubleClick = () => App.MainWin.OpenAlbumTab(this);
                lp.onWheelClick  = () => App.MainWin.OpenAlbumTab(this, false);
            }

            TopRightText = $"({EntryList.Count} ep.)";

            UpdateAtrText();
            if (string.IsNullOrWhiteSpace(AtrText))
            {
                lp.lblAtr.Visibility = Visibility.Collapsed;
            }
            else
            {
                lp.lblAtr.Visibility = Visibility.Visible;
            }

            UpdateIconBrokenState();
            UpdateVideoResIcons();
            return(lp);
        }
コード例 #2
0
 /// <summary> Создание списочного плэйта эпизода. </summary>
 public virtual ListPlate CreateListPlate()
 {
     if (lp == null)
     {
         lp = new ListPlate();
     }
     return(lp);
 }
コード例 #3
0
        /// <summary> Создание плэйта эпизода. </summary>
        public override ListPlate CreateListPlate()
        {
            if (lp == null)
            {
                lp = new ListPlate();
            }

            lp.DataContext   = this;
            lp.onDoubleClick = () => System.Diagnostics.Process.Start(EntAbsFile.FullName);
            lp.onClick       = () => App.MainWin.OpenSidePanel(this);

            TimeSpan ts = new TimeSpan(0, 0, duration);

            int hours   = (int)ts.TotalHours;
            int minutes = ts.Minutes;

            if (hours == 0 & minutes == 0)
            {
                TopRightText = $"{width}x{height}	({ts.Seconds} sec)";
            }
            else
            {
                TopRightText = $"{width}x{height}	({hours}:{minutes})";
            }

            UpdateAtrText();
            if (string.IsNullOrWhiteSpace(AtrText))
            {
                lp.lblAtr.Visibility = Visibility.Collapsed;
            }
            else
            {
                lp.lblAtr.Visibility = Visibility.Visible;
            }

            UpdateIconBrokenState();
            UpdateVideoResIcons();

            return(lp);
        }