SharpsAnnotPropertyViewModel.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. using ComPDFKit.PDFAnnotation;
  2. using ComPDFKitViewer;
  3. using ComPDFKitViewer.AnnotEvent;
  4. using PDF_Master.CustomControl.CompositeControl;
  5. using PDF_Master.Helper;
  6. using PDF_Master.Model;
  7. using PDF_Master.Model.AnnotPanel;
  8. using PDF_Master.ViewModels.Tools;
  9. using PDF_Master.ViewModels.Tools.AnnotManager;
  10. using PDFSettings;
  11. using Prism.Commands;
  12. using Prism.Mvvm;
  13. using Prism.Regions;
  14. using System;
  15. using System.Collections.Generic;
  16. using System.Globalization;
  17. using System.Linq;
  18. using System.Text;
  19. using System.Threading.Tasks;
  20. using System.Windows;
  21. using System.Windows.Controls;
  22. using System.Windows.Data;
  23. using System.Windows.Media;
  24. namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
  25. {
  26. public class DashStyleConverter : IValueConverter
  27. {
  28. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  29. {
  30. if (value is DashStyle)
  31. {
  32. var dash = value as DashStyle;
  33. if (dash.Dashes == null || dash.Dashes.Count == 0 || dash.Dashes[0] == 0)
  34. {
  35. return DashStyles.Solid.Dashes;
  36. }
  37. else
  38. {
  39. DashStyle dashx = new DashStyle();
  40. dashx.Dashes.Add(1);
  41. dashx.Dashes.Add(1);
  42. return dashx.Dashes;
  43. }
  44. }
  45. return value;
  46. }
  47. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  48. {
  49. throw new NotImplementedException();
  50. }
  51. }
  52. public class SharpsAnnotPropertyViewModel : BindableBase, INavigationAware
  53. {
  54. #region 属性
  55. private bool isRect = false;
  56. public bool IsRect
  57. {
  58. get { return isRect; }
  59. set => SetProperty(ref isRect, value);
  60. }
  61. private bool isCircle = false;
  62. public bool IsCircle
  63. {
  64. get { return isCircle; }
  65. set => SetProperty(ref isCircle, value);
  66. }
  67. private bool isArrow = false;
  68. public bool IsArrow
  69. {
  70. get { return isArrow; }
  71. set => SetProperty(ref isArrow, value);
  72. }
  73. private bool isLine = false;
  74. public bool IsLine
  75. {
  76. get { return isLine; }
  77. set => SetProperty(ref isLine, value);
  78. }
  79. private string _strShapeChecked = "";
  80. public string StrShapeChecked
  81. {
  82. get { return _strShapeChecked; }
  83. set
  84. {
  85. SetProperty(ref _strShapeChecked, value);
  86. }
  87. }
  88. public List<ComboDataItem> ThicknessItems { get; protected set; }
  89. private AnnotCommon _basicVm = new AnnotCommon();
  90. public AnnotCommon BasicVm
  91. {
  92. get { return _basicVm; }
  93. set => SetProperty(ref _basicVm, value);
  94. }
  95. private Geometry dataPath = null;
  96. public Geometry DataPath
  97. {
  98. get { return dataPath; }
  99. set
  100. {
  101. SetProperty(ref dataPath, value);
  102. }
  103. }
  104. private DashStyle dash = new DashStyle();
  105. public DashStyle Dash
  106. {
  107. get { return dash; }
  108. set
  109. {
  110. SetProperty(ref dash, value);
  111. }
  112. }
  113. private bool _isLineAnnot = false;
  114. public bool IsLineAnnot
  115. {
  116. get { return _isLineAnnot; }
  117. set
  118. {
  119. SetProperty(ref _isLineAnnot, value);
  120. }
  121. }
  122. #endregion 属性
  123. public DelegateCommand<object> SelectedThickCommand { get; set; }
  124. public DelegateCommand<object> SelectedBorderColorCommand { get; set; }
  125. public DelegateCommand<object> SelectedFillOpacityCommand { get; set; }
  126. public DelegateCommand<object> SelectedFillColorCommand { get; set; }
  127. public DelegateCommand<object> LineStyleCommand { get; set; }
  128. public DelegateCommand<object> SharpsTypeCommand { get; set; }
  129. public DelegateCommand<object> ThicknessChangedCommand { get; set; }
  130. public DelegateCommand<object> SelectedOpacityValueCommand { get; set; }
  131. public event EventHandler<object> LoadPropertyHandler;
  132. public SharpsAnnotPropertyViewModel()
  133. {
  134. InitColorItems();
  135. InitFillColorItems();
  136. InitThicknessItems();
  137. SharpsTypeCommand = new DelegateCommand<object>(SharpsType_Command);
  138. SelectedFillOpacityCommand = new DelegateCommand<object>(SelectedFillOpacity_Command);
  139. SelectedFillColorCommand = new DelegateCommand<object>(SelectedFillColor_Command);
  140. SelectedThickCommand = new DelegateCommand<object>(SelectedThick_Command);
  141. SelectedBorderColorCommand = new DelegateCommand<object>(SelectedBorderColor);
  142. SelectedOpacityValueCommand = new DelegateCommand<object>(SelectedOpacityValue);
  143. ThicknessChangedCommand = new DelegateCommand<object>(ThicknessChanged_Command);
  144. LineStyleCommand = new DelegateCommand<object>(LineStyle_Command);
  145. }
  146. private void InitThicknessItems()
  147. {
  148. ThicknessItems = new List<ComboDataItem>();
  149. ComboDataItem item = new ComboDataItem(1, "pt");
  150. ThicknessItems.Add(item);
  151. item = new ComboDataItem(2, "pt");
  152. ThicknessItems.Add(item);
  153. item = new ComboDataItem(4, "pt");
  154. ThicknessItems.Add(item);
  155. item = new ComboDataItem(6, "pt");
  156. ThicknessItems.Add(item);
  157. item = new ComboDataItem(8, "pt");
  158. ThicknessItems.Add(item);
  159. }
  160. private void InitColorItems()
  161. {
  162. BasicVm.ColorItems = AnnotColorList.GetColorList(ColorSelectorType.Border);
  163. }
  164. private void InitFillColorItems()
  165. {
  166. BasicVm.FillColorItems = AnnotColorList.GetColorList(ColorSelectorType.Fill);
  167. }
  168. private void ThicknessChanged_Command(object obj)
  169. {
  170. if (obj != null)
  171. {
  172. var item = (ComboBoxItem)obj;
  173. var content = (string)item.Content;
  174. if (content != null)
  175. {
  176. var intData = int.Parse(content);
  177. BasicVm.AnnotThickness = intData;
  178. }
  179. }
  180. }
  181. private void SharpsType_Command(object obj)
  182. {
  183. if (obj != null)
  184. {
  185. var tag = (string)obj;
  186. SharpsType(tag, true);
  187. Dictionary<AnnotArgsType, object> changeData = new Dictionary<AnnotArgsType, object>();
  188. switch (tag)
  189. {
  190. case "Rect":
  191. changeData[AnnotArgsType.AnnotSquare] = tag;
  192. break;
  193. case "Circle":
  194. changeData[AnnotArgsType.AnnotCircle] = tag;
  195. break;
  196. case "Arrow":
  197. changeData[AnnotArgsType.AnnotLine] = tag;
  198. break;
  199. case "Line":
  200. changeData[AnnotArgsType.AnnotLine] = tag;
  201. break;
  202. }
  203. PropertyPanel.AnnotTypeChangedInvoke(this, changeData);
  204. }
  205. }
  206. private void SharpsType(string tag, bool isFromToolsBtn = false)
  207. {
  208. switch (tag)
  209. {
  210. case "Rect":
  211. RectangleGeometry rectPath = new RectangleGeometry();
  212. rectPath.Rect = new Rect(0, 5, 28, 22);
  213. DataPath = rectPath;
  214. IsLineAnnot = false;
  215. //if (IsRect == false)
  216. // IsRect = true;
  217. break;
  218. case "Circle":
  219. EllipseGeometry circlePath = new EllipseGeometry();
  220. circlePath.RadiusX = 14;
  221. circlePath.RadiusY = 14;
  222. circlePath.Center = new Point(14, 14);
  223. DataPath = circlePath;
  224. IsLineAnnot = false;
  225. //if (IsCircle == false)
  226. // IsCircle = true;
  227. break;
  228. case "Arrow":
  229. {
  230. ArrowHelper arrowLine = new ArrowHelper();
  231. arrowLine.ArrowLength = 8;
  232. arrowLine.LineStart = new Point(8, 24);
  233. arrowLine.LineEnd = new Point(24, 8);
  234. arrowLine.StartSharp = C_LINE_TYPE.LINETYPE_NONE;
  235. arrowLine.EndSharp = C_LINE_TYPE.LINETYPE_ARROW;
  236. DataPath = arrowLine.BuildArrowBody();
  237. if (IsLineAnnot == false)
  238. IsLineAnnot = true;
  239. //if (isArrow == false)
  240. // isArrow = true;
  241. // changeData[AnnotArgsType.AnnotLine] = tag;
  242. }
  243. break;
  244. case "Line":
  245. {
  246. ArrowHelper arrowLine = new ArrowHelper();
  247. arrowLine.LineStart = new Point(0, 32);
  248. arrowLine.LineEnd = new Point(32, 0);
  249. DataPath = arrowLine.BuildArrowBody();
  250. if (IsLineAnnot == false)
  251. IsLineAnnot = true;
  252. //if (IsLine == false)
  253. // IsLine = true;
  254. }
  255. break;
  256. }
  257. //if (isFromToolsBtn)
  258. // PropertyPanel.AnnotTypeChangedInvoke(this, changeData);
  259. StrShapeChecked = tag;
  260. PropertyPanel.SharpsAnnot = tag;
  261. BasicVm.SetOtherTag(tag);
  262. }
  263. private void LineStyle_Command(object obj)
  264. {
  265. if (obj != null)
  266. {
  267. var tag = obj as string;
  268. if (tag == "Solid")
  269. {
  270. DashStyle dashAnnot = new DashStyle();
  271. dashAnnot.Dashes.Add(0);
  272. dashAnnot.Dashes.Add(0);
  273. Dash = dashAnnot;
  274. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.LineStyle, DashStyles.Solid);
  275. }
  276. else
  277. {
  278. DashStyle dashAnnot = new DashStyle();
  279. dashAnnot.Dashes.Add(1);
  280. dashAnnot.Dashes.Add(1);
  281. Dash = dashAnnot;
  282. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.LineStyle, dash);
  283. }
  284. if (BasicVm.IsMultiSelected == false)
  285. PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, Annot);
  286. }
  287. }
  288. private void SelectedFillColor_Command(object obj)
  289. {
  290. if (obj != null && PropertyPanel != null)
  291. {
  292. var colorValue = (Color)obj;
  293. if (colorValue != null)
  294. {
  295. BasicVm.FillColor = new SolidColorBrush(colorValue);
  296. BasicVm.FillColor.Opacity = BasicVm.FillOpacity;
  297. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.FillColor, colorValue);
  298. if (BasicVm.IsMultiSelected == false)
  299. PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, Annot);
  300. }
  301. }
  302. }
  303. private void SelectedFillOpacity_Command(object obj)
  304. {
  305. if (obj != null)
  306. {
  307. BasicVm.FillOpacity = (double)obj;
  308. BasicVm.FillColor.Opacity = BasicVm.FillOpacity;
  309. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Transparency, BasicVm.FillOpacity);
  310. PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, BasicVm.FillOpacity);
  311. }
  312. }
  313. private void SelectedOpacityValue(object obj)
  314. {
  315. if (obj != null)
  316. {
  317. BasicVm.FillOpacity = (double)obj;
  318. BasicVm.FillColor.Opacity = BasicVm.FillOpacity;
  319. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Transparency, BasicVm.FillOpacity);
  320. PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, BasicVm.FillOpacity);
  321. }
  322. }
  323. private void SelectedBorderColor(object obj)
  324. {
  325. if (obj != null && PropertyPanel != null)
  326. {
  327. var colorValue = (Color)obj;
  328. if (colorValue != null)
  329. {
  330. BasicVm.BorderColor = new SolidColorBrush(colorValue);
  331. BasicVm.BorderColor.Opacity = BasicVm.BorderOpacity;
  332. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Color, colorValue);
  333. if (BasicVm.IsMultiSelected == false)
  334. PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, Annot);
  335. }
  336. }
  337. }
  338. private void SelectedThick_Command(object obj)
  339. {
  340. if (obj is double)
  341. {
  342. var tran = (double)obj;
  343. //BasicVm.AnnotThickness = tran;
  344. PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Thickness, tran);
  345. if (BasicVm.IsMultiSelected == false)
  346. PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, Annot);
  347. }
  348. }
  349. public bool IsNavigationTarget(NavigationContext navigationContext)
  350. {
  351. return true;
  352. }
  353. public void OnNavigatedFrom(NavigationContext navigationContext)
  354. {
  355. BasicVm.IsMultiSelected = false;
  356. //PropertyPanel.annot = null;
  357. //PropertyPanel.AnnotEvents = null;
  358. //PropertyPanel.AnnotEvent = null;
  359. //PropertyPanel.annotlists = null;
  360. //AnnotEvent = null;
  361. //Annot = null;
  362. }
  363. private void SetAnnotType()
  364. {
  365. switch (BasicVm.AnnotType)
  366. {
  367. case AnnotArgsType.AnnotCircle:
  368. BasicVm.AnnotTypeTitle = "圆";
  369. break;
  370. case AnnotArgsType.AnnotSquare:
  371. BasicVm.AnnotTypeTitle = "矩形";
  372. break;
  373. case AnnotArgsType.AnnotLine:
  374. var annotLine = Annot as LineAnnotArgs;
  375. if (annotLine != null)
  376. {
  377. if (annotLine.TailLineType == C_LINE_TYPE.LINETYPE_ARROW && annotLine.HeadLineType == C_LINE_TYPE.LINETYPE_NONE)
  378. BasicVm.AnnotTypeTitle = "箭头";
  379. else
  380. BasicVm.AnnotTypeTitle = "线";
  381. }
  382. break;
  383. }
  384. }
  385. public AnnotAttribEvent AnnotEvent { get; set; }
  386. public AnnotHandlerEventArgs Annot;
  387. public AnnotTransfer PropertyPanel;
  388. public void OnNavigatedTo(NavigationContext navigationContext)
  389. {
  390. navigationContext.Parameters.TryGetValue<AnnotTransfer>(ParameterNames.PropertyPanelContentViewModel, out PropertyPanel);
  391. if (PropertyPanel != null)
  392. {
  393. AnnotEvent = PropertyPanel.AnnotEvent;
  394. BasicVm.AnnotType = PropertyPanel.annot.EventType;
  395. Annot = PropertyPanel.annot;
  396. BasicVm.IsMultiSelected = PropertyPanel.IsMultiSelected;
  397. if (BasicVm.IsMultiSelected)
  398. {
  399. IsAttributeEquals();
  400. }
  401. else
  402. {
  403. GetAnnotProperty();
  404. }
  405. LoadPropertyHandler?.Invoke(null, Annot);
  406. }
  407. }
  408. private List<SquareAnnotArgs> ConvertLists()
  409. {
  410. List<SquareAnnotArgs> FreeTextLists = new List<SquareAnnotArgs>();
  411. foreach (var item in PropertyPanel.annotlists)
  412. {
  413. var itemFreeText = item as SquareAnnotArgs;
  414. if (itemFreeText != null)
  415. {
  416. FreeTextLists.Add(itemFreeText);
  417. }
  418. }
  419. if (FreeTextLists.Count != PropertyPanel.annotlists.Count)
  420. return null;
  421. else
  422. return FreeTextLists;
  423. }
  424. private void IsAttributeEquals()
  425. {
  426. var list = ConvertLists();
  427. if (list != null)
  428. {
  429. var temp = list[0];
  430. Dictionary<string, bool> isNoEqualsDir = new Dictionary<string, bool>();
  431. isNoEqualsDir.Add("FillColor", false);
  432. isNoEqualsDir.Add("LineColor", false);
  433. isNoEqualsDir.Add("Thickness", false);
  434. isNoEqualsDir.Add("ThickSolidDashStyle", false);
  435. foreach (var item in list)
  436. {
  437. if (item == list[0])
  438. continue;
  439. if (isNoEqualsDir["FillColor"] == false)
  440. {
  441. if (temp.BgColor.A != item.BgColor.A || temp.BgColor.R != item.BgColor.R || temp.BgColor.G != item.BgColor.G || temp.BgColor.B != item.BgColor.B)
  442. {
  443. BasicVm.FillColor = new SolidColorBrush(Color.FromArgb(0x01, 0xff, 0xff, 0xff));
  444. isNoEqualsDir["FillColor"] = true;
  445. }
  446. }
  447. if (isNoEqualsDir["LineColor"] == false)
  448. {
  449. if (temp.LineColor.A != item.LineColor.A || temp.LineColor.R != item.LineColor.R || temp.LineColor.G != item.LineColor.G || temp.LineColor.B != item.LineColor.B)
  450. {
  451. BasicVm.BorderColor = new SolidColorBrush(Color.FromArgb(0x01, 0xff, 0xff, 0xff));
  452. isNoEqualsDir["LineColor"] = true;
  453. }
  454. }
  455. if (isNoEqualsDir["Thickness"] == false)
  456. {
  457. isNoEqualsDir["Thickness"] = true;
  458. if (temp.LineWidth > item.LineWidth)
  459. {
  460. BasicVm.AnnotThickness = temp.LineWidth;
  461. }
  462. else
  463. {
  464. BasicVm.AnnotThickness = item.LineWidth;
  465. }
  466. }
  467. if (isNoEqualsDir["ThickSolidDashStyle"] == false)
  468. {
  469. if (AnnotTransfer.IsSolidStyle(temp.LineDash) != AnnotTransfer.IsSolidStyle(item.LineDash))
  470. {
  471. isNoEqualsDir["ThickSolidDashStyle"] = true;
  472. }
  473. }
  474. }
  475. ////以下是多选注释的属性相等时
  476. if (isNoEqualsDir["FillColor"] == false)
  477. {
  478. BasicVm.FillColor = new SolidColorBrush(temp.BgColor);
  479. }
  480. if (isNoEqualsDir["LineColor"] == false)
  481. {
  482. BasicVm.BorderColor = new SolidColorBrush(temp.LineColor);
  483. }
  484. if (isNoEqualsDir["Thickness"] == false)
  485. {
  486. BasicVm.AnnotThickness = temp.LineWidth;
  487. }
  488. if (isNoEqualsDir["ThickSolidDashStyle"] == true)
  489. {
  490. BasicVm.IsSolidLine = BasicVm.IsDashLine = false;
  491. }
  492. else
  493. {
  494. var isSolid = AnnotTransfer.IsSolidStyle(temp.LineDash);
  495. BasicVm.IsSolidLine = isSolid;
  496. BasicVm.IsDashLine = !isSolid;
  497. }
  498. }
  499. }
  500. private bool IsSolidStyle(AnnotHandlerEventArgs annot)
  501. {
  502. bool isSolid = true;
  503. if (annot is SquareAnnotArgs)
  504. {
  505. var Square = Annot as SquareAnnotArgs;
  506. isSolid = AnnotTransfer.IsSolidStyle(Square.LineDash);
  507. }
  508. else if (annot is CircleAnnotArgs)
  509. {
  510. var Circle = Annot as CircleAnnotArgs;
  511. isSolid = AnnotTransfer.IsSolidStyle(Circle.LineDash);
  512. }
  513. else if (annot is LineAnnotArgs)
  514. {
  515. var line = Annot as LineAnnotArgs;
  516. isSolid = AnnotTransfer.IsSolidStyle(line.LineDash);
  517. }
  518. return isSolid;
  519. }
  520. private void GetAnnotProperty()
  521. {
  522. if (Annot != null)
  523. {
  524. bool isSolid = true;
  525. switch (Annot.EventType)
  526. {
  527. case AnnotArgsType.AnnotSquare:
  528. if (Annot is SquareAnnotArgs)
  529. {
  530. var Square = Annot as SquareAnnotArgs;
  531. BasicVm.BorderColor = new SolidColorBrush(Square.LineColor);
  532. BasicVm.FillColor = new SolidColorBrush(Square.BgColor);
  533. BasicVm.BorderOpacity = Square.Transparency;
  534. BasicVm.FillOpacity = Square.Transparency;
  535. BasicVm.AnnotThickness = Square.LineWidth;
  536. Dash = Square.LineDash;
  537. //SharpsType("Rect", false);
  538. BasicVm.AnnotTypeTitle = "矩形";
  539. IsLineAnnot = false;
  540. IsRect = true;
  541. //IsCircle = false;
  542. //IsArrow=false;
  543. //IsLine= false;
  544. }
  545. break;
  546. case AnnotArgsType.AnnotCircle:
  547. if (Annot is CircleAnnotArgs)
  548. {
  549. var Circle = Annot as CircleAnnotArgs;
  550. BasicVm.BorderColor = new SolidColorBrush(Circle.LineColor);
  551. BasicVm.FillColor = new SolidColorBrush(Circle.BgColor);
  552. BasicVm.BorderOpacity = Circle.Transparency;
  553. BasicVm.FillOpacity = Circle.Transparency;
  554. BasicVm.AnnotThickness = Circle.LineWidth;
  555. Dash = Circle.LineDash;
  556. //SharpsType("Circle", false);
  557. BasicVm.AnnotTypeTitle = "圆";
  558. IsLineAnnot = false;
  559. IsCircle = true;
  560. //IsRect = false;
  561. //IsArrow = false;
  562. //IsLine = false;
  563. }
  564. break;
  565. case AnnotArgsType.AnnotLine:
  566. if (Annot is LineAnnotArgs)
  567. {
  568. var line = Annot as LineAnnotArgs;
  569. BasicVm.BorderColor = new SolidColorBrush(line.LineColor);
  570. BasicVm.FillColor = new SolidColorBrush(line.LineColor);
  571. BasicVm.BorderOpacity = line.Transparency;
  572. BasicVm.FillOpacity = line.Transparency;
  573. BasicVm.AnnotThickness = line.LineWidth;
  574. Dash = line.LineDash;
  575. if (line.TailLineType == C_LINE_TYPE.LINETYPE_ARROW && line.HeadLineType == C_LINE_TYPE.LINETYPE_NONE)
  576. {
  577. //SharpsType("Arrow", false);
  578. BasicVm.AnnotTypeTitle = "箭头";
  579. IsArrow = true;
  580. //IsCircle = false;
  581. //IsRect = false;
  582. //IsLine = false;
  583. }
  584. else
  585. {
  586. //SharpsType("Line", false);
  587. BasicVm.AnnotTypeTitle = "线条";
  588. IsLine = true;
  589. //IsCircle = false;
  590. //IsRect = false;
  591. //IsArrow = false;
  592. }
  593. IsLineAnnot = true;
  594. }
  595. break;
  596. }
  597. isSolid = IsSolidStyle(Annot);
  598. BasicVm.IsSolidLine = isSolid;
  599. BasicVm.IsDashLine = !isSolid;
  600. }
  601. }
  602. }
  603. }