|
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using System.Windows;
|
|
|
|
|
|
namespace SASDesktop.ViewModels.Drivers
|
|
|
{
|
|
@@ -29,7 +30,33 @@ namespace SASDesktop.ViewModels.Drivers
|
|
|
|
|
|
public Create()
|
|
|
{
|
|
|
+ CancelCmd = new DelegateCommand(CancelExecuted);
|
|
|
+ }
|
|
|
|
|
|
+ private void CancelExecuted()
|
|
|
+ {
|
|
|
+ var response = MessageBox.Show(
|
|
|
+ "Действительно отменить создание?",
|
|
|
+ "Подтвердите действие",
|
|
|
+ MessageBoxButton.YesNo,
|
|
|
+ MessageBoxImage.Question
|
|
|
+ );
|
|
|
+ if ( response == MessageBoxResult.Yes )
|
|
|
+ {
|
|
|
+ Navigation.ToPortal();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ChoosePhoto()
|
|
|
+ {
|
|
|
+ // 1. Открыть диалог выбора файла
|
|
|
+ var ofd = new Microsoft.Win32.SaveFileDialog();
|
|
|
+ ofd.Filter = "CSV файлы (*.csv)|*.csv|Все файлы (*.*)|*.*";
|
|
|
+ if (ofd.ShowDialog() == false)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ string fileName = ofd.FileName;
|
|
|
}
|
|
|
}
|
|
|
}
|