Пример #1
0
 private void QubeStandardForm_Load(object Submiter, EventArgs e)
 {
     QubeExtensions.ControlFinder<QubeStandardPanel> cf = new QubeExtensions.ControlFinder<QubeStandardPanel>();
     cf.FindChildControlsRecursive(this);
     cf.FoundControls.First().IsCurrent = true;
     cf.FoundControls.First().RenderFieldsOuterDiv = RenderFieldsOuterDiv;
 }
Пример #2
0
 protected QubeCRUDFormPanel GetPanel(ECRUDPanelType type)
 {
     QubeExtensions.ControlFinder<QubeCRUDFormPanel> cf = new QubeExtensions.ControlFinder<QubeCRUDFormPanel>();
     cf.FindChildControlsRecursive(this, true);
     return cf.FoundControls.Where(x => x.Types.HasFlag(type)).First();
 }
Пример #3
0
 protected IEnumerable<QubeCRUDFormPanel> GetAllPanels()
 {
     QubeExtensions.ControlFinder<QubeCRUDFormPanel> cf = new QubeExtensions.ControlFinder<QubeCRUDFormPanel>();
     cf.FindChildControlsRecursive(this, true);
     return cf.FoundControls;
 }
Пример #4
0
 private void QubeContactForm_Load(object sender, EventArgs e)
 {
     QubeExtensions.ControlFinder<QubeContactPanel> cf = new QubeExtensions.ControlFinder<QubeContactPanel>();
     cf.FindChildControlsRecursive(this);
     cf.FoundControls.First().IsCurrent = true;
 }
Пример #5
0
        protected override void OnPreRender(EventArgs e)
        {
            QubeExtensions.ControlFinder<QubeCRUDFormPanel> cf = new QubeExtensions.ControlFinder<QubeCRUDFormPanel>();
            cf.FindChildControlsRecursive(this);
            List<QubeCRUDFormPanel> Panels = cf.FoundControls.ToList();

            foreach (QubeCRUDFormPanel p in Panels)
                p.Visible = p.Types.HasFlag(FormMode);

            base.OnPreRender(e);
        }
Пример #6
0
 public override Panel GetCurrentPanel()
 {
     QubeExtensions.ControlFinder<QubeCRUDFormPanel> cf = new QubeExtensions.ControlFinder<QubeCRUDFormPanel>();
     cf.FindChildControlsRecursive(this, false);
     foreach (QubeCRUDFormPanel p in cf.FoundControls)
         if (p.Types.HasFlag(FormMode))
         {
             p.IsCurrent = true;
             break;
         }
     return base.GetCurrentPanel();
 }