Ver código fonte

付费路径-新增订阅权益弹窗和订阅弹窗,部分弹窗样式更新

lvle 1 ano atrás
pai
commit
307b95be16

+ 2 - 0
PDF Office/PDF Master.csproj

@@ -517,6 +517,8 @@
       <DependentUpon>Service.resx</DependentUpon>
     </Compile>
     <Compile Include="ViewModels\Dialog\ChatGPTAIDialogs\DocumentaryTranslationDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\ServiceDialog\SubscriptionDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\ServiceDialog\SubscriptionOKDialogViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\PDFTools\HomeFilesContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\ChatGPTAI\ChatGPTAIErrorCorrectionContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\ChatGPTAI\ChatGPTAIRewritingContentViewModel.cs" />

+ 27 - 3
PDF Office/ViewModels/Dialog/ServiceDialog/CodeRegionViewModel.cs

@@ -68,6 +68,21 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
             set { SetProperty(ref _Text_back, value); }
         }
 
+       
+        private string _Bordcolor = "#F3465B";
+        public string Bordcolor
+        {
+            get { return _Bordcolor; }
+            set { SetProperty(ref _Bordcolor, value); }
+        }
+
+        private string _BottomBackgroubd = "#FDC7C6";
+        public string BottomBackgroubd
+        {
+            get { return _BottomBackgroubd; }
+            set { SetProperty(ref _BottomBackgroubd, value); }
+        }
+        
         private void InitString()
         {
 
@@ -255,6 +270,8 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
                     Codetime = " ";
                     disTimer.Stop();
                     RegisterCodemsg = ErrorCodeHelper.Ercode("codehad");
+                    Bordcolor = "#FFAF25";
+                    BottomBackgroubd = "#FFF1C1";
                     RegisterCodemsgVis = Visibility.Visible;
 
                 }
@@ -278,7 +295,8 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
                     disTimer.Stop();
                     RegisterCodemsg =  ErrorCodeHelper.Ercode("codehad");
                     RegisterCodemsgVis = Visibility.Visible;
-
+                    Bordcolor = "#FFAF25";
+                    BottomBackgroubd = "#FFF1C1";
                 }
                 else if (code == "200")
                 {
@@ -383,6 +401,8 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
                 {
                     EnableNextStep = false;
                     RegisterCodemsg = ErrorCodeHelper.Ercode(code);
+                    Bordcolor = "#F3465B";
+                    BottomBackgroubd = "#FDC7C6";
                     RegisterCodemsgVis = Visibility.Visible;
                 }
 
@@ -420,7 +440,9 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
                         {
                             EnableNextStep = false;                   
                             RegisterCodemsg = ErrorCodeHelper.Ercode(code);
-                            RegisterCodemsgVis = Visibility.Visible;
+                        Bordcolor = "#F3465B";
+                        BottomBackgroubd = "#FDC7C6";
+                        RegisterCodemsgVis = Visibility.Visible;
                         }
                     }
                     else
@@ -434,7 +456,9 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
                         {
                             EnableNextStep = false;
                             RegisterCodemsg = ErrorCodeHelper.Ercode(code);
-                            RegisterCodemsgVis = Visibility.Visible;
+                        Bordcolor = "#F3465B";
+                        BottomBackgroubd = "#FDC7C6";
+                        RegisterCodemsgVis = Visibility.Visible;
                         }
                     }
 

+ 26 - 1
PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs

@@ -5,6 +5,7 @@ using Prism.Regions;
 using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
@@ -22,6 +23,9 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         #region 文案
 
+
+
+        #endregion
         private string _Text_Signup = "";
 
         public string Text_Signup
@@ -33,17 +37,38 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
             }
         }
 
+        private string _uristore = "https://www.pdfreaderpro.com/windows/store/permanent";
+        public string Uristore
+        {
+            get { return _uristore; }
+            set
+            {
+                SetProperty(ref _uristore, value);
+
+            }
+        }
 
+        public DelegateCommand LinkstoreCommand { get; set; }
+       
         private void InitString()
         {
 
             //Text_Signup = App.ServiceLoader.GetString("Text_Signup");
+            LinkstoreCommand = new DelegateCommand(Linkstore);
+
+        }
+
+
 
 
+        private void Linkstore()
+        {
+
+            Process.Start(new ProcessStartInfo(Uristore));
         }
 
 
-        #endregion
+
 
 
         public bool CanCloseDialog()

