コード例 #1
0
ファイル: Widget.cs プロジェクト: OronDF343/Sky-Jukebox
 /// <summary>
 /// Creates a new Widget shown near a <see cref="Control"/> in the specified parent <see cref="Window"/>, using the specified positioning, and the specified alignment.
 /// </summary>
 /// <param name="parentWindow">The parent <see cref="Window"/>.</param>
 /// <param name="showNear">The target <see cref="Control"/>. Must be a child of the parent <see cref="Window"/>.</param>
 /// <param name="relativePosition">The positioning of the Widget relative to the target <see cref="Control"/>.</param>
 /// <param name="alignment">The alignment of the Widget relative to the target <see cref="Control"/>. Must be horizontal for vertical positioning and vice versa.</param>
 /// <param name="allowOverlap">Determines whether the Widget will overlap the parent <see cref="Window"/>, or be positioned outside of it.</param>
 /// <param name="autoPosition">Determines whether the positioning will be automatically changed if there is no space. For example, if the positioning is Above and there is insufficient space above the window, it will be set to Below, but never Left or Right.</param>
 public void Initialize(Window parentWindow, Control showNear, WidgetRelativePosition relativePosition,
     WidgetAlignment alignment, bool allowOverlap, bool autoPosition)
 {
     WindowStartupLocation = WindowStartupLocation.Manual;
     ParentWindow = parentWindow;
     ParentWindow.LocationChanged += (sender, e) => UpdatePosition();
     ShowNear = showNear;
     RelativePosition = relativePosition;
     Alignment = alignment;
     AllowOverlap = allowOverlap;
     AutoPosition = autoPosition;
     UpdatePosition();
 }
コード例 #2
0
ファイル: Widget.cs プロジェクト: OronDF343/Sky-Jukebox
 /// <summary>
 /// Creates a new Widget shown near a <see cref="Control"/> in the specified parent <see cref="Window"/>, using the specified positioning, and the specified alignment.
 /// </summary>
 /// <param name="parentWindow">The parent <see cref="Window"/>.</param>
 /// <param name="showNear">The target <see cref="Control"/>. Must be a child of the parent <see cref="Window"/>.</param>
 /// <param name="relativePosition">The positioning of the Widget relative to the target <see cref="Control"/>.</param>
 /// <param name="alignment">The alignment of the Widget relative to the target <see cref="Control"/>. Must be horizontal for vertical positioning and vice versa.</param>
 /// <param name="allowOverlap">Determines whether the Widget will overlap the parent <see cref="Window"/>, or be positioned outside of it.</param>
 /// <param name="autoPosition">Determines whether the positioning will be automatically changed if there is no space. For example, if the positioning is Above and there is insufficient space above the window, it will be set to Below, but never Left or Right.</param>
 public void Initialize(Window parentWindow, Control showNear, WidgetRelativePosition relativePosition,
                        WidgetAlignment alignment, bool allowOverlap, bool autoPosition)
 {
     WindowStartupLocation         = WindowStartupLocation.Manual;
     ParentWindow                  = parentWindow;
     ParentWindow.LocationChanged += (sender, e) => UpdatePosition();
     ShowNear         = showNear;
     RelativePosition = relativePosition;
     Alignment        = alignment;
     AllowOverlap     = allowOverlap;
     AutoPosition     = autoPosition;
     UpdatePosition();
 }
コード例 #3
0
 public VolumeWidget(Window parentWindow, Control showNear, WidgetRelativePosition relativePosition,
     WidgetAlignment alignment, bool allowOverlap, bool autoPosition)
     : this()
 {
     Initialize(parentWindow, showNear, relativePosition, alignment, allowOverlap, autoPosition);
 }
コード例 #4
0
 public PluginsWidget(Window parentWindow, Control showNear, WidgetRelativePosition relativePosition,
                      WidgetAlignment alignment, bool allowOverlap, bool autoPosition)
     : this()
 {
     Initialize(parentWindow, showNear, relativePosition, alignment, allowOverlap, autoPosition);
 }