Kaynağa Gözat

轻会员所有窗口添加关闭键

lvle 2 yıl önce
ebeveyn
işleme
66d271c5ba

+ 17 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/CodeRegionViewModel.cs

@@ -211,6 +211,8 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         public DelegateCommand CodetooCommand { get; set; }
         public DelegateCommand Code6ChangedCommand { get; set; }
         public DelegateCommand RegisterNextCommand { get; set; }
+        public DelegateCommand CloseDialogCommand { get; set; }
+
 
         public CodeRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
@@ -222,6 +224,8 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             CodetooCommand = new DelegateCommand(Codetoo);
             Code6ChangedCommand = new DelegateCommand(Code6Changed);
             RegisterNextCommand = new DelegateCommand(RegisterNext);
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+
             if (LoginDialogViewModel != null && LoginDialogViewModel.IsReset == true)
             {
                 CodeType = "user_reset_password";
@@ -243,6 +247,19 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             }
         }
 
+        private void CloseDialog()
+        {
+            if (CodeType == "user_register")
+            {
+                RegisterDialogViewModel.Close();
+            }
+            else if (CodeType == "user_reset_password")
+            {
+                LoginDialogViewModel.Close();
+            }
+           
+
+        }
         private bool CodeSum()
         {
             Codesum = Code1 + Code2 + Code3 + Code4 + Code5 + Code6;

+ 9 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/LoginPasswordRegionViewModel.cs

@@ -166,6 +166,8 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         public DelegateCommand LoginCommand { get; set; }
         public DelegateCommand LinkLicenseCommand { get; set; }
         public DelegateCommand LoginPasswordChangedCommand { get; set; }
+        public DelegateCommand CloseDialogCommand { get; set; }
+
         LoginPasswordRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             dialogs = dialogService;
@@ -175,9 +177,16 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             ChangeEmailCommand = new DelegateCommand(ChangeEmail);
             GoCodeUpdataCommand = new DelegateCommand(GoCodeUpdata);
             LoginPasswordChangedCommand = new DelegateCommand(LoginPasswordChanged);
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+
         }
 
+        private void CloseDialog()
+        {
 
+            LoginDialogViewModel.Close();
+
+        }
 
         //密码改变
         private void LoginPasswordChanged()

+ 8 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/LoginRegionViewModel.cs

@@ -109,6 +109,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
         public DelegateCommand LoginNextCommand { get; set; }
         public DelegateCommand GoLoginCommand { get; set; }
+        public DelegateCommand CloseDialogCommand { get; set; }
 
         LoginRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
@@ -116,8 +117,15 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
           
             LoginNextCommand = new DelegateCommand(LoginNext);
             GoLoginCommand = new DelegateCommand(GoLogin);
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
         }
 
+        private void CloseDialog()
+        {
+
+            LoginDialogViewModel.Close();
+
+        }
 
         private void LoginNext()
         {

+ 11 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/PasswordUpdataRegionVIewModel.cs

@@ -241,6 +241,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
         public DelegateCommand LoginPasswordChangedCommand { get; set; }
         public DelegateCommand LoginPasswordChanged2Command { get; set; }
+        public DelegateCommand CloseDialogCommand { get; set; }
         PasswordUpdataRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             dialogs = dialogService;
@@ -250,6 +251,16 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             PasswordUpdataCommand = new DelegateCommand(PasswordUpdata);
             LoginPasswordChangedCommand = new DelegateCommand(LoginPasswordChanged);
             LoginPasswordChanged2Command = new DelegateCommand(LoginPasswordChanged2);
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+
+        }
+
+
+        private void CloseDialog()
+        {
+
+           LoginDialogViewModel.Close();
+
         }
 
         private void LoginPasswordChanged()

+ 7 - 2
PDF Office/ViewModels/Dialog/ServiceDialog/RegisterOKRegionViewModel.cs

@@ -41,7 +41,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         }
 
         public DelegateCommand RegisterGetStartCommand { get; set; }
-
+        public DelegateCommand CloseDialogCommand { get; set; }
 
         public RegisterOKRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
