Jelajahi Sumber

轻会员-订阅接口接入,完善高保真,水印保存逻辑修改,部分文案添加,查询状态修改显示文案

lvle 1 tahun lalu
induk
melakukan
8f91a5dde0

+ 14 - 5
PDF Office/Helper/ServiceHelper.cs

@@ -288,12 +288,21 @@ namespace PDF_Master.Helper
                         App.IsLogin = true;
                         Settings.Default.UserDate.Email= jobject["email"].ToObject<string>().ToLower();
                         Settings.Default.UserDate.id= jobject["id"].ToObject<string>().ToLower();
-                        //Settings.Default.UserDate.subscribed= jobject["subscribed"].ToObject<string>().ToLower();
-                        Settings.Default.UserDate.subscribed= "0";
+                        Settings.Default.UserDate.subscribeid = jobject["subscriptionInfoList"][0]["id"].ToObject<string>().ToLower();
+                        Settings.Default.UserDate.subscribeuserid = jobject["subscriptionInfoList"][0]["userId"].ToObject<string>().ToLower();
+                        Settings.Default.UserDate.subscribeplatform = jobject["subscriptionInfoList"][0]["platform"].ToObject<int>();
+                        Settings.Default.UserDate.subscribestatus = jobject["subscriptionInfoList"][0]["status"].ToObject<int>();
+                        if(Settings.Default.UserDate.subscribestatus>0)
+                        {
+                            Settings.Default.UserDate.subscribeendDate = jobject["subscriptionInfoList"][0]["endDate"].ToObject<string>().ToLower();
+                        }
+
+                     
+                        Settings.Default.UserDate.subscribepayType = jobject["subscriptionInfoList"][0]["payType"].ToObject<int>();
+
+
                         //Settings.Default.UserDate.subscriberType = jobject["subscriberType"].ToObject<string>().ToLower();
-                        Settings.Default.UserDate.subscriberType = "0";
-                        //Settings.Default.UserDate.subscriptionendDate = jobject["subscriptionendDate"].ToObject<string>().ToLower();
-                        Settings.Default.UserDate.subscriptionendDate = "2023-06-01 08:00:00";
+
 
                         #region 试用策略
                         //Settings.Default.UserDate.isInFreeUseTime= jobject["isInFreeUseTime"].ToObject<bool>();

+ 16 - 0
PDF Office/MultilingualResources/PDF Office.en.xlf

@@ -414,6 +414,22 @@
           <source>Extract texts from image-based or scanned PDF with OCR</source>
           <target state="new">Extract texts from image-based or scanned PDF with OCR</target>
         </trans-unit>
+        <trans-unit id="TextSubscribeStateExpired" translate="yes" xml:space="preserve">
+          <source>Expired</source>
+          <target state="new">Expired</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribeStateOnTrial" translate="yes" xml:space="preserve">
+          <source>OnTrial</source>
+          <target state="new">OnTrial</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribetimeExpired" translate="yes" xml:space="preserve">
+          <source>Trial expires</source>
+          <target state="new">Trial expires</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribetimetextOnTrial" translate="yes" xml:space="preserve">
+          <source>Next subscription</source>
+          <target state="new">Next subscription</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 16 - 0
PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf

@@ -414,6 +414,22 @@
           <source>Extract texts from image-based or scanned PDF with OCR</source>
           <target state="new">Extract texts from image-based or scanned PDF with OCR</target>
         </trans-unit>
+        <trans-unit id="TextSubscribeStateExpired" translate="yes" xml:space="preserve">
+          <source>Expired</source>
+          <target state="new">Expired</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribeStateOnTrial" translate="yes" xml:space="preserve">
+          <source>OnTrial</source>
+          <target state="new">OnTrial</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribetimeExpired" translate="yes" xml:space="preserve">
+          <source>Trial expires</source>
+          <target state="new">Trial expires</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribetimetextOnTrial" translate="yes" xml:space="preserve">
+          <source>Next subscription</source>
+          <target state="new">Next subscription</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 16 - 0
PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf

@@ -414,6 +414,22 @@
           <source>Extract texts from image-based or scanned PDF with OCR</source>
           <target state="new">Extract texts from image-based or scanned PDF with OCR</target>
         </trans-unit>
