private void AddCalendars() { this.SuspendLayout(); Controls.Clear(); cals=new SingleMonthCalendar[calendarDims.Width*calendarDims.Height]; for(int i=0;i<calendarDims.Height;i++) { for(int j=0;j<calendarDims.Width;j++) { SingleMonthCalendar cal = new SingleMonthCalendar(this, i*calendarDims.Width+j); cal.Size = monthSize; cal.Location = ClientOrigin + new Size(monthSize.Width * j, monthSize.Height * i); cals[i*calendarDims.Width+j] = cal; Controls.Add(cal); } } this.ResumeLayout(); }
private void AddCalendars() { this.SuspendLayout(); Controls.Clear(); cals = new SingleMonthCalendar[calendarDims.Width * calendarDims.Height]; for (int i = 0; i < calendarDims.Height; i++) { for (int j = 0; j < calendarDims.Width; j++) { SingleMonthCalendar cal = new SingleMonthCalendar(this, i * calendarDims.Width + j); cal.Size = monthSize; cal.Location = ClientOrigin + new Size(monthSize.Width * j, monthSize.Height * i); cals[i * calendarDims.Width + j] = cal; Controls.Add(cal); } } this.ResumeLayout(); }