MainWindow.axaml.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. using Avalonia.Controls;
  2. using Avalonia.Interactivity;
  3. using Avalonia.Media;
  4. using Avalonia.Media.Imaging;
  5. using System;
  6. using System.Data;
  7. using System.Diagnostics;
  8. using System.Runtime.Intrinsics.Arm;
  9. using Avalonia.Threading;
  10. using System.Runtime.InteropServices;
  11. using System.Threading.Tasks;
  12. using Tmds.DBus.Protocol;
  13. using System.IO;
  14. using System.Linq;
  15. using static System.Runtime.InteropServices.JavaScript.JSType;
  16. using Avalonia.Input;
  17. using System.Reflection.Metadata.Ecma335;
  18. using System.Text.RegularExpressions;
  19. using System.Text;
  20. namespace AvaloniaApplication1
  21. {
  22. public struct DateB
  23. {
  24. public string dayB;
  25. public string mounthB;
  26. public string yearB;
  27. }
  28. public partial class MainWindow : Window
  29. {
  30. public MainWindow()
  31. {
  32. InitializeComponent();
  33. }
  34. public void Button_Click(object source, RoutedEventArgs args)
  35. {
  36. string date = dateT.SelectedDate.ToString();
  37. if (date == "")
  38. {
  39. Error.Text = "Âû ââåëè íåñóùåñòâóþùóþ äàòó";
  40. }
  41. else
  42. {
  43. int day = int.Parse(date.Substring(0, 2));
  44. int mounth = int.Parse(date.Substring(3, 2));
  45. int year = int.Parse(date.Substring(6, 4));
  46. DateTime BD = new DateTime(year, mounth, day);
  47. DateTime ToDay = DateTime.Now;
  48. if (BD > ToDay)
  49. {
  50. Error.Text = "Âû ââåëè áóäóùóþ äàòó";
  51. }
  52. else
  53. {
  54. Error.Text = "";
  55. int Vis = 0;
  56. int DbWeek = 0;
  57. DateTime dayW;
  58. int age = ToDay.Year - BD.Year;
  59. int months = ToDay.Month - BD.Month;
  60. int days = ToDay.Day - BD.Day;
  61. if (ToDay.Month < BD.Month || (ToDay.Month == BD.Month && ToDay.Day < BD.Day))
  62. {
  63. age--;
  64. }
  65. if (days < 0)
  66. {
  67. months--;
  68. days += DateTime.DaysInMonth(ToDay.Year, ToDay.Month - 1);
  69. }
  70. if (months < 0)
  71. {
  72. months += 12;
  73. }
  74. VisY.Text = "Âèñîêîñíûå ãîäû: ";
  75. string DayOfWeek = BD.DayOfWeek.ToString();
  76. for (int i = year; i <= ToDay.Year; i++)
  77. {
  78. if (i % 4 == 0)
  79. {
  80. VisY.Text = VisY.Text + i + " ";
  81. Vis++;
  82. }
  83. dayW = new DateTime(i, mounth, day);
  84. if (dayW.DayOfWeek.ToString() == DayOfWeek && dayW != BD && dayW != ToDay)
  85. {
  86. DbWeek++;
  87. }
  88. }
  89. if (DayOfWeek == "Monday")
  90. {
  91. DayOfWeek = "Ïîíåäåëüíèê";
  92. }
  93. if (DayOfWeek == "Tuesday")
  94. {
  95. DayOfWeek = "Âòîðíèê";
  96. }
  97. if (DayOfWeek == "Wednesday")
  98. {
  99. DayOfWeek = "Ñðåäà";
  100. }
  101. if (DayOfWeek == "Thursday")
  102. {
  103. DayOfWeek = "×åòâåðã";
  104. }
  105. if (DayOfWeek == "Friday")
  106. {
  107. DayOfWeek = "Ïÿòíèöà";
  108. }
  109. if (DayOfWeek == "Saturday")
  110. {
  111. DayOfWeek = "Ñóááîòà";
  112. }
  113. if (DayOfWeek == "Sunday")
  114. {
  115. DayOfWeek = "Âîñêðåñåíüå";
  116. }
  117. dayOfWeek.Text = "Äåíü íåäåëè: " + DayOfWeek;
  118. yearT.Text = "Êîëè÷åñòâî ëåò: " + age.ToString();
  119. mounthT.Text = "Êîëè÷åñòâî ìåñÿöåâ: " + months.ToString();
  120. daysT.Text = "Êîëè÷åñòâî äíåé: " + days.ToString();
  121. DBW.Text = "Êîëè÷åñòâî îòïðàçäíîâàííûõ äíåé ðîæäåíèé â " + DayOfWeek + ": " + DbWeek;
  122. Viss.Text = "Êîëè÷åñòâî âèñîêîñíûõ ãîäîâ: " + Vis;
  123. }
  124. if (Zod.IsChecked == false && Vost.IsChecked == false)
  125. {
  126. }
  127. if (Vost.IsChecked == true)
  128. {
  129. Znak.Text = "Çíàê âîñòî÷íîãî êàëåíäàðÿ: " + Vostoch(year);
  130. }
  131. if (Zod.IsChecked == true)
  132. {
  133. Znak.Text = "Çíàê çîäèàêà: " + Zodiac(day, mounth);
  134. }
  135. }
  136. }
  137. public string Vostoch(int year)
  138. {
  139. string[] ZnakV = new string[]
  140. {
  141. "Îáåçüÿíà", "Ïåòóõ",
  142. "Ñîáàêà", "Ñâèíüÿ","Êðûñà", "Áûê", "Òèãð", "Êðîëèê", "Äðàêîí",
  143. "Çìåÿ", "Ëîøàäü", "Êîçà"
  144. };
  145. int index = year % 12;
  146. return ZnakV[index];
  147. }
  148. public string Zodiac(int day, int mounth)
  149. {
  150. string Zod = " ";
  151. if (day >= 21 && day <= 31 && mounth == 3 || day <= 19 && mounth == 4)
  152. {
  153. Zod = "Îâåí";
  154. }
  155. else if (day >= 20 && day<=30 && mounth == 4 || day <= 20 && mounth == 5)
  156. {
  157. Zod = "Òåëåö";
  158. }
  159. else if (day >= 21 && day<=31 && mounth == 5 || day <= 20 && mounth == 6)
  160. {
  161. Zod = "Áëèçíåöû";
  162. }
  163. else if (day >= 21 && day <= 30 && mounth == 6 || day <= 22 && mounth == 7)
  164. {
  165. Zod = "Ðàê";
  166. }
  167. else if (day >= 23 && day <= 31 && mounth == 7 || day <= 22 && mounth == 8)
  168. {
  169. Zod = "Ëåâ";
  170. }
  171. else if (day >= 23 && day <= 31 && mounth == 8 || day <= 22 && mounth == 9)
  172. {
  173. Zod = "Äåâà";
  174. }
  175. else if (day >= 23 && day <= 30 && mounth == 9 || day <= 22 && mounth == 10)
  176. {
  177. Zod = "Âåñû";
  178. }
  179. else if (day >= 23 && day <= 31 && mounth == 10 || day <= 21 && mounth == 11)
  180. {
  181. Zod = "Ñêîðïèîí";
  182. }
  183. else if (day >= 22 && day <= 30 && mounth == 11 || day <= 21 && mounth == 12)
  184. {
  185. Zod = "Ñòðåëåö";
  186. }
  187. else if (day >= 22 && day <= 31 && mounth == 12 || day <= 19 && mounth == 1)
  188. {
  189. Zod = "Êîçåðîã";
  190. }
  191. else if (day >= 20 && day<=31 && mounth == 1 || day <= 18 && mounth == 2)
  192. {
  193. Zod = "Âîäîëåé";
  194. }
  195. else if (day >= 19 && day<=28 && mounth == 2 || day <= 20 && mounth == 3)
  196. {
  197. Zod = "Ðûáû";
  198. }
  199. else
  200. {
  201. Zod = "Äåíü íå ñóùåñòâóåò èëè ìåñÿö íå ñóùåñòâóåò";
  202. }
  203. return Zod;
  204. }
  205. [Obsolete]
  206. public async void Filee(object source, RoutedEventArgs args)
  207. {
  208. string header = "";
  209. string path;
  210. int k = 0;
  211. OpenFileDialog OFD = new OpenFileDialog();
  212. OFD.AllowMultiple = false;
  213. OFD.Filters.Add(new FileDialogFilter() { Name = "CSV ôàéëû", Extensions = { "csv" } });
  214. var result = await OFD.ShowAsync(this);
  215. if (result != null)
  216. {
  217. Error.Text = "Ñ÷èòûâàíèå óñïåøíî";
  218. path = result[0];
  219. string[] lines = File.ReadAllLines(path);
  220. if (lines.Length > 0)
  221. {
  222. DateB[] dateB = new DateB[lines.Length - 1];
  223. Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
  224. using (StreamReader sr = new StreamReader(path, Encoding.GetEncoding(1251)))
  225. {
  226. string line = sr.ReadLine();
  227. header = line;
  228. line = sr.ReadLine();
  229. while (line != null)
  230. {
  231. string[] strs = line.Split(";").ToArray();
  232. dateB[k].dayB = strs[0];
  233. dateB[k].mounthB = strs[1];
  234. dateB[k].yearB = strs[2];
  235. k++;
  236. line = sr.ReadLine();
  237. }
  238. };
  239. int s = 0;
  240. using (StreamWriter sw = new StreamWriter("Output.csv", false, Encoding.GetEncoding(1251)))
  241. {
  242. sw.WriteLine(header + ";" + "Çíàê çîäèàêà" + ";" + "Âîñòî÷íûé êàëåíäàðü");
  243. for (int i = 0; i<k; i++)
  244. {
  245. bool isNumericMounthNotInt = Regex.IsMatch(dateB[i].mounthB, @"^(\d+|0),\d+$");
  246. bool isNumericDayNotInt = Regex.IsMatch(dateB[i].dayB, @"^(\d+|0),\d+$");
  247. bool isNumericYearNotInt = Regex.IsMatch(dateB[i].yearB, @"^(\d+|0),\d+$");
  248. bool isNumericDayDate = Regex.IsMatch(dateB[i].dayB, @"^\d{2}\.\d{2}\.\d{4}$");
  249. bool isNumericMounthDate = Regex.IsMatch(dateB[i].mounthB, @"^\d{2}\.\d{2}\.\d{4}$");
  250. bool isNumericYearDate = Regex.IsMatch(dateB[i].yearB, @"^\d{2}\.\d{2}\.\d{4}$");
  251. bool isNumericDayOtr = Regex.IsMatch(dateB[i].dayB, @"^-?\d+$");
  252. bool isNumericMounthOtr = Regex.IsMatch(dateB[i].mounthB, @"^-?\d+$");
  253. bool isNumericYearOtr = Regex.IsMatch(dateB[i].yearB, @"^-?\d+$");
  254. bool isNumericDay = Regex.IsMatch(dateB[i].dayB, @"^\d+$");
  255. bool isNumericMounth = Regex.IsMatch(dateB[i].mounthB, @"^\d+$");
  256. bool isNumericYear = Regex.IsMatch(dateB[i].yearB, @"^\d+$");
  257. if (isNumericDay == true & isNumericMounth == true && isNumericYear == true)
  258. {
  259. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + Zodiac(int.Parse(dateB[i].dayB), int.Parse(dateB[i].mounthB)) + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  260. }
  261. else if (isNumericDay == true & isNumericMounth == false && isNumericYear == true)
  262. {
  263. if(dateB[i].mounthB == "")
  264. {
  265. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö íå óêàçàí" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  266. }
  267. else if(isNumericMounthOtr == true)
  268. {
  269. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  270. }
  271. else if(dateB[i].mounthB != " ")
  272. {
  273. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö íå ÿâëÿåòñÿ ÷èñëîì" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  274. }
  275. else if(isNumericMounthDate == true)
  276. {
  277. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Â ìåñÿöå óêàçàíà ïîëíàÿ äàòà" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  278. }
  279. }
  280. else if (isNumericDay == false & isNumericMounth == true && isNumericYear == true)
  281. {
  282. if (dateB[i].dayB == "")
  283. {
  284. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü íå óêàçàí" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  285. }
  286. else if (isNumericDayOtr == true)
  287. {
  288. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  289. }
  290. else if (dateB[i].dayB != " ")
  291. {
  292. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü íå ÿâëÿåòñÿ ÷èñëîì" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  293. }
  294. else if(isNumericDayDate == true)
  295. {
  296. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Â äíå óêàçàíà ïîëíàÿ äàòà" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  297. }
  298. }
  299. else if (isNumericDay == true & isNumericMounth == true && isNumericYear == false)
  300. {
  301. if (dateB[i].yearB == "")
  302. {
  303. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + Zodiac(int.Parse(dateB[i].dayB), int.Parse(dateB[i].mounthB)) + ";" + "Ãîä íå óêàçàí");
  304. }
  305. else if (isNumericYearOtr == true)
  306. {
  307. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + Zodiac(int.Parse(dateB[i].dayB), int.Parse(dateB[i].mounthB)) + ";" + "Ãîä ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì");
  308. }
  309. else if (dateB[i].yearB != " ")
  310. {
  311. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + Zodiac(int.Parse(dateB[i].dayB), int.Parse(dateB[i].mounthB)) + ";" + "Ãîä íå ÿâëÿåòñÿ ÷èñëîì");
  312. }
  313. else if(isNumericYearDate == true)
  314. {
  315. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + Zodiac(int.Parse(dateB[i].dayB), int.Parse(dateB[i].mounthB)) + ";" + "Â ãîäå óêàçàíà ïîëíàÿ äàòà");
  316. }
  317. }
  318. else if (isNumericDay == false && isNumericMounth == false && isNumericYear == false)
  319. {
  320. if (dateB[i].dayB == "" && dateB[i].mounthB == "" && dateB[i].yearB == "")
  321. {
  322. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü è ìåñÿö íå óêàçàíû" + ";" + "Ãîä íå óêàçàí");
  323. }
  324. else if (dateB[i].dayB == "" && dateB[i].mounthB == "" && isNumericYearOtr == true)
  325. {
  326. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü è ìåñÿö íå óêàçàíû" + ";" + "Ãîä ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì");
  327. }
  328. else if (dateB[i].dayB == "" && isNumericMounthOtr == true && dateB[i].yearB == "")
  329. {
  330. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü íå óêàçàí. Ìåñÿö ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì" + ";" + "Ãîä íå óêàçàí");
  331. }
  332. else if (isNumericDayOtr == true && dateB[i].mounthB == "" && dateB[i].yearB == "")
  333. {
  334. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì. Ìåñÿö íå óêàçàí" + ";" + "Ãîä íå óêàçàí");
  335. }
  336. else if (isNumericDayDate == true && dateB[i].mounthB == "" && dateB[i].yearB == "")
  337. {
  338. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Â äíå óêàçàíà ïîëíàÿ äàòà. Ìåñÿö íå óêàçàí" + ";" + "Ãîä íå óêàçàí");
  339. }
  340. else if (dateB[i].dayB == "" && dateB[i].mounthB == "" && dateB[i].yearB != "")
  341. {
  342. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü è ìåñÿö íå óêàçàíû" + ";" + "Ãîä íå ÿâëÿåòñÿ ÷èñëîì");
  343. }
  344. else if (isNumericDayOtr == true && isNumericMounthOtr == true && isNumericYearOtr == true)
  345. {
  346. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü è ìåñÿö ÿâëÿþòñÿ îòðèöàòåëüíûìè ÷èñëàìè" + ";" + "Ãîä ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì");
  347. }
  348. else if (isNumericDayDate == true && isNumericMounthDate == true && isNumericYearDate == true)
  349. {
  350. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Â äíå è ìåñÿöå óêàçàíà ïîëíàÿ äàòà" + ";" + "Â ãîäå óêàçàíà ïîëíàÿ äàòà");
  351. }
  352. else if(isNumericDayNotInt == true && isNumericMounthNotInt == true && isNumericYearNotInt == true)
  353. {
  354. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + " äíå è ìåñÿöå óêàçàíû íå ÷èñëà" + ";" + " ãîäå óêàçàíî íå ÷èñëî");
  355. }
  356. }
  357. else if (isNumericDay == false & isNumericMounth == false && isNumericYear == true)
  358. {
  359. if (dateB[i].dayB == "" && dateB[i].mounthB == "")
  360. {
  361. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü è ìåñÿö íå óêàçàíû" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  362. }
  363. else if (isNumericDayOtr == true && dateB[i].mounthB == "")
  364. {
  365. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì. Ìåñÿö íå óêàçàí" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  366. }
  367. else if (dateB[i].dayB == "" && isNumericMounthOtr == true)
  368. {
  369. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü íå óêàçàí. Ìåñÿö ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  370. }
  371. else if (dateB[i].dayB != "" && dateB[i].mounthB == "")
  372. {
  373. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü íå ÿâëÿåòñÿ ÷èñëîì. Ìåñÿö íå óêàçàí" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  374. }
  375. else if (dateB[i].dayB == "" && dateB[i].mounthB != "")
  376. {
  377. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü íå óêàçàí. Ìåñÿö íå ÿâëÿåòñÿ ÷èñëîì" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  378. }
  379. else if (isNumericDayOtr == true && isNumericMounthOtr == true)
  380. {
  381. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Äåíü è ìåñÿö ÿâëÿþòñÿ îòðèöàòåëüíûìè ÷èñëàìè" + ";" + Vostoch(int.Parse(dateB[i].yearB)));
  382. }
  383. }
  384. else if (isNumericDay == true & isNumericMounth == false && isNumericYear == false)
  385. {
  386. if (dateB[i].mounthB == "" && dateB[i].yearB == "")
  387. {
  388. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö íå óêàçàí" + ";" + "Ãîä íå óêàçàí");
  389. }
  390. else if (isNumericMounthOtr == true && dateB[i].yearB == "")
  391. {
  392. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì" + ";" + "Ãîä íå óêàçàí");
  393. }
  394. else if(isNumericMounthNotInt == true && dateB[i].yearB == "")
  395. {
  396. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö ÿâëÿåòñÿ íå öåëûì ÷èñëì" + ";" + "Ãîä íå óêàçàí");
  397. }
  398. else if (isNumericMounthOtr == true && isNumericYearOtr == true)
  399. {
  400. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì" + ";" + "Ãîä ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì");
  401. }
  402. else if (dateB[i].mounthB != "" && isNumericYearOtr == true)
  403. {
  404. sw.WriteLine(dateB[i].dayB + ";" + dateB[i].mounthB + ";" + dateB[i].yearB + ";" + "Ìåñÿö íå ÿâëÿåòñÿ ÷èñëîì" + ";" + "Ãîä ÿâëÿåòñÿ îòðèöàòåëüíûì ÷èñëîì");
  405. }
  406. }
  407. }
  408. };
  409. Process.Start(new ProcessStartInfo
  410. {
  411. FileName = "Output.csv",
  412. UseShellExecute = true
  413. });
  414. }
  415. else
  416. {
  417. Error.Text = "Âûáðàííûé ôàéë ïóñò";
  418. }
  419. }
  420. }
  421. }
  422. }