Skip to content

Commit

Permalink
cleanup sample
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm committed Nov 25, 2024
1 parent 8d8bacb commit 4ab1583
Showing 1 changed file with 7 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,10 @@ private async Task OpenFiles(string title, bool allowMultiple)
SuggestedStartLocation = new SystemStorageFolder(new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))),
FileTypeFilter = new List<FilePickerFileType>()
{
new FilePickerFileType("All files")
{
Patterns = new List<string>() { "*" }
},
new FilePickerFileType("Text")
{
Patterns = new List<string>() { "*.txt" }
},
new FilePickerFileType("Comma Delimited Files")
{
Patterns = new List<string>() { "*.csv" }
},
new FilePickerFileType("PDF")
{
Patterns = new List<string>() { "*.pdf" }
}
new FilePickerFileType("All files") { Patterns = new[] { "*" } },
new FilePickerFileType("Text") { Patterns = new[] { "*.txt" } },
new FilePickerFileType("Comma Delimited Files") { Patterns = new[] { "*.csv" } },
new FilePickerFileType("PDF") { Patterns = new[] { "*.pdf" } }
},
});

Expand Down Expand Up @@ -128,14 +116,9 @@ private async void OnSaveFile(object sender, Avalonia.Interactivity.RoutedEventA
SuggestedFileName = "NewFile.txt",
FileTypeChoices = new List<FilePickerFileType>()
{
new FilePickerFileType("Text")
{
Patterns = new List<string>() { "*.txt" }
},
new FilePickerFileType("Comma delimited values")
{
Patterns = new List<string>() { "*.csv" }
},
new FilePickerFileType("Text") { Patterns = new[] { "*.txt" } },
new FilePickerFileType("Comma Delimited Files") { Patterns = new[] { "*.csv" } },
new FilePickerFileType("PDF") { Patterns = new[] { "*.pdf" } }
},
});

Expand Down

0 comments on commit 4ab1583

Please sign in to comment.