diff --git a/ClientApp/ModernEncryption.UWP/Package.appxmanifest b/ClientApp/ModernEncryption.UWP/Package.appxmanifest index 6ef8c45..a4decc7 100644 --- a/ClientApp/ModernEncryption.UWP/Package.appxmanifest +++ b/ClientApp/ModernEncryption.UWP/Package.appxmanifest @@ -1,6 +1,6 @@  - + DontSpyUniversalWindows diff --git a/ClientApp/ModernEncryption/Model/Channel.cs b/ClientApp/ModernEncryption/Model/Channel.cs index 1f5979d..d9fe687 100644 --- a/ClientApp/ModernEncryption/Model/Channel.cs +++ b/ClientApp/ModernEncryption/Model/Channel.cs @@ -26,6 +26,8 @@ public class Channel : IEntity [Ignore] public ChannelPage View => _channelView ?? (_channelView = new ChannelPage(this)); + public static bool ChannelKeyVisibility { get; set; } = true; + public Channel() { } diff --git a/ClientApp/ModernEncryption/Presentation/View/ChannelPage.xaml b/ClientApp/ModernEncryption/Presentation/View/ChannelPage.xaml index b676ee7..31066e5 100644 --- a/ClientApp/ModernEncryption/Presentation/View/ChannelPage.xaml +++ b/ClientApp/ModernEncryption/Presentation/View/ChannelPage.xaml @@ -20,7 +20,7 @@ diff --git a/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs b/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs index 66eb248..42d3586 100644 --- a/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs +++ b/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs @@ -1,4 +1,5 @@ -using System.Collections.ObjectModel; +using System; +using System.Collections.ObjectModel; using System.ComponentModel; using System.Windows.Input; using ModernEncryption.Model; @@ -20,6 +21,8 @@ public class ChannelPageViewModel : ValidationBase, INotifyPropertyChanged public ICommand ValidateMessageCommand { protected set; get; } public ICommand ShowKeyCommand { protected set; get; } public Page KeyPage { get; set; } + public bool KeyVisibility { get; set; } + public bool ChannelKeyVisibility { get; } public string Title { @@ -64,14 +67,17 @@ public ChannelPageViewModel(Channel channel) Validate(); }); + KeyVisibility = Channel.ChannelKeyVisibility; + ShowKeyCommand = new Command(param => { DependencyManager.AnchorPage.Children[1].Navigation.PopToRootAsync(false); _view.Navigation.PushAsync(new KeyPage()); + KeyVisibility = false; + Channel.ChannelKeyVisibility = false; }); } - protected sealed override void AddValidations() { _message.Validations.Add(new IsNullOrEmptyRule());