Advertisement
Tosker

ContactBook Part 9 - WindowsDialogService

Jul 13th, 2018
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1.     public class WindowDialogService : IDialogService
  2.     {
  3.         public string OpenFile(string filter)
  4.         {
  5.             var dialog = new OpenFileDialog();
  6.  
  7.             if(dialog.ShowDialog() == true)
  8.             {
  9.                 return dialog.FileName;
  10.             }
  11.  
  12.             return null;
  13.         }
  14.  
  15.         public void ShowMessageBox(string message)
  16.         {
  17.             throw new NotImplementedException();
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement