aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-26 13:12:10 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-26 13:12:10 +0200
commitc338e69e9b60ddb71102a6b11058912dd06d5018 (patch)
tree16d1445dd6028a4419eb1769affd757a5c1a05fc /Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage
parent03180d26af65c24822cf5ffd44a347db7394d3b2 (diff)
downloadTango-c338e69e9b60ddb71102a6b11058912dd06d5018.tar.gz
Tango-c338e69e9b60ddb71102a6b11058912dd06d5018.zip
Import job & update completed with dialogs!
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Models/StorageNavigationRequest.cs5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Tango.PPC.Storage.csproj1
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewContracts/IMainView.cs1
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml.cs7
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/app.config55
7 files changed, 80 insertions, 5 deletions
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.
/// </summary>
public String DefaultFileName { get; set; }
+
+ /// <summary>
+ /// Gets or sets the title.
+ /// </summary>
+ 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 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
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 @@
<Grid DockPanel.Dock="Top" Visibility="{Binding Request.Intent,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter=SaveFile,TargetNullValue=Visibility.Collapsed,FallbackValue=Visibility.Collapsed}">
<Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" Padding="20">
- <DockPanel>
- <touch:TouchButton Command="{Binding SaveCommand}" Margin="20 0 0 0" Height="50" Width="200" Style="{StaticResource TangoHollowButton}" CornerRadius="0" DockPanel.Dock="Right">SAVE</touch:TouchButton>
- <touch:TouchTextBox VerticalAlignment="Bottom" Text="{Binding Request.DefaultFileName}" />
- </DockPanel>
+ <StackPanel>
+ <TextBlock Text="{Binding Request.Title}" FontSize="{StaticResource TangoHeaderFontSize}"></TextBlock>
+ <DockPanel Margin="0 10 0 0">
+ <touch:TouchButton Command="{Binding SaveCommand}" Margin="20 0 0 0" Height="50" Width="200" Style="{StaticResource TangoHollowButton}" CornerRadius="0" DockPanel.Dock="Right">SAVE</touch:TouchButton>
+ <touch:TouchTextBox x:Name="txtFileName" FocusSelectionMode="SelectAll" VerticalAlignment="Bottom" Text="{Binding Request.DefaultFileName}" />
+ </DockPanel>
+ </StackPanel>
</Border>
</Grid>
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<IMainView>(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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file