예제 #1
0
        private async void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            JObject json = JObject.Parse(await Uuuhh.GetWebAsync("http://59.37.96.220/soso/fcgi-bin/dynamic_content?format=json&outCharset=utf-8", Encoding.UTF8));

            textBox.Text = json["data"]["search_content"].ToString();

            RotateTransform rtf = new RotateTransform();// { CenterX = 0.5,CenterY = 0.5};

            os.RenderTransform       = rtf;
            os.RenderTransformOrigin = new Point(0.5, 0.5);
            DoubleAnimation dbAscending = new DoubleAnimation(0, 360, new Duration(TimeSpan.FromSeconds(5)))
            {
                RepeatBehavior = RepeatBehavior.Forever
            };

            rtf.BeginAnimation(RotateTransform.AngleProperty, dbAscending);

            listBox.Items.Clear();
            ListJson lj = new Lemon_App.ListJson();

            lj = JsonToObject(Settings.Default.MusicList, lj) as ListJson;
            for (int i = 0; i < lj.List.Count; i++)
            {
                listBox.Items.Add(new MusicItemControl()
                {
                    MusicGS = lj.List[i].ItemText[3], MusicName = lj.List[i].ItemText[1], MusicZJ = lj.List[i].ItemText[5], Music = lj.List[i].ItemText
                });
            }
        }
예제 #2
0
        private void Border_MouseDown_2(object sender, MouseButtonEventArgs e)
        {
            listBox.Items.Clear();
            ListJson lj = new Lemon_App.ListJson();

            lj = JsonToObject(Settings.Default.MusicList, lj) as ListJson;
            for (int i = 0; i < lj.List.Count; i++)
            {
                listBox.Items.Add(new MusicItemControl()
                {
                    MusicGS = lj.List[i].ItemText[3], MusicName = lj.List[i].ItemText[1], MusicZJ = lj.List[i].ItemText[5], Music = lj.List[i].ItemText
                });
            }
        }