Kaynağa Gözat

轻会员-头像不显示字符bug修复

lvle 1 yıl önce
ebeveyn
işleme
b8c074b77d

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

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Data;
-
-namespace PDF_Master.DataConvert
-{
-      public class FirstCharacterConverter : IValueConverter
-    {
-        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
-        {
-            if (value == null)
-            {
-                return " ";
-            }
-            else
-            { 
-                string firstCharacter=" ";
-                string stringValue = value.ToString();
-                if (!string.IsNullOrEmpty(stringValue) && value.ToString().Length >= 1)
-                {
-                    firstCharacter = stringValue.Substring(0, 1);
-                }
-                return firstCharacter;
-            }
-        }
-
-        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
-        {
-
-            throw new NotImplementedException();
-        }
-    }
-}

+ 3 - 1
PDF Office/Helper/ServiceHelper.cs

@@ -400,7 +400,8 @@ namespace PDF_Master.Helper
                                 MainWindow win = App.Current.Windows[i] as MainWindow;
                                 if (win != null&& win.DataContext!=null)
                                 {
-                                    (win.DataContext as MainWindowViewModel).UpgradeVis = Visibility.Collapsed;                           
+                                    (win.DataContext as MainWindowViewModel).UpgradeVis = Visibility.Collapsed;
+                                    (win.DataContext as MainWindowViewModel).Useremailchar = Settings.Default.UserDate.Email.Substring(0, 1);
                                 }
                             }
                         }
@@ -412,6 +413,7 @@ namespace PDF_Master.Helper
                                 if (win != null&& win.DataContext!=null)
                                 {
                                     (win.DataContext as MainWindowViewModel).UpgradeVis = Visibility.Visible;
+                                    (win.DataContext as MainWindowViewModel).Useremailchar = Settings.Default.UserDate.Email.Substring(0, 1);
                                 }
                             }
                         }

+ 7 - 7
PDF Office/MultilingualResources/PDF Office.en.xlf

@@ -602,31 +602,31 @@
           <source>Cancellation failed</source>
           <target state="new">Cancellation failed</target>
         </trans-unit>
-        <trans-unit id="328" translate="yes" xml:space="preserve">
+        <trans-unit id="code328" translate="yes" xml:space="preserve">
           <source>Payment method error</source>
           <target state="new">Payment method error</target>
         </trans-unit>
-        <trans-unit id="329" translate="yes" xml:space="preserve">
+        <trans-unit id="code329" translate="yes" xml:space="preserve">
           <source>Current events are not supported</source>
           <target state="new">Current events are not supported</target>
         </trans-unit>
-        <trans-unit id="330" translate="yes" xml:space="preserve">
+        <trans-unit id="code330" translate="yes" xml:space="preserve">
           <source>Account is logged in on another device</source>
           <target state="new">Account is logged in on another device</target>
         </trans-unit>
-        <trans-unit id="331" translate="yes" xml:space="preserve">
+        <trans-unit id="code331" translate="yes" xml:space="preserve">
           <source>This email account is no longer available or cancelled</source>
           <target state="new">This email account is no longer available or cancelled</target>
         </trans-unit>
-        <trans-unit id="332" translate="yes" xml:space="preserve">
+        <trans-unit id="code332" translate="yes" xml:space="preserve">
           <source>AppStore receipt verification failed</source>
           <target state="new">AppStore receipt verification failed</target>
         </trans-unit>
-        <trans-unit id="333" translate="yes" xml:space="preserve">
+        <trans-unit id="code333" translate="yes" xml:space="preserve">
           <source>Please re-verify the receipt</source>
           <target state="new">Please re-verify the receipt</target>
         </trans-unit>
-        <trans-unit id="334" translate="yes" xml:space="preserve">
+        <trans-unit id="code334" translate="yes" xml:space="preserve">
           <source>Users have already subscribed to PDF Master</source>
           <target state="new">Users have already subscribed to PDF Master</target>
         </trans-unit>

+ 7 - 7
PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf

@@ -602,31 +602,31 @@
           <source>Cancellation failed</source>
           <target state="new">Cancellation failed</target>
         </trans-unit>
-        <trans-unit id="328" translate="yes" xml:space="preserve">
+        <trans-unit id="code328" translate="yes" xml:space="preserve">
           <source>Payment method error</source>
           <target state="new">Payment method error</target>
         </trans-unit>
-        <trans-unit id="329" translate="yes" xml:space="preserve">
+        <trans-unit id="code329" translate="yes" xml:space="preserve">
           <source>Current events are not supported</source>
           <target state="new">Current events are not supported</target>
         </trans-unit>
-        <trans-unit id="330" translate="yes" xml:space="preserve">
+        <trans-unit id="code330" translate="yes" xml:space="preserve">
           <source>Account is logged in on another device</source>
           <target state="new">Account is logged in on another device</target>
         </trans-unit>
