5 커밋 ea6846e552 ... 438abd753c

작성자 SHA1 메시지 날짜
  ZhouJieSheng 438abd753c Merge branch 'dev' into beta 1 년 전
  OYXH\oyxh b3240fb2fe 其他-补充注释 1 년 전
  OYXH\oyxh 883446ba06 轻会员-隐藏 更换邮箱 入口 1 년 전
  OYXH\oyxh d9105fc6c1 轻会员-个人中心-更换邮箱 UI 1 년 전
  OYXH\oyxh d91afd748b 轻会员-更换邮箱 Step 1 년 전

+ 19 - 24
PDF Office/App.xaml.cs

@@ -83,7 +83,6 @@ namespace PDF_Master
     /// </summary>
     public partial class App : PrismApplication
     {
-
         /// <summary>
         /// 产品名称
         /// </summary>
@@ -142,7 +141,7 @@ namespace PDF_Master
         /// <summary>
         /// 激活窗体的原因
         /// </summary>
-        public static string  WebOpencase = "";
+        public static string WebOpencase = "";
 
         public static bool IsBookMode = false;
 
@@ -159,7 +158,6 @@ namespace PDF_Master
         /// </summary>
         public static bool IsLogin = false;
 
-
         /// <summary>
         /// 记录开始拖拽的窗口句柄,用于判断是否为跨窗口拖拽
         /// </summary>
@@ -169,6 +167,7 @@ namespace PDF_Master
         /// 双击打开文件通知ID
         /// </summary>
         public static uint MsgId;
+
         /// <summary>
         /// 将应用前置通知ID
         /// </summary>
@@ -283,14 +282,14 @@ namespace PDF_Master
                 if (Settings.Default.PresetFontList == null)
                     Settings.Default.PresetFontList = new PDFSettings.PresetFontList();
             }
-            catch { 
-            
+            catch
+            {
             }
         }
 
         protected override void OnStartup(StartupEventArgs e)
         {
-               MsgId = Win32Helper.RegisterWindowMessage("msgNotify_PDFMaster");
+            MsgId = Win32Helper.RegisterWindowMessage("msgNotify_PDFMaster");
             WakeId = Win32Helper.RegisterWindowMessage("msgWake_PDFMaster");
             WakeId = Win32Helper.RegisterWindowMessage("webopenexpired_PDFMaster");
             Process[] pros = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
@@ -299,11 +298,11 @@ namespace PDF_Master
             {
                 if (e != null && e.Args != null && e.Args.Length > 0)
                 {
-                    if (Webgoapp(e.Args)==true)
+                    if (Webgoapp(e.Args) == true)
                     {
-                        if(WebOpencase=="expired")
+                        if (WebOpencase == "expired")
                         {
-                            Win32Helper.PostMessage((IntPtr)0xffff,WebopenexpiredId, IntPtr.Zero, IntPtr.Zero);
+                            Win32Helper.PostMessage((IntPtr)0xffff, WebopenexpiredId, IntPtr.Zero, IntPtr.Zero);
                             IntPtr waitPtr = Win32Helper.CreateEvent(IntPtr.Zero, true, false, "Global\\shareWaitNotify" + Guid.NewGuid());
                             Win32Helper.WaitForSingleObject(waitPtr, 5000);
                             Win32Helper.CloseHandle(waitPtr);
@@ -315,8 +314,6 @@ namespace PDF_Master
                             Win32Helper.WaitForSingleObject(waitPtr, 5000);
                             Win32Helper.CloseHandle(waitPtr);
                         }
-
-                      
                     }
                     else
                     {
@@ -354,12 +351,10 @@ namespace PDF_Master
                                 }
                                 catch
                                 {
-
                                 }
                             }
                         }
                     }
-                 
                 }
                 else
                 {
@@ -373,8 +368,6 @@ namespace PDF_Master
                 return;
             }
 
-
-
             if (!LicenseVerify())
             {
 #if !DEBUG
@@ -392,7 +385,7 @@ namespace PDF_Master
             InitSettings();
 
 #if DEBUG
-            IsLogin =false;
+            IsLogin = false;
 #endif
 
             CachePath = CacheFilePath.Instance;
@@ -432,13 +425,13 @@ namespace PDF_Master
                 {
                     GuidPDFPath = Path.Combine(CachePath.GuidPDFPath, "Quick Start Guide.pdf");
                 }
-
             }
             catch
             {
             }
 
             #region 设置软件语系
