예제 #1
0
 private void ctrl_OnExitControlEvent(ucBase luncherControl)
 {
     if (panel_DERECHO.Contains(luncherControl))
     {
         RemoveControlFromPannel((ucBase)luncherControl);
     }
 }
예제 #2
0
 public void RemoveControlFromPannel(ucBase ctrl)
 {
     if (ctrl != null)
     {
         if (panel_DERECHO.Contains(ctrl))
         {
             panel_DERECHO.Controls.Remove(ctrl);
             ctrl.Dispose();
         }
     }
 }
예제 #3
0
        public void AddContronToPannel(ButtonsMenu item)
        {
            ucBase ctrl = (ucBase)Fwk.HelperFunctions.ReflectionFunctions.CreateInstance(item.Component);

            ctrl.Parent = panel_DERECHO;
            ctrl.Key    = item.ID;
            panel_DERECHO.Controls.Add(ctrl);
            ctrl.Dock = System.Windows.Forms.DockStyle.Fill;
            ctrl.OnExitControlEvent += new ExitControlHandler(ctrl_OnExitControlEvent);
            ctrl.BringToFront();
            ctrl.Refresh();
        }