Exemplo n.º 1
0
        public Widget ResolveEditor(PropertyItem item = null)
        {
            this.widget            = new Table(1u, 1u, false);
            this.imageEventBoxList = new List <ImageEventBox>();
            List <string> list = this._propertyItem.PropertyData.GetValue(this._propertyItem.Instance, null) as List <string>;

            if (list != null)
            {
                uint  num   = 0u;
                Table table = new Table(2u, (uint)list.Count, false);
                table.ColumnSpacing = 6u;
                foreach (string current in list)
                {
                    Label              label              = new Label();
                    PropertyInfo       property           = this._propertyItem.Instance.GetType().GetProperty(current);
                    PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(this._propertyItem.Instance.GetType()).Find(current, false);
                    label.Text = LanguageOption.GetValueBykey(propertyDescriptor.DisplayName);
                    Color color = new Color(165, 168, 176);
                    label.ModifyFg(StateType.Normal, color);
                    label.SetFontSize(10.0);
                    table.Attach(label, num, num + 1u, 1u, 2u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
                    ImageEventBox imageEventBox = new ImageEventBox(this._propertyItem, propertyDescriptor);
                    table.Attach(imageEventBox, num, num + 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
                    num += 1u;
                    this.imageEventBoxList.Add(imageEventBox);
                }
                this.widget.Attach(table, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            }
            this.widget.ShowAll();
            return(this.widget);
        }
Exemplo n.º 2
0
        public Widget ResolveEditor(PropertyItem item = null)
        {
            this.widget            = new Table(1U, 1U, false);
            this.imageEventBoxList = new List <ImageEventBox>();
            List <string> stringList = this._propertyItem.PropertyData.GetValue(this._propertyItem.Instance, (object[])null) as List <string>;

            if (stringList != null)
            {
                uint  left_attach = 0;
                Table table       = new Table(2U, (uint)stringList.Count, false);
                table.ColumnSpacing = 6U;
                foreach (string name in stringList)
                {
                    Label lable = new Label();
                    this._propertyItem.Instance.GetType().GetProperty(name);
                    PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(this._propertyItem.Instance.GetType()).Find(name, false);
                    lable.Text = LanguageOption.GetValueBykey(propertyDescriptor.DisplayName);
                    Color color = new Color((byte)165, (byte)168, (byte)176);
                    lable.ModifyFg(StateType.Normal, color);
                    lable.SetFontSize(10.0);
                    table.Attach((Widget)lable, left_attach, left_attach + 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
                    ImageEventBox imageEventBox = new ImageEventBox(this._propertyItem, propertyDescriptor);
                    table.Attach((Widget)imageEventBox, left_attach, left_attach + 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
                    ++left_attach;
                    this.imageEventBoxList.Add(imageEventBox);
                }
                this.widget.Attach((Widget)table, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            }
            this.widget.ShowAll();
            return((Widget)this.widget);
        }
Exemplo n.º 3
0
        public Widget ResolveEditor(PropertyItem item)
        {
            this.widget        = new Table(2U, 1U, false);
            this.imageEventBox = new ImageEventBox(this._propertyItem, this._propertyItem.PropertyDescriptor);
            this.widget.Attach((Widget)this.imageEventBox, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.widget.ShowAll();
            Label lable = new Label();
            Color color = new Color((byte)165, (byte)168, (byte)176);

            lable.ModifyFg(StateType.Normal, color);
            this.widget.RowSpacing = 6U;
            lable.Text             = LanguageOption.GetValueBykey(this._propertyItem.DiaplayName);
            lable.SetFontSize(10.0);
            this.widget.Attach((Widget)lable, 0U, 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            lable.Show();
            return((Widget)this.widget);
        }
Exemplo n.º 4
0
        public Widget ResolveEditor(PropertyItem item)
        {
            this.widget        = new Table(2u, 1u, false);
            this.imageEventBox = new ImageEventBox(this._propertyItem, this._propertyItem.PropertyDescriptor);
            this.widget.Attach(this.imageEventBox, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this.widget.ShowAll();
            Label label = new Label();
            Color color = new Color(165, 168, 176);

            label.ModifyFg(StateType.Normal, color);
            this.widget.RowSpacing = 6u;
            label.Text             = LanguageOption.GetValueBykey(this._propertyItem.DiaplayName);
            label.SetFontSize(10.0);
            this.widget.Attach(label, 0u, 1u, 1u, 2u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            label.Show();
            return(this.widget);
        }