|
@@ -1,5 +1,7 @@
|
|
|
using Avalonia.Controls;
|
|
|
using Avalonia.Interactivity;
|
|
|
+using Avalonia.Media;
|
|
|
+using Avalonia.Media.Imaging;
|
|
|
using System;
|
|
|
using System.Data;
|
|
|
using System.Diagnostics;
|
|
@@ -15,13 +17,14 @@ namespace AvaloniaApplication1
|
|
|
|
|
|
|
|
|
}
|
|
|
- public void Button_Click(object source, RoutedEventArgs args)
|
|
|
+
|
|
|
+ public void Button_Click(object source, RoutedEventArgs args)
|
|
|
{
|
|
|
string date = dateT.SelectedDate.ToString();
|
|
|
|
|
|
if (date == "")
|
|
|
{
|
|
|
- mounthT.Text = "Âû ââåëè íåñóùåñòâóþùóþ äàòó";
|
|
|
+ Error.Text = "Âû ââåëè íåñóùåñòâóþùóþ äàòó";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -35,10 +38,11 @@ namespace AvaloniaApplication1
|
|
|
|
|
|
if (BD > ToDay)
|
|
|
{
|
|
|
- mounthT.Text = "Âû ââåëè áóäóùóþ äàòó";
|
|
|
+ Error.Text = "Âû ââåëè áóäóùóþ äàòó";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ Error.Text = "";
|
|
|
int Vis = 0;
|
|
|
int DbWeek = 0;
|
|
|
DateTime dayW;
|
|
@@ -115,7 +119,121 @@ namespace AvaloniaApplication1
|
|
|
DBW.Text = "Êîëè÷åñòâî îòïðàçäíîâàííûõ äíåé ðîæäåíèé â " + DayOfWeek + ": " + DbWeek;
|
|
|
Viss.Text = "Êîëè÷åñòâî âèñîêîñíûõ ãîäîâ: " + Vis;
|
|
|
}
|
|
|
+ if(Zod.IsChecked == false && Vost.IsChecked == false)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ if(Vost.IsChecked == true)
|
|
|
+ {
|
|
|
+ string Zod = " ";
|
|
|
+ if(year == 1971 || year == 1983 || year == 1995 || year == 2007 || year == 2019 || year == 2031)
|
|
|
+ {
|
|
|
+ Zod = "Ñâèíüÿ";
|
|
|
+ }
|
|
|
+ if (year == 1972 || year == 1984 || year == 1996 || year == 2008 || year == 2020 || year == 1960)
|
|
|
+ {
|
|
|
+ Zod = "Êðûñà";
|
|
|
+ }
|
|
|
+ if (year == 1973 || year == 1985 || year == 1997 || year == 2009 || year == 2021 || year == 1961)
|
|
|
+ {
|
|
|
+ Zod = "Áûê";
|
|
|
+ }
|
|
|
+ if (year == 1974 || year == 1986 || year == 1998 || year == 2010 || year == 2022 || year == 1962)
|
|
|
+ {
|
|
|
+ Zod = "Òèãð";
|
|
|
+ }
|
|
|
+ if (year == 1975 || year == 1987 || year == 1999 || year == 2011 || year == 2023 || year == 1963)
|
|
|
+ {
|
|
|
+ Zod = "Êðîëèê";
|
|
|
+ }
|
|
|
+ if (year == 1976 || year == 1988 || year == 2000 || year == 2012 || year == 2024 || year == 1964)
|
|
|
+ {
|
|
|
+ Zod = "Äðàêîí";
|
|
|
+ }
|
|
|
+ if (year == 1977 || year == 1989 || year == 2001 || year == 2013 || year == 2025 || year == 1965)
|
|
|
+ {
|
|
|
+ Zod = "Çìåÿ";
|
|
|
+ }
|
|
|
+ if (year == 1978 || year == 1990 || year == 2002 || year == 2014 || year == 2026 || year == 1966)
|
|
|
+ {
|
|
|
+ Zod = "Ëîøàäü";
|
|
|
+ }
|
|
|
+ if (year == 1979 || year == 1991 || year == 2003 || year == 2015 || year == 2027 || year == 1967)
|
|
|
+ {
|
|
|
+ Zod = "Êîíü";
|
|
|
+ }
|
|
|
+ if (year == 1980 || year == 1992 || year == 2004 || year == 2016 || year == 2028 || year == 1968)
|
|
|
+ {
|
|
|
+ Zod = "Îáåçüÿíà";
|
|
|
+ }
|
|
|
+ if (year == 1981 || year == 1993 || year == 2005 || year == 2017 || year == 2029 || year == 1969)
|
|
|
+ {
|
|
|
+ Zod = "Ïåòóõ";
|
|
|
+ }
|
|
|
+ if (year == 1982 || year == 1994 || year == 2006 || year == 2018 || year == 2030 || year == 1970)
|
|
|
+ {
|
|
|
+ Zod = "Ñîáàêà";
|
|
|
+ }
|
|
|
+ Znak.Text = "Çíàê âîñòî÷íîãî êàëåíäàðÿ: " + Zod;
|
|
|
+ }
|
|
|
+ if (Zod.IsChecked == true)
|
|
|
+ {
|
|
|
+ string Zod = " ";
|
|
|
+ if(day >= 21 && mounth == 3 || day <= 19 && mounth == 4)
|
|
|
+ {
|
|
|
+ Zod = "Îâåí";
|
|
|
+
|
|
|
+ }
|
|
|
+ if (day >= 20 && mounth == 4 || day <= 20 && mounth == 5)
|
|
|
+ {
|
|
|
+ Zod = "Òåëåö";
|
|
|
+ }
|
|
|
+ if (day >= 21 && mounth == 5 || day <= 20 && mounth == 6)
|
|
|
+ {
|
|
|
+ Zod = "Áëèçíåöû";
|
|
|
+ }
|
|
|
+ if (day >= 21 && mounth == 6 || day <= 22 && mounth == 7)
|
|
|
+ {
|
|
|
+ Zod = "Ðàê";
|
|
|
+ }
|
|
|
+ if (day >= 23 && mounth == 7 || day <= 22 && mounth == 8)
|
|
|
+ {
|
|
|
+ Zod = "Ëåâ";
|
|
|
+ }
|
|
|
+ if (day >= 23 && mounth == 8 || day <= 22 && mounth == 9)
|
|
|
+ {
|
|
|
+ Zod = "Äåâà";
|
|
|
+ }
|
|
|
+ if (day >= 23 && mounth == 9 || day <= 22 && mounth == 10)
|
|
|
+ {
|
|
|
+ Zod = "Âåñû";
|
|
|
+ }
|
|
|
+ if (day >= 23 && mounth == 10 || day <= 21 && mounth == 11)
|
|
|
+ {
|
|
|
+ Zod = "Ñêîðïèîí";
|
|
|
+ }
|
|
|
+ if (day >= 22 && mounth == 11 || day <= 21 && mounth == 12)
|
|
|
+ {
|
|
|
+ Zod = "Ñòðåëåö";
|
|
|
+ }
|
|
|
+ if (day >= 22 && mounth == 12 || day <= 19 && mounth == 1)
|
|
|
+ {
|
|
|
+ Zod = "Êîçåðîã";
|
|
|
+ }
|
|
|
+ if (day >= 20 && mounth == 1 || day <= 18 && mounth == 2)
|
|
|
+ {
|
|
|
+ Zod = "Âîäîëåé";
|
|
|
+ }
|
|
|
+ if (day >= 19 && mounth == 2 || day <= 20 && mounth == 3)
|
|
|
+ {
|
|
|
+ Zod = "Ðûáû";
|
|
|
+ }
|
|
|
+
|
|
|
+ Znak.Text = "Çíàê çîäèàêà: " + Zod;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|