Exemplo n.º 1
0
        private void PrintMonthCalendar(int month, int year)
        {
            CalendarLib.Calendar calendar = new CalendarLib.Calendar(1, month, year);
            var arr = calendar.GetMonthArray();

            for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 7; j++)
                {
                    string  chuThich = "";
                    int     ngay     = arr[i, j];
                    Control control  = tabCalendar.GetControlFromPosition(j, i + 1);
                    if (ngay == 0)
                    {
                        control.Text = "";
                    }
                    else
                    {
                        control.Text = ngay.ToString();
                        chuThich    += Lunar.convertSolar2Lunar(ngay, month, year) + "\r\n";
                        chuThich    += GetNgayLe(ngay, month);
                    }
                    toolTip.SetToolTip(control, chuThich);
                }
            }
        }