Beispiel #1
0
    private void SetAllMonths()
    {
        MonthObject jan = new MonthObject("January", 100, 50, 1);
        MonthObject feb = new MonthObject("February", 100, 50, 1);
        MonthObject mar = new MonthObject("March", 100, 50, 1);
        MonthObject apr = new MonthObject("Arpil", 100, 50, 1);
        MonthObject may = new MonthObject("May", 100, 50, 1);
        MonthObject jun = new MonthObject("June", 100, 50, 1);
        MonthObject jul = new MonthObject("July", 100, 50, 1);
        MonthObject aug = new MonthObject("August", 100, 50, 1);
        MonthObject sep = new MonthObject("September", 100, 50, 1);
        MonthObject oct = new MonthObject("October", 100, 50, 1);
        MonthObject nov = new MonthObject("November", 100, 50, 1);
        MonthObject dec = new MonthObject("December", 100, 50, 1);

        SetArray(0, jan);
        SetArray(1, feb);
        SetArray(2, mar);
        SetArray(3, apr);
        SetArray(4, may);
        SetArray(5, jun);
        SetArray(6, jul);
        SetArray(7, aug);
        SetArray(8, sep);
        SetArray(9, oct);
        SetArray(10, nov);
        SetArray(11, dec);
    }
Beispiel #2
0
        private void FillMonths()
        {
            string currentSelection = null;

            if (this.cmbMonth.Items.Count != 0)
            {
                currentSelection = this.cmbMonth.Text;
                this.cmbMonth.Items.Clear();
            }
            int year = (int)this.cmbYear.SelectedItem;

            for (int i = 0; i < Program.HebrewCalendar.GetMonthsInYear(year); i++)
            {
                var month = new MonthObject(year, i + 1);
                if (currentSelection == null && month.Year == Program.HebrewCalendar.GetYear(this._displayingSecularDate) && month.MonthInYear == Program.HebrewCalendar.GetMonth(this._displayingSecularDate))
                {
                    currentSelection = month.MonthName;
                }
                this.cmbMonth.Items.Add(month);
                if (month.MonthName == currentSelection)
                {
                    this.cmbMonth.SelectedItem = month;
                }
            }
        }
Beispiel #3
0
 private void SetArray(int _index, MonthObject _month)
 {
     Months[_index] = _month;
 }