/// <summary>
        /// Raises top control changed event
        /// </summary>
        /// <param name="oldControl">old control</param>
        /// <param name="newControl">new control</param>
        private void OnTopControlChnaged(Control oldControl, Control newControl)
        {
            EventHandler <ControlSwitchedEventArgs> handler = TopControlChanged;

            if (handler != null)
            {
                ControlSwitchedEventArgs args = new ControlSwitchedEventArgs(oldControl, newControl);
                handler(this, args);
            }
        }
        /// <summary>
        /// On top form changed
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="e">e</param>
        private void OnTopFormChanged(object sender, ControlSwitchedEventArgs e)
        {
            if (e.OldControl != null)
            {
                e.OldControl.Resize -= OnTopFormResize;
            }

            SetFormsPanelBounds();
            ApplyTopFormMargins();

            if (e.NewControl != null)
            {
                e.NewControl.Resize += OnTopFormResize;
            }

            return;
        }
 /// <summary>
 /// Raises top control changed event
 /// </summary>
 /// <param name="oldControl">old control</param>
 /// <param name="newControl">new control</param>
 private void OnTopControlChnaged(Control oldControl, Control newControl)
 {
     EventHandler<ControlSwitchedEventArgs> handler = TopControlChanged;
      if (handler != null)
      {
     ControlSwitchedEventArgs args = new ControlSwitchedEventArgs(oldControl, newControl);
     handler(this, args);
      }
 }
Esempio n. 4
0
      /// <summary>
      /// On top form changed
      /// </summary>
      /// <param name="sender">sender of the event</param>
      /// <param name="e">e</param>
      private void OnTopFormChanged(object sender, ControlSwitchedEventArgs e)
      {
         if (e.OldControl != null)
         {
            e.OldControl.Resize -= OnTopFormResize;
         }

         SetFormsPanelBounds();
         ApplyTopFormMargins();

         if (e.NewControl != null)
         {
            e.NewControl.Resize += OnTopFormResize;
         }

         return;
      }