-        <trans-unit id="331" translate="yes" xml:space="preserve">
+        <trans-unit id="code331" translate="yes" xml:space="preserve">
           <source>This email account is no longer available or cancelled</source>
           <target state="new">This email account is no longer available or cancelled</target>
         </trans-unit>
-        <trans-unit id="332" translate="yes" xml:space="preserve">
+        <trans-unit id="code332" translate="yes" xml:space="preserve">
           <source>AppStore receipt verification failed</source>
           <target state="new">AppStore receipt verification failed</target>
         </trans-unit>
-        <trans-unit id="333" translate="yes" xml:space="preserve">
+        <trans-unit id="code333" translate="yes" xml:space="preserve">
           <source>Please re-verify the receipt</source>
           <target state="new">Please re-verify the receipt</target>
         </trans-unit>
-        <trans-unit id="334" translate="yes" xml:space="preserve">
+        <trans-unit id="code334" translate="yes" xml:space="preserve">
           <source>Users have already subscribed to PDF Master</source>
           <target state="new">Users have already subscribed to PDF Master</target>
         </trans-unit>

+ 7 - 7
PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf

@@ -602,31 +602,31 @@
           <source>Cancellation failed</source>
           <target state="new">Cancellation failed</target>
         </trans-unit>
-        <trans-unit id="328" translate="yes" xml:space="preserve">
+        <trans-unit id="code328" translate="yes" xml:space="preserve">
           <source>Payment method error</source>
           <target state="new">Payment method error</target>
         </trans-unit>
-        <trans-unit id="329" translate="yes" xml:space="preserve">
+        <trans-unit id="code329" translate="yes" xml:space="preserve">
           <source>Current events are not supported</source>
           <target state="new">Current events are not supported</target>
         </trans-unit>
-        <trans-unit id="330" translate="yes" xml:space="preserve">
+        <trans-unit id="code330" translate="yes" xml:space="preserve">
           <source>Account is logged in on another device</source>
           <target state="new">Account is logged in on another device</target>
         </trans-unit>
-        <trans-unit id="331" translate="yes" xml:space="preserve">
+        <trans-unit id="code331" translate="yes" xml:space="preserve">
           <source>This email account is no longer available or cancelled</source>
           <target state="new">This email account is no longer available or cancelled</target>
         </trans-unit>
-        <trans-unit id="332" translate="yes" xml:space="preserve">
+        <trans-unit id="code332" translate="yes" xml:space="preserve">
           <source>AppStore receipt verification failed</source>
           <target state="new">AppStore receipt verification failed</target>
         </trans-unit>
-        <trans-unit id="333" translate="yes" xml:space="preserve">
+        <trans-unit id="code333" translate="yes" xml:space="preserve">
           <source>Please re-verify the receipt</source>
           <target state="new">Please re-verify the receipt</target>
         </trans-unit>
-        <trans-unit id="334" translate="yes" xml:space="preserve">
+        <trans-unit id="code334" translate="yes" xml:space="preserve">
           <source>Users have already subscribed to PDF Master</source>
           <target state="new">Users have already subscribed to PDF Master</target>
         </trans-unit>

+ 0 - 1
PDF Office/PDF Master.csproj

@@ -358,7 +358,6 @@
     <Compile Include="DataConvert\ColorBrushConvert.cs" />
     <Compile Include="DataConvert\CreateTimeToDate.cs" />
     <Compile Include="DataConvert\FileFormatToIconConvert.cs" />
-    <Compile Include="DataConvert\FirstCharacterConverter.cs" />
     <Compile Include="DataConvert\GroupHeaderConverter.cs" />
     <Compile Include="DataConvert\IndexConverter .cs" />
     <Compile Include="DataConvert\IntToBooleanConvert.cs" />

+ 63 - 63
PDF Office/Strings/Service/Service.Designer.cs

@@ -60,69 +60,6 @@ namespace PDF_Master.Strings.Service {
             }
         }
         
