Esempio n. 1
0
 private void Login()
 {
     if (Username.Text == "home" && Password.Password == "1234")
     {
         SelectionWindow newWindow = new SelectionWindow();
         newWindow.Show();
         this.Close();
     }
     else
     {
         invalidCredentials.Visibility = Visibility.Visible;
     }
 }
        private void SaveData()
        {
            var jsonSerializerSettings = new JsonSerializerSettings()
            {
                TypeNameHandling = TypeNameHandling.All
            };
            string jsonData = JsonConvert.SerializeObject(this.students, jsonSerializerSettings);

            System.IO.File.WriteAllText(@"../../StudentData.json", jsonData);

            SelectionWindow selectionWindow = new SelectionWindow();

            selectionWindow.Show();
            this.Close();
        }