/// <summary>
        ///    <para>
        ///       Initializes the designer.
        ///    </para>
        /// </summary>
        /// <param name='component'>
        ///    The control element being designed.
        /// </param>
        /// <remarks>
        ///    <para>
        ///       This is called by the designer host to establish the component being
        ///       designed.
        ///    </para>
        /// </remarks>
        /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
        public override void Initialize(IComponent component)
        {
            Debug.Assert(component is System.Web.UI.MobileControls.ObjectList,
                         "ObjectListDesigner.Initialize - Invalid ObjectList Control");

            _objectList = (System.Web.UI.MobileControls.ObjectList)component;
            base.Initialize(component);
        }
        // Used for autogenerated field collections.

        internal ObjectListFieldCollection(ObjectList owner, ArrayList fields) : base(fields)
        {
            _owner = owner;
            foreach (ObjectListField field in fields)
            {
                field.SetOwner(owner);
            }
        }
        /// <summary>
        ///    <para>
        ///       Initializes the designer.
        ///    </para>
        /// </summary>
        /// <param name='component'>
        ///    The control element being designed.
        /// </param>
        /// <remarks>
        ///    <para>
        ///       This is called by the designer host to establish the component being
        ///       designed.
        ///    </para>
        /// </remarks>
        /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
        public override void Initialize(IComponent component)
        {
            Debug.Assert(component is System.Web.UI.MobileControls.ObjectList,
                         "ObjectListDesigner.Initialize - Invalid ObjectList Control");

            _objectList = (System.Web.UI.MobileControls.ObjectList) component;
            base.Initialize(component);
        }
        private Object[] GetCommands(ObjectList objectList)
        {
            ObjectListCommandCollection commands = objectList.Commands;
            if (commands.Count == 0)
            {
                return null;
            }

            ArrayList commandList = new ArrayList(commands.Count);
            foreach(ObjectListCommand command in commands)
            {
                commandList.Add(command.Name);
            }

            commandList.Sort();
            return commandList.ToArray();
        }
Example #5
0
 protected override void InitForm()
 {
     base.InitForm();
     this._objectList = (ObjectList) base.Component;
     base.CommitOnDeactivate = true;
     base.Icon = new Icon(Type.GetType("System.Web.UI.Design.MobileControls.MobileControlDesigner," + Constants.MobileAssemblyFullName), "Commands.ico");
     base.Size = new Size(0x192, 300);
     this.Text = MobileResource.GetString("ObjectListCommandsPage_Title");
     GroupLabel label = new GroupLabel();
     label.SetBounds(4, 4, 0x188, ListComponentEditorPage.LabelHeight);
     label.Text = MobileResource.GetString("ObjectListCommandsPage_CommandListGroupLabel");
     label.TabIndex = 0;
     label.TabStop = false;
     base.TreeList.TabIndex = 1;
     Label label2 = new Label();
     label2.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.LabelHeight);
     label2.Text = MobileResource.GetString("ObjectListCommandsPage_TextCaption");
     label2.TabStop = false;
     label2.TabIndex = base.TabIndex;
     this._txtText = new TextBox();
     base.Y += ListComponentEditorPage.LabelHeight;
     this._txtText.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.CmbHeight);
     this._txtText.TextChanged += new EventHandler(this.OnPropertyChanged);
     this._txtText.TabIndex = base.TabIndex + 1;
     GroupLabel label3 = new GroupLabel();
     label3.SetBounds(4, 0xee, 0x188, ListComponentEditorPage.LabelHeight);
     label3.Text = MobileResource.GetString("ObjectListCommandsPage_DataGroupLabel");
     label3.TabIndex = base.TabIndex + 2;
     label3.TabStop = false;
     Label label4 = new Label();
     label4.SetBounds(8, 260, 0xb6, ListComponentEditorPage.LabelHeight);
     label4.Text = MobileResource.GetString("ObjectListCommandsPage_DefaultCommandCaption");
     label4.TabStop = false;
     label4.TabIndex = base.TabIndex + 3;
     this._cmbDefaultCommand = new ComboBox();
     this._cmbDefaultCommand.SetBounds(8, 0x114, 0xb6, 0x40);
     this._cmbDefaultCommand.DropDownStyle = ComboBoxStyle.DropDown;
     this._cmbDefaultCommand.Sorted = true;
     this._cmbDefaultCommand.TabIndex = base.TabIndex + 4;
     this._cmbDefaultCommand.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty);
     this._cmbDefaultCommand.TextChanged += new EventHandler(this.OnSetPageDirty);
     base.Controls.AddRange(new Control[] { label, label2, this._txtText, label3, label4, this._cmbDefaultCommand });
 }
