Quellcode durchsuchen

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

OYXH\oyxh vor 1 Jahr
Ursprung
Commit
aa366a3c71

+ 1 - 1
PDF Office/App.xaml.cs

@@ -592,7 +592,6 @@ namespace PDF_Master
             containerRegistry.RegisterForNavigation<LoginRegion>();
             containerRegistry.RegisterForNavigation<LoginPasswordRegion>();
             containerRegistry.RegisterForNavigation<RegisterRegion>();
-            containerRegistry.RegisterForNavigation<RegisterOKRegion>();
             containerRegistry.RegisterForNavigation<NOInternetRegion>();
             containerRegistry.RegisterForNavigation<UserOutCodeRegion>();
             containerRegistry.RegisterForNavigation<PasswordUpdataRegion>();
@@ -653,6 +652,7 @@ namespace PDF_Master
             containerRegistry.RegisterDialog<LoginDialog>(DialogNames.LoginDialog);
             containerRegistry.RegisterDialog<UserDialog>(DialogNames.UserDialog);
             containerRegistry.RegisterDialog<UserOutingLogin>(DialogNames.UserOutingLogin);
+            containerRegistry.RegisterDialog<RegisterOKRegion>(DialogNames.RegisterOKRegion);
 
             //新手引导弹窗
             containerRegistry.RegisterDialog<NoviceGuidDialog>(DialogNames.GuidDialog);

+ 6 - 0
PDF Office/Model/DialogNames.cs

@@ -33,6 +33,12 @@ namespace PDF_Master.Model
         public static string UserOutingLogin = "UserOutingLogin";
 
 
+        /// <summary>
+        /// 注册成功弹窗
+        /// </summary>
+        public static string RegisterOKRegion = "RegisterOKRegion";
+
+
         /// <summary>
         /// 注册弹窗
         /// </summary>

+ 5 - 1
PDF Office/PDF Master.csproj

@@ -1742,8 +1742,8 @@
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="Views\Dialog\ServiceDialog\RegisterOKRegion.xaml">
-      <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
     </Page>
     <Page Include="Views\Dialog\ServiceDialog\RegisterRegion.xaml">
       <SubType>Designer</SubType>
@@ -2271,6 +2271,10 @@
     <Content Include="Resources\GuidPDF\Quick Start Guide.pdf">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Resource Include="Resources\Service\convert.png" />
+    <Resource Include="Resources\Service\edit.png" />
+    <Resource Include="Resources\Service\more.png" />
+    <Resource Include="Resources\Service\page-edit.png" />
     <Content Include="source\models\OCR.model">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

+ 1 - 1
PDF Office/PDF Master.csproj.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectView>ShowAllFiles</ProjectView>
   </PropertyGroup>
 </Project>

BIN
PDF Office/Resources/Service/Login.png


BIN
PDF Office/Resources/Service/NewRegiserok.png


BIN
PDF Office/Resources/Service/convert.png


BIN
PDF Office/Resources/Service/edit.png


BIN
PDF Office/Resources/Service/more.png


BIN
PDF Office/Resources/Service/page-edit.png


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

@@ -374,8 +374,10 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
                     App.mainWindowViewModel.LoginVis = Visibility.Collapsed;
                     App.mainWindowViewModel.OphVis = Visibility.Collapsed;
                     Settings.Default.UserDate.Email = RegisterDialogViewModel.RegisterEmail;
-                    RegisterDialogViewModel.RegionMan("RegisterOKRegion");
+                    //RegisterDialogViewModel.RegionMan("RegisterOKRegion");
                     Codeclear();
