Sicherung
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// <copyright file="ScrollbarControlDesigner.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace FSI.BT.Tools.SystemTrayMenu.UserInterface
|
||||
{
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
internal class ScrollbarControlDesigner : ControlDesigner
|
||||
{
|
||||
public override SelectionRules SelectionRules
|
||||
{
|
||||
get
|
||||
{
|
||||
SelectionRules selectionRules = base.SelectionRules;
|
||||
PropertyDescriptor propDescriptor = TypeDescriptor.GetProperties(Component)["AutoSize"];
|
||||
if (propDescriptor != null)
|
||||
{
|
||||
bool autoSize = (bool)propDescriptor.GetValue(Component);
|
||||
if (autoSize)
|
||||
{
|
||||
selectionRules = SelectionRules.Visible | SelectionRules.Moveable | SelectionRules.BottomSizeable | SelectionRules.TopSizeable;
|
||||
}
|
||||
else
|
||||
{
|
||||
selectionRules = SelectionRules.Visible | SelectionRules.AllSizeable | SelectionRules.Moveable;
|
||||
}
|
||||
}
|
||||
|
||||
return selectionRules;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user