Skip to content

Commit

Permalink
Update MonthCalendarDesigner.cs to use file-scoped namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafShi1 committed Jul 25, 2023
1 parent c0c1bcc commit 6d97545
Showing 1 changed file with 24 additions and 25 deletions.
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;
}
}
}

0 comments on commit 6d97545

Please sign in to comment.