+                    RegisterDialogViewModel.Close();
+                    App.mainWindowViewModel.OpenRegisterOK();
                 }
                 else
                 {

+ 19 - 24
PDF Office/ViewModels/Dialog/ServiceDialog/RegisterOKRegionViewModel.cs

@@ -13,10 +13,8 @@ using System.Windows.Threading;
 
 namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 {
-    public class RegisterOKRegionViewModel : BindableBase, INavigationAware
+    public class RegisterOKRegionViewModel : BindableBase, IDialogAware
     {
-        private string uuid = ServiceHelper.GetDeviceSerialNumber();
-        private RegisterDialogViewModel RegisterDialogViewModel;
         public IDialogService dialogs;
 
 
@@ -35,6 +33,8 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
 
         private string _Text_getstart = "";
 
+        public event Action<IDialogResult> RequestClose;
+
         public string Text_getstart
         {
             get { return _Text_getstart; }
@@ -47,8 +47,6 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
         private void InitString()
         {
 
-            Text_regisuccess = App.ServiceLoader.GetString("Text_regisuccess");
-            Text_getstart = App.ServiceLoader.GetString("Text_getstart");
 
         }
 
@@ -56,40 +54,37 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
         #endregion
 
 
-        public bool IsNavigationTarget(NavigationContext navigationContext)
-        {
-            return true;
-        }
-
-        public void OnNavigatedFrom(NavigationContext navigationContext)
-        {
-
-
-        }
-
-        public void OnNavigatedTo(NavigationContext navigationContext)
-        {
-            navigationContext.Parameters.TryGetValue<RegisterDialogViewModel>("RegisterDialogViewModel", out RegisterDialogViewModel);
-        }
 
         public DelegateCommand RegisterGetStartCommand { get; set; }
 
+        public string Title => throw new NotImplementedException();
+
         public RegisterOKRegionViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
 
 
         
             dialogs = dialogService;
-            RegisterGetStartCommand = new DelegateCommand(RegisterGetStart);
             InitString();
         }
 
-        private void RegisterGetStart()
+        public void Close()
+        {
+            RequestClose?.Invoke(new Prism.Services.Dialogs.DialogResult(ButtonResult.Cancel));
+        }
+        public bool CanCloseDialog()
         {
+            return true;
+        }
 
-            RegisterDialogViewModel.Close();
-            
+        public void OnDialogClosed()
+        {
+           
+        }
 
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+           
         }
     }
 }

+ 5 - 0
PDF Office/ViewModels/MainWindowViewModel.cs

@@ -419,6 +419,11 @@ namespace PDF_Master.ViewModels
             dialogs.ShowDialog(DialogNames.LoginDialog);
         }
 
+        public void OpenRegisterOK()
+        {
+            dialogs.ShowDialog(DialogNames.RegisterOKRegion);
+        }
+
 
 
         //打开用户弹窗

+ 73 - 2
PDF Office/Views/Dialog/ServiceDialog/LoginDialog.xaml

@@ -16,8 +16,79 @@
             <ColumnDefinition Width="260"/>
             <ColumnDefinition/>
         </Grid.ColumnDefinitions>
