Skip to content

Commit 7c75193

Browse files
committed
Change file type of open and save as dialog to be json
1 parent 6aaca5e commit 7c75193

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

MainWindow.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ private void SaveData_CanExecute(object sender, CanExecuteRoutedEventArgs e)
116116
private void OpenData_Click(object sender, RoutedEventArgs e)
117117
{
118118
var dialog = new System.Windows.Forms.OpenFileDialog();
119+
dialog.Filter = "JSON Files (*.json)|*.json";
119120
System.Windows.Forms.DialogResult result = dialog.ShowDialog();
120121
if (result == System.Windows.Forms.DialogResult.OK)
121122
{
@@ -149,6 +150,7 @@ private void NewData_CanExecute(object sender, CanExecuteRoutedEventArgs e)
149150
private void SaveAsData_Click(object sender, RoutedEventArgs e)
150151
{
151152
var dialog = new System.Windows.Forms.SaveFileDialog();
153+
dialog.Filter = "JSON Files (*.json)|*.json";
152154
System.Windows.Forms.DialogResult result = dialog.ShowDialog();
153155
if (result == System.Windows.Forms.DialogResult.OK)
154156
{

0 commit comments

Comments
 (0)