+
             List<string> lang = new List<string>() { "zh-CN", "zh-TW", "en-US" };
             CultureInfo cultureInfo = new CultureInfo("en-US");
             //if (lang.Contains(Settings.Default.AppProperties.culture))
@@ -454,7 +447,7 @@ namespace PDF_Master
             }
             catch { }
 
-            #endregion
+            #endregion 设置软件语系
 
             //启动循环检查更新线程
             CheckUpdate();
@@ -473,6 +466,7 @@ namespace PDF_Master
 
             base.OnStartup(e);
         }
+
         /// <summary>
         /// 解析是否带参数启动
         /// </summary>
@@ -545,6 +539,7 @@ namespace PDF_Master
             Crashes.TrackError(e.Exception);
 #endif
         }
+
         /// <summary>
         /// 创建启动窗口
         /// </summary>
@@ -758,7 +753,6 @@ namespace PDF_Master
             containerRegistry.RegisterDialog<SubscriptionOKDialog>(DialogNames.SubscriptionOKDialog);
             containerRegistry.RegisterDialog<LoginoffDialog>(DialogNames.LoginoffDialog);
 
-
             //新手引导弹窗
             containerRegistry.RegisterDialog<NoviceGuidDialog>(DialogNames.GuidDialog);
             containerRegistry.RegisterDialog<IAPCompareDialog>(DialogNames.IAPCompareDialog);
@@ -773,7 +767,8 @@ namespace PDF_Master
 
             //OCR下载弹窗
             containerRegistry.RegisterDialog<OCRDownloadProgress>(DialogNames.OCRDownloadProgress);
-            
+
+            containerRegistry.RegisterDialog<ChangeEmailDialog>(DialogNames.ChangeEmailDialog);
 
             #endregion 注册弹窗
         }
@@ -826,7 +821,6 @@ namespace PDF_Master
                 Trace.WriteLine("CPDFSDK License Code." + verifyResult + "\n");
                 if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
                     return false;
-
             }
             catch { Trace.WriteLine("CPDFSDK License Code Error \n"); }
 
@@ -848,10 +842,10 @@ namespace PDF_Master
                 return false;
                 }
                 CPDFConverter.Init(resPath);*/
-               
+
                 string resPath = Path.GetDirectoryName(typeof(MainWindow).Assembly.Location) + "\\";
                 CPDFConverter.Init(resPath);
-                
+
                 LicenseError licenseerror = CPDFConverter.LicenseVerify(ConverterDevKey, ConverterDevSecret);
                 //初始化ocr库
                 CPDFConverter.InitOCRLibrary(Path.Combine(resPath, "x64"));
@@ -909,9 +903,11 @@ namespace PDF_Master
                     case "zh-CN":
                         lang = "zh_Hans";
                         break;
+
                     case "zh-TW":
                         lang = "zh_Hant";
                         break;
+
                     default:
                         lang = "en_Us";
                         break;
@@ -953,7 +949,6 @@ namespace PDF_Master
             }
             catch
             {
-
             }
         }
 

+ 142 - 0
PDF Office/CustomControl/StepBar.cs

