Example #1
0
    /// <inheritdoc />
    public virtual bool OnWindowClosing(IDockWindow?window)
    {
        var canClose = window?.OnClose() ?? true;

        var eventArgs = new WindowClosingEventArgs(window)
        {
            Cancel = !canClose
        };

        WindowClosing?.Invoke(this, eventArgs);

        return(!eventArgs.Cancel);
    }
Example #2
0
    /// <inheritdoc />
    public virtual bool OnWindowMoveDragBegin(IDockWindow?window)
    {
        var canMoveDrag = window?.OnMoveDragBegin() ?? true;

        var eventArgs = new WindowMoveDragBeginEventArgs(window)
        {
            Cancel = !canMoveDrag
        };

        WindowMoveDragBegin?.Invoke(this, eventArgs);

        return(!eventArgs.Cancel);
    }
Example #3
0
 /// <summary>
 /// Initializes new instance of the <see cref="WindowMoveDragEventArgs"/> class.
 /// </summary>
 /// <param name="window">The dragged window.</param>
 public WindowMoveDragEventArgs(IDockWindow?window)
 {
     Window = window;
 }
Example #4
0
 /// <inheritdoc />
 public virtual void OnWindowMoveDragEnd(IDockWindow?window)
 {
     window?.OnMoveDragEnd();
     WindowMoveDragEnd?.Invoke(this, new WindowMoveDragEndEventArgs(window));
 }
Example #5
0
 /// <inheritdoc />
 public virtual void OnWindowClosed(IDockWindow?window)
 {
     WindowClosed?.Invoke(this, new WindowClosedEventArgs(window));
 }
Example #6
0
 /// <summary>
 /// Initializes new instance of the <see cref="WindowOpenedEventArgs"/> class.
 /// </summary>
 /// <param name="window">The opened window.</param>
 public WindowOpenedEventArgs(IDockWindow?window)
 {
     Window = window;
 }
Example #7
0
 /// <summary>
 /// Initializes new instance of the <see cref="WindowClosedEventArgs"/> class.
 /// </summary>
 /// <param name="window">The closed window.</param>
 public WindowClosedEventArgs(IDockWindow?window)
 {
     Window = window;
 }
Example #8
0
 /// <summary>
 /// Initializes new instance of the <see cref="WindowAddedEventArgs"/> class.
 /// </summary>
 /// <param name="window">The added window.</param>
 public WindowAddedEventArgs(IDockWindow?window)
 {
     Window = window;
 }
Example #9
0
 /// <summary>
 /// Initializes new instance of the <see cref="WindowRemovedEventArgs"/> class.
 /// </summary>
 /// <param name="window">The removed window.</param>
 public WindowRemovedEventArgs(IDockWindow?window)
 {
     Window = window;
 }