示例#1
0
        }                                                         //inotifypropetychanged  on list / binding mmvm lite/prison
        public MainWindow()
        {
            InitializeComponent();

            AppID = new ObservableCollection <int>(DataHandle.LoadIds());
            Items = new ObservableCollection <newsitem>(SteamLoadData.GetNewsByIDs(AppID.ToList()));

            AllItems.ItemsSource = Items = new ObservableCollection <newsitem>(SteamLoadData.GetNewsByIDs(AppID.ToList()));
            AllGames.ItemsSource = AppID;

            NewsWindow.Visibility     = Visibility.Visible;
            GameEditWindow.Visibility = Visibility.Hidden;

            if (Items.Count() == 0)
            {
                IsEmpty.Visibility = Visibility.Visible;
            }
        }
示例#2
0
 private void News_Click(object sender, RoutedEventArgs e)
 {
     NewsWindow.Visibility     = Visibility.Visible;
     GameEditWindow.Visibility = Visibility.Hidden;
     AllItems.ItemsSource      = Items = new ObservableCollection <newsitem>(SteamLoadData.GetNewsByIDs(AppID.ToList()));
 }