public ProductItemControl(ProductInfo itemInfo,
                                  ContractState.ProductItemState itemState,
                                  ContractTabAControl container) : base(container)
        {
            InitializeComponent();

            ItemState = itemState;
            ItemInfo  = itemInfo;

            Text            = ItemInfo.Title;
            ShowCloseButton = DefaultBoolean.True;

            if (Container.TabInfo.CommonEditorConfiguration.FontSize.HasValue)
            {
                var fontSizeDelte = Container.TabInfo.CommonEditorConfiguration.FontSize.Value -
                                    TextEditorConfiguration.DefaultFontSize;
                layoutControl.Appearance.Control.FontSizeDelta               = fontSizeDelte;
                layoutControl.Appearance.ControlFocused.FontSizeDelta        = fontSizeDelte;
                layoutControl.Appearance.ControlDropDown.FontSizeDelta       = fontSizeDelte;
                layoutControl.Appearance.ControlDropDownHeader.FontSizeDelta = fontSizeDelte;
                layoutControl.Appearance.ControlDisabled.FontSizeDelta       = fontSizeDelte;
                layoutControl.Appearance.ControlReadOnly.FontSizeDelta       = fontSizeDelte;
            }
            if (!Container.TabInfo.CommonEditorConfiguration.BackColor.IsEmpty)
            {
                layoutControl.Appearance.Control.BackColor         = Container.TabInfo.CommonEditorConfiguration.BackColor;
                layoutControl.Appearance.ControlFocused.BackColor  = Container.TabInfo.CommonEditorConfiguration.BackColor;
                layoutControl.Appearance.ControlDisabled.BackColor = CommonSkins.GetSkin(UserLookAndFeel.Default).Colors.GetColor(CommonColors.DisabledControl);;
            }
            if (!Container.TabInfo.CommonEditorConfiguration.ForeColor.IsEmpty)
            {
                layoutControl.Appearance.Control.ForeColor         = Container.TabInfo.CommonEditorConfiguration.ForeColor;
                layoutControl.Appearance.ControlFocused.ForeColor  = Container.TabInfo.CommonEditorConfiguration.ForeColor;
                layoutControl.Appearance.ControlDisabled.ForeColor = CommonSkins.GetSkin(UserLookAndFeel.Default).Colors.GetColor(CommonColors.DisabledText);
            }
            if (!Container.TabInfo.CommonEditorConfiguration.DropdownForeColor.IsEmpty)
            {
                layoutControl.Appearance.ControlDropDown.ForeColor       = Container.TabInfo.CommonEditorConfiguration.DropdownForeColor;
                layoutControl.Appearance.ControlDropDownHeader.ForeColor =
                    Container.TabInfo.CommonEditorConfiguration.DropdownForeColor;
            }
        }
        public ContentsItemControl(ContractTabAControl container) : base(container)
        {
            InitializeComponent();

            Text            = Container.CustomTabInfo.TabSelector.ContentsTabName;
            ShowCloseButton = DefaultBoolean.False;

            simpleLabelItemDescription.Text = String.Format("<size=+2><color=gray>{0}</color></size>", Container.CustomTabInfo.TabSelector.ContentsTabDescription);

            _productSelectorControl.Init(Container.CustomTabInfo.Products);
            _productSelectorControl.ItemClicking += OnProductClicking;
            _productSelectorControl.ItemClicked  += OnProductClicked;

            if (Container.TabInfo.CommonEditorConfiguration.FontSize.HasValue)
            {
                var fontSizeDelte = Container.TabInfo.CommonEditorConfiguration.FontSize.Value - TextEditorConfiguration.DefaultFontSize;
                layoutControl.Appearance.Control.FontSizeDelta               = fontSizeDelte;
                layoutControl.Appearance.ControlFocused.FontSizeDelta        = fontSizeDelte;
                layoutControl.Appearance.ControlDropDown.FontSizeDelta       = fontSizeDelte;
                layoutControl.Appearance.ControlDropDownHeader.FontSizeDelta = fontSizeDelte;
                layoutControl.Appearance.ControlDisabled.FontSizeDelta       = fontSizeDelte;
                layoutControl.Appearance.ControlReadOnly.FontSizeDelta       = fontSizeDelte;
            }
            if (!Container.TabInfo.CommonEditorConfiguration.BackColor.IsEmpty)
            {
                layoutControl.Appearance.Control.BackColor        = Container.TabInfo.CommonEditorConfiguration.BackColor;
                layoutControl.Appearance.ControlFocused.BackColor = Container.TabInfo.CommonEditorConfiguration.BackColor;
            }
            if (!Container.TabInfo.CommonEditorConfiguration.ForeColor.IsEmpty)
            {
                layoutControl.Appearance.Control.ForeColor        = Container.TabInfo.CommonEditorConfiguration.ForeColor;
                layoutControl.Appearance.ControlFocused.ForeColor = Container.TabInfo.CommonEditorConfiguration.ForeColor;
            }
            if (!Container.TabInfo.CommonEditorConfiguration.DropdownForeColor.IsEmpty)
            {
                layoutControl.Appearance.ControlDropDown.ForeColor       = Container.TabInfo.CommonEditorConfiguration.DropdownForeColor;
                layoutControl.Appearance.ControlDropDownHeader.ForeColor = Container.TabInfo.CommonEditorConfiguration.DropdownForeColor;
            }
        }
 public BaseSubTabControl(ContractTabAControl container)
 {
     Container = container;
 }