WebImageSelectorWindow.xaml 的交互逻辑
        /// <summary>
        /// return null if none select
        /// </summary>
        /// <returns></returns>
        public static string StartSelect(Window parent, IEnumerable <string> urls)
        {
            var dlg = new WebImageSelectorWindow()
            {
                Owner = parent
            };

            dlg.ViewModel.Load(urls);
            return(dlg.ShowDialog() == true ? dlg.ViewModel.SelectedUrl : null);
        }
 public static string StartSelectByImdbId(Window parent, string imdbId)
 {
     var client = JryVideoCore.Current.GetTheTVDBClient();
     if (client == null)
     {
         parent.ShowJryVideoMessage("error", "TheTVDB init failed, try again.");
         return null;
     }
     var dlg = new WebImageSelectorWindow() { Owner = parent };
     dlg.ViewModel.BeginLoadPosterByImdbId(client, imdbId);
     return dlg.ShowDialog() == true ? dlg.ViewModel.SelectedUrl : null;
 }
 public static string StartSelectFanartByImdbId(Window parent, string index, params RemoteId[] ids)
 {
     var client = JryVideoCore.Current.GetTheTVDBClient();
     if (client == null)
     {
         parent.ShowJryVideoMessage("error", "TheTVDB init failed, try again.");
         return null;
     }
     var dlg = new WebImageSelectorWindow() { Owner = parent };
     dlg.WithMode(ViewMode.Mode2);
     dlg.ViewModel.BeginLoadFanartByImdbId(client, index, ids);
     return dlg.ShowDialog() == true ? dlg.ViewModel.SelectedUrl : null;
 }
        public static string StartSelectByImdbId(Window parent, string imdbId)
        {
            var client = JryVideoCore.Current.GetTheTVDBClient();

            if (client == null)
            {
                parent.ShowJryVideoMessage("error", "TheTVDB init failed, try again.");
                return(null);
            }
            var dlg = new WebImageSelectorWindow()
            {
                Owner = parent
            };

            dlg.ViewModel.BeginLoadPosterByImdbId(client, imdbId);
            return(dlg.ShowDialog() == true ? dlg.ViewModel.SelectedUrl : null);
        }
        public static string StartSelectFanartByImdbId(Window parent, string index, params RemoteId[] ids)
        {
            var client = JryVideoCore.Current.GetTheTVDBClient();

            if (client == null)
            {
                parent.ShowJryVideoMessage("error", "TheTVDB init failed, try again.");
                return(null);
            }
            var dlg = new WebImageSelectorWindow()
            {
                Owner = parent
            };

            dlg.WithMode(ViewMode.Mode2);
            dlg.ViewModel.BeginLoadFanartByImdbId(client, index, ids);
            return(dlg.ShowDialog() == true ? dlg.ViewModel.SelectedUrl : null);
        }
 /// <summary>
 /// return null if none select
 /// </summary>
 /// <returns></returns>
 public static string StartSelect(Window parent, IEnumerable<string> urls)
 {
     var dlg = new WebImageSelectorWindow() { Owner = parent };
     dlg.ViewModel.Load(urls);
     return dlg.ShowDialog() == true ? dlg.ViewModel.SelectedUrl : null;
 }