Exemplo n.º 1
0
        private void MenuItemFileExit_Click(object sender, RoutedEventArgs e)
        {
            SerializationAccountActions actions = new SerializationAccountActions();

            actions.SerializeObject("conturi.xml", (DataContext as AccountsViewModel).UserList);
            Window.GetWindow(this).Close();
        }
Exemplo n.º 2
0
        public AccountsViewModel()
        {
            SerializationAccountActions actions = new SerializationAccountActions();

            UserList = new ObservableCollection <Account>();
            UserList = actions.DeserializeObject("conturi.xml");
        }
Exemplo n.º 3
0
 public Account()
 {
     InitializeComponent();
     acVM = new AccountsViewModel();
     gridUserList.ItemsSource = acVM.UserList;
     this.DataContext         = acVM;
     actions = new SerializationAccountActions();
 }
 public StatisticsViewModel()
 {
     this.Lost     = false;
     this.Accounts = Views.Account.acVM;
     this.Gamer    = Accounts.UserList[Accounts.SelectedAccount];
     Gamer.GamePlay++;
     actions = new SerializationAccountActions();
     actions.SerializeObject("conturi.xml", Accounts.UserList);
 }