Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button button = (Button)sender;

            AppID.Remove((int)button.Tag);
            DataHandle.SaveIds(AppID.ToList());
        }
Ejemplo n.º 2
0
        private void SendButton_Click(object sender, RoutedEventArgs e)
        {
            var isNumeric = int.TryParse(GameIdInput.Text, out int n);

            if (isNumeric)
            {
                AppID.Add(n);
            }
            GameIdInput.Clear();
            DataHandle.SaveIds(AppID.ToList());
        }
Ejemplo n.º 3
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;
            }
        }