Ejemplo n.º 1
0
        public LiveWatchViewModel(LiveViewModel vm, NicoNicoLive instance, NicoNicoLiveContent content)
        {
            Owner        = vm;
            LiveInstance = instance;
            Content      = content;

            DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => {
                LiveFlash = new LiveFlash()
                {
                    DataContext = this
                };

                if (Content.GetPlayerStatus.Archive)
                {
                    Controller = new TimeShiftController()
                    {
                        DataContext = this
                    };
                }
                else
                {
                    Controller = new LiveController()
                    {
                        DataContext = this
                    };
                }
            }));

            Task.Run(() => Initialize());
        }
Ejemplo n.º 2
0
        public LiveGateViewModel(LiveViewModel vm, NicoNicoLive instance, NicoNicoLiveContent content)
        {
            Owner        = vm;
            LiveInstance = instance;
            Content      = content;

            Task.Run(() => Initialize());
        }
Ejemplo n.º 3
0
        public void Initialize()
        {
            Status   = "読込中";
            IsActive = true;

            var LiveInstance = new NicoNicoLive(LiveUrl);

            Content = LiveInstance.GetPage();
            Name    = Content.Title;

            if (Content.Type == LivePageType.Gate || Content.Type == LivePageType.TimeShiftGate)
            {
                ContentViewModel = new LiveGateViewModel(this, LiveInstance, Content);
            }
            else
            {
                ContentViewModel = new LiveWatchViewModel(this, LiveInstance, Content);
            }

            IsActive = false;
            Status   = "";
        }