private async void BtnSaveSelected_Click(object sender, RoutedEventArgs e) { var sfd = new SaveFileDialog() { Filter = "JSON File (*.json)|*.json", AddExtension = true, CheckFileExists = false, DefaultExt = ".json", ValidateNames = true, Title = "Classes file", DereferenceLinks = true }; if (sfd.ShowDialog() == false) { return; } await UClass.Save(_classesModels.Values.Where(c => c.IsIncluded).Select(c => c.Source), sfd.FileName); }
private async void BtnSaveData_Click(object sender, RoutedEventArgs e) { var sfd = new SaveFileDialog { Filter = "JSON File (*.json)|*.json", AddExtension = true, CheckFileExists = false, DefaultExt = ".json", ValidateNames = true, Title = "Classes file.", DereferenceLinks = true }; if (sfd.ShowDialog() == false) { return; } string filePath = sfd.FileName; await UClass.Save(_classes, filePath); }