Пример #1
0
        private void R_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Ran         r  = sender as Ran;
            MusicSinger ms = r.data as MusicSinger;

            GetToSingerPage(ms);
        }
Пример #2
0
        private void DataItem_Loaded(object sender, RoutedEventArgs e)
        {
            if (!HasLoaded)
            {
                HasLoaded = true;
                ser.Inlines.Clear();
                needb     = needDeleteBtn;
                name.Text = music.MusicName;
                if (music.Album.Name != null)
                {
                    ab.Text = music.Album.Name.Replace("空", "");
                }
                foreach (MusicSinger a in music.Singer)
                {
                    Ran r = new Ran()
                    {
                        Text = a.Name, data = a
                    };
                    r.MouseDown += R_MouseDown;
                    ser.Inlines.Add(r);
                    ser.Inlines.Add(new Run(" / "));
                }
                ser.Inlines.Remove(ser.Inlines.LastInline);
                mss.Text = music.MusicName_Lyric;

                int BtnCount = 0;
                if (music.Mvmid != "")
                {
                    var MV = (Border)XamlReader.Parse(@"<Border xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" Height=""15"" Width=""30"" Background=""#00000000"">
                    <Path Data=""M878.028 244.364H145.842c-54.044 0-97.486 43.83-97.486 97.874v341.075c0 53.915 43.7 97.875 97.486 97.875h732.316c54.044 0 97.486-43.83 97.486-97.875V342.238c-0.129-53.915-43.7-97.874-97.616-97.874z m48.744 438.95c0 27.021-21.85 49.001-48.614 49.001H145.842c-26.893 0-48.614-21.98-48.614-49.002V342.238c0-27.022 21.85-49.002 48.614-49.002h732.316c26.893 0 48.614 21.98 48.614 49.002v341.075zM437.657 376.888h47.191v265.697h-47.191V463.903L358.4 568.372l-79.257-104.469v178.683h-47.062V376.889h47.192l79.256 106.796 79.128-106.796z m220.573 199.37l84.3-198.594h52.622L677.107 643.362h-38.141L520.92 377.665h52.881l84.428 198.594z"" Stretch=""Uniform"" Fill=""{DynamicResource PlayDLPage_Font_Low}""/>
                </Border>");
                    MV.Cursor     = Cursors.Hand;
                    MV.MouseDown += MV_MouseDown;
                    wpl.Children.Add(MV);
                    BtnCount++;
                }
                if (music.Pz == "HQ")
                {
                    wpl.Children.Add((Border)XamlReader.Parse(@"<Border xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" Height=""15"" Width=""30""  Background=""#00000000"">
                    <Path Data=""M865.968777 252.511038 158.029176 252.511038c-52.202942 0-94.237291 42.34748-94.237291 94.585215l0 329.807495c0 52.113915 42.190915 94.584192 94.237291 94.584192l707.940624 0c52.204989 0 94.238314-42.346457 94.238314-94.584192L960.208115 347.096253C960.208115 294.981315 918.015154 252.511038 865.968777 252.511038zM913.028583 676.904771c0 26.13831-21.110807 47.40466-47.058782 47.40466L158.029176 724.30943c-25.947975 0-47.057759-21.266349-47.057759-47.40466L110.971417 347.096253c0-26.139334 21.10876-47.405683 47.057759-47.405683l707.940624 0c25.947975 0 47.058782 21.266349 47.058782 47.405683L913.028583 676.904771z M462.1128 370.876865c-12.522198 0-22.645766 9.813506-22.645766 21.904892l0 92.985788L289.436018 485.767546l0-93.402273c0-12.091386-10.123568-21.904892-22.646789-21.904892-12.523221 0-22.646789 9.813506-22.646789 21.904892l0 229.739405c0 12.090363 10.123568 21.903869 22.646789 21.903869 12.523221 0 22.646789-9.813506 22.646789-21.903869l0-92.526323 150.031015 0 0 92.964298c0 12.091386 10.123568 21.904892 22.645766 21.904892 12.523221 0 22.646789-9.813506 22.646789-21.904892L484.759589 392.781758C484.759589 380.690372 474.637044 370.876865 462.1128 370.876865z M773.813914 615.112426c7.397481-10.317996 11.782348-22.796192 11.782348-36.291554L785.596262 436.779831c0-35.30611-29.616528-63.908542-66.172095-63.908542L588.419484 372.871289c-36.534078 0-66.172095 28.603455-66.172095 63.908542l0 142.040017c0 35.282574 29.639041 63.907519 66.172095 63.907519l131.004683 0c6.144954 0 11.976776-1.069355 17.620309-2.582825l13.56904 13.301957c4.259 4.206812 9.858532 6.310729 15.456017 6.310729 5.64251 0 11.30651-2.146896 15.587-6.4192 8.540514-8.500605 8.497535-22.228257-0.130983-30.66337L773.813914 615.112426zM588.419484 599.35658c-12.272511 0-22.262026-9.215896-22.262026-20.535709L566.157457 436.779831c0-11.320836 9.989515-20.537755 22.262026-20.537755l131.004683 0c12.272511 0 22.262026 9.215896 22.262026 20.537755l0 142.040017c0 1.394766-0.574075 2.617617-0.86367 3.936659l-24.019043-23.555485c-8.563026-8.414647-22.50455-8.370645-31.045063 0.12996-8.53949 8.501628-8.496511 22.229281 0.132006 30.66337l9.54847 9.361205L588.419484 599.355557z"" Stretch=""Fill"" Fill=""#FF19BE75"" Width=""26""/>
                </Border>"));
                    BtnCount++;
                }
                else if (music.Pz == "SQ")
                {
                    wpl.Children.Add((Border)XamlReader.Parse(@"<Border xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" Height=""15"" Width=""30"" Margin=""5,0,0,0"" Background=""#00000000"">
                    <Path Data=""M411.82958 487.166405c-0.548492-0.042979-1.032516-0.303922-1.581008-0.303922l-90.782609 0c-19.49603 0-35.325553-15.678074-35.325553-34.914184s15.829524-34.892695 35.325553-34.892695c0.724501 0 1.339508-0.346901 2.020006-0.411369 0.703011 0.064468 1.315972 0.411369 2.041496 0.411369l135.110187 0c12.140505 0 21.954011-9.714246 21.954011-21.686928 0-11.969613-9.813506-21.684882-21.954011-21.684882L323.526441 373.683794c-0.725524 0-1.339508 0.325411-2.041496 0.38988-0.681522-0.064468-1.295506-0.38988-2.020006-0.38988-43.691081 0-79.235622 35.109636-79.235622 78.263481 0 40.030715 30.692023 72.776514 69.992097 77.352739 1.559519 0.346901 2.986007 0.933255 4.63353 0.933255l93.834108 0c19.47454 0 35.325553 15.656585 35.325553 34.892695 0 19.234063-15.851013 34.892695-35.325553 34.892695L262.185374 600.018659c-12.141528 0-21.956058 9.714246-21.956058 21.684882 0 11.992125 9.813506 21.686928 21.956058 21.686928l150.851707 0c1.557472 0 2.919493-0.564865 4.368494-0.867764 39.563064-4.358261 70.5191-37.190017 70.5191-77.395718C487.924675 523.033287 454.025611 488.834394 411.82958 487.166405z M773.813914 615.112426c7.397481-10.317996 11.782348-22.796192 11.782348-36.291554L785.596262 436.777785c0-35.304064-29.616528-63.907519-66.172095-63.907519L588.419484 372.870266c-36.534078 0-66.172095 28.603455-66.172095 63.907519l0 142.042063c0 35.282574 29.639041 63.907519 66.172095 63.907519l131.004683 0c6.144954 0 11.976776-1.069355 17.620309-2.582825l13.56904 13.301957c4.259 4.206812 9.858532 6.310729 15.456017 6.310729 5.64251 0 11.30651-2.146896 15.587-6.4192 8.540514-8.500605 8.497535-22.228257-0.130983-30.66337L773.813914 615.112426zM741.686193 578.819848c0 1.394766-0.574075 2.617617-0.86367 3.936659l-24.019043-23.555485c-8.563026-8.414647-22.50455-8.370645-31.045063 0.12996-8.53949 8.500605-8.496511 22.228257 0.132006 30.66337l9.54847 9.361205L588.419484 599.355557c-12.272511 0-22.262026-9.215896-22.262026-20.535709L566.157457 436.777785c0-11.319813 9.989515-20.535709 22.262026-20.535709l131.004683 0c12.272511 0 22.262026 9.215896 22.262026 20.535709L741.686193 578.819848z M865.968777 252.511038 158.029176 252.511038c-52.202942 0-94.237291 42.34748-94.237291 94.585215l0 329.806471c0 52.115961 42.190915 94.585215 94.237291 94.585215l707.940624 0c52.204989 0 94.238314-42.34748 94.238314-94.585215L960.208115 347.096253C960.208115 294.981315 918.015154 252.511038 865.968777 252.511038zM913.028583 676.902724c0 26.139334-21.110807 47.405683-47.058782 47.405683L158.029176 724.308407c-25.947975 0-47.057759-21.266349-47.057759-47.405683L110.971417 347.096253c0-26.139334 21.10876-47.405683 47.057759-47.405683l707.940624 0c25.947975 0 47.058782 21.266349 47.058782 47.405683L913.028583 676.902724z"" Stretch=""Fill"" Fill=""#FFFD893C"" Width=""26""/>
                </Border>"));
                    BtnCount++;
                }
                BtnWidth = 32 * BtnCount + 5;
                if (namss.ActualWidth > wpl.ActualWidth - BtnWidth)
                {
                    namss.Width = wpl.ActualWidth - 101;
                }
                LoadUI();
            }
        }