+ 87 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/SubscriptionDialogViewModel.cs

@@ -0,0 +1,87 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Master.ViewModels.Dialog.ServiceDialog
+{
+    public class SubscriptionDialogViewModel : BindableBase, IDialogAware
+    {
+
+
+
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        #region 文案
+
+
+
+        #endregion
+
+        private string _uristore = "https://www.pdfreaderpro.com/windows/store/permanent";
+        public string Uristore
+        {
+            get { return _uristore; }
+            set
+            {
+                SetProperty(ref _uristore, value);
+
+            }
+        }
+
+        public DelegateCommand LinkstoreCommand { get; set; }
+
+        private void InitString()
+        {
+
+            LinkstoreCommand = new DelegateCommand(Linkstore);
+        }
+
+        private void Linkstore()
+        {
+
+            Process.Start(new ProcessStartInfo(Uristore));
+        }
+
+
+
+
+
+
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+
+        }
+
+
+
+        public SubscriptionDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
+        {
+
+            //GoLoginCommand = new DelegateCommand(GoLogin);
+            InitString();
+
+        }
+
+    }
+}
+

+ 67 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/SubscriptionOKDialogViewModel.cs

@@ -0,0 +1,67 @@
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PDF_Master.ViewModels.Dialog.ServiceDialog
+{
+    public class SubscriptionOKDialogViewModel : BindableBase, IDialogAware
+    {
+
+
+
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        #region 文案
+
+
+
+        #endregion
+
+
+
+        private void InitString()
+        {
+
+            //Text_Signup = App.ServiceLoader.GetString("Text_Signup");
+
+        }
+
+
+
+
+
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+
+        }
+
+
+
+        public SubscriptionOKDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
+        {
+
+            //GoLoginCommand = new DelegateCommand(GoLogin);
+            InitString();
+
+        }
+
+    }
+}