Example #6
0
 public override void Initialize(IComponent component)
 {
     this._objectList = (ObjectList) component;
     base.Initialize(component);
 }
        // Used for primary field collection (the one modified by the user).

        internal ObjectListFieldCollection(ObjectList owner) : base(new ArrayList())
        {
            _owner = owner;
        }
        private void EnsureCount(int count)
        {

            int diff = Count - count;
            if (diff > 0)
            {
                Items.RemoveRange(count, diff);
                NotifyOwnerChange();
            }
            else
            {
                // Set owner = null, to avoid multiple change notifications. 
                // We'll call it just once later.

                ObjectList prevOwner = _owner;
                _owner = null;
                for (int i = diff; i < 0; i++)
                {
                    ObjectListField field = new ObjectListField();
                    Add(field);
                    field.SetOwner(prevOwner);
                }
                _owner = prevOwner;
                NotifyOwnerChange();
            }
        }
 internal ObjectListItem(ObjectList owner, Object dataItem) : base(dataItem, null, null)
 {
     _owner = owner;
     _fields = new String[owner.AllFields.Count];
 }
 internal ObjectListItem(ObjectList owner) : this(owner, null)
 {
 }
        protected override void InitForm()
        {
            base.InitForm();

            this._objectList = (ObjectList)Component;
            this.CommitOnDeactivate = true;
            this.Icon = new Icon(
                typeof(System.Web.UI.Design.MobileControls.MobileControlDesigner),
                "Commands.ico"
            );
            this.Size = new Size(402, 300);
            this.Text = SR.GetString(SR.ObjectListCommandsPage_Title);

            GroupLabel grplblCommandList = new GroupLabel();
            grplblCommandList.SetBounds(4, 4, 392, LabelHeight);
            grplblCommandList.Text = SR.GetString(SR.ObjectListCommandsPage_CommandListGroupLabel);
            grplblCommandList.TabIndex = 0;
            grplblCommandList.TabStop = false;

            TreeList.TabIndex = 1;

            Label lblText = new Label();
            lblText.SetBounds(X, Y, ControlWidth, LabelHeight);
            lblText.Text = SR.GetString(SR.ObjectListCommandsPage_TextCaption);
            lblText.TabStop = false;
            lblText.TabIndex = TabIndex;

            _txtText = new TextBox();
            Y += LabelHeight;
            _txtText.SetBounds(X, Y, ControlWidth, CmbHeight);
            _txtText.TextChanged += new EventHandler(this.OnPropertyChanged);
            _txtText.TabIndex = TabIndex + 1;

            GroupLabel grplblData = new GroupLabel();
            grplblData.SetBounds(4, 238, 392, LabelHeight);
            grplblData.Text = SR.GetString(SR.ObjectListCommandsPage_DataGroupLabel);
            grplblData.TabIndex = TabIndex + 2;
            grplblData.TabStop = false;

            Label lblDefaultCommand = new Label();
            lblDefaultCommand.SetBounds(8, 260, 182, LabelHeight);
            lblDefaultCommand.Text = SR.GetString(SR.ObjectListCommandsPage_DefaultCommandCaption);
            lblDefaultCommand.TabStop = false;
            lblDefaultCommand.TabIndex = TabIndex + 3;

            _cmbDefaultCommand = new ComboBox();
            _cmbDefaultCommand.SetBounds(8, 276, 182, 64);
            _cmbDefaultCommand.DropDownStyle = ComboBoxStyle.DropDown;
            _cmbDefaultCommand.Sorted = true;
            _cmbDefaultCommand.TabIndex = TabIndex + 4;
            _cmbDefaultCommand.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty);
            _cmbDefaultCommand.TextChanged += new EventHandler(this.OnSetPageDirty);

            this.Controls.AddRange(new Control[] 
                                    {
                                        grplblCommandList,
                                        lblText,
                                        _txtText,
                                        grplblData,
                                        lblDefaultCommand,
                                        _cmbDefaultCommand
                                    });
        }
