Esempio 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);
                }
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            calendar = new Calendar();

            while (true)
            {
                int action;
                printMenu();
                readInt("Wählen Sie eine Aktion aus: ", out action);

                switch (action)
                {
                    case 1:
                    {
                        listAppointments();
                        break;
                    }
                    case 2:
                    {
                        createAppointment();
                        break;
                    }
                    case 3:
                    {
                        listTasks();
                        break;
                    }
                    case 4:
                    {
                        createTask();
                        break;
                    }
                    case 5:
                    {
                        Console.WriteLine("Auf Wiedersehen!");
                        Environment.Exit(0);
                        break;
                    }
                }
            }
        }