Esempio n. 1
0
 public NewFeedPage()
 {
     this.InitializeComponent();
     this.NavigationCacheMode             = NavigationCacheMode.Enabled;
     homeDataTemplateSelector.resource    = this.Resources;
     homeTabDataTemplateSelector.resource = this.Resources;
     homePages = new ObservableCollection <HomeModel>()
     {
         new HomeModel()
         {
             header      = "推荐",
             mode        = HomeDisplayMode.Home,
             showRefresh = (SettingHelper.RefreshButton)? Visibility.Visible:Visibility.Collapsed
         },
         new HomeModel()
         {
             header      = "热门",
             mode        = HomeDisplayMode.Hot,
             showRefresh = (SettingHelper.RefreshButton)? Visibility.Visible:Visibility.Collapsed
         }
     };
     pivot_home.ItemsSource = homePages;
     toView = new ToView();
     home   = new Home();
 }
 public RecommendPage()
 {
     this.InitializeComponent();
     this.Loaded += RecommendPage_Loaded;
     recommendVM  = new RecommendVM();
     toView       = new ToView();
 }
Esempio n. 3
0
 public HotPage()
 {
     this.InitializeComponent();
     this.Loaded += HotPage_Loaded;
     hotVM        = new HotVM();
     toView       = new ToView();
 }
Esempio n. 4
0
        private async void btn_AddToView_Click(object sender, RoutedEventArgs e)
        {
            ToView toView = new ToView();
            var    data   = await toView.AddToView(_aid);

            if (data.success)
            {
                Utils.ShowMessageToast("已添加");
            }
            else
            {
                Utils.ShowMessageToast(data.message);
            }
        }
Esempio n. 5
0
        private async void menuAdd_Click(object sender, RoutedEventArgs e)
        {
            var    item   = ((FrameworkElement)e.OriginalSource).DataContext as episodesModel;
            ToView toView = new ToView();
            var    data   = await toView.AddToView(item.av_id);

            if (data.success)
            {
                Utils.ShowMessageToast("添加成功");
            }
            else
            {
                Utils.ShowMessageToast("添加失败 ");
            }
        }