Example #12
0
 protected override void InitForm()
 {
     base.InitForm();
     this._objectList = (ObjectList) base.Component;
     base.CommitOnDeactivate = true;
     base.Icon = new Icon(Type.GetType("System.Web.UI.Design.MobileControls.MobileControlDesigner," + Constants.MobileAssemblyFullName), "Fields.ico");
     base.Size = new Size(0x192, 300);
     this.Text = MobileResource.GetString("ObjectListFieldsPage_Title");
     this._ckbAutoGenerateFields = new CheckBox();
     this._cmbDataField = new UnsettableComboBox();
     this._ckbVisible = new CheckBox();
     this._txtDataFormatString = new TextBox();
     this._txtTitle = new TextBox();
     this._ckbAutoGenerateFields.SetBounds(4, 4, 0x18c, ListComponentEditorPage.LabelHeight);
     this._ckbAutoGenerateFields.Text = MobileResource.GetString("ObjectListFieldsPage_AutoGenerateFieldsCaption");
     this._ckbAutoGenerateFields.FlatStyle = FlatStyle.System;
     this._ckbAutoGenerateFields.CheckedChanged += new EventHandler(this.OnSetPageDirty);
     this._ckbAutoGenerateFields.TabIndex = 0;
     GroupLabel label = new GroupLabel();
     label.SetBounds(4, 0x20, 0x188, ListComponentEditorPage.LabelHeight);
     label.Text = MobileResource.GetString("ObjectListFieldsPage_FieldListGroupLabel");
     label.TabIndex = 1;
     label.TabStop = false;
     base.TreeList.TabIndex = 2;
     Label label2 = new Label();
     label2.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.LabelHeight);
     label2.Text = MobileResource.GetString("ObjectListFieldsPage_DataFieldCaption");
     label2.TabStop = false;
     label2.TabIndex = ListComponentEditorPage.Index;
     base.Y += ListComponentEditorPage.LabelHeight;
     this._cmbDataField.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.CmbHeight);
     this._cmbDataField.DropDownStyle = ComboBoxStyle.DropDown;
     this._cmbDataField.Sorted = true;
     this._cmbDataField.NotSetText = MobileResource.GetString("ObjectListFieldsPage_NoneComboEntry");
     this._cmbDataField.TextChanged += new EventHandler(this.OnPropertyChanged);
     this._cmbDataField.SelectedIndexChanged += new EventHandler(this.OnPropertyChanged);
     this._cmbDataField.TabIndex = ListComponentEditorPage.Index + 1;
     base.Y += ListComponentEditorPage.CellSpace;
     Label label3 = new Label();
     label3.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.LabelHeight);
     label3.Text = MobileResource.GetString("ObjectListFieldsPage_DataFormatStringCaption");
     label3.TabStop = false;
     label3.TabIndex = ListComponentEditorPage.Index + 2;
     base.Y += ListComponentEditorPage.LabelHeight;
     this._txtDataFormatString.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.CmbHeight);
     this._txtDataFormatString.TextChanged += new EventHandler(this.OnPropertyChanged);
     this._txtDataFormatString.TabIndex = ListComponentEditorPage.Index + 3;
     base.Y += ListComponentEditorPage.CellSpace;
     Label label4 = new Label();
     label4.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.LabelHeight);
     label4.Text = MobileResource.GetString("ObjectListFieldsPage_TitleCaption");
     label4.TabStop = false;
     label4.TabIndex = ListComponentEditorPage.Index + 4;
     base.Y += ListComponentEditorPage.LabelHeight;
     this._txtTitle.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.CmbHeight);
     this._txtTitle.TextChanged += new EventHandler(this.OnPropertyChanged);
     this._txtTitle.TabIndex = ListComponentEditorPage.Index + 5;
     base.Y += ListComponentEditorPage.CellSpace;
     this._ckbVisible.SetBounds(ListComponentEditorPage.X, base.Y, ListComponentEditorPage.ControlWidth, ListComponentEditorPage.CmbHeight);
     this._ckbVisible.FlatStyle = FlatStyle.System;
     this._ckbVisible.Text = MobileResource.GetString("ObjectListFieldsPage_VisibleCaption");
     this._ckbVisible.CheckedChanged += new EventHandler(this.OnPropertyChanged);
     this._ckbVisible.TabIndex = ListComponentEditorPage.Index + 6;
     base.Controls.AddRange(new Control[] { this._ckbAutoGenerateFields, label, label2, this._cmbDataField, label3, this._txtDataFormatString, label4, this._txtTitle, this._ckbVisible });
 }
 public DesignerObjectListAdapter(ObjectList objectList)
 {
     base.set_Control(objectList);
 }
        protected override void InitForm()
        {
            base.InitForm();

            this._objectList = (ObjectList)Component;
            this.CommitOnDeactivate = true;
            this.Icon = new Icon(
                typeof(System.Web.UI.Design.MobileControls.MobileControlDesigner),
                "Commands.ico"
            );
            this.Size = new Size(402, 300);
            this.Text = SR.GetString(SR.ObjectListCommandsPage_Title);

            GroupLabel grplblCommandList = new GroupLabel();
            grplblCommandList.SetBounds(4, 4, 392, LabelHeight);
            grplblCommandList.Text = SR.GetString(SR.ObjectListCommandsPage_CommandListGroupLabel);
            grplblCommandList.TabIndex = 0;
            grplblCommandList.TabStop = false;

            TreeList.TabIndex = 1;

            Label lblText = new Label();
            lblText.SetBounds(X, Y, ControlWidth, LabelHeight);
            lblText.Text = SR.GetString(SR.ObjectListCommandsPage_TextCaption);
            lblText.TabStop = false;
            lblText.TabIndex = TabIndex;

            _txtText = new TextBox();
            Y += LabelHeight;
            _txtText.SetBounds(X, Y, ControlWidth, CmbHeight);
            _txtText.TextChanged += new EventHandler(this.OnPropertyChanged);
            _txtText.TabIndex = TabIndex + 1;

            GroupLabel grplblData = new GroupLabel();
            grplblData.SetBounds(4, 238, 392, LabelHeight);
            grplblData.Text = SR.GetString(SR.ObjectListCommandsPage_DataGroupLabel);
            grplblData.TabIndex = TabIndex + 2;
            grplblData.TabStop = false;

            Label lblDefaultCommand = new Label();
            lblDefaultCommand.SetBounds(8, 260, 182, LabelHeight);
            lblDefaultCommand.Text = SR.GetString(SR.ObjectListCommandsPage_DefaultCommandCaption);
            lblDefaultCommand.TabStop = false;
            lblDefaultCommand.TabIndex = TabIndex + 3;

            _cmbDefaultCommand = new ComboBox();
            _cmbDefaultCommand.SetBounds(8, 276, 182, 64);
            _cmbDefaultCommand.DropDownStyle = ComboBoxStyle.DropDown;
            _cmbDefaultCommand.Sorted = true;
            _cmbDefaultCommand.TabIndex = TabIndex + 4;
            _cmbDefaultCommand.SelectedIndexChanged += new EventHandler(this.OnSetPageDirty);
            _cmbDefaultCommand.TextChanged += new EventHandler(this.OnSetPageDirty);

            this.Controls.AddRange(new Control[]
                                    {
                                        grplblCommandList,
                                        lblText,
                                        _txtText,
                                        grplblData,
                                        lblDefaultCommand,
                                        _cmbDefaultCommand
                                    });
        }
 internal void SetOwner(ObjectList owner) {
     _owner = owner;
 }
        protected override void InitForm()
        {
            base.InitForm();

            this._objectList = (ObjectList)Component;

            this.CommitOnDeactivate = true;
            this.Icon = new Icon(
                typeof(System.Web.UI.Design.MobileControls.MobileControlDesigner),
                "Fields.ico"
            );
            this.Size = new Size(402, 300);
            this.Text = SR.GetString(SR.ObjectListFieldsPage_Title);
            
            _ckbAutoGenerateFields = new CheckBox();
            _cmbDataField          = new UnsettableComboBox();
            _ckbVisible            = new CheckBox();
            _txtDataFormatString   = new TextBox();
            _txtTitle              = new TextBox();

            _ckbAutoGenerateFields.SetBounds(4, 4, 396, LabelHeight);
            _ckbAutoGenerateFields.Text = SR.GetString(SR.ObjectListFieldsPage_AutoGenerateFieldsCaption);
            _ckbAutoGenerateFields.FlatStyle = FlatStyle.System;
            _ckbAutoGenerateFields.CheckedChanged += new EventHandler(this.OnSetPageDirty);
            _ckbAutoGenerateFields.TabIndex = 0;

            GroupLabel grplblFieldList = new GroupLabel();
            grplblFieldList.SetBounds(4, 32, 392, LabelHeight);
            grplblFieldList.Text = SR.GetString(SR.ObjectListFieldsPage_FieldListGroupLabel);
            grplblFieldList.TabIndex = 1;
            grplblFieldList.TabStop = false;

            TreeList.TabIndex = 2;

            Label lblDataField = new Label();
            lblDataField.SetBounds(X, Y, ControlWidth, LabelHeight);
            lblDataField.Text = SR.GetString(SR.ObjectListFieldsPage_DataFieldCaption);
            lblDataField.TabStop = false;
            lblDataField.TabIndex = Index;

            Y += LabelHeight;
            _cmbDataField.SetBounds(X, Y, ControlWidth, CmbHeight);
            _cmbDataField.DropDownStyle = ComboBoxStyle.DropDown;
            _cmbDataField.Sorted        = true;
            _cmbDataField.NotSetText    = SR.GetString(SR.ObjectListFieldsPage_NoneComboEntry);
            _cmbDataField.TextChanged   += new EventHandler(this.OnPropertyChanged);
            _cmbDataField.SelectedIndexChanged += new EventHandler(this.OnPropertyChanged);
            _cmbDataField.TabIndex = Index + 1;

            Y += CellSpace;
            Label lblDataFormatString = new Label();
            lblDataFormatString.SetBounds(X, Y, ControlWidth, LabelHeight);
            lblDataFormatString.Text = SR.GetString(SR.ObjectListFieldsPage_DataFormatStringCaption);
            lblDataFormatString.TabStop = false;
            lblDataFormatString.TabIndex = Index + 2;

            Y += LabelHeight;
            _txtDataFormatString.SetBounds(X, Y, ControlWidth, CmbHeight);
            _txtDataFormatString.TextChanged += new EventHandler(this.OnPropertyChanged);
            _txtDataFormatString.TabIndex = Index + 3;

            Y += CellSpace;
            Label lblTitle = new Label();
            lblTitle.SetBounds(X, Y, ControlWidth, LabelHeight);
            lblTitle.Text = SR.GetString(SR.ObjectListFieldsPage_TitleCaption);
            lblTitle.TabStop = false;
            lblTitle.TabIndex = Index + 4;

            Y += LabelHeight;
            _txtTitle.SetBounds(X, Y, ControlWidth, CmbHeight);
            _txtTitle.TextChanged += new EventHandler(this.OnPropertyChanged);
            _txtTitle.TabIndex = Index + 5;

            Y += CellSpace;
            _ckbVisible.SetBounds(X, Y, ControlWidth, CmbHeight);
            _ckbVisible.FlatStyle = System.Windows.Forms.FlatStyle.System;
            _ckbVisible.Text = SR.GetString(SR.ObjectListFieldsPage_VisibleCaption); 
            _ckbVisible.CheckedChanged += new EventHandler(this.OnPropertyChanged);
            _ckbVisible.TabIndex = Index + 6;

            this.Controls.AddRange(new Control[] {
                                                     _ckbAutoGenerateFields,
                                                     grplblFieldList,
                                                     lblDataField,
                                                     _cmbDataField,
                                                     lblDataFormatString,
                                                     _txtDataFormatString,
                                                     lblTitle,
                                                     _txtTitle,
                                                     _ckbVisible
                                                 });
        }
Example #17
0
 internal static void InvalidateDisplayFieldIndices(ObjectList objectList)
 {
     typeof(ObjectList).InvokeMember("InvalidateDisplayFieldIndices", BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, objectList, null);
 }
 internal ObjectListItemCollection(ObjectList owner)
 {
     _owner = owner;
 }