@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows;
+
+namespace PDF_Master.CustomControl
+{
+    public class StepBarItem : ContentControl
+    {
+        #region 依赖属性定义
+
+        public string Number
+        {
+            get { return (string)GetValue(NumberProperty); }
+            set { SetValue(NumberProperty, value); }
+        }
+
+        public static readonly DependencyProperty NumberProperty =
+            DependencyProperty.Register("Number", typeof(string), typeof(StepBarItem));
+
+        #endregion 依赖属性定义
+
+        #region Constructors
+
+        static StepBarItem()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(StepBarItem), new FrameworkPropertyMetadata(typeof(StepBarItem)));
+        }
+
+        #endregion Constructors
+    }
+
+    public class StepBar : ItemsControl
+    {
+        #region Progress
+
+        public int CurrentIndex
+        {
+            get { return (int)GetValue(CurrentIndexProperty); }
+            set { SetValue(CurrentIndexProperty, value); }
+        }
+
+        public static readonly DependencyProperty CurrentIndexProperty =
+            DependencyProperty.Register("CurrentIndex", typeof(int), typeof(StepBar), new PropertyMetadata(0));
+
+        public Brush ActivateColor
+        {
+            get { return (Brush)GetValue(ActivateColorProperty); }
+            set { SetValue(ActivateColorProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for ActivateColor.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty ActivateColorProperty =
+            DependencyProperty.Register("ActivateColor", typeof(Brush), typeof(StepBar), new PropertyMetadata(new SolidColorBrush(Colors.Green)));
+
+        public Brush UnActivateColor
+        {
+            get { return (Brush)GetValue(UnActivateColorProperty); }
+            set { SetValue(UnActivateColorProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for UnActivateColor.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty UnActivateColorProperty =
+            DependencyProperty.Register("UnActivateColor", typeof(Brush), typeof(StepBar), new PropertyMetadata(new SolidColorBrush(Colors.Gray)));
+
+        /// <summary>
+        /// 线的最小长度
+        /// </summary>
+        public double LineMinLength
+        {
+            get { return (double)GetValue(LineMinLengthProperty); }
+            set { SetValue(LineMinLengthProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for LineMinLength.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty LineMinLengthProperty =
+            DependencyProperty.Register("LineMinLength", typeof(double), typeof(StepBar), new PropertyMetadata(50d));
+
+        public Orientation Orientation
+        {
+            get { return (Orientation)GetValue(OrientationProperty); }
+            set { SetValue(OrientationProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for Orientation.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty OrientationProperty =
+            DependencyProperty.Register("Orientation", typeof(Orientation), typeof(StepBar), new PropertyMetadata(Orientation.Horizontal));
+
+        #endregion Progress
+
+        #region Constructors
+
+        static StepBar()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(StepBar), new FrameworkPropertyMetadata(typeof(StepBar)));
+        }
+
+        #endregion Constructors
+
+        #region Override方法
+
+        protected override DependencyObject GetContainerForItemOverride()
+        {
+            return new StepBarItem();
+        }
+
+        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
+        {
+            //设置Item的显示数字
+            StepBarItem stepBarItem = element as StepBarItem;
+            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(stepBarItem);
+            int index = itemsControl.ItemContainerGenerator.IndexFromContainer(stepBarItem);
+            stepBarItem.Number = Convert.ToString(++index);
+            base.PrepareContainerForItemOverride(element, item);
+        }
+
+        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
+        {
+            base.OnItemsChanged(e);
+
+            //ItemsControl数量变化时,重新设置各个Item的显示的数字
+            for (int i = 0; i < this.Items.Count; i++)
+            {
+                StepBarItem stepBarItem = this.ItemContainerGenerator.ContainerFromIndex(i) as StepBarItem;
+                if (stepBarItem != null)
+                {
+                    int temp = i;
+                    stepBarItem.Number = Convert.ToString(++temp);
+                }
+            }
+            //进度重新回到第一个
+            //this.Progress = 0;
+        }
+
+        #endregion Override方法
+    }
+}

+ 37 - 0
PDF Office/DataConvert/IsLastItemConverter.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace PDF_Master.DataConvert
+{
+    public class IsLastItemConverter : IMultiValueConverter
+    {
+        #region IValueConverter 成员
+
+        public object Convert(object[] value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            ContentControl contentPresenter = value[0] as ContentControl;
+            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(contentPresenter);
+
+            bool flag = false;
+            if (itemsControl != null)
+            {
+                int index = itemsControl.ItemContainerGenerator.IndexFromContainer(contentPresenter);
+                flag = (index == (itemsControl.Items.Count - 1));
+            }
+
+            return flag;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+        }
+
+        #endregion IValueConverter 成员
+    }
+}

+ 67 - 0
PDF Office/DataConvert/IsProgressedConverter.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace PDF_Master.DataConvert
+{
+    public class IsProgressedConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            if ((values[0] is ContentControl && values[1] is int) == false)
+            {
+                return EnumCompare.None;
+            }
+
+            ContentControl contentControl = values[0] as ContentControl;
+            int progress = (int)values[1];
+            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(contentControl);
+
+            if (itemsControl == null)
+            {
+                return EnumCompare.None;
+            }
+
+            int index = itemsControl.ItemContainerGenerator.IndexFromContainer(contentControl);
+
+            if (index < progress)
+            {
+                return EnumCompare.Less;
+            }
+            else if (index == progress)
+            {
+                return EnumCompare.Equal;
+            }
+            return EnumCompare.Large;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+
+    public enum EnumCompare
+    {
+        /// <summary>
+        /// 小于
+        /// </summary>
+        Less,
+
+        /// <summary>
+        /// 等于
+        /// </summary>
+        Equal,
+
+        /// <summary>
+        /// 大于
+        /// </summary>
+        Large,
+
+        None,
+    }
+}

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

@@ -246,5 +246,10 @@ namespace PDF_Master.Model
         public static string SelectedTranslation = "SelectedTranslationDialog";
 
         public static string OCRDownloadProgress = "OCRDownloadProgress";
+
+        /// <summary>
+        ///个人中心-更换邮箱
+        /// </summary>
+        public static string ChangeEmailDialog = "ChangeEmailDialog";
     }
 }

+ 19 - 0
PDF Office/PDF Master.csproj

@@ -338,6 +338,7 @@
     <Compile Include="CustomControl\ScanViewControl\CustomDraw.cs" />
     <Compile Include="CustomControl\ScanViewControl\CustomPanel.cs" />
     <Compile Include="CustomControl\ScanViewControl\DrawRect.cs" />
+    <Compile Include="CustomControl\StepBar.cs" />
     <Compile Include="CustomControl\SystemControl\CustomCommandAction .cs" />
     <Compile Include="CustomControl\SystemControl\RoutedEventTrigger.cs" />
     <Compile Include="CustomControl\TextBoxEx.cs" />
@@ -365,6 +366,8 @@
     <Compile Include="DataConvert\IntAndTagToBoolMultiBinding.cs" />
     <Compile Include="DataConvert\IntToColorBrush.cs" />
     <Compile Include="DataConvert\InvertBoolConvert.cs" />
+    <Compile Include="DataConvert\IsLastItemConverter.cs" />
+    <Compile Include="DataConvert\IsProgressedConverter.cs" />
     <Compile Include="DataConvert\ListCountToVisible.cs.cs" />
     <Compile Include="DataConvert\LoginBordVis.cs" />
     <Compile Include="DataConvert\ObjectConvert.cs" />
@@ -524,6 +527,7 @@
       <DependentUpon>Service.resx</DependentUpon>
     </Compile>
     <Compile Include="ViewModels\Dialog\ChatGPTAIDialogs\DocumentaryTranslationDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\ServiceDialog\ChangeEmailDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\LoginoffViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\SubscriptionDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ServiceDialog\SubscriptionOKDialogViewModel.cs" />
@@ -948,6 +952,9 @@
     <Compile Include="Views\Dialog\Redaction\RepeatMarkDialog.xaml.cs">
       <DependentUpon>RepeatMarkDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\ServiceDialog\ChangeEmailDialog.xaml.cs">
+      <DependentUpon>ChangeEmailDialog.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\ServiceDialog\CodeRegion.xaml.cs">
       <DependentUpon>CodeRegion.xaml</DependentUpon>
     </Compile>
@@ -1479,6 +1486,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Styles\RegisterStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\SeparatorStyle.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -1487,6 +1498,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Styles\StepControlStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\TabControlStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -1775,6 +1790,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Views\Dialog\ServiceDialog\ChangeEmailDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\Dialog\ServiceDialog\CodeRegion.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 217 - 0
PDF Office/Styles/RegisterStyle.xaml


+ 266 - 0
PDF Office/Styles/StepControlStyle.xaml

@@ -0,0 +1,266 @@
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:converter="clr-namespace:PDF_Master.DataConvert"
+    xmlns:local="clr-namespace:PDF_Master.CustomControl">
+    <converter:IsLastItemConverter x:Key="IsLastItemConverter" />
+    <converter:IsProgressedConverter x:Key="IsProgressedConverter" />
+
+    <Style TargetType="{x:Type local:StepBarItem}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type local:StepBarItem}">
+                    <Grid>
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="auto" />
+                            <ColumnDefinition Width="*" />
+                        </Grid.ColumnDefinitions>
+                        <StackPanel Orientation="Horizontal">
+
+                            <ContentPresenter VerticalAlignment="Center" Visibility="Collapsed" />
+                            <Grid>
+                                <!--<TextBlock
+                                x:Name="path"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                FontFamily="{StaticResource FontAwesome}"
+                                FontSize="20"
+                                FontWeight="Light"
+                                Foreground="{TemplateBinding Foreground}"
+                                Text="&#xf05d;"
+                                Visibility="Collapsed" />-->
+                                <!--<Button
+                                Name="BtnIcon"
+                                Width="30"
+                                Height="30"
+                                Background="LightBlue"
+                                BorderBrush="Black"
+                                BorderThickness="1"
+                                Content="{Binding Path=Number, RelativeSource={RelativeSource TemplatedParent}}">
+                                <Button.Template>
+                                <ControlTemplate TargetType="Button">
+                                <Border
+                                Background="{TemplateBinding Background}"
+                                BorderBrush="{TemplateBinding BorderBrush}"
+                                BorderThickness="{TemplateBinding BorderThickness}"
+                                CornerRadius="15">
+                                <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
+                                </Border>
+                                </ControlTemplate>
+                                </Button.Template>
+                                </Button>-->
+                                <Ellipse
+                                    Name="BtnIcon"
+                                    Width="24"
+                                    Height="23"
+                                    Fill="LightBlue"
+                                    Stroke="Black"
+                                    StrokeThickness="0" />
+                                <TextBlock
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    FontSize="14"
+                                    Foreground="White"
+                                    Text="{Binding Path=Number, RelativeSource={RelativeSource TemplatedParent}}" />
+                            </Grid>
+                        </StackPanel>
+                        <Border
+                            x:Name="Line"
+                            Grid.Column="1"
+                            MinWidth="{Binding LineMinLength, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                            Margin="0"
+                            VerticalAlignment="Center"
+                            BorderBrush="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                            BorderThickness="0,2,0,0"
+                            SnapsToDevicePixels="True"
+                            UseLayoutRounding="True"
+                            Visibility="Collapsed" />
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <DataTrigger Value="True">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="Visibility" Value="Collapsed" />
+                            <Setter Property="HorizontalAlignment" Value="Left" />
+                        </DataTrigger>
+                        <DataTrigger Value="False">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="Visibility" Value="Visible" />
+                        </DataTrigger>
+                        <DataTrigger Value="Less">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="BorderBrush" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter TargetName="BtnIcon" Property="Fill" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                        </DataTrigger>
+                        <DataTrigger Value="Equal">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter TargetName="BtnIcon" Property="Fill" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                        </DataTrigger>
+                        <DataTrigger Value="Large">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter TargetName="BtnIcon" Property="Fill" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter Property="Foreground" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                        </DataTrigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <DataTrigger Binding="{Binding Orientation, RelativeSource={RelativeSource AncestorType=local:StepBar}}" Value="Vertical">
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type local:StepBarItem}">
+                            <Grid>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="auto" />
+                                    <RowDefinition Height="*" />
+                                </Grid.RowDefinitions>
+                                <StackPanel Orientation="Vertical">
+                                    <Grid Margin="0,0,0,0">
+                                        <TextBlock
+                                            x:Name="path"
+                                            HorizontalAlignment="Center"
+                                            VerticalAlignment="Center"
+                                            FontFamily="{StaticResource FontAwesome}"
+                                            FontSize="20"
+                                            FontWeight="Thin"
+                                            Foreground="{TemplateBinding Foreground}"
+                                            Text="&#xf05d;"
+                                            Visibility="Collapsed" />
+                                    </Grid>
+                                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
+                                </StackPanel>
+                                <Border
+                                    x:Name="Line"
+                                    Grid.Row="1"
+                                    MinHeight="{Binding LineMinLength, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                                    Margin="13,0,0,0"
+                                    VerticalAlignment="Center"
+                                    BorderBrush="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                                    BorderThickness="1,0,0,0"
+                                    SnapsToDevicePixels="True"
+                                    UseLayoutRounding="True"
+                                    Visibility="Collapsed" />
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <DataTrigger Value="True">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="Visibility" Value="Collapsed" />
+                                    <Setter Property="HorizontalAlignment" Value="Left" />
+                                </DataTrigger>
+                                <DataTrigger Value="False">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="Visibility" Value="Visible" />
+                                </DataTrigger>
+                                <DataTrigger Value="Less">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="BorderBrush" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                    <Setter TargetName="path" Property="Visibility" Value="Visible" />
+                                    <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                </DataTrigger>
+                                <DataTrigger Value="Equal">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                    <Setter TargetName="path" Property="Visibility" Value="Visible" />
+                                    <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                </DataTrigger>
+                                <DataTrigger Value="Large">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                    <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
+                                    <Setter Property="Foreground" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                </DataTrigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </DataTrigger>
+        </Style.Triggers>
+    </Style>
+
+    <Style TargetType="{x:Type local:StepBar}">
+        <Setter Property="HorizontalAlignment" Value="Left" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type local:StepBar}">
+                    <Border Background="{TemplateBinding Background}">
+                        <ScrollViewer PanningMode="HorizontalOnly" VerticalScrollBarVisibility="Disabled">
+                            <ItemsPresenter />
+                        </ScrollViewer>
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="ItemsPanel">
+            <Setter.Value>
+                <ItemsPanelTemplate>
+                    <StackPanel IsItemsHost="True" Orientation="Horizontal" />
+                </ItemsPanelTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Orientation}" Value="Vertical">
+                <Setter Property="ItemsPanel">
+                    <Setter.Value>
+                        <ItemsPanelTemplate>
+                            <StackPanel IsItemsHost="True" Orientation="Vertical" />
+                        </ItemsPanelTemplate>
+                    </Setter.Value>
+                </Setter>
+            </DataTrigger>
+        </Style.Triggers>
+    </Style>
+</ResourceDictionary>

+ 33 - 0
PDF Office/ViewModels/Dialog/ServiceDialog/ChangeEmailDialogViewModel.cs

@@ -0,0 +1,33 @@
+using Prism.Mvvm;
+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 ChangeEmailDialogViewModel : BindableBase, IDialogAware
+    {
+        public string Title => throw new NotImplementedException();
+
+        public event Action<IDialogResult> RequestClose;
+
+        public bool CanCloseDialog()
+        {
+            return true;
+            //throw new NotImplementedException();
+        }
+
+        public void OnDialogClosed()
+        {
+            //throw new NotImplementedException();
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+            //throw new NotImplementedException();
+        }
+    }
+}

+ 24 - 2
PDF Office/ViewModels/Dialog/ServiceDialog/UserDialogViewModel.cs

@@ -6,6 +6,8 @@ using System.Windows.Controls;
 using System.Windows.Media;
 using PDF_Master.CustomControl;
 using PDF_Master.Helper;
+using PDF_Master.Model.HomePageToolsDialogs;
+using PDF_Master.Model;
 using PDF_Master.Properties;
 using Prism.Commands;
 using Prism.Mvvm;
@@ -18,6 +20,7 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
     {
         private string uuid = ServiceHelper.GetDeviceSerialNumber();
         public IRegionManager Region;
+        private IDialogService dialogs;
         public string Title => "";
 
         public event Action<IDialogResult> RequestClose;
@@ -344,18 +347,20 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
         public DelegateCommand UserOutCommand { get; set; }
         public DelegateCommand LogOutCommand { get; set; }
         public DelegateCommand LinkuserdataCommand { get; set; }
-       
 
+        public DelegateCommand ChangeEmailCommand { get; set; }
         UserDialogViewModel(IRegionManager regionManager, IDialogService dialogService)
         {
             this.Region = regionManager;
+            this.dialogs=dialogService;
+
             InitString();
             UserRegionName = Guid.NewGuid().ToString();
             UserOutCommand = new DelegateCommand(UserOut);
             LogOutCommand = new DelegateCommand(LogOut);
             LinkstoreCommand = new DelegateCommand(Linkstore);
             LinkuserdataCommand = new DelegateCommand(Linkuserdata);
-
+            ChangeEmailCommand = new DelegateCommand(ChangeEmail);
 
             TextSubscribeEndtime = Settings.Default.UserDate.subscribeendDate;
             UserEmail = Settings.Default.UserDate.Email;
@@ -402,6 +407,23 @@ namespace PDF_Master.ViewModels.Dialog.ServiceDialog
   
 
         }
+
+        private void ChangeEmail()
+        {
+            dialogs.ShowDialog(DialogNames.ChangeEmailDialog, null , e =>
+            {
+                if (e.Result == ButtonResult.OK && e.Parameters != null)
+                {
+                    //付费锁
+                    if (!ServiceHelper.IAPBeforeFunction())
+                    {
+                        return;
+                    }
+                   
+                }
+            });
+        }
+
         private void Linkstore()
         {
             Process.Start(new ProcessStartInfo(Uristore));

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 186 - 0
PDF Office/Views/Dialog/ServiceDialog/ChangeEmailDialog.xaml


+ 48 - 0
PDF Office/Views/Dialog/ServiceDialog/ChangeEmailDialog.xaml.cs

@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Master.Views.Dialog.ServiceDialog
+{
+/// <summary>
+    /// ChangeEmailDialog.xaml 的交互逻辑
+/// </summary>
+public partial class ChangeEmailDialog : UserControl
+{
+public ChangeEmailDialog()
+{
+InitializeComponent();
+}
+
+private void BtnNext_Click(object sender, RoutedEventArgs e)
+{
+  if (StepBar.Items.Count > 0 && StepBar.CurrentIndex < (StepBar.Items.Count - 1))
+  {
+  StepBar.CurrentIndex++;
+  }
+  }
+
+  private void BtnPrevious_Click(object sender, RoutedEventArgs e)
+  {
+  if (StepBar.Items.Count > 0 && StepBar.CurrentIndex != 0)
+        {
+        StepBar.CurrentIndex--;
+        }
+        }
+
+        private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
+        {
+        }
+        }
+        }

+ 27 - 27
PDF Office/Views/Dialog/ServiceDialog/UserDialog.xaml

@@ -86,7 +86,6 @@
                                 Foreground="White"
                                 Text="{Binding Useremailchar, Mode=TwoWay}" />
                         </Grid>
-
                     </Border>
                     <TextBlock
                         Margin="0,18,0,0"
@@ -109,32 +108,36 @@
                         Text="{Binding UserEmail}"
                         TextAlignment="Center"
                         TextWrapping="Wrap" />
-
+                    <!--  隐藏更换邮箱入口  -->
+                    <Button
+                        Command="{Binding ChangeEmailCommand}"
+                        Content="Change Email"
+                        Visibility="Collapsed" />
                 </StackPanel>
             </Grid>
             <TextBlock
                 Height="54"
-                    Margin="0,24,0,0"
-                    Visibility="{Binding LinkuserdataVis,Mode=TwoWay}"
-                    FontFamily="Segoe UI"
-                    FontSize="14"
-                    Foreground="#1770F4"
-                    LineHeight="22">
-                    <Hyperlink Command="{Binding LinkuserdataCommand}">
-                        <Hyperlink.Style>
-                            <Style BasedOn="{StaticResource {x:Type Hyperlink}}" TargetType="Hyperlink">
-                                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
-                                <Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
-                                <Style.Triggers>
-                                    <Trigger Property="IsMouseOver" Value="True">
-                                        <Setter Property="TextBlock.TextDecorations" Value="None" />
-                                    </Trigger>
-                                </Style.Triggers>
-                            </Style>
-                        </Hyperlink.Style>
-                        <TextBlock Text="{Binding TextOrderInformation}" />
-                    </Hyperlink>
-                </TextBlock>
+                Margin="0,24,0,0"
+                FontFamily="Segoe UI"
+                FontSize="14"
+                Foreground="#1770F4"
+                LineHeight="22"
+                Visibility="{Binding LinkuserdataVis, Mode=TwoWay}">
+                <Hyperlink Command="{Binding LinkuserdataCommand}">
+                    <Hyperlink.Style>
+                        <Style BasedOn="{StaticResource {x:Type Hyperlink}}" TargetType="Hyperlink">
+                            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+                            <Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
+                            <Style.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter Property="TextBlock.TextDecorations" Value="None" />
+                                </Trigger>
+                            </Style.Triggers>
+                        </Style>
+                    </Hyperlink.Style>
+                    <TextBlock Text="{Binding TextOrderInformation}" />
+                </Hyperlink>
+            </TextBlock>
             <StackPanel
                 Width="392"
                 Margin="0,22,0,30"
@@ -227,12 +230,9 @@
                     Style="{StaticResource btn.upgrade}"
                     Visibility="{Binding Subscriptionbtn, Mode=TwoWay}" />
             </StackPanel>
-
         </StackPanel>
         <Grid>
             <ContentControl prism:RegionManager.RegionName="{Binding UserRegionName}" Visibility="Visible" />
         </Grid>
     </Grid>
-
-</UserControl>
-
+</UserControl>