public DispSetGeneral() { int i; InitializeComponent(); displayPairs = new CheckBoxValuePair[] { }; // first day of week for (i = 0; i < 7; i++) { comboBox1.Items.Add(GCCalendar.GetWeekdayName(i)); } comboBox1.SelectedIndex = GCDisplaySettings.Current.getValue(GCDS.GENERAL_FIRST_DOW); // masa name format comboBox2.SelectedIndex = GCDisplaySettings.Current.getValue(GCDS.GENERAL_MASA_FORMAT); // anniversary format comboBox3.SelectedIndex = GCDisplaySettings.Current.getValue(GCDS.GENERAL_ANNIVERSARY_FMT); foreach (CheckBoxValuePair cvp in displayPairs) { cvp.checkBox.Checked = (GCDisplaySettings.Current.getValue(cvp.dispValue) != 0); } }
private SizeF DrawWeekdayHeader(Graphics g, float tempTextHeight) { SizeF textSize = SizeF.Empty; string str; for (int i = 0; i < 7; i++) { str = GCCalendar.GetWeekdayName((i + firstDayOfWeekGeneral) % 7); textSize = g.MeasureString(str, fontH2); g.DrawString(str, fontH2, Brushes.Black, xMarginLeft + xCellWidth * i + xCellWidth / 2 - textSize.Width / 2, yUnderTitleBar + tempTextHeight); } return(textSize); }
public DateSpecifyDstPanel() { InitializeComponent(); int i; for (i = 0; i < 7; i++) { comboBoxDayOfWeek.Items.Add(GCCalendar.GetWeekdayName(i)); } for (i = 1; i < 32; i++) { comboBoxDayOfMonth.Items.Add(i.ToString()); } for (i = 1; i < 13; i++) { comboBoxMonth.Items.Add(GregorianDateTime.GetMonthName(i)); } }