TextFont.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. using ImTools;
  2. using PDF_Master.CustomControl.CompositeControl;
  3. using PDF_Master.Helper;
  4. using PDF_Master.Model.AnnotPanel;
  5. using PDF_Master.Properties;
  6. using PDFSettings;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Globalization;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows;
  14. using System.Windows.Controls;
  15. using System.Windows.Media;
  16. namespace PDF_Master.Model.PropertyPanel.AnnotPanel
  17. {
  18. public class TextFont
  19. {
  20. //获取本地缓存数据
  21. public static List<PresetFontItem> GetCachePresetFontList()
  22. {
  23. List<PresetFontItem> cacheTempList = new List<PresetFontItem>();
  24. if (Settings.Default.PresetFontList == null)
  25. Settings.Default.PresetFontList = new PresetFontList();
  26. if (Settings.Default.PreinstallFontList == null)
  27. Settings.Default.PreinstallFontList = new PreinstallFontList();
  28. if (Settings.Default.PreinstallFontList.Count == 0/*Settings.Default.PresetFontList.Count == 0*/ )
  29. {
  30. cacheTempList = GetPresetFontStyle();
  31. foreach (var cacheItem in cacheTempList)
  32. {
  33. var newItem = new PresetFontItem();
  34. newItem.mTag = cacheItem.mTag;
  35. newItem.mTagContent = cacheItem.mTagContent;
  36. newItem.mFontStyle = cacheItem.mFontStyle;
  37. newItem.mFontWeight = cacheItem.mFontWeight;
  38. newItem.mFontSize = cacheItem.mFontSize;
  39. newItem.mFontFamily = cacheItem.mFontFamily;
  40. Settings.Default.PresetFontList.Add(newItem);
  41. //复杂数据类型 , 不可本地缓存到配置文件,需要转换一下(先 string保存,再根据类型缓存)
  42. var newItem1 = new PreinstallItem();
  43. newItem1.mTag = cacheItem.mTag;
  44. newItem1.mTagContent = cacheItem.mTagContent;
  45. newItem1.mFontStyle = cacheItem.mFontStyle.ToString();
  46. newItem1.mFontWeight = cacheItem.mFontWeight.ToString();
  47. newItem1.mFontSize = cacheItem.mFontSize;
  48. newItem1.mFontFamily = cacheItem.mFontFamily.Source;
  49. Settings.Default.PreinstallFontList.Add(newItem1);
  50. }
  51. Settings.Default.Save();
  52. }
  53. else
  54. {
  55. //根据 对应的字段 内容 ,对照相对应的类型
  56. foreach (var item in Settings.Default.PreinstallFontList)
  57. {
  58. var newItem = new PresetFontItem();
  59. newItem.mTag = item.mTag;
  60. newItem.mTagContent = item.mTagContent;
  61. switch (item.mFontStyle)
  62. {
  63. case "Normal":
  64. newItem.mFontStyle = FontStyles.Normal;
  65. break;
  66. case "Italic":
  67. newItem.mFontStyle = FontStyles.Italic;
  68. break;
  69. case "Oblique":
  70. newItem.mFontStyle = FontStyles.Oblique;
  71. break;
  72. }
  73. switch (item.mFontWeight)
  74. {
  75. case "Bold":
  76. newItem.mFontWeight = FontWeights.Bold;
  77. break;
  78. case "Normal":
  79. newItem.mFontWeight = FontWeights.Normal;
  80. break;
  81. }
  82. newItem.mFontSize = item.mFontSize;
  83. newItem.mFontFamily = new FontFamily(item.mFontFamily);
  84. cacheTempList.Add(newItem);
  85. }
  86. //foreach (var item in Settings.Default.PresetFontList)
  87. //{
  88. // var newItem = new PresetFontItem();
  89. // newItem.mTag = item.mTag;
  90. // newItem.mTagContent = item.mTagContent;
  91. // newItem.mFontStyle = item.mFontStyle;
  92. // newItem.mFontWeight = item.mFontWeight;
  93. // newItem.mFontSize = item.mFontSize;
  94. // newItem.mFontFamily = item.mFontFamily;
  95. // cacheTempList.Add(newItem);
  96. //}
  97. }
  98. return cacheTempList;
  99. }
  100. public static List<PresetFontItem> GetCachePresetEditFontList()
  101. {
  102. List<PresetFontItem> cacheTempList = new List<PresetFontItem>();
  103. if (Settings.Default.PresetEditFontList == null)
  104. Settings.Default.PresetEditFontList = new PresetEditFontList();
  105. if (Settings.Default.PreinstallEditFontList == null)
  106. Settings.Default.PreinstallEditFontList = new PreinstallEditFontList();
  107. if (Settings.Default.PreinstallEditFontList.Count == 0/*Settings.Default.PresetFontList.Count == 0*/ )
  108. {
  109. cacheTempList = GetPresetFontStyle();
  110. foreach (var cacheItem in cacheTempList)
  111. {
  112. var newItem = new PresetFontItem();
  113. newItem.mTag = cacheItem.mTag;
  114. newItem.mTagContent = cacheItem.mTagContent;
  115. newItem.mFontStyle = cacheItem.mFontStyle;
  116. newItem.mFontWeight = cacheItem.mFontWeight;
  117. newItem.mFontSize = cacheItem.mFontSize;
  118. newItem.mFontFamily = cacheItem.mFontFamily;
  119. Settings.Default.PresetEditFontList.Add(newItem);
  120. //复杂数据类型 , 不可本地缓存到配置文件,需要转换一下(先 string保存,再根据类型缓存)
  121. var newItem1 = new PreinstallItem();
  122. newItem1.mTag = cacheItem.mTag;
  123. newItem1.mTagContent = cacheItem.mTagContent;
  124. newItem1.mFontStyle = cacheItem.mFontStyle.ToString();
  125. newItem1.mFontWeight = cacheItem.mFontWeight.ToString();
  126. newItem1.mFontSize = cacheItem.mFontSize;
  127. newItem1.mFontFamily = cacheItem.mFontFamily.Source;
  128. Settings.Default.PreinstallEditFontList.Add(newItem1);
  129. }
  130. Settings.Default.Save();
  131. }
  132. else
  133. {
  134. //根据 对应的字段 内容 ,对照相对应的类型
  135. foreach (var item in Settings.Default.PreinstallEditFontList)
  136. {
  137. var newItem = new PresetFontItem();
  138. newItem.mTag = item.mTag;
  139. newItem.mTagContent = item.mTagContent;
  140. switch (item.mFontStyle)
  141. {
  142. case "Normal":
  143. newItem.mFontStyle = FontStyles.Normal;
  144. break;
  145. case "Italic":
  146. newItem.mFontStyle = FontStyles.Italic;
  147. break;
  148. case "Oblique":
  149. newItem.mFontStyle = FontStyles.Oblique;
  150. break;
  151. }
  152. switch (item.mFontWeight)
  153. {
  154. case "Bold":
  155. newItem.mFontWeight = FontWeights.Bold;
  156. break;
  157. case "Normal":
  158. newItem.mFontWeight = FontWeights.Normal;
  159. break;
  160. }
  161. newItem.mFontSize = item.mFontSize;
  162. newItem.mFontFamily = new FontFamily(item.mFontFamily);
  163. cacheTempList.Add(newItem);
  164. }
  165. //foreach (var item in Settings.Default.PresetFontList)
  166. //{
  167. // var newItem = new PresetFontItem();
  168. // newItem.mTag = item.mTag;
  169. // newItem.mTagContent = item.mTagContent;
  170. // newItem.mFontStyle = item.mFontStyle;
  171. // newItem.mFontWeight = item.mFontWeight;
  172. // newItem.mFontSize = item.mFontSize;
  173. // newItem.mFontFamily = item.mFontFamily;
  174. // cacheTempList.Add(newItem);
  175. //}
  176. }
  177. return cacheTempList;
  178. }
  179. //保存到本地缓存数据
  180. public static void SavePresetFontList(List<PresetFontItem> list)
  181. {
  182. if (list == null) return;
  183. if (Settings.Default.PresetFontList == null)
  184. Settings.Default.PresetFontList = new PresetFontList();
  185. if (Settings.Default.PreinstallFontList == null)
  186. Settings.Default.PreinstallFontList = new PreinstallFontList();
  187. bool isCanSave = false;
  188. List<PresetFontItem> TempLists = new List<PresetFontItem>();
  189. foreach (var item in list)
  190. {
  191. //根据预设标题 ,找到 相对应数据
  192. var cacheItem = Settings.Default.PreinstallFontList.FirstOrDefault(temp => temp.mTag == item.mTag);
  193. if (cacheItem != null)
  194. {
  195. //比对数据,如果不一样 ,更新数据
  196. if (cacheItem.mFontFamily != item.mFontFamily.Source ||
  197. cacheItem.mFontSize != item.mFontSize ||
  198. cacheItem.mFontStyle != item.mFontStyle.ToString() ||
  199. cacheItem.mFontWeight != item.mFontWeight.ToString()
  200. )
  201. {
  202. isCanSave = true;
  203. var index = Settings.Default.PreinstallFontList.FindIndex(temp => temp.mTag == cacheItem.mTag);
  204. if (index != -1)
  205. {
  206. Settings.Default.PreinstallFontList.Remove(cacheItem);
  207. var newItem1 = new PreinstallItem();
  208. newItem1.mTag = item.mTag;
  209. newItem1.mTagContent = item.mTagContent;
  210. newItem1.mFontStyle = item.mFontStyle.ToString();
  211. newItem1.mFontWeight = item.mFontWeight.ToString();
  212. newItem1.mFontSize = item.mFontSize;
  213. newItem1.mFontFamily = item.mFontFamily.Source;
  214. Settings.Default.PreinstallFontList.Insert(index, newItem1);
  215. }
  216. //cacheItem.mFontFamily = new FontFamily(item.mFontFamily.Source);
  217. //cacheItem.mFontSize = item.mFontSize;
  218. //cacheItem.mFontStyle = item.mFontStyle;
  219. //cacheItem.mFontWeight = item.mFontWeight;
  220. break;
  221. }
  222. }
  223. //else
  224. //{
  225. // TempLists.Add(item);
  226. //}
  227. }
  228. //foreach (var itemTemp in TempLists)
  229. //{
  230. // Settings.Default.PresetFontList.Add(itemTemp);
  231. //}
  232. if (isCanSave)
  233. Settings.Default.Save();
  234. }
  235. public static void SavePresetEditFontList(List<PresetFontItem> list)
  236. {
  237. if (list == null) return;
  238. if (Settings.Default.PresetEditFontList == null)
  239. Settings.Default.PresetEditFontList = new PresetEditFontList();
  240. if (Settings.Default.PreinstallEditFontList == null)
  241. Settings.Default.PreinstallEditFontList = new PreinstallEditFontList();
  242. bool isCanSave = false;
  243. List<PresetFontItem> TempLists = new List<PresetFontItem>();
  244. foreach (var item in list)
  245. {
  246. //根据预设标题 ,找到 相对应数据
  247. var cacheItem = Settings.Default.PreinstallEditFontList.FirstOrDefault(temp => temp.mTag == item.mTag);
  248. if (cacheItem != null)
  249. {
  250. //比对数据,如果不一样 ,更新数据
  251. if (cacheItem.mFontFamily != item.mFontFamily.Source ||
  252. cacheItem.mFontSize != item.mFontSize ||
  253. cacheItem.mFontStyle != item.mFontStyle.ToString() ||
  254. cacheItem.mFontWeight != item.mFontWeight.ToString()
  255. )
  256. {
  257. isCanSave = true;
  258. var index = Settings.Default.PreinstallEditFontList.FindIndex(temp => temp.mTag == cacheItem.mTag);
  259. if (index != -1)
  260. {
  261. Settings.Default.PreinstallEditFontList.Remove(cacheItem);
  262. var newItem1 = new PreinstallItem();
  263. newItem1.mTag = item.mTag;
  264. newItem1.mTagContent = item.mTagContent;
  265. newItem1.mFontStyle = item.mFontStyle.ToString();
  266. newItem1.mFontWeight = item.mFontWeight.ToString();
  267. newItem1.mFontSize = item.mFontSize;
  268. newItem1.mFontFamily = item.mFontFamily.Source;
  269. Settings.Default.PreinstallEditFontList.Insert(index, newItem1);
  270. }
  271. //cacheItem.mFontFamily = new FontFamily(item.mFontFamily.Source);
  272. //cacheItem.mFontSize = item.mFontSize;
  273. //cacheItem.mFontStyle = item.mFontStyle;
  274. //cacheItem.mFontWeight = item.mFontWeight;
  275. break;
  276. }
  277. }
  278. //else
  279. //{
  280. // TempLists.Add(item);
  281. //}
  282. }
  283. //foreach (var itemTemp in TempLists)
  284. //{
  285. // Settings.Default.PresetFontList.Add(itemTemp);
  286. //}
  287. if (isCanSave)
  288. Settings.Default.Save();
  289. }
  290. public static void BackDefaultPresetFontStyle(string tag)
  291. {
  292. bool isCanSave = false;
  293. var list = GetPresetFontStyle();
  294. var itemDefault = list.FirstOrDefault(temp => temp.mTag == tag);
  295. if (Settings.Default.PresetFontList == null)
  296. Settings.Default.PresetFontList = new PresetFontList();
  297. if (Settings.Default.PresetFontList.Count == 0)
  298. {
  299. Settings.Default.PresetFontList.Add(itemDefault);
  300. isCanSave = true;
  301. }
  302. else
  303. {
  304. foreach (var item in Settings.Default.PresetFontList)
  305. {
  306. if (item.mTag == itemDefault.mTag)
  307. {
  308. item.mTagContent = itemDefault.mTagContent;
  309. item.mFontFamily = itemDefault.mFontFamily;
  310. item.mFontWeight = itemDefault.mFontWeight;
  311. item.mFontStyle = itemDefault.mFontStyle;
  312. item.mFontSize = itemDefault.mFontSize;
  313. isCanSave = true;
  314. break;
  315. }
  316. }
  317. }
  318. if (isCanSave == true)
  319. Settings.Default.Save();
  320. }
  321. //获取拟定的预设样式
  322. public static List<PresetFontItem> GetPresetFontStyle()
  323. {
  324. List<PresetFontItem> fontStyleList = new List<PresetFontItem>();
  325. PresetFontItem custom = new PresetFontItem();
  326. custom.mTag = "Custom";
  327. custom.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_Customize");
  328. custom.mFontSize = 24;
  329. custom.mFontFamily = new FontFamily("Arial");
  330. custom.mFontStyle = FontStyles.Normal;
  331. custom.mFontWeight = FontWeights.Normal;
  332. PresetFontItem h1 = new PresetFontItem();
  333. h1.mTag = "H1";
  334. h1.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_H1Title");
  335. h1.mFontSize = 36;
  336. h1.mFontFamily = new FontFamily("Arial");
  337. h1.mFontStyle = FontStyles.Normal;
  338. h1.mFontWeight = FontWeights.Bold;
  339. PresetFontItem h2 = new PresetFontItem();
  340. h2.mTag = "H2";
  341. h2.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_H2Title");
  342. h2.mFontSize = 24;
  343. h2.mFontFamily = new FontFamily("Arial");
  344. h2.mFontStyle = FontStyles.Normal;
  345. h2.mFontWeight = FontWeights.Bold;
  346. PresetFontItem h3 = new PresetFontItem();
  347. h3.mTag = "H3";
  348. h3.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_H3Title");
  349. h3.mFontSize = 18;
  350. h3.mFontFamily = new FontFamily("Arial");
  351. h3.mFontStyle = FontStyles.Normal;
  352. h3.mFontWeight = FontWeights.Bold;
  353. PresetFontItem b1 = new PresetFontItem();
  354. b1.mTag = "B1";
  355. b1.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_B1NormalTextStandard");
  356. b1.mFontSize = 14;
  357. b1.mFontFamily = new FontFamily("Arial");
  358. b1.mFontStyle = FontStyles.Normal;
  359. b1.mFontWeight = FontWeights.Regular;
  360. PresetFontItem b2 = new PresetFontItem();
  361. b2.mTag = "B2";
  362. b2.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_B2NormalTextSmall");
  363. b2.mFontSize = 12;
  364. b2.mFontFamily = new FontFamily("Arial");
  365. b2.mFontStyle = FontStyles.Normal;
  366. b2.mFontWeight = FontWeights.Regular;
  367. PresetFontItem b3 = new PresetFontItem();
  368. b3.mTag = "B3";
  369. b3.mTagContent = App.MainPageLoader.GetString("PresetTextStyle_B3Description");
  370. b3.mFontSize = 11;
  371. b3.mFontFamily = new FontFamily("Arial");
  372. b3.mFontStyle = FontStyles.Normal;
  373. b3.mFontWeight = FontWeights.Regular;
  374. fontStyleList.Add(custom);
  375. fontStyleList.Add(h1);
  376. fontStyleList.Add(h2);
  377. fontStyleList.Add(h3);
  378. fontStyleList.Add(b1);
  379. fontStyleList.Add(b2);
  380. fontStyleList.Add(b3);
  381. return fontStyleList;
  382. }
  383. public static List<ComboDataItem> GetFontStyle()
  384. {
  385. var FontStyleItems = new List<ComboDataItem>();
  386. ComboDataItem item = new ComboDataItem("Regular", "Regular");
  387. FontStyleItems.Add(item);
  388. item = new ComboDataItem("Bold", "Bold");
  389. FontStyleItems.Add(item);
  390. item = new ComboDataItem("Italic", "Italic");
  391. FontStyleItems.Add(item);
  392. item = new ComboDataItem("Bold Italic", "Bold Italic");
  393. FontStyleItems.Add(item);
  394. return FontStyleItems;
  395. }
  396. internal static List<ComboDataItem> GetFontSize()
  397. {
  398. var FontSizeItems = new List<ComboDataItem>();
  399. ComboDataItem item = new ComboDataItem(8);
  400. FontSizeItems.Add(item);
  401. item = new ComboDataItem(9);
  402. FontSizeItems.Add(item);
  403. item = new ComboDataItem(10);
  404. FontSizeItems.Add(item);
  405. item = new ComboDataItem(11);
  406. FontSizeItems.Add(item);
  407. item = new ComboDataItem(12);
  408. FontSizeItems.Add(item);
  409. item = new ComboDataItem(14);
  410. FontSizeItems.Add(item);
  411. item = new ComboDataItem(16);
  412. FontSizeItems.Add(item);
  413. item = new ComboDataItem(18);
  414. FontSizeItems.Add(item);
  415. item = new ComboDataItem(20);
  416. FontSizeItems.Add(item);
  417. item = new ComboDataItem(22);
  418. FontSizeItems.Add(item);
  419. item = new ComboDataItem(24);
  420. FontSizeItems.Add(item);
  421. item = new ComboDataItem(26);
  422. FontSizeItems.Add(item);
  423. item = new ComboDataItem(28);
  424. FontSizeItems.Add(item);
  425. item = new ComboDataItem(36);
  426. FontSizeItems.Add(item);
  427. item = new ComboDataItem(48);
  428. FontSizeItems.Add(item);
  429. item = new ComboDataItem(72);
  430. FontSizeItems.Add(item);
  431. return FontSizeItems;
  432. }
  433. public static List<ComboDataItem> GetFamily()
  434. {
  435. var FontFamilyItems = new List<ComboDataItem>();
  436. ComboDataItem item = new ComboDataItem("Courier", "Courier New");
  437. FontFamilyItems.Add(item);
  438. item = new ComboDataItem("Arial", "Arial");
  439. FontFamilyItems.Add(item);
  440. item = new ComboDataItem(/*"Times-Roman"*/"Times", "Times New Roman");
  441. FontFamilyItems.Add(item);
  442. return FontFamilyItems;
  443. }
  444. public static List<ComboDataItem> GetFamilyEdit()
  445. {
  446. System.Drawing.Text.InstalledFontCollection objFont = new System.Drawing.Text.InstalledFontCollection();
  447. var FontFamilyItems = new List<ComboDataItem>();
  448. ComboDataItem item;
  449. foreach (var itemFam in EditHelper.GetFontFamily())
  450. {
  451. string content = itemFam;
  452. if (itemFam.Equals("Informal"))
  453. {
  454. content = "Informal Roman";
  455. }
  456. //屏蔽 SDK暂时无效的字体
  457. if (itemFam.Equals("Marlett") || itemFam.Equals("MT Extra")
  458. || itemFam.Equals("Symbol") || itemFam.Equals("HoloLens MDL2 Assets")
  459. || itemFam.Equals("Wingdings") || itemFam.Equals("Wingdings 2")
  460. || itemFam.Equals("Wingdings 3") || itemFam.Equals("Webdings")
  461. || itemFam.Equals("ZWAdobeF") || itemFam.Equals("Algerian")
  462. || itemFam.Equals("Bookshelf Symbol 7") || itemFam.Equals("Castellar")
  463. || itemFam.Equals("MS Outlook") || itemFam.Equals("MS Reference Specialty")
  464. || itemFam.Equals("Segoe Fluent Icons") || itemFam.Equals("Segoe MDL2 Assets")
  465. || itemFam.Equals("Stencil"))
  466. {
  467. continue;
  468. }
  469. item = new ComboDataItem(DeleteCharacters(itemFam), content);
  470. item.FontFamily = new FontFamily(content);
  471. FontFamilyItems.Add(item);
  472. }
  473. return FontFamilyItems;
  474. }
  475. public static string DeleteCharacters(string str)
  476. {
  477. str = str.Replace(" ", string.Empty);
  478. str = str.Replace("-", string.Empty);
  479. str = str.Replace("_", string.Empty);
  480. return str;
  481. }
  482. public static List<ComboDataItem> GetDateFormats()
  483. {
  484. var dateFormatItems = new List<ComboDataItem>();
  485. foreach (var itemFormat in GetTimesFormats())
  486. {
  487. ComboDataItem item = new ComboDataItem(itemFormat, "format");
  488. dateFormatItems.Add(item);
  489. }
  490. return dateFormatItems;
  491. }
  492. private static List<string> GetTimesFormats()
  493. {
  494. List<string> TimesItems = new List<string>();
  495. TimesItems.Add("yyyy年M月d日");
  496. TimesItems.Add("M/d");
  497. TimesItems.Add("M/d/yy");
  498. TimesItems.Add("M/d/yyyy");
  499. TimesItems.Add("MM/dd/yy");
  500. TimesItems.Add("MM/dd/yyyy");
  501. TimesItems.Add("d/M/yy");
  502. TimesItems.Add("d/M/yyyy");
  503. TimesItems.Add("dd/MM/yy");
  504. TimesItems.Add("dd/MM/yyyy");
  505. TimesItems.Add("MM/yy");
  506. TimesItems.Add("MM/yyyy");
  507. TimesItems.Add("M.d.yy");
  508. TimesItems.Add("M.d.yyyy");
  509. TimesItems.Add("MM.dd.yy");
  510. TimesItems.Add("MM.dd.yyyy");
  511. TimesItems.Add("MM.yy");
  512. TimesItems.Add("MM.yyyy");
  513. TimesItems.Add("d.M.yy");
  514. TimesItems.Add("d.M.yyyy");
  515. TimesItems.Add("dd.MM.yy");
  516. TimesItems.Add("dd.MM.yyyy");
  517. TimesItems.Add("yy-MM-dd");
  518. TimesItems.Add("yyyy-MM-dd");
  519. return TimesItems;
  520. }
  521. }
  522. }