Пример #1
0
        protected virtual void GenerateControlsDesignTime(
            int currentColumn,
            KeyValuePair <string, Control> pair,
            Size propertyItemControlSize,
            Point propertyItemControlLocation)
        {
            DataLayoutControlItem component = (DataLayoutControlItem)this.designerHost.CreateComponent(typeof(DataLayoutControlItem));

            this.changeService.OnComponentChanging((object)component, (MemberDescriptor)null);
            component.Text = pair.Key;
            if (component.MinSize.Height != propertyItemControlSize.Height)
            {
                component.MinSize = new Size(component.MinSize.Width, propertyItemControlSize.Height);
            }
            this.changeService.OnComponentChanged((object)component, (MemberDescriptor)null, (object)null, (object)null);
            this.changeService.OnComponentChanging((object)this.DataLayoutControl.Site.Component, (MemberDescriptor)null);
            DataLayoutItemInitializingEventArgs e = new DataLayoutItemInitializingEventArgs((LayoutControlItem)component);

            this.OnItemInitializing((object)this, e);
            if (e.Cancel)
            {
                return;
            }
            Control index = pair.Value;

            component.AssociatedControl = index;
            component.Bounds            = new Rectangle(propertyItemControlLocation, propertyItemControlSize);
            this.DataLayoutControl.LayoutControl.Items.Add((RadItem)component);
            this.OnItemInitialized((object)this, new DataLayoutItemInitializedEventArgs((LayoutControlItem)component));
            this.changeService.OnComponentChanged((object)this.DataLayoutControl.LayoutControl.Site.Component, (MemberDescriptor)null, (object)null, (object)null);
            this.alreadyGeneratedProperties.Add(pair.Key, pair.Value);
            this.validationInfoForEachEditor[index].Item = component;
        }
Пример #2
0
        protected internal virtual void OnItemInitializing(
            object sender,
            DataLayoutItemInitializingEventArgs e)
        {
            DataLayoutItemInitializingEventHandler itemInitializing = this.ItemInitializing;

            if (itemInitializing == null)
            {
                return;
            }
            itemInitializing((object)this, e);
        }
Пример #3
0
        protected virtual void GenerateControlsRunTime(
            int currentColumn,
            KeyValuePair <string, Control> pair,
            Size propertyItemControlSize,
            Point propertyItemControlLocation)
        {
            DataLayoutControlItem layoutControlItem = new DataLayoutControlItem();

            layoutControlItem.Text = pair.Key;
            Control index = pair.Value;

            if (index is RadControl)
            {
                (index as RadControl).ThemeName = this.DataLayoutControl.ThemeName;
            }
            layoutControlItem.AssociatedControl = index;
            if (layoutControlItem.MinSize.Height != propertyItemControlSize.Height)
            {
                layoutControlItem.MinSize = new Size(layoutControlItem.MinSize.Width, propertyItemControlSize.Height);
            }
            if (layoutControlItem.MinSize.Width > propertyItemControlSize.Width)
            {
                layoutControlItem.MinSize = new Size(propertyItemControlSize.Width, layoutControlItem.MinSize.Height);
            }
            layoutControlItem.Bounds = new Rectangle(propertyItemControlLocation, propertyItemControlSize);
            DataLayoutItemInitializingEventArgs e = new DataLayoutItemInitializingEventArgs((LayoutControlItem)layoutControlItem);

            this.OnItemInitializing((object)this, e);
            if (e.Cancel)
            {
                return;
            }
            this.DataLayoutControl.LayoutControl.Items.Add((RadItem)layoutControlItem);
            this.OnItemInitialized((object)this, new DataLayoutItemInitializedEventArgs((LayoutControlItem)layoutControlItem));
            this.alreadyGeneratedProperties.Add(pair.Key, index);
            this.validationInfoForEachEditor[index].Item = layoutControlItem;
        }
Пример #4
0
 private void DataEntryElement_ItemInitializing(
     object sender,
     DataLayoutItemInitializingEventArgs e)
 {
     this.OnItemInitializing((object)this, e);
 }