+        <trans-unit id="TextSubscribeStateExpired" translate="yes" xml:space="preserve">
+          <source>Expired</source>
+          <target state="new">Expired</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribeStateOnTrial" translate="yes" xml:space="preserve">
+          <source>OnTrial</source>
+          <target state="new">OnTrial</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribetimeExpired" translate="yes" xml:space="preserve">
+          <source>Trial expires</source>
+          <target state="new">Trial expires</target>
+        </trans-unit>
+        <trans-unit id="TextSubscribetimetextOnTrial" translate="yes" xml:space="preserve">
+          <source>Next subscription</source>
+          <target state="new">Next subscription</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 2 - 0
PDF Office/PDF Master.csproj

@@ -2366,6 +2366,8 @@
     <Resource Include="Resources\HomeIcon\Rewriting.png" />
     <Resource Include="Resources\HomeIcon\Error_Correction.png" />
     <Resource Include="Resources\Service\Warermark.png" />
+    <Resource Include="Resources\Service\NOai.png" />
+    <Resource Include="Resources\Service\Noconvert.png" />
     <Content Include="source\models\OCR.model">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

TEMPAT SAMPAH
PDF Office/Resources/Service/NOai.png


TEMPAT SAMPAH
PDF Office/Resources/Service/NoWatermark.png


TEMPAT SAMPAH
PDF Office/Resources/Service/Noconvert.png


+ 36 - 0
PDF Office/Strings/Service/Service.Designer.cs

@@ -977,5 +977,41 @@ namespace PDF_Master.Strings.Service {
                 return ResourceManager.GetString("Text_yes", resourceCulture);
             }
         }
