public override Control CreateControl(DashboardInstanceParams pars)
        {
            var frame = new DashboardFrame(this, pars);

            frame.LoadLayoutOrOverride(m_design);
            //frame.EnableDesign(m_enableDesign);
            return(frame);
        }
 public void SetDesignFrame(DashboardFrame win)
 {
     if (!CustomDashboardsFeature.Allowed)
     {
         return;
     }
     if (win == null)
     {
         if (m_designFrame != null)
         {
             m_designFrame.SetEnableDesignFlag(false);
         }
         m_designFrame = null;
         return;
     }
     if (m_designFrame != null && m_designFrame != win)
     {
         throw new DashboardAllreadyDesignedError(this);
     }
     m_designFrame = win;
     m_designFrame.SetEnableDesignFlag(true);
 }
 public Action GetOpenWidgetCallback(DashboardFrame frame)
 {
     return(() => frame.AddWidget(Widget, WeifenLuo.WinFormsUI.Docking.DockState.Document, PersistString));
 }