From c338e69e9b60ddb71102a6b11058912dd06d5018 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 26 Nov 2018 13:12:10 +0200 Subject: Import job & update completed with dialogs! --- .../Models/StorageNavigationRequest.cs | 5 ++ .../Tango.PPC.Storage/Tango.PPC.Storage.csproj | 1 + .../Tango.PPC.Storage/ViewContracts/IMainView.cs | 1 + .../Tango.PPC.Storage/ViewModels/MainViewVM.cs | 5 ++ .../Modules/Tango.PPC.Storage/Views/MainView.xaml | 11 +++-- .../Tango.PPC.Storage/Views/MainView.xaml.cs | 7 ++- .../PPC/Modules/Tango.PPC.Storage/app.config | 55 ++++++++++++++++++++++ 7 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/app.config (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationRequest.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationRequest.cs index 32a546f4f..ef991a7f2 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationRequest.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationRequest.cs @@ -22,5 +22,10 @@ namespace Tango.PPC.Storage.Models /// Gets or sets the default file name when saving a file. /// public String DefaultFileName { get; set; } + + /// + /// Gets or sets the title. + /// + public String Title { get; set; } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj index 83f23e6b9..0a2f65711 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj @@ -80,6 +80,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewContracts/IMainView.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewContracts/IMainView.cs index 8c08f5a28..1dea82c4f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewContracts/IMainView.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewContracts/IMainView.cs @@ -11,5 +11,6 @@ namespace Tango.PPC.Storage.ViewContracts public interface IMainView : IPPCView { void NavigateBack(); + void EditFileName(); } } 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 05316d1f6..3882fb486 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 @@ -72,6 +72,11 @@ namespace Tango.PPC.Storage.ViewModels { CurrentPath = null; CurrentPath = StorageProvider.Drive.RootDirectory.FullName; + + if (Request.Intent == StorageNavigationIntent.SaveFile) + { + View.EditFileName(); + } } else { diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml index d7817fe6f..840149c98 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml @@ -17,10 +17,13 @@ - - SAVE - - + + + + SAVE + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml.cs index f77eaa401..96090e870 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml.cs @@ -14,6 +14,7 @@ using System.Windows.Navigation; using System.Windows.Shapes; using Tango.Core.DI; using Tango.PPC.Storage.ViewContracts; +using static Tango.SharedUI.Controls.NavigationControl; namespace Tango.PPC.Storage.Views { @@ -25,7 +26,6 @@ namespace Tango.PPC.Storage.Views public MainView() { InitializeComponent(); - TangoIOC.Default.Register(this); } @@ -33,5 +33,10 @@ namespace Tango.PPC.Storage.Views { explorer.NavigateBack(); } + + public void EditFileName() + { + txtFileName.Focus(); + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/app.config new file mode 100644 index 000000000..7b19296d1 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/app.config @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3.1