-
Notifications
You must be signed in to change notification settings - Fork 957
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MonthCalendarDesigner.cs to use file-scoped namespaces
- Loading branch information
Showing
1 changed file
with
24 additions
and
25 deletions.
There are no files selected for viewing
49 changes: 24 additions & 25 deletions
49
src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/MonthCalendarDesigner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
namespace System.Windows.Forms.Design | ||
namespace System.Windows.Forms.Design; | ||
|
||
internal class MonthCalendarDesigner : ControlDesigner | ||
{ | ||
internal class MonthCalendarDesigner : ControlDesigner | ||
public MonthCalendarDesigner() | ||
{ | ||
public MonthCalendarDesigner() | ||
{ | ||
AutoResizeHandles = true; | ||
} | ||
AutoResizeHandles = true; | ||
} | ||
|
||
/// <summary> | ||
/// Retrieves a set of rules concerning the movement capabilities of a component. | ||
/// This should be one or more flags from the SelectionRules class. If no designer | ||
/// provides rules for a component, the component will not get any UI services. | ||
/// </summary> | ||
public override SelectionRules SelectionRules | ||
/// <summary> | ||
/// Retrieves a set of rules concerning the movement capabilities of a component. | ||
/// This should be one or more flags from the SelectionRules class. If no designer | ||
/// provides rules for a component, the component will not get any UI services. | ||
/// </summary> | ||
public override SelectionRules SelectionRules | ||
{ | ||
get | ||
{ | ||
get | ||
{ | ||
SelectionRules rules = base.SelectionRules; | ||
SelectionRules rules = base.SelectionRules; | ||
|
||
if (Control.Parent is null || !Control.Parent.IsMirrored) | ||
{ | ||
rules &= ~(SelectionRules.TopSizeable | SelectionRules.LeftSizeable); | ||
} | ||
else | ||
{ | ||
rules &= ~(SelectionRules.TopSizeable | SelectionRules.RightSizeable); | ||
} | ||
|
||
return rules; | ||
if (Control.Parent is null || !Control.Parent.IsMirrored) | ||
{ | ||
rules &= ~(SelectionRules.TopSizeable | SelectionRules.LeftSizeable); | ||
} | ||
else | ||
{ | ||
rules &= ~(SelectionRules.TopSizeable | SelectionRules.RightSizeable); | ||
} | ||
|
||
return rules; | ||
} | ||
} | ||
} |