Exemple #1
0
        public override Boolean AllowChildControl(Server.Application.FormControlType childControlType)
        {
            if (childControlType != Server.Application.FormControlType.SectionColumn)
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
        virtual public void BaseConstructor(Mercury.Client.Core.Forms.Control parentControl, Server.Application.FormControl serverControl)
        {
            base.BaseConstructor(application, serverControl);


            controlId = serverControl.ControlId;

            controlType = serverControl.ControlType;

            tabIndex = serverControl.TabIndex;

            enabled = serverControl.Enabled;

            visible = serverControl.Visible;

            readOnly = serverControl.ReadOnly;

            required = serverControl.Required;

            position = serverControl.Position;

            capabilities = serverControl.Capabilities;



            eventHandlers = serverControl.EventHandlers;

            if (eventHandlers == null)
            {
                eventHandlers = new ObservableCollection <Mercury.Server.Application.FormControlEventHandler> ();
            }


            if (serverControl.Style != null)
            {
                style = new Mercury.Client.Core.Forms.Structures.Style(this, serverControl.Style);
            }

            else if (style == null)
            {
                style = new Mercury.Client.Core.Forms.Structures.Style(this);
            }


            dataBindings = serverControl.DataBindings;


            parent = parentControl;

            return;
        }
Exemple #3
0
        public void InsertNewControl(Int32 index, Server.Application.FormControlType forControlType)
        {
            #region Create Appropriate Child Control

            Client.Core.Forms.Control childControl = null;

            switch (forControlType)
            {
            case Server.Application.FormControlType.Address: childControl = new global::Mercury.Client.Core.Forms.Controls.Address(application); break;

            case Server.Application.FormControlType.Button: childControl = new global::Mercury.Client.Core.Forms.Controls.Button(application); break;

            case Server.Application.FormControlType.Collection: childControl = new global::Mercury.Client.Core.Forms.Controls.Collection(application); break;

            case Server.Application.FormControlType.Entity: childControl = new global::Mercury.Client.Core.Forms.Controls.Entity(application); break;

            case Server.Application.FormControlType.Input: childControl = new global::Mercury.Client.Core.Forms.Controls.Input(application); break;

            case Server.Application.FormControlType.Label: childControl = new global::Mercury.Client.Core.Forms.Controls.Label(application); break;

            case Server.Application.FormControlType.Metric: childControl = new global::Mercury.Client.Core.Forms.Controls.Metric(application); break;

            case Server.Application.FormControlType.Section: childControl = new global::Mercury.Client.Core.Forms.Controls.Section(application); break;

            case Server.Application.FormControlType.SectionColumn: childControl = new global::Mercury.Client.Core.Forms.Controls.SectionColumn(application); break;

            case Server.Application.FormControlType.Selection: childControl = new global::Mercury.Client.Core.Forms.Controls.Selection(application); break;

            case Server.Application.FormControlType.Service: childControl = new global::Mercury.Client.Core.Forms.Controls.Service(application); break;

            case Server.Application.FormControlType.Text: childControl = new global::Mercury.Client.Core.Forms.Controls.Text(application); break;
            }

            if ((childControl != null) && (AllowChildControl(forControlType)))
            {
                InsertNewControl(index, childControl);
            }

            #endregion

            return;
        }
Exemple #4
0
 virtual public Boolean AllowChildControl(Server.Application.FormControlType childControlType)
 {
     return(false);
 }