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