Gui neu angelegt
This commit is contained in:
26
StammGenerator/Services/OpenFileDialogService.cs
Normal file
26
StammGenerator/Services/OpenFileDialogService.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StammGenerator.Services
|
||||
{
|
||||
internal class OpenFileDialogService
|
||||
{
|
||||
public string OpenFileDialog()
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.Filter = "CSV Files(.csv)|*.csv";
|
||||
dialog.FilterIndex = 1;
|
||||
dialog.Multiselect = false;
|
||||
if(dialog.ShowDialog() == true)
|
||||
{
|
||||
return dialog.FileName;
|
||||
}
|
||||
return string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user