57 references to Day
System.Windows.Forms (19)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (9)
80private const Day DefaultFirstDayOfWeek = Day.Default; 109private Day _firstDayOfWeek = DefaultFirstDayOfWeek; 374public Day FirstDayOfWeek 380if (value is < Day.Monday or > Day.Default) 382throw new InvalidEnumArgumentException(nameof(FirstDayOfWeek), (int)value, typeof(Day)); 393if (value == Day.Default) 1380if (_firstDayOfWeek == Day.Default)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (10)
113private static DayOfWeek CastDayToDayOfWeek(Day day) 116Day.Monday => DayOfWeek.Monday, 117Day.Tuesday => DayOfWeek.Tuesday, 118Day.Wednesday => DayOfWeek.Wednesday, 119Day.Thursday => DayOfWeek.Thursday, 120Day.Friday => DayOfWeek.Friday, 121Day.Saturday => DayOfWeek.Saturday, 122Day.Sunday => DayOfWeek.Sunday, 123Day.Default => DayOfWeek.Sunday, 201internal DayOfWeek FirstDayOfWeek => this.TryGetOwnerAs(out MonthCalendar? owner) ? CastDayToDayOfWeek(owner.FirstDayOfWeek) : CastDayToDayOfWeek(Day.Default);
System.Windows.Forms.Tests (37)
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarAccessibleObjectTests.cs (1)
137control.FirstDayOfWeek = Day.Sunday;
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarBodyAccessibleObjectTests.cs (1)
135control.FirstDayOfWeek = Day.Sunday;
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarCellAccessibleObjectTests.cs (1)
149control.FirstDayOfWeek = Day.Monday;
System\Windows\Forms\AccessibleObjects\MonthCalendar.MonthCalendarAccessibleObjectTests.cs (10)
154yield return new object[] { Day.Monday, DayOfWeek.Monday }; 155yield return new object[] { Day.Tuesday, DayOfWeek.Tuesday }; 156yield return new object[] { Day.Wednesday, DayOfWeek.Wednesday }; 157yield return new object[] { Day.Thursday, DayOfWeek.Thursday }; 158yield return new object[] { Day.Friday, DayOfWeek.Friday }; 159yield return new object[] { Day.Saturday, DayOfWeek.Saturday }; 160yield return new object[] { Day.Sunday, DayOfWeek.Sunday }; 161yield return new object[] { Day.Default, DayOfWeek.Sunday }; 166public void MonthCalendarAccessibleObject_CastDayToDayOfWeek_IsExpected(Day day, DayOfWeek expected) 285monthCalendar.FirstDayOfWeek = Day.Monday;
System\Windows\Forms\MonthCalendarTests.cs (24)
79Assert.Equal(Day.Default, control.FirstDayOfWeek); 808[EnumData<Day>] 809public void MonthCalendar_FirstDayOfWeek_Set_GetReturnsExpected(Day value) 825[EnumData<Day>] 826public void MonthCalendar_FirstDayOfWeek_SetWithCustomOldValue_GetReturnsExpected(Day value) 830FirstDayOfWeek = Day.Monday 844[EnumData<Day>] 845public void MonthCalendar_FirstDayOfWeek_SetWithHandle_GetReturnsExpected(Day value) 873[InlineData(Day.Default, 1)] 874[InlineData(Day.Monday, 0)] 875[InlineData(Day.Tuesday, 0)] 876[InlineData(Day.Wednesday, 0)] 877[InlineData(Day.Thursday, 0)] 878[InlineData(Day.Friday, 0)] 879[InlineData(Day.Saturday, 0)] 880[InlineData(Day.Sunday, 0)] 881public void MonthCalendar_FirstDayOfWeek_SetWithHandleWithCustomOldValue_GetReturnsExpected(Day value, int expectedCreatedCallCount) 885FirstDayOfWeek = Day.Monday 912[InvalidEnumData<Day>] 913public void MonthCalendar_FirstDayOfWeek_SetInvalidValue_ThrowsInvalidEnumArgumentException(Day value) 1139FirstDayOfWeek = Day.Default 1156FirstDayOfWeek = Day.Tuesday 4189using MonthCalendar calendar = new() { Size = new Size(600, 600), FirstDayOfWeek = Day.Sunday }; 4367monthCalendar.FirstDayOfWeek = Day.Monday;
WinFormsControlsTest (1)
Calendar.cs (1)
58monthCalendar1.FirstDayOfWeek = (Day)daysOfWeekComboBox.SelectedIndex;