aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-11 13:11:27 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-11 13:11:27 +0200
commitadb47939226859aa952cb8c2123d331c16c88402 (patch)
tree5db5b89b26ca5823b9416d2c426d4c216522b6b5 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels
parent8d7ace94349c473c20fa5c06431897580e45aa82 (diff)
downloadTango-adb47939226859aa952cb8c2123d331c16c88402.tar.gz
Tango-adb47939226859aa952cb8c2123d331c16c88402.zip
Working on PPC...
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs22
1 files changed, 19 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs
index 3882fb486..688f82fe7 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs
@@ -33,7 +33,23 @@ namespace Tango.PPC.Storage.ViewModels
public StorageNavigationRequest Request
{
get { return _request; }
- set { _request = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _request = value;
+ RaisePropertyChangedAuto();
+
+ if (_request != null)
+ {
+ FileName = _request.DefaultFileName;
+ }
+ }
+ }
+
+ private String _fileName;
+ public String FileName
+ {
+ get { return _fileName; }
+ set { _fileName = value; RaisePropertyChangedAuto(); SaveCommand.RaiseCanExecuteChanged(); }
}
public RelayCommand<ExplorerFileItem> FileSelectedCommand { get; set; }
@@ -43,7 +59,7 @@ namespace Tango.PPC.Storage.ViewModels
public MainViewVM()
{
FileSelectedCommand = new RelayCommand<ExplorerFileItem>(OnFileSelected);
- SaveCommand = new RelayCommand(OnSaveCommand);
+ SaveCommand = new RelayCommand(OnSaveCommand, (x) => !String.IsNullOrWhiteSpace(FileName));
Request = new StorageNavigationRequest();
}
@@ -161,7 +177,7 @@ namespace Tango.PPC.Storage.ViewModels
{
_selectedItem = new ExplorerFileItem()
{
- Path = CurrentPath + "\\" + Request.DefaultFileName,
+ Path = CurrentPath + "\\" + FileName,
};
NavigationManager.NavigateBack();
}