+        
+        /// <summary>
+        ///   查找类似 Expired 的本地化字符串。
+        /// </summary>
+        public static string TextSubscribeStateExpired {
+            get {
+                return ResourceManager.GetString("TextSubscribeStateExpired", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 OnTrial 的本地化字符串。
+        /// </summary>
+        public static string TextSubscribeStateOnTrial {
+            get {
+                return ResourceManager.GetString("TextSubscribeStateOnTrial", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Trial expires 的本地化字符串。
+        /// </summary>
+        public static string TextSubscribetimeExpired {
+            get {
+                return ResourceManager.GetString("TextSubscribetimeExpired", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Next subscription 的本地化字符串。
+        /// </summary>
+        public static string TextSubscribetimetextOnTrial {
+            get {
+                return ResourceManager.GetString("TextSubscribetimetextOnTrial", resourceCulture);
+            }
+        }
     }
 }

+ 12 - 0
PDF Office/Strings/Service/Service.resx

@@ -234,6 +234,18 @@
   <data name="Registertext1" xml:space="preserve">
     <value>Already have an account?</value>
   </data>
+  <data name="TextSubscribeStateExpired" xml:space="preserve">
+    <value>Expired</value>
+  </data>
+  <data name="TextSubscribeStateOnTrial" xml:space="preserve">
+    <value>OnTrial</value>
+  </data>
+  <data name="TextSubscribetimeExpired" xml:space="preserve">
+    <value>Trial expires</value>
+  </data>
+  <data name="TextSubscribetimetextOnTrial" xml:space="preserve">
+    <value>Next subscription</value>
+  </data>
   <data name="Text_Add" xml:space="preserve">
     <value>Add password and permission</value>
   </data>

+ 97 - 15
PDF Office/ViewModels/Dialog/ServiceDialog/IAPCompareDialogViewModel.cs

@@ -1,4 +1,6 @@
 using PDF_Master.DataConvert;
+using PDF_Master.Helper;
+using PDF_Master.Properties;
 using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Regions;
@@ -26,6 +28,37 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
 
         #endregion
+
+
+        /// <summary>
+        /// 价格优惠bord
+        /// </summary>
+       private Visibility _Vishalfprice = Visibility.Visible;
+
+        public Visibility Vishalfprice
+        {
+            get { return _Vishalfprice; }
+            set
+            {
+                SetProperty(ref _Vishalfprice, value);
+            }
+        }
+
+        
+        /// <summary>
+        /// 价格优惠
+        /// </summary>
+          private string _Textprice = "$39.99";
+
+        public string Textprice
+        {
+            get { return _Textprice; }
+            set
+            {
+                SetProperty(ref _Textprice, value);
+            }
+        }
+
         private string _Text_Signup = "";
 
         public string Text_Signup
@@ -53,18 +86,7 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
         private void InitString()
         {
 
-            //Text_Signup = App.ServiceLoader.GetString("Text_Signup");
-            LinkstoreCommand = new DelegateCommand(Linkstore);
-
-        }
-
-
 
-
-        private void Linkstore()
-        {
-
-            Process.Start(new ProcessStartInfo(Uristore));
         }
 
 
@@ -88,14 +110,74 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
 
         public DelegateCommand GoLoginCommand { get; set; }
-
-
+        public DelegateCommand RefreshCommand { get; set; }
        public IAPCompareDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
-           
-            //GoLoginCommand = new DelegateCommand(GoLogin);
+
+            LinkstoreCommand = new DelegateCommand(Linkstore);
+            RefreshCommand = new DelegateCommand(Refresh);
             InitString();
 
+          
+            if (Settings.Default.UserDate.subscribestatus == 2 )
+            {
+                Textprice = "$79.99";
+                Vishalfprice = Visibility.Collapsed;
+            }
+         
+            else
+            {
+
+                Textprice = "$39.99";
+                Vishalfprice = Visibility.Visible;
+            }
+        }
+
+        public void Close()
+        {
+            RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
+        }
+
+        private void Linkstore()
+        {
+
+            Process.Start(new ProcessStartInfo(Uristore));
+        }
+
+        /// <summary>
+        /// 刷新订阅状态按钮
+        /// </summary>
+        private void Refresh()
+        {
+
+            if (Settings.Default.AppProperties.LoginToken != "")
+            {
+                if (ServiceHelper.GetUser() == "401")
+                {
+                    App.mainWindowViewModel.UserVis = Visibility.Collapsed;
+                    App.mainWindowViewModel.LoginVis = Visibility.Visible;
+                    App.mainWindowViewModel.OphVis = Visibility.Visible;
+
+                    if (Settings.Default.UserDate.IsLoginoff == false)
+                    {
+                        App.mainWindowViewModel.OpenLoginoff();
+                        Settings.Default.UserDate.IsLoginoff = true;
+                        Settings.Default.Save();
+                    }
+                }
+            }
+            else
+            {
+                App.mainWindowViewModel.UserVis = Visibility.Collapsed;
+                App.mainWindowViewModel.LoginVis = Visibility.Visible;
+                App.mainWindowViewModel.OphVis = Visibility.Visible;
+            }
+
+
+            if (Settings.Default.UserDate.subscribestatus == 1)
+            {
+                Close();
+            }
         }
 
     }

+ 94 - 18
PDF Office/ViewModels/Dialog/ServiceDialog/SubscriptionDialogViewModel.cs

@@ -1,6 +1,8 @@
 using ComPDFKit.PDFWatermark;
+using PDF_Master.Helper;
 using PDF_Master.Model;
 using PDF_Master.Model.EditTools.Watermark;
+using PDF_Master.Properties;
 using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Regions;
@@ -32,6 +34,38 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         #endregion
 
+        /// <summary>
+        /// 价格优惠bord
+        /// </summary>
+        private Visibility _Vishalfprice = Visibility.Visible;
+
+        public Visibility Vishalfprice
+        {
+            get { return _Vishalfprice; }
+            set
+            {
+                SetProperty(ref _Vishalfprice, value);
+            }
+        }
+
+
+        /// <summary>
+        /// 价格优惠
+        /// </summary>
+        private string _Textprice = "$39.99/year";
+
+        public string Textprice
+        {
+            get { return _Textprice; }
+            set
+            {
+                SetProperty(ref _Textprice, value);
+            }
+        }
+
+
+
+
         private string _uristore = "https://www.pdfreaderpro.com/windows/store/permanent";
         public string Uristore
         {
@@ -45,7 +79,7 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         public DelegateCommand LinkstoreCommand { get; set; }
          public DelegateCommand WarermarkSavingCommand { get; set; }
-        
+        public DelegateCommand RefreshCommand { get; set; }
         private void InitString()
         {
 
@@ -55,10 +89,22 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         public SubscriptionDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
-
+            RefreshCommand = new DelegateCommand(Refresh);
             LinkstoreCommand = new DelegateCommand(Linkstore);
             WarermarkSavingCommand = new DelegateCommand(WarermarkSaving);
             InitString();
+            if (Settings.Default.UserDate.subscribestatus == 2)
+            {
+                Textprice = "$79.99/year";
+                Vishalfprice = Visibility.Collapsed;
+            }
+
+            else
+            {
+
+                Textprice = "$39.99/year";
+                Vishalfprice = Visibility.Visible;
+            }
 
         }
         private void Linkstore()
@@ -67,25 +113,12 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
             Process.Start(new ProcessStartInfo(Uristore));
         }
 
+        /// <summary>
+        /// 水印保存
+        /// </summary>
         private void WarermarkSaving()
         {
 
-            //string imagePath = "pack://application:,,,/PDF Master;component/Resources/Service/Warermark.png";
-            //string imagePath = "D:/PDF Office/PDF Office/Resources/Service/Warermark.png";
-            //Uri imageUri = new Uri(imagePath);
-            //BitmapImage bitmapImage = new BitmapImage(imageUri);
-            //byte[] imageArray;
-            //using (MemoryStream memoryStream = new MemoryStream())
-            //{
-            //    PngBitmapEncoder encoder = new PngBitmapEncoder();
-            //    encoder.Frames.Add(BitmapFrame.Create(bitmapImage));
-            //    encoder.Save(memoryStream);
-            //    imageArray = memoryStream.ToArray();
-            //}
-            //long imageSize = imageArray.Length;
-            //int imageWidth = bitmapImage.PixelWidth;
-            //int imageHeight = bitmapImage.PixelHeight;
-
 
             Uri resourceUri = new Uri("pack://application:,,,/PDF Master;component/Resources/Service/Warermark.png");
             StreamResourceInfo resourceInfo = Application.GetResourceStream(resourceUri);
@@ -141,6 +174,49 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         }
 
+        /// <summary>
+        /// 刷新订阅状态按钮
+        /// </summary>
+        private void Refresh()
+        {
+
+            if (Settings.Default.AppProperties.LoginToken != "")
+            {
+                if (ServiceHelper.GetUser() == "401")
+                {
+                    App.mainWindowViewModel.UserVis = Visibility.Collapsed;
+                    App.mainWindowViewModel.LoginVis = Visibility.Visible;
+                    App.mainWindowViewModel.OphVis = Visibility.Visible;
+
+                    if (Settings.Default.UserDate.IsLoginoff == false)
+                    {
+                        App.mainWindowViewModel.OpenLoginoff();
+                        Settings.Default.UserDate.IsLoginoff = true;
+                        Settings.Default.Save();
+                    }
+                }
+            }
+            else
+            {
+                App.mainWindowViewModel.UserVis = Visibility.Collapsed;
+                App.mainWindowViewModel.LoginVis = Visibility.Visible;
+                App.mainWindowViewModel.OphVis = Visibility.Visible;
+            }
+
+
+            if (Settings.Default.UserDate.subscribestatus == 1)
+            {
+                Close();
+            }
+        }
+
+
+
+
+
+
+
+
         public void Close()
         {
             RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));

+ 67 - 9
PDF Office/ViewModels/Dialog/ServiceDialog/UserDialogViewModel.cs

@@ -126,6 +126,42 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
             }
         }
 
+
+
+
+        private string _TextSubscribeState = "";
+
+        public string TextSubscribeState
+        {
+            get { return _TextSubscribeState; }
+            set
+            {
+                SetProperty(ref _TextSubscribeState, value);
+            }
+        }
+        private string _TextSubscribeEndtime = "";
+
+        public string TextSubscribeEndtime
+        {
+            get { return _TextSubscribeEndtime; }
+            set
+            {
+                SetProperty(ref _TextSubscribeEndtime, value);
+            }
+        }
+        private string _TextSubscribetimetext = "";
+
+        public string TextSubscribetimetext
+        {
+            get { return _TextSubscribetimetext; }
+            set
+            {
+                SetProperty(ref _TextSubscribetimetext, value);
+            }
+        }
+
+
+
         private void InitString()
         {
 
@@ -218,19 +254,31 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
             LogOutCommand = new DelegateCommand(LogOut);
             LinkstoreCommand = new DelegateCommand(Linkstore);
 
+
+            TextSubscribeEndtime = Settings.Default.UserDate.subscribeendDate;
             UserEmail = Settings.Default.UserDate.Email;
-            if(Settings.Default.UserDate.subscriberType=="1")
+            if(Settings.Default.UserDate.subscribestatus==1&& Settings.Default.UserDate.subscribepayType==1)
             {
                 Subscriptionbox = Visibility.Visible;
+                Subscriptionauto= Visibility.Visible;
+                TextSubscribeState= App.ServiceLoader.GetString("TextSubscribeStateOnTrial");
+                TextSubscribetimetext = App.ServiceLoader.GetString("TextSubscribetimetextOnTrial");
             }
-            else if(Settings.Default.UserDate.subscriberType == "2")
+            else if(Settings.Default.UserDate.subscribestatus == 1 && Settings.Default.UserDate.subscribepayType == 0)
             {
+                Subscriptionbox = Visibility.Visible;
                 Subscriptionbtn = Visibility.Visible;
+                Subscriptionauto = Visibility.Collapsed;
+                TextSubscribeState = App.ServiceLoader.GetString("TextSubscribeStateOnTrial");
+                TextSubscribetimetext = App.ServiceLoader.GetString("TextSubscribetimetextOnTrial");
             }
             else
             {
                 Subscriptionbox = Visibility.Collapsed;
-                Subscriptionbtn = Visibility.Collapsed; 
+                Subscriptionbtn = Visibility.Collapsed;
+                TextSubscribeState = App.ServiceLoader.GetString("TextSubscribeStateExpired");
+                TextSubscribetimetext = App.ServiceLoader.GetString("TextSubscribetimeExpired");
+
             }
 
   
@@ -245,14 +293,24 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         public void UserOut()
         {
-            AlertsMessage alertsMessage = new AlertsMessage();
-            alertsMessage.ShowDialog(Text_userouttol, Text_useroutmsg, App.ServiceLoader.GetString("Text_yes"), App.ServiceLoader.GetString("Text_no"), IconType.Tip);
-            //调整按钮显示位置,cancel按钮表示确认退出
-            //目的是尽量引导用户不注销
-            if (alertsMessage.result == ContentResult.MiddleCancel)
+            if(Settings.Default.UserDate.subscribestatus == 1)
             {
-                RegionMan("UserOutCodeRegion");
+                AlertsMessage alertsMessage = new AlertsMessage();
+                alertsMessage.ShowDialog("注不了销 ", "无法注销,需要订阅期结束后再申请注销 ", App.ServiceLoader.GetString("Text_yes"), App.ServiceLoader.GetString("Text_no"), IconType.Tip);
+            }
+            else
+            {
+                AlertsMessage alertsMessage = new AlertsMessage();
+                alertsMessage.ShowDialog(Text_userouttol, Text_useroutmsg, App.ServiceLoader.GetString("Text_yes"), App.ServiceLoader.GetString("Text_no"), IconType.Tip);
+                //调整按钮显示位置,cancel按钮表示确认退出
+                //目的是尽量引导用户不注销
+                if (alertsMessage.result == ContentResult.MiddleCancel)
+                {
+                    RegionMan("UserOutCodeRegion");
+                }
+
             }
+           
         }
 
         public void LogOut()

+ 2 - 2
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -2747,7 +2747,7 @@ namespace PDF_Master.ViewModels
             try
             {
                 //删掉Settings.Default.UserDate.isInFreeUseTime == false,没有试用期策略了
-                if (!App.IsLogin)
+                if (!App.IsLogin|| Settings.Default.UserDate.subscribestatus==0)
                 {
                     DialogParameters value = new DialogParameters();
                     value.Add(ParameterNames.ViewContentViewModel, this);
@@ -3016,7 +3016,7 @@ namespace PDF_Master.ViewModels
         {
             bool flg = false;
             //删掉Settings.Default.UserDate.isInFreeUseTime == false,没有试用期策略了
-            if (!App.IsLogin)
+            if (!App.IsLogin || Settings.Default.UserDate.subscribestatus == 0)
             {
                 DialogParameters value = new DialogParameters();
                 value.Add(ParameterNames.ViewContentViewModel, this);

+ 15 - 2
PDF Office/Views/Dialog/ServiceDialog/IAPCompareDialog.xaml

@@ -232,7 +232,7 @@
                             FontSize="32"
                             FontWeight="SemiBold"
                             LineHeight="40"
-                            Text="$39.99" />
+                            Text="{Binding Textprice}" />
                         <Border
                             Width="72"
                             Height="24"
@@ -240,7 +240,8 @@
                             Background="#10FF852E"
                             BorderBrush="#FF852E"
                             BorderThickness="1"
-                            CornerRadius="4">
+                            CornerRadius="4"
+                            Visibility="{Binding Vishalfprice}">
                             <TextBlock
                                 HorizontalAlignment="Center"
                                 VerticalAlignment="Center"
@@ -363,5 +364,17 @@
                 </StackPanel>
             </Border>
         </Grid>
+        <Button
+            Width="Auto"
+            Height="40"
+            VerticalAlignment="Bottom"
+            HorizontalAlignment="Right"
+            Margin="20"
+            Command="{Binding RefreshCommand}"
+            Content="Refresh"
+            FontFamily="Segoe UI"
+            FontSize="16"
+            FontWeight="SemiBold"
+            Style="{StaticResource btn.upgrade}" />
     </Grid>
 </UserControl>

+ 48 - 14
PDF Office/Views/Dialog/ServiceDialog/SubscriptionDialog.xaml

@@ -55,7 +55,7 @@
                         FontFamily="Segoe UI"
                         FontSize="14"
                         FontWeight="SemiBold"
-                        Text="No Watermarks" />
+                        Text="No trial watermark when exporting documents" />
                     <TextBlock
                         Margin="0,4,0,0"
                         HorizontalAlignment="Left"
@@ -77,13 +77,13 @@
                     Height="36"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Top"
-                    Source="pack://application:,,,/PDF Master;component/Resources/Service/NoWatermark.png" />
+                    Source="pack://application:,,,/PDF Master;component/Resources/Service/Noconvert.png" />
                 <StackPanel Width="340" Margin="8,0,0,0">
                     <TextBlock
                         FontFamily="Segoe UI"
                         FontSize="14"
                         FontWeight="SemiBold"
-                        Text="No Watermarks" />
+                        Text="No page limit when converting PDF to other formats" />
                     <TextBlock
                         Margin="0,4,0,0"
                         HorizontalAlignment="Left"
@@ -105,13 +105,13 @@
                     Height="36"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Top"
-                    Source="pack://application:,,,/PDF Master;component/Resources/Service/NoWatermark.png" />
+                    Source="pack://application:,,,/PDF Master;component/Resources/Service/Noai.png" />
                 <StackPanel Width="340" Margin="8,0,0,0">
                     <TextBlock
                         FontFamily="Segoe UI"
                         FontSize="14"
                         FontWeight="SemiBold"
-                        Text="No Watermarks" />
+                        Text="Using the AI function" />
                     <TextBlock
                         Margin="0,4,0,0"
                         HorizontalAlignment="Left"
@@ -165,16 +165,50 @@
                     </Style>
                 </Button.Style>
             </Button>
-            <Button
-                Width="177"
-                Height="40"
-                Margin="16,0,0,0"
-                Command="{Binding LinkstoreCommand}"
-                Content="$79.99/year"
-                FontFamily="Segoe UI"
-                FontSize="16"
-                Style="{StaticResource btn.upgrade}" />
+            <Grid>
+                <Border
+                    Width="67"
+                    Height="20"
+                    Margin="0,-10,5,0"
+                    HorizontalAlignment="Right"
+                    VerticalAlignment="Top"
+                    Panel.ZIndex="1"
+                    Background="#FFDE8A"
+                    CornerRadius="10,10,10,0"
+                    Visibility="{Binding Vishalfprice}">
+                    <TextBlock
+                        HorizontalAlignment="Center"
+                        VerticalAlignment="Center"
+                        FontFamily="SF Pro Text"
+                        FontSize="12"
+                        FontWeight="SemiBold"
+                        Foreground="#D2621C"
+                        Text="50% OFF" />
+                </Border>
+                <Button
+                    Width="177"
+                    Height="40"
+                    Margin="16,0,0,0"
+                    Command="{Binding LinkstoreCommand}"
+                    Content="{Binding Textprice}"
+                    FontFamily="Segoe UI"
+                    FontSize="16"
+                    Style="{StaticResource btn.upgrade}" />
+            </Grid>
+
 
         </WrapPanel>
+        <Button
+            Width="Auto"
+            Height="40"
+            Margin="2"
+            HorizontalAlignment="Right"
+            VerticalAlignment="Bottom"
+            Command="{Binding RefreshCommand}"
+            Content="Refresh"
+            FontFamily="Segoe UI"
+            FontSize="16"
+            FontWeight="SemiBold"
+            Style="{StaticResource btn.upgrade}" />
     </Grid>
 </UserControl>

+ 26 - 19
PDF Office/Views/Dialog/ServiceDialog/UserDialog.xaml

@@ -40,29 +40,36 @@
             LineHeight="28"
             Text="{Binding Text_useracc}" />
         <StackPanel
-            Margin="0,100,0,0"
+            Margin="0,84,0,0"
             HorizontalAlignment="Center"
-            VerticalAlignment="Center">
+            VerticalAlignment="Top">
 
             <Grid Background="#F7F8FA">
                 <StackPanel Width="300" MinHeight="150">
-                    <Menu
-                        x:Name="Menu"
+                    <Border
                         Width="24"
+                        CornerRadius="4"
                         Height="24"
+                        Margin="0,8,8,0"
                         HorizontalAlignment="Right"
                         VerticalAlignment="Top">
-                        <MenuItem
-                            Width="24"
-                            Height="24"
-                            Margin="-2,0,0,0"
-                            HorizontalAlignment="Left"
-                            VerticalAlignment="Top"
-                            Header="🔻">
-                            <MenuItem Command="{Binding LogOutCommand}" Header="{Binding Text_logout}" />
-                            <MenuItem Command="{Binding UserOutCommand}" Header="Cancellation" />
-                        </MenuItem>
-                    </Menu>
+                        <Menu x:Name="Menu" >
+                            <MenuItem
+                                Width="24"                           
+                                Height="24"
+                                Margin="0,0,0,0"
+                                HorizontalAlignment="Left"
+                                VerticalAlignment="Top"
+                               >
+                                <MenuItem.Header >
+                                    <TextBlock Text="···" FontWeight="SemiBold"  VerticalAlignment="Center" HorizontalAlignment="Center"  FontSize="10"  Foreground="#616469"/>
+                                </MenuItem.Header>
+                                <MenuItem Command="{Binding LogOutCommand}" Header="{Binding Text_logout}" />
+                                <MenuItem Command="{Binding UserOutCommand}" Header="Cancellation" />
+                            </MenuItem>
+                        </Menu>
+                    </Border>
+
                     <Border
                         Width="48"
                         Height="48"
@@ -107,7 +114,7 @@
             </Grid>
             <StackPanel
                 Width="300"
-                Margin="0,22,0,40"
+                Margin="0,22,0,30"
                 Visibility="{Binding Subscriptionbox, Mode=TwoWay}">
                 <TextBlock
                     FontFamily="Segoe UI"
@@ -123,7 +130,7 @@
                         FontSize="16"
                         FontWeight="SemiBold"
                         LineHeight="24"
-                        Text="On Trial" />
+                        Text="{Binding TextSubscribeState}" />
                     <Border
                         Width="88"
                         Height="20"
@@ -145,13 +152,13 @@
                             FontFamily="Segoe UI"
                             FontSize="12"
                             Foreground="#616469"
-                            Text="2023/01/25"
+                            Text="{Binding TextSubscribeEndtime}"
                             TextAlignment="Right" />
                         <TextBlock
                             FontFamily="Segoe UI"
                             FontSize="12"
                             Foreground="#616469"
-                            Text="Next subscription"
+                            Text="{Binding TextSubscribetimetext}"
                             TextAlignment="Right" />
                     </StackPanel>
                 </WrapPanel>

+ 20 - 2
PDFSettings/UserDate.cs

@@ -23,7 +23,26 @@ using System.Threading.Tasks;
         public string appId { get; set; }
         public string Email { get; set; } = "";
         public string fullName { get; set; }
-        public string subscriberType { get; set; }
+
+
+        //订阅部分
+
+
+        public string subscribeid { get; set; }
+        public string subscribeuserid { get; set; }
+        public string subscribeType { get; set; }
+
+        public int subscribeplatform { get; set; }
+
+        //0已注册1订阅中2订阅过期3试用中4试用过期
+        public int subscribestatus{ get; set; }
+
+        public string subscribeendDate { get; set; }
+
+        public int subscribepayType { get; set; }
+
+
+
 
         public string subscribed { get; set; }
 
@@ -52,7 +71,6 @@ using System.Threading.Tasks;
 
         public List<string> subscriptionInfoList { get; set; }
 
-        public string subscriptionendDate { get; set; }
 
         public string freeDate { get; set; } = "2023-06-01 08:00:00";
         public bool isInFreeUseTime { get; set; } = false;