+ 7 - 0
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -2714,6 +2714,13 @@ namespace PDF_Master.ViewModels
         {
             try
             {
+                if (!App.IsLogin || Settings.Default.UserDate.isInFreeUseTime == false)
+                {
+                    dialogs.ShowDialog(DialogNames.SubscriptionDialog);
+                    return false;
+                }
+
+
                 if ((string.IsNullOrEmpty(PDFViewer.Document.FilePath) || mainViewModel.NewFile) && !autosave)
                     return saveAsFile();
 

+ 15 - 15
PDF Office/Views/Dialog/ServiceDialog/CodeRegion.xaml

@@ -7,7 +7,7 @@
     xmlns:local="clr-namespace:PDF_Master.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
-    Width="326"
+    Width="404"
     Height="420"
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
@@ -29,8 +29,8 @@
                 Fill="Black" />
         </Button>
         <Grid
-            Margin="32,48,0,0"
-            HorizontalAlignment="Left"
+            Margin="0,48,0,0"
+            HorizontalAlignment="Center"
             VerticalAlignment="Top">
             <StackPanel>
                 <TextBlock
@@ -75,7 +75,7 @@
                             Effect="{StaticResource shadow.red-0-4}"
                             Visibility="{Binding ElementName=Grid_RegisterVis, Path=Visibility}" />
                     </Grid>
-                    <Grid Margin="9,0,0,0">
+                    <Grid Margin="16,0,0,0">
                         <TextBox
                             x:Name="text_Code2"
                             Width="36"
@@ -99,7 +99,7 @@
                             Effect="{StaticResource shadow.red-0-4}"
                             Visibility="{Binding ElementName=Grid_RegisterVis, Path=Visibility}" />
                     </Grid>
-                    <Grid Margin="9,0,0,0">
+                    <Grid Margin="16,0,0,0">
                         <TextBox
                             x:Name="text_Code3"
                             Width="36"
@@ -123,7 +123,7 @@
                             Effect="{StaticResource shadow.red-0-4}"
                             Visibility="{Binding ElementName=Grid_RegisterVis, Path=Visibility}" />
                     </Grid>
-                    <Grid Margin="9,0,0,0">
+                    <Grid Margin="16,0,0,0">
                         <TextBox
                             x:Name="text_Code4"
                             Width="36"
@@ -147,7 +147,7 @@
                             Effect="{StaticResource shadow.red-0-4}"
                             Visibility="{Binding ElementName=Grid_RegisterVis, Path=Visibility}" />
                     </Grid>
-                    <Grid Margin="9,0,0,0">
+                    <Grid Margin="16,0,0,0">
                         <TextBox
                             x:Name="text_Code5"
                             Width="36"
@@ -171,7 +171,7 @@
                             Effect="{StaticResource shadow.red-0-4}"
                             Visibility="{Binding ElementName=Grid_RegisterVis, Path=Visibility}" />
                     </Grid>
-                    <Grid Margin="9,0,0,0">
+                    <Grid Margin="16,0,0,0">
                         <TextBox
                             x:Name="text_Code6"
                             Width="36"
@@ -240,14 +240,14 @@
         </Grid>
 
         <Grid
-            Width="262"
-            Margin="32,240,0,0"
-            HorizontalAlignment="Left"
+            Width="304"
+            Margin="0,240,0,0"
+            HorizontalAlignment="Center"
             VerticalAlignment="Top">
             <StackPanel>
                 <Button
                     x:Name="Btn_RegisterNext"
-                    Width="262"
+                    Width="304"
                     Height="32"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Top"
@@ -277,17 +277,17 @@
 
         <Grid
             x:Name="Grid_RegisterVis"
-            Width="326"
+            Width="404"
             Height="48"
             VerticalAlignment="Bottom"
-            Background="#FDC7C6"
+            Background="{Binding BottomBackgroubd}"
             Visibility="{Binding RegisterCodemsgVis, Mode=TwoWay}">
             <WrapPanel HorizontalAlignment="Left" VerticalAlignment="Center" Margin="9,0,0,0">
                 <Border
                     Width="14"
                     Height="14"
                     Margin="-1,-4,0,0"
-                    Background="#F3465B"
+                    Background="{Binding Bordcolor}"
                     CornerRadius="100">
                     <Path
                         Margin="-1,-4,0,0"

+ 33 - 13
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml

@@ -170,22 +170,41 @@
                             LineHeight="20"
                             Text="Using the AI function" />
                     </StackPanel>
-                    <Border
+                    <Button
                         Width="284"
                         Height="40"
                         Margin="0,32,0,0"
-                        Background="White"
-                        BorderBrush="#DFE1E5"
-                        BorderThickness="1"
-                        CornerRadius="20">
-                        <TextBlock
-                            HorizontalAlignment="Center"
-                            VerticalAlignment="Center"
-                            FontFamily="Segoe UI"
-                            FontSize="16"
-                            FontWeight="SemiBold"
-                            Text="Sign Up For Free" />
-                    </Border>
+                        Content="Sign Up For Free"
+                        FontFamily="Segoe UI"
+                        FontSize="16"
+                        FontWeight="SemiBold">
+                        <Button.Style>
+                            <Style TargetType="Button">
+                                <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner20}" />
+                                <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.norm}" />
+                                <Setter Property="Foreground" Value="{StaticResource color.btn.sec.text.def}" />
+                                <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
+                                <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
+                                <Style.Triggers>
+                                    <Trigger Property="IsDefaulted" Value="true">
+                                        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
+                                    </Trigger>
+                                    <Trigger Property="IsMouseOver" Value="true">
+                                        <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.hov}" />
+                                        <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
+                                    </Trigger>
+                                    <Trigger Property="IsPressed" Value="true">
+                                        <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.act}" />
+                                        <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
+                                    </Trigger>
+                                    <Trigger Property="IsEnabled" Value="false">
+                                        <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.dis}" />
+                                        <Setter Property="Foreground" Value="{StaticResource color.btn.sec.text.dis}" />
+                                    </Trigger>
+                                </Style.Triggers>
+                            </Style>
+                        </Button.Style>
+                    </Button>
                 </StackPanel>
             </Border>
         </Grid>
@@ -335,6 +354,7 @@
                         Width="284"
                         Height="40"
                         Margin="0,32,0,0"
+                        Command="{Binding LinkstoreCommand}"
                         Content="Subscribe Now"
                         FontFamily="Segoe UI"
                         FontSize="16"

+ 1 - 1
PDF Office/Views/Dialog/ServiceDialog/LoginDialog.xaml

@@ -7,7 +7,7 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
     prism:ViewModelLocator.AutoWireViewModel="True" 
-    Width="586"
+    Width="664"
      prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     Height="420"
     mc:Ignorable="d">

+ 1 - 1
PDF Office/Views/Dialog/ServiceDialog/RegisterDialog.xaml

@@ -6,7 +6,7 @@
     xmlns:local="clr-namespace:PDF_Master.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
