Bladeren bron

暂时更改属性时不让其选中,修改主页时间显示逗号问题

liyijie 1 jaar geleden
bovenliggende
commit
1ab5bb7d2d

+ 1 - 1
PDF Office/DataConvert/StringToDateConvert.cs

@@ -100,7 +100,7 @@ namespace PDF_Master.DataConvert
 
                 case "week":
                     string weekStr = DateTime.Parse(last.Date.ToString("yyyy-MM-dd"), cultureInfo).ToString("ddd", cultureInfoEnglish);
-                    result = weekStr + ", " + last.Hour + "," + last.Minute;
+                    result = weekStr + ", " + last.Hour + ":" + last.Minute;
                     break;
 
                 default:

+ 7 - 0
PDF Office/ViewModels/BOTA/AnnotationContentViewModel.cs

@@ -49,6 +49,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Media.Media3D;
 using System.Windows.Shapes;
 using static Dropbox.Api.Files.SearchMatchType;
+using static Dropbox.Api.Paper.ListPaperDocsSortBy;
 using static Dropbox.Api.TeamLog.SpaceCapsType;
 using static System.Net.Mime.MediaTypeNames;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement;
@@ -289,6 +290,9 @@ namespace PDF_Master.ViewModels.BOTA
         public DelegateCommand TimeDescendingCommand { get; set; }
         public string Unicode { get; private set; }
         private bool IsFirst = true;
+
+        //判断是否为属性修改进入,属性修改,改变后不让再次其选中注释
+        public bool IsModified = false;
 
         public AnnotationContentViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator eventAggregator)
         {
@@ -1232,7 +1236,10 @@ namespace PDF_Master.ViewModels.BOTA
                                 if (listBox.SelectedItems.IndexOf(AnnotationListItems[k]) == -1)
                                 //if (!listBox.SelectedItems.Contains(AnnotationListItems[k]))
                                 {
+
+                                    IsModified = false;
                                     listBox.SelectedItem = AnnotationListItems[k];
+                                    
                                     //PdfViewer.SelectAnnotation(args.PageIndex, args.AnnotIndex);
                                 }
                             }

+ 7 - 2
PDF Office/Views/BOTA/AnnotationContent.xaml.cs

@@ -331,7 +331,12 @@ namespace PDF_Master.Views.BOTA
             if (a1 == 1)
             {
                 //if(viewModel.ViewContentViewModel.IsPropertyOpen==false)
-                viewModel.ListBoxItemPreviewMouseLeftButtonDown.Execute((sender as ListBox).SelectedItems[0]);
+                if (viewModel.IsModified)
+                {
+                    viewModel.ListBoxItemPreviewMouseLeftButtonDown.Execute((sender as ListBox).SelectedItems[0]);
+                }
+                viewModel.IsModified = true;
+
             }
             else if (a1 > 1)
             {
@@ -358,7 +363,7 @@ namespace PDF_Master.Views.BOTA
                         selectedItemDics.Add(item.Key, ai);
                     }
                 }
-                
+
 
                 #endregion 阅读视图 多选