aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs14
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Views/MainView.xaml4
2 files changed, 15 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 4a756e7ea..507110942 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
@@ -63,6 +63,14 @@ namespace Tango.PPC.Storage.ViewModels
}
}
+ private bool _displayItems;
+ public bool DisplayItems
+ {
+ get { return _displayItems; }
+ set { _displayItems = value; RaisePropertyChangedAuto(); }
+ }
+
+
public RelayCommand<ExplorerFileItem> FileSelectedCommand { get; set; }
public RelayCommand SaveCommand { get; set; }
@@ -104,6 +112,8 @@ namespace Tango.PPC.Storage.ViewModels
{
View.EditFileName();
}
+
+ DisplayItems = true;
}
else
{
@@ -116,6 +126,8 @@ namespace Tango.PPC.Storage.ViewModels
public override void OnNavigatedFrom()
{
base.OnNavigatedFrom();
+ DisplayItems = false;
+ Request = null;
Request = new StorageNavigationRequest();
}
@@ -158,7 +170,6 @@ namespace Tango.PPC.Storage.ViewModels
{
if (_allow_exit || CurrentPath == StorageProvider.Drive.RootDirectory.FullName)
{
- Request = null;
return Task.FromResult(true);
}
else
@@ -170,6 +181,7 @@ namespace Tango.PPC.Storage.ViewModels
private async void OnFileSelected(ExplorerFileItem fileItem)
{
+ _selectedItem = fileItem;
_allow_exit = true;
await NavigationManager.NavigateBack();
StorageProvider.SubmitFileSelection(fileItem);
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 74307c9ce..25538a525 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
@@ -38,7 +38,7 @@
<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">
+ <touch:TouchButton Command="{Binding SaveCommand}" Margin="20 0 0 0" Height="55" Width="200" Style="{StaticResource TangoHollowButton}" CornerRadius="25" DockPanel.Dock="Right">
<touch:TouchButton.Content>
SAVE
</touch:TouchButton.Content>
@@ -49,7 +49,7 @@
</Border>
</Grid>
- <explorer:ExplorerControl x:Name="explorer" CurrentPath="{Binding CurrentPath,Mode=TwoWay}" FileSelectedCommand="{Binding FileSelectedCommand}" Filter="{Binding Request.Filter}">
+ <explorer:ExplorerControl x:Name="explorer" CurrentPath="{Binding CurrentPath,Mode=TwoWay}" FileSelectedCommand="{Binding FileSelectedCommand}" Filter="{Binding Request.Filter}" Visibility="{Binding DisplayItems,Converter={StaticResource BooleanToVisibilityConverter}}">
<explorer:ExplorerControl.Style>
<Style TargetType="explorer:ExplorerControl" BasedOn="{StaticResource {x:Type explorer:ExplorerControl}}">
<Setter Property="EnableFileSelection" Value="True"></Setter>