-    Width="586"
+    Width="664"
     Height="420"
     prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     prism:ViewModelLocator.AutoWireViewModel="True"

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

@@ -148,6 +148,7 @@
                     Content="Become a Subscriber"
                     FontFamily="Segoe UI"
                     FontSize="16"
+                    Command="{Binding OpenIAPCommand}"
                     FontWeight="SemiBold"
                     Style="{StaticResource btn.upgrade}" />
             </StackPanel>

+ 10 - 10
PDF Office/Views/Dialog/ServiceDialog/RegisterRegion.xaml

@@ -10,7 +10,7 @@
     xmlns:local="clr-namespace:PDF_Master.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
-    Width="326"
+    Width="404"
     Height="420"
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
@@ -307,10 +307,10 @@
                 Fill="Black" />
         </Button>
         <Grid
-            Width="262"
+            Width="304"
+            HorizontalAlignment="Center"
             Height="316"
-            Margin="32,48,0,0"
-            HorizontalAlignment="Left"
+            Margin="0,48,0,0"
             VerticalAlignment="Top">
             <StackPanel>
                 <TextBlock
@@ -324,7 +324,7 @@
                     FontWeight="SemiBold"
                     Text="{Binding Text_Signup}" />
                 <Grid
-                    Width="262"
+                    Width="304"
                     Height="32"
                     Margin="0,32,0,0"
                     HorizontalAlignment="Left"
@@ -345,7 +345,7 @@
                 </Grid>
                 <TextBlock
                     x:Name="Textbl_email"
-                    Width="262"
+                    Width="304"
                     Height="20"
                     Margin="0,2,0,0"
                     HorizontalAlignment="Left"
@@ -354,7 +354,7 @@
                     Text="{Binding RegisterEmaillook, Mode=TwoWay}" />
                 <Grid Margin="0,8,0,0">
                     <Grid
-                        Width="262"
+                        Width="304"
                         Height="32"
                         HorizontalAlignment="Left"
                         VerticalAlignment="Top">
@@ -406,7 +406,7 @@
                 </Grid>
                 <TextBlock
                     x:Name="Textbl_password"
-                    Width="262"
+                    Width="304"
                     Height="20"
                     Margin="0,2,0,0"
                     HorizontalAlignment="Left"
@@ -414,7 +414,7 @@
                     Foreground="#F3465B"
                     Text="{Binding RegisterePasswordlook, Mode=TwoWay}" />
                 <Button
-                    Width="262"
+                    Width="304"
                     Height="32"
                     Margin="0,16,0,0"
                     HorizontalAlignment="Left"
@@ -451,7 +451,7 @@
                     </TextBlock>
                 </WrapPanel>
                 <TextBlock
-                    Width="262"
+                    Width="304"
                     Height="36"
                     Margin="0,28,0,0"
                     HorizontalAlignment="Center"

+ 28 - 2
PDF Office/Views/Dialog/ServiceDialog/SubscriptionDialog.xaml

@@ -136,8 +136,34 @@
                 Height="40"
                 Content="Watermark Saving"
                 FontFamily="Segoe UI"
-                FontSize="16"
-                Style="{StaticResource btn.upgrade}" />
+                FontSize="16">
+                <Button.Style>
+                    <Style TargetType="Button">
+                        <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner20}" />
+                        <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.norm}" />
+                        <Setter Property="Foreground" Value="{StaticResource color.btn.sec.text.def}" />
+                        <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
+                        <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
+                        <Style.Triggers>
+                            <Trigger Property="IsDefaulted" Value="true">
+                                <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
+                            </Trigger>
+                            <Trigger Property="IsMouseOver" Value="true">
+                                <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.hov}" />
+                                <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
+                            </Trigger>
+                            <Trigger Property="IsPressed" Value="true">
+                                <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.act}" />
+                                <Setter Property="BorderBrush" Value="{StaticResource color.btn.sec.border-color}" />
+                            </Trigger>
+                            <Trigger Property="IsEnabled" Value="false">
+                                <Setter Property="Background" Value="{StaticResource color.btn.sec.bg.dis}" />
+                                <Setter Property="Foreground" Value="{StaticResource color.btn.sec.text.dis}" />
+                            </Trigger>
+                        </Style.Triggers>
+                    </Style>
+                </Button.Style>
+            </Button>
             <Button
                 Width="177"
                 Height="40"