/// <summary>
 /// Attaches a toolbox window to the active window. It will remain attached to whichever window is active.
 /// </summary>
 /// <param name="newToolbox">The toolbox window to attach.</param>
 /// <param name="position">Where to position the toolbox window in relation to the active window.</param>
 public void ShowToolbox(Window newToolbox, ToolboxPosition position) {
     newToolbox.Owner = Current;
     if (position == ToolboxPosition.Right) {
         newToolbox.Left = Current.Left + Current.Width;
         newToolbox.Top = Current.Top;
     } else if (position == ToolboxPosition.Bottom) {
         newToolbox.Left = Current.Left;
         newToolbox.Top = Current.Top + Current.Height;
     }
     newToolbox.Show();
     if (!toolboxes.Contains(newToolbox))
         toolboxes.Add(newToolbox);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Attaches a toolbox window to the active window. It will remain attached to whichever window is active.
 /// </summary>
 /// <param name="newToolbox">The toolbox window to attach.</param>
 /// <param name="position">Where to position the toolbox window in relation to the active window.</param>
 public void ShowToolbox(Window newToolbox, ToolboxPosition position)
 {
     newToolbox.Owner = Current;
     if (position == ToolboxPosition.Right)
     {
         newToolbox.Left = Current.Left + Current.Width;
         newToolbox.Top  = Current.Top;
     }
     else if (position == ToolboxPosition.Bottom)
     {
         newToolbox.Left = Current.Left;
         newToolbox.Top  = Current.Top + Current.Height;
     }
     newToolbox.Show();
     if (!toolboxes.Contains(newToolbox))
     {
         toolboxes.Add(newToolbox);
     }
 }
 public void ShowAndPosition(ToolboxPosition position) {
     SessionCore.Instance.Windows.ShowToolbox(this, position);
 }
 public void ShowAndPosition(ToolboxPosition position)
 {
     SessionCore.Instance.Windows.ShowToolbox(this, position);
 }