From 9810bc65bd556193320871ef572c68f031240106 Mon Sep 17 00:00:00 2001 From: Mai Saito Date: Sun, 18 Feb 2018 12:17:24 +0100 Subject: [PATCH] worked on KeyInvisibility --- ClientApp/ModernEncryption.UWP/Package.appxmanifest | 2 +- ClientApp/ModernEncryption/Model/Channel.cs | 2 +- .../Presentation/ViewModel/ChannelPageViewModel.cs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ClientApp/ModernEncryption.UWP/Package.appxmanifest b/ClientApp/ModernEncryption.UWP/Package.appxmanifest index a4decc7..eaee427 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 d9fe687..813920a 100644 --- a/ClientApp/ModernEncryption/Model/Channel.cs +++ b/ClientApp/ModernEncryption/Model/Channel.cs @@ -26,7 +26,7 @@ public class Channel : IEntity [Ignore] public ChannelPage View => _channelView ?? (_channelView = new ChannelPage(this)); - public static bool ChannelKeyVisibility { get; set; } = true; + public bool ChannelKeyVisibility { get; set; } = true; public Channel() { diff --git a/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs b/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs index 42d3586..96cfa72 100644 --- a/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs +++ b/ClientApp/ModernEncryption/Presentation/ViewModel/ChannelPageViewModel.cs @@ -22,7 +22,6 @@ public class ChannelPageViewModel : ValidationBase, INotifyPropertyChanged public ICommand ShowKeyCommand { protected set; get; } public Page KeyPage { get; set; } public bool KeyVisibility { get; set; } - public bool ChannelKeyVisibility { get; } public string Title { @@ -67,14 +66,14 @@ public ChannelPageViewModel(Channel channel) Validate(); }); - KeyVisibility = Channel.ChannelKeyVisibility; + KeyVisibility = channel.ChannelKeyVisibility; ShowKeyCommand = new Command(param => { DependencyManager.AnchorPage.Children[1].Navigation.PopToRootAsync(false); _view.Navigation.PushAsync(new KeyPage()); KeyVisibility = false; - Channel.ChannelKeyVisibility = false; + channel.ChannelKeyVisibility = false; }); }