-        <Grid >
-            <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/Login.png" />
+        <Grid>
+            <Grid.Background>
+                <ImageBrush ImageSource="pack://application:,,,/PDF Master;component/Resources/Service/Login.png" />
+            </Grid.Background>
+            <StackPanel
+                Width="204"
+                Margin="29,44,0,0"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Top">
+                <TextBlock
+                    HorizontalAlignment="Left"
+                    Width="169"
+                    FontFamily="Segoe UI"
+                    FontSize="20"
+                    FontWeight="SemiBold"
+                    LineHeight="28"
+                    Text="Unlock all features for free"
+                    TextWrapping="Wrap" />
+                <TextBlock
+                    Width="204"
+                    Height="32"
+                    HorizontalAlignment="Left"
+                    Margin="0,2,0,0"
+                    FontFamily="SF Pro Text"
+                    FontSize="10"
+                    Foreground="#60252629"
+                    LineHeight="16"
+                    Text="Register as a member and login to access all premium features for free"
+                    TextWrapping="Wrap" />
+            </StackPanel>
+
+            <StackPanel Margin="28,152,0,0"  HorizontalAlignment="Left" Width="195" Height="204" VerticalAlignment="Top">
+                <Grid Width="173" Height="42" HorizontalAlignment="Left">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/edit.png"/>
+                    </Border>
+                    <StackPanel Width="129" Height="42" HorizontalAlignment="Right">
+                        <TextBlock Text="Edit PDF" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                        <TextBlock Margin="0,4,0,0" Text="Text editing, image editing"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+                <Grid Width="195" Height="42" HorizontalAlignment="Left" Margin="0,12,0,0">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/convert.png"/>
+                    </Border>
+                    <StackPanel Margin="42,0,0,0" Width="153" Height="42" >
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Text="Convert" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                            <TextBlock Text="(Limit first 10 pages)" FontFamily="Segoe UI"  FontSize="11" LineHeight="18" Height="18" Margin="8,0,0,0" Foreground="#94989C"/>
+                        </StackPanel>
+
+                        <TextBlock Margin="0,4,0,0" Text="Best PDF to Office Converter"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+                <Grid Width="173" Height="42" HorizontalAlignment="Left" Margin="0,12,0,0">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/page-edit.png"/>
+                    </Border>
+                    <StackPanel Width="129" Height="42" HorizontalAlignment="Right">
+                        <TextBlock Text="Page Edit" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                        <TextBlock Margin="0,4,0,0" Text="Insert, Replace, Split, Extract"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+                <Grid Width="173" Height="42" HorizontalAlignment="Left" Margin="0,12,0,0">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/more.png"/>
+                    </Border>
+                    <StackPanel Width="129" Height="42" HorizontalAlignment="Right">
+                        <TextBlock Text="More Features" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                        <TextBlock Margin="0,4,0,0" Text="More features to look forward"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+            </StackPanel>
         </Grid>
         <Grid Grid.Column="1" >
             <ContentControl prism:RegionManager.RegionName="{Binding LoginRegionName}" Visibility="Visible"/>

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

@@ -31,5 +31,6 @@ namespace PDF_Master.Views.Dialog.ServiceDialog
             RegionManager.SetRegionManager(this, regionManager);
             RegionManager.UpdateRegions();
         }
+
     }
 }

+ 82 - 10
PDF Office/Views/Dialog/ServiceDialog/RegisterDialog.xaml

@@ -6,22 +6,94 @@
     xmlns:local="clr-namespace:PDF_Master.Views.Dialog.ServiceDialog"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
-    prism:ViewModelLocator.AutoWireViewModel="True" 
-    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     Width="586"
     Height="420"
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
+    prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
     <Grid Background="White">
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="260"/>
-            <ColumnDefinition/>
+            <ColumnDefinition Width="260" />
+            <ColumnDefinition />
         </Grid.ColumnDefinitions>
