Example #1
0
        public void OpenHyperLink(object sender, RequestNavigateEventArgs e)
        {
            var text = e.Uri.OriginalString;

            if (text.StartsWith("mylist/"))
            {
                text = "http://www.nicovideo.jp/" + text;
            }
            NicoNicoOpener.Open(text);
        }
Example #2
0
 public void Open()
 {
     //not existsの時など
     if (SelectedItem == null || SelectedItem.Url == null)
     {
         SelectedItem = null;
         return;
     }
     NicoNicoOpener.Open(SelectedItem.Url);
     SelectedItem = null;
 }
Example #3
0
        private void Value_Navigating1(object sender, NavigatingCancelEventArgs e)
        {
            Url = e.Uri.OriginalString;

            if (!ForceWebView && NicoNicoOpener.GetType(e.Uri) != NicoNicoUrlType.Other && !(Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)))
            {
                e.Cancel = true;

                NicoNicoOpener.Open(e.Uri);
                return;
            }
        }
Example #4
0
        private void browser_Navigating(object sender, NavigatingCancelEventArgs e)
        {
            if (e.Uri != null)
            {
                var url = e.Uri.OriginalString;

                if (NicoNicoOpener.GetType(url) != NicoNicoUrlType.Other)
                {
                    NicoNicoOpener.Open(url);
                    e.Cancel = true;
                }
            }
        }
Example #5
0
        public void Reflesh()
        {
            DisposeViewModel();

            if (IsPlayList)
            {
                Initialize();
            }
            else
            {
                NicoNicoOpener.Open(VideoUrl);
            }
        }
Example #6
0
        public void Open()
        {
            //not existsの時など
            if (SelectedItem == null || SelectedItem.Entry.VideoUrl == null)
            {
                SelectedItem = null;
                return;
            }

            //URLに応じて開くものを変える
            NicoNicoOpener.Open(SelectedItem.Entry.VideoUrl);

            SelectedItem = null;
        }
Example #7
0
        //投稿者を開く
        public void OpenHyperLink(object sender, RequestNavigateEventArgs e)
        {
            var vm = DataContext as VideoViewModel;

            if (vm != null)
            {
                if (vm.VideoData.ApiData.IsChannelVideo)
                {
                    NicoNicoOpener.Open("http://ch.nicovideo.jp/channel/ch" + e.Uri.OriginalString);
                }
                else
                {
                    NicoNicoOpener.Open("http://www.nicovideo.jp/user/" + e.Uri.OriginalString);
                }
            }
        }
Example #8
0
        public void OpenHyperLink(object sender, RequestNavigateEventArgs e)
        {
            var url = e.Uri.OriginalString;

            if (url.StartsWith("#"))
            {
                if (DataContext is VideoViewModel)
                {
                    VideoViewModel vm   = (VideoViewModel)DataContext;
                    var            time = url.Substring(1);

                    vm.Seek(NicoNicoUtil.ConvertTime((time)));
                }
            }
            else
            {
                NicoNicoOpener.Open(e.Uri.OriginalString);
            }
        }
 //選択したマイリストを開く
 public void Open()
 {
     if (SelectedItem != null)
     {
         if (SelectedItem.Entry.Type == 0)
         {
             NicoNicoOpener.Open("http://www.nicovideo.jp/watch/" + SelectedItem.Entry.Id);
         }
         else if (SelectedItem.Entry.Type == 5)
         {
             System.Diagnostics.Process.Start("http://seiga.nicovideo.jp/watch/mg" + SelectedItem.Entry.Id);
         }
         else if (SelectedItem.Entry.Type == 6)
         {
             System.Diagnostics.Process.Start("http://seiga.nicovideo.jp/watch/bk" + SelectedItem.Entry.Id);
         }
         else if (SelectedItem.Entry.Type == 11)
         {
             //System.Diagnostics.Process.Start("http://ch.nicovideo.jp/" + SelectedItem.Entry);
         }
         SelectedItem = null;
     }
 }
Example #10
0
 public void OpenHyperLink(object sender, RequestNavigateEventArgs e)
 {
     NicoNicoOpener.Open(e.Uri.OriginalString);
 }
Example #11
0
 public void OpenCommunity()
 {
     NicoNicoOpener.Open(CommunityUrl);
 }
Example #12
0
 public void Open()
 {
     NicoNicoOpener.Open("http://www.nicovideo.jp/watch/" + Item.VideoId);
 }
 public void Open()
 {
     NicoNicoOpener.Open(Item.UserPageUrl);
 }
 public void Open()
 {
     NicoNicoOpener.Open(Item.ContentUrl);
 }
 public void Open()
 {
     NicoNicoOpener.Open(Item.Url);
 }
Example #16
0
 public void Open(RankingItem item)
 {
     NicoNicoOpener.Open(item.VideoUrl);
 }