Esempio n. 1
0
        private static string[] createNewMonthArray(int i_Year, int i_Month)
        {
            List <string> newFile = new List <string>();

            for (int i = 1; i <= TimeHandler.DaysInMonth(i_Year, i_Month); i++)
            {
                newFile.Add(string.Format(
                                DayData.m_RowFormat,
                                ((i < 10) ? "0" : "") + i,
                                TimeHandler.getWeekDayStr(i_Year, i_Month, i),
                                "",
                                "",
                                "",
                                getDayType(TimeHandler.getWeekDayInt(i_Year, i_Month, i)),
                                "",
                                TimeWatch.sr_RowSeparator));
            }

            return(newFile.ToArray());
        }
Esempio n. 2
0
        public static List <string> GetYears()
        {
            List <string>   years    = new List <string>();
            List <FileInfo> allFiles = GetAllFiles();

            foreach (var file in allFiles)
            {
                string year = getFileYear(file.Name).ToString();
                if (!years.Contains(year))
                {
                    years.Add(year);
                }
            }

            if (!years.Contains(TimeHandler.NextYear().ToString()))
            {
                years.Add(TimeHandler.NextYear().ToString());
            }

            return(years);
        }