예제 #1
0
        private void GetTimelines(object sender, RoutedEventArgs e)
        {
            if (MotionPanel.Children.Count > 0)
            {
                if (MotionPanel.Visibility == Visibility.Visible)
                {
                    MotionPanel.Visibility = Visibility.Collapsed;
                }
                else
                {
                    MotionPanel.Visibility = Visibility.Visible;
                }

                return;
            }

            var count = _player.CountMainTimelines();

            for (uint i = 0; i < count; i++)
            {
                //Console.WriteLine(_player.GetDiffTimelineLabelAt(i));
                Button btn = new Button
                {
                    //Name = _player.GetDiffTimelineLabelAt(i),
                    Content    = _player.GetMainTimelineLabelAt(i),
                    Width      = 180,
                    Tag        = "main",
                    Margin     = new Thickness(0, 0, 5, 5),
                    Background = Brushes.Transparent,
                    Foreground = Brushes.DarkOrange,
                };
                btn.Click += PlayTimeline;
                MotionPanel.Children.Add(btn);
            }

            if (count > 0)
            {
                MotionPanel.Children.Add(new Separator());
            }

            count = _player.CountDiffTimelines();
            for (uint i = 0; i < count; i++)
            {
                //Console.WriteLine(_player.GetDiffTimelineLabelAt(i));
                Button btn = new Button
                {
                    //Name = _player.GetDiffTimelineLabelAt(i),
                    Content    = _player.GetDiffTimelineLabelAt(i),
                    Width      = 180,
                    Tag        = "diff",
                    Margin     = new Thickness(0, 0, 5, 5),
                    Background = Brushes.Transparent,
                    Foreground = Brushes.DarkOrange,
                };
                btn.Click += PlayTimeline;
                MotionPanel.Children.Add(btn);
            }
        }
예제 #2
0
        private void btnTime_Click(object sender, EventArgs e)
        {
            Console.WriteLine("Playing");
            var count = _emote.CountPlayingTimelines();

            for (uint i = 0; i < count; i++)
            {
                Console.WriteLine(_emote.GetPlayingTimelineLabelAt(i));
                Button btn = new Button()
                {
                    Name  = _emote.GetPlayingTimelineLabelAt(i),
                    Text  = _emote.GetPlayingTimelineLabelAt(i),
                    Width = 200
                };
                btn.Click += btn_Click;
                _argTracks.TryAdd(_emote.GetPlayingTimelineLabelAt(i), btn);
            }
            Console.WriteLine("Diff");
            count = _emote.CountDiffTimelines();
            for (uint i = 0; i < count; i++)
            {
                Console.WriteLine(_emote.GetDiffTimelineLabelAt(i));
                Button btn = new Button()
                {
                    Name  = _emote.GetDiffTimelineLabelAt(i),
                    Text  = _emote.GetDiffTimelineLabelAt(i),
                    Width = 200
                };
                btn.Click += btn_Click;
                _argTracks.TryAdd(_emote.GetDiffTimelineLabelAt(i), btn);
            }
            Console.WriteLine("Main");
            count = _emote.CountMainTimelines();
            for (uint i = 0; i < count; i++)
            {
                Console.WriteLine(_emote.GetMainTimelineLabelAt(i));
                Button btn = new Button()
                {
                    Name  = _emote.GetMainTimelineLabelAt(i),
                    Text  = _emote.GetMainTimelineLabelAt(i),
                    Width = 200
                };
                btn.Click += btn_Click;
                _argTracks.TryAdd(_emote.GetMainTimelineLabelAt(i), btn);
            }
            UpdatePanel();
        }