-        /// <summary>
-        ///   查找类似 Payment method error 的本地化字符串。
-        /// </summary>
-        public static string _328 {
-            get {
-                return ResourceManager.GetString("328", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   查找类似 Current events are not supported 的本地化字符串。
-        /// </summary>
-        public static string _329 {
-            get {
-                return ResourceManager.GetString("329", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   查找类似 Account is logged in on another device 的本地化字符串。
-        /// </summary>
-        public static string _330 {
-            get {
-                return ResourceManager.GetString("330", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   查找类似 This email account is no longer available or cancelled 的本地化字符串。
-        /// </summary>
-        public static string _331 {
-            get {
-                return ResourceManager.GetString("331", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   查找类似 AppStore receipt verification failed 的本地化字符串。
-        /// </summary>
-        public static string _332 {
-            get {
-                return ResourceManager.GetString("332", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   查找类似 Please re-verify the receipt 的本地化字符串。
-        /// </summary>
-        public static string _333 {
-            get {
-                return ResourceManager.GetString("333", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   查找类似 Users have already subscribed to PDF Master 的本地化字符串。
-        /// </summary>
-        public static string _334 {
-            get {
-                return ResourceManager.GetString("334", resourceCulture);
-            }
-        }
-        
         /// <summary>
         ///   查找类似 Save with Watermark 的本地化字符串。
         /// </summary>
@@ -393,6 +330,69 @@ namespace PDF_Master.Strings.Service {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Payment method error 的本地化字符串。
+        /// </summary>
+        public static string code328 {
+            get {
+                return ResourceManager.GetString("code328", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Current events are not supported 的本地化字符串。
+        /// </summary>
+        public static string code329 {
+            get {
+                return ResourceManager.GetString("code329", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Account is logged in on another device 的本地化字符串。
+        /// </summary>
+        public static string code330 {
+            get {
+                return ResourceManager.GetString("code330", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 This email account is no longer available or cancelled 的本地化字符串。
+        /// </summary>
+        public static string code331 {
+            get {
+                return ResourceManager.GetString("code331", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 AppStore receipt verification failed 的本地化字符串。
+        /// </summary>
+        public static string code332 {
+            get {
+                return ResourceManager.GetString("code332", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Please re-verify the receipt 的本地化字符串。
+        /// </summary>
+        public static string code333 {
+            get {
+                return ResourceManager.GetString("code333", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Users have already subscribed to PDF Master 的本地化字符串。
+        /// </summary>
+        public static string code334 {
+            get {
+                return ResourceManager.GetString("code334", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Enter an existing verification code 的本地化字符串。
         /// </summary>

+ 21 - 21
PDF Office/Strings/Service/Service.resx

@@ -117,27 +117,6 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <data name="328" xml:space="preserve">
-    <value>Payment method error</value>
-  </data>
-  <data name="329" xml:space="preserve">
-    <value>Current events are not supported</value>
-  </data>
-  <data name="330" xml:space="preserve">
-    <value>Account is logged in on another device</value>
-  </data>
-  <data name="331" xml:space="preserve">
-    <value>This email account is no longer available or cancelled</value>
-  </data>
-  <data name="332" xml:space="preserve">
-    <value>AppStore receipt verification failed</value>
-  </data>
-  <data name="333" xml:space="preserve">
-    <value>Please re-verify the receipt</value>
-  </data>
-  <data name="334" xml:space="preserve">
-    <value>Users have already subscribed to PDF Master</value>
-  </data>
   <data name="BtnTextSavewithWatermark" xml:space="preserve">
     <value>Save with Watermark</value>
   </data>
@@ -228,6 +207,27 @@
   <data name="code327" xml:space="preserve">
     <value>Spaces are not allowed in password</value>
   </data>
+  <data name="code328" xml:space="preserve">
+    <value>Payment method error</value>
+  </data>
+  <data name="code329" xml:space="preserve">
+    <value>Current events are not supported</value>
+  </data>
+  <data name="code330" xml:space="preserve">
+    <value>Account is logged in on another device</value>
+  </data>
+  <data name="code331" xml:space="preserve">
+    <value>This email account is no longer available or cancelled</value>
+  </data>
+  <data name="code332" xml:space="preserve">
+    <value>AppStore receipt verification failed</value>
+  </data>
+  <data name="code333" xml:space="preserve">
+    <value>Please re-verify the receipt</value>
+  </data>
+  <data name="code334" xml:space="preserve">
+    <value>Users have already subscribed to PDF Master</value>
+  </data>
   <data name="codehad" xml:space="preserve">
     <value>Enter an existing verification code</value>
   </data>

+ 1 - 3
PDF Office/Views/MainWindow.xaml

@@ -11,7 +11,6 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
     xmlns:viewmodels="clr-namespace:PDF_Master.ViewModels"
-    xmlns:prop="clr-namespace:PDF_Master.Properties"
     Title="PDF Master"
     Width="1280"
     Height="800"
@@ -33,7 +32,6 @@
     mc:Ignorable="d">
     <Window.Resources>
         <ResourceDictionary>
-            <convert:FirstCharacterConverter x:Key="FirstCharacterConverter"/>
             <Style x:Key="DragablzItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
                 <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="False" />
                 <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
@@ -377,7 +375,7 @@
                             FontSize="14"
                             FontWeight="SemiBold"
                             Foreground="White"
-                          Text="{Binding Source={x:Static prop:Settings.Default}, Path=UserDate.Email,Converter={StaticResource FirstCharacterConverter}}" />
+                          Text="{Binding Useremailchar,Mode=TwoWay}" />
                         </Border>
 
                     </Grid>