private void mnuFileExport_Click(object sender, EventArgs e)
 {
     using (var saveFile = DefaultFileDialogPresenter.SaveFile())
     {
         _presenter.ExportClick(saveFile);
     }
 }
 private async void downloadButton_Click(object sender, EventArgs e)
 {
     using (var saveFile = DefaultFileDialogPresenter.SaveFile())
     {
         await _presenter.DownloadClick(saveFile).ConfigureAwait(true);
     }
 }
Esempio n. 3
0
 private void SubscribeToFileMenuControlEvents()
 {
     mnuFileNew.Click  += (s, e) => _presenter.FileNewClick();
     mnuFileOpen.Click += (s, e) =>
     {
         using (var openFile = DefaultFileDialogPresenter.OpenFile())
         {
             _presenter.FileOpenClick(openFile);
         }
     };
     mnuFileSave.Click   += (s, e) => _presenter.FileSaveClick();
     mnuFileSaveas.Click += (s, e) =>
     {
         using (var saveFile = DefaultFileDialogPresenter.SaveFile())
         {
             _presenter.FileSaveAsClick(saveFile);
         }
     };
     mnuFileQuit.Click += (s, e) => Close();
 }