@@ -50,9 +50,14 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         
             dialogs = dialogService;
             RegisterGetStartCommand = new DelegateCommand(RegisterGetStart);
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+        }
+        private void CloseDialog()
+        {
+
+            RegisterDialogViewModel.Close();
 
         }
-       
 
         private void RegisterGetStart()
         {

+ 8 - 1
PDF Office/ViewModels/Dialog/ServiceDialog/UserDialogViewModel.cs

@@ -64,6 +64,7 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
 
         public DelegateCommand UserOutCommand { get; set; }
         public DelegateCommand LogOutCommand { get; set; }
+        public DelegateCommand CloseDialogCommand { get; set; }
 
         UserDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
@@ -71,12 +72,18 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             UserRegionName = Guid.NewGuid().ToString();
             UserOutCommand = new DelegateCommand(UserOut);
             LogOutCommand = new DelegateCommand(LogOut);
-            if(ServiceHelper.ALLEmail!="")
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+            if (ServiceHelper.ALLEmail!="")
             {
                 UserEmail = ServiceHelper.ALLEmail;
             }
         }
+        private void CloseDialog()
+        {
+
+           this.Close();
 
+        }
         public void UserOut()
         {
             AlertsMessage alertsMessage = new AlertsMessage();

+ 11 - 2
PDF Office/ViewModels/Dialog/ServiceDialog/UserOutCodeRegionViewModel.cs

@@ -177,7 +177,9 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
         public DelegateCommand CodetooCommand { get; set; }
         public DelegateCommand Code6ChangedCommand { get; set; }
         public DelegateCommand UserOutCommand { get; set; }
-       
+
+        public DelegateCommand CloseDialogCommand { get; set; }
+
         public UserOutCodeRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
 
@@ -188,9 +190,16 @@ namespace PDF_Office.ViewModels.Dialog.ServiceDialog
             CodetooCommand = new DelegateCommand(Codetoo);
             Code6ChangedCommand = new DelegateCommand(Code6Changed);
             UserOutCommand = new DelegateCommand(UserOut);
-           
+            CloseDialogCommand = new DelegateCommand(CloseDialog);
+
+
         }
+        private void CloseDialog()
+        {
+
+            UserDialogViewModel.Close();
 
+        }
 
         private void UserOutCancel()
         {

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml

@@ -12,6 +12,18 @@
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+        </Button>
         <Grid           
             Margin="32,48,0,0"
             HorizontalAlignment="Left"

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/LoginPasswordRegion.xaml

@@ -275,6 +275,18 @@
         </Style>
     </UserControl.Resources>
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+        </Button>
         <Grid
             Width="262"
             Margin="0,48,0,0"

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/LoginRegion.xaml

@@ -275,6 +275,18 @@
     </UserControl.Resources>
     <Grid>
         <Grid Background="White">
+            <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+                <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+            </Button>
             <Grid
                 Margin="0,48,0,0"
                 HorizontalAlignment="Center"

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/PasswordUpdataRegion.xaml

@@ -387,6 +387,18 @@
         </Style>
     </UserControl.Resources>
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+        </Button>
         <Grid
             Width="262"
             Margin="0,48,0,0"

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/RegisterOKRegion.xaml

@@ -11,6 +11,18 @@
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+        </Button>
         <Grid Margin="0,84,0,0" HorizontalAlignment="Center" VerticalAlignment="Top">
             <StackPanel>
                 <Grid

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/UserDialog.xaml

@@ -13,6 +13,18 @@
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+        </Button>
         <Grid
             Margin="0,40,0,0"
             HorizontalAlignment="Center"

+ 12 - 0
PDF Office/Views/Dialog/ServiceDialog/UserOutCodeRegion.xaml

@@ -12,6 +12,18 @@
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
     <Grid Background="White">
+        <Button
+            Width="16"
+            Height="16"
+            Margin="287,17,0,0"
+            HorizontalAlignment="Left"
+            VerticalAlignment="Top"
+            Background="Transparent"
+            BorderThickness="0"
+            Command="{Binding CloseDialogCommand}"
+            WindowChrome.IsHitTestVisibleInChrome="True">
+            <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
+        </Button>
         <Grid
             Margin="0,40,0,0"
             HorizontalAlignment="Center"