-        <Grid >
-            <Image Source="pack://application:,,,/Resources/Service/Login.png" />
-         
-        </Grid>
-        <Grid Grid.Column="1" >
-            <ContentControl prism:RegionManager.RegionName="{Binding RegisterRegionName}" Visibility="Visible"/>
+        <Grid>
+            <Grid.Background>
+                <ImageBrush ImageSource="pack://application:,,,/PDF Master;component/Resources/Service/Login.png" />
+            </Grid.Background>
+            <StackPanel
+                Width="204"
+                Margin="29,44,0,0"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Top">
+                <TextBlock
+                    HorizontalAlignment="Left"
+                    Width="169"
+                    FontFamily="Segoe UI"
+                    FontSize="20"
+                    FontWeight="SemiBold"
+                    LineHeight="28"
+                    Text="Unlock all features for free"
+                    TextWrapping="Wrap" />
+                <TextBlock
+                    Width="204"
+                    Height="32"
+                    HorizontalAlignment="Left"
+                    Margin="0,2,0,0"
+                    FontFamily="SF Pro Text"
+                    FontSize="10"
+                    Foreground="#94989C"
+                    LineHeight="16"
+                    Text="Register as a member and login to access all premium features for free"
+                    TextWrapping="Wrap" />
+            </StackPanel>
+
+            <StackPanel Margin="28,152,0,0"  HorizontalAlignment="Left" Width="195" Height="204" VerticalAlignment="Top">
+                <Grid Width="173" Height="42" HorizontalAlignment="Left">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/edit.png"/>
+                    </Border>
+                    <StackPanel Width="129" Height="42" HorizontalAlignment="Right">
+                        <TextBlock Text="Edit PDF" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                        <TextBlock Margin="0,4,0,0" Text="Text editing, image editing"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+                <Grid Width="195" Height="42" HorizontalAlignment="Left" Margin="0,12,0,0">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/convert.png"/>
+                    </Border>
+                    <StackPanel Margin="42,0,0,0" Width="153" Height="42" >
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Text="Convert" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                            <TextBlock Text="(Limit first 10 pages)" FontFamily="Segoe UI"  FontSize="11" LineHeight="18" Height="18" Margin="8,0,0,0" Foreground="#94989C"/>
+                        </StackPanel>
+
+                        <TextBlock Margin="0,4,0,0" Text="Best PDF to Office Converter"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+                <Grid Width="173" Height="42" HorizontalAlignment="Left" Margin="0,12,0,0">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/page-edit.png"/>
+                    </Border>
+                    <StackPanel Width="153" Height="42" HorizontalAlignment="Left" Margin="42,0,0,0">
+                        <TextBlock Text="Page Edit" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                        <TextBlock Margin="0,4,0,0" Text="Insert, Replace, Split, Extract"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+                <Grid Width="190" Height="42" HorizontalAlignment="Left" Margin="0,12,0,0">
+                    <Border Width="36" Height="36" HorizontalAlignment="Left">
+                        <Image Source="pack://application:,,,/PDF Master;component/Resources/Service/more.png"/>
+                    </Border>
+                    <StackPanel Width="153" Height="42" HorizontalAlignment="Left" Margin="42,0,0,0" >
+                        <TextBlock Text="More Features" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" LineHeight="20" Height="20"/>
+                        <TextBlock Margin="0,4,0,0" Text="More features to look forward"  FontFamily="Segoe UI"  FontSize="11" LineHeight="28" Height="18" Foreground="#616469"/>
+                    </StackPanel>
+                </Grid>
+            </StackPanel>
+            <!--<TextBlock Text="Subscribe Now" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="12" Foreground="#3F8FF6"  LineHeight="20" Margin="150,380,0,0" Width="82" Height="20" />-->
+            <Button Content="Subscribe Now" Background="Transparent"  Margin="150,380,0,0" Width="84" Height="20" Foreground="#3F8FF6" FontWeight="SemiBold" FontSize="12" FontFamily="Segoe UI" BorderThickness="0" />
+        </Grid> 
+        <Grid Grid.Column="1">
+            <ContentControl prism:RegionManager.RegionName="{Binding RegisterRegionName}" Visibility="Visible" />
         </Grid>
     </Grid>
 </UserControl>

Datei-Diff unterdrückt, da er zu groß ist
+ 58 - 52
PDF Office/Views/Dialog/ServiceDialog/RegisterOKRegion.xaml


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

@@ -22,9 +22,14 @@ namespace PDF_Master.Views.Dialog.ServiceDialog
     /// </summary>
     public partial class RegisterOKRegion : UserControl
     {
-        public RegisterOKRegion()
+        private IContainerProvider containerProvider;
+        public RegisterOKRegion(IContainerProvider containerProvider)
         {
             InitializeComponent();
+            this.containerProvider = containerProvider;
+            var regionManager = containerProvider.Resolve<IRegionManager>();
+            RegionManager.SetRegionManager(this, regionManager);
+            RegionManager.UpdateRegions();
         }
     }
 }