public Widget ResolveEditor(PropertyItem item = null)
 {
     this.combox = new ComBoxEx();
     this.SetControl();
     this.combox.Changed += new EventHandler(this.combox_Changed);
     return(this.combox);
 }
 public UIListViewEditorWidget()
 {
     this.table                  = new Table(6U, 3U, false);
     this.lbHor                  = new Label();
     this.lbVer                  = new Label();
     this.lbBottom               = new Label();
     this.lbHor.HeightRequest    = 10;
     this.lbVer.HeightRequest    = 10;
     this.lbBottom.HeightRequest = 10;
     this.directionText          = new Label();
     this.directionText.Xalign   = 1f;
     this.table.Attach((Widget)this.directionText, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.directionCombox = new ComBoxEx();
     this.table.Attach((Widget)this.directionCombox, 1U, 2U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.directionText.Show();
     this.directionCombox.Show();
     this.table.Attach((Widget)this.lbHor, 0U, 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Shrink, 0U, 0U);
     this.horizontalText        = new Label();
     this.horizontalText.Xalign = 1f;
     this.table.Attach((Widget)this.horizontalText, 0U, 1U, 2U, 3U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.horizontalCombox = new ComBoxEx();
     this.table.Attach((Widget)this.horizontalCombox, 1U, 2U, 2U, 3U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.table.Attach((Widget)this.lbVer, 0U, 1U, 3U, 4U, AttachOptions.Fill, AttachOptions.Shrink, 0U, 0U);
     this.verticalText        = new Label();
     this.verticalText.Xalign = 1f;
     this.table.Attach((Widget)this.verticalText, 0U, 1U, 4U, 5U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.verticalCombox = new ComBoxEx();
     this.table.Attach((Widget)this.verticalCombox, 1U, 2U, 4U, 5U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.table.Attach((Widget)this.lbBottom, 0U, 1U, 5U, 6U, AttachOptions.Fill, AttachOptions.Shrink, 0U, 0U);
     this.horizontalText.WidthRequest = this.verticalText.WidthRequest = 90;
     this.table.RowSpacing            = 0U;
     this.table.ColumnSpacing         = 12U;
     this.table.ShowAll();
     this.Add((Widget)this.table);
     this.ShowAll();
     this.BeforeValueChanged += new System.Action(this.BeforEvent);
     this.AfterValueChanged  += new System.Action(this.AfterEvent);
     this.AfterEvent();
     this.ReadLanuageConfigFile();
 }
Exemple #3
0
        public ChangeColorWidget()
        {
            this.table               = new Table(6U, 3U, false);
            this.table.Name          = "table1";
            this.table.ColumnSpacing = 6U;
            this.comboxLabel         = new Label();
            this.comboxLabel.Xalign  = 1f;
            this.table.Attach((Widget)this.comboxLabel, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.comboBox_colorType = new ComBoxEx();
            this.table.Attach((Widget)this.comboBox_colorType, 1U, 2U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            Label label = new Label();

            label.WidthRequest = 70;
            this.table.Attach((Widget)label, 2U, 3U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            label.Show();
            this.SingleColorSet        = new Label();
            this.SingleColorSet.Xalign = 1f;
            this.table.Attach((Widget)this.SingleColorSet, 0U, 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.singleColorEditor = new ColorEx();
            this.table.Attach((Widget)this.singleColorEditor, 1U, 2U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.StartColorSet        = new Label();
            this.StartColorSet.Xalign = 1f;
            this.table.Attach((Widget)this.StartColorSet, 0U, 1U, 2U, 3U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.firstColorEditor = new ColorEx();
            this.table.Attach((Widget)this.firstColorEditor, 1U, 2U, 2U, 3U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.EndColorSet        = new Label();
            this.EndColorSet.Xalign = 1f;
            this.table.Attach((Widget)this.EndColorSet, 0U, 1U, 3U, 4U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.endColorEditor = new ColorEx();
            this.table.Attach((Widget)this.endColorEditor, 1U, 2U, 3U, 4U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.directLabel        = new Label();
            this.directLabel.Text   = LanguageInfo.Changed_Direction;
            this.directLabel.Xalign = 1f;
            this.table.Attach((Widget)this.directLabel, 0U, 1U, 5U, 6U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.directSlider = new SliderEditorWidget();
            this.table.Attach((Widget)this.directSlider, 1U, 3U, 5U, 6U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.directSlider.SetLabelText(LanguageOption.CurrentLanguage == LanguageType.Chinese ? "度" : "°");
            this.bgLabel        = new Label();
            this.bgLabel.Text   = LanguageInfo.Background_color_transparency;
            this.bgLabel.Xalign = 1f;
            this.table.Attach((Widget)this.bgLabel, 0U, 1U, 4U, 5U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.bgSlider = new SliderEditorWidget();
            this.table.Attach((Widget)this.bgSlider, 1U, 3U, 4U, 5U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.Add((Widget)this.table);
            this.table.RowSpacing = 2U;
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.Add((Widget)this.table);
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.Hide();
            this.bgSlider.SetValueSize(0, (int)byte.MaxValue, 1);
            this.directSlider.SetValueAngle(0, 360, 1);
            this.ReadLanuageConfigFile();
            this.comboxLabel.WidthRequest = 90;
            this.ControlVisible();
            this.singleColorEditor.Visible = this.SingleColorSet.Visible = true;
            this.AfterEvent();
            this.BeforeValueChanged += new System.Action(this.BeforEvent);
            this.AfterValueChanged  += new System.Action(this.AfterEvent);
        }