示例#1
0
        public Widget ResolveEditor(PropertyItem item = null)
        {
            this._table             = new Table(2u, 1u, false);
            this._checkButton       = new CheckButtonEx();
            this._checkButton.Label = "九宫格";
            this._sudukuTable       = new Table(2u, 2u, false);
            this._tableRight        = new Table(3u, 1u, false);
            this._tableBottom       = new Table(1u, 3u, false);
            this._left              = new EntryIntEx();
            this._left.Name         = "left";
            this._right             = new EntryIntEx();
            this._right.Name        = "right";
            this._top               = new EntryIntEx();
            this._top.Name          = "top";
            this._bottom            = new EntryIntEx();
            this._bottom.Name       = "bottom";
            this._left.WidthRequest = (this._right.WidthRequest = (this._top.WidthRequest = (this._bottom.WidthRequest = 30)));
            this._left.IntegerNum   = (this._right.IntegerNum = (this._top.IntegerNum = (this._bottom.IntegerNum = 0)));
            this._imageWidget       = new ImageView();
            this._imageWidget.Image = ImageIcon.GetIcon("CocoStudio.DefaultResource.ComponentResource.Multi.png");
            this._tableRight.Attach(this._top, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            Label label = new Label();

            label.WidthRequest = 5;
            this._tableRight.Attach(label, 0u, 1u, 1u, 2u, AttachOptions.Fill, AttachOptions.Expand, 0u, 0u);
            this._tableRight.Attach(this._bottom, 0u, 1u, 2u, 3u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._tableRight.ShowAll();
            this._tableBottom.Attach(this._left, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            Label label2 = new Label();

            label2.WidthRequest = 5;
            this._tableBottom.Attach(label2, 1u, 2u, 0u, 1u, AttachOptions.Fill, AttachOptions.Expand, 0u, 0u);
            this._tableBottom.Attach(this._right, 2u, 3u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._tableBottom.ShowAll();
            this._sudukuTable.Attach(this._imageWidget, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._sudukuTable.Attach(this._tableRight, 1u, 2u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._sudukuTable.Attach(this._tableBottom, 0u, 1u, 1u, 2u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._sudukuTable.ShowAll();
            this._table.Attach(this._checkButton, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._table.Attach(this._sudukuTable, 0u, 1u, 1u, 2u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u);
            this._table.ShowAll();
            this._left.EntryValueChanged  += new EventHandler <EntryIntEventArgs>(this.EntryValueChanged);
            this._right.EntryValueChanged += new EventHandler <EntryIntEventArgs>(this.EntryValueChanged);
            this._top.EntryValueChanged   += new EventHandler <EntryIntEventArgs>(this.EntryValueChanged);
            this._top.EntryValueChanged   += new EventHandler <EntryIntEventArgs>(this.EntryValueChanged);
            this._checkButton.Clicked     += new EventHandler(this._checkButton_Clicked);
            return(this._table);
        }
示例#2
0
 public Widget ResolveEditor(PropertyItem item = null)
 {
     this.table           = new Table(1U, 2U, false);
     this.widget          = new CheckButtonEx();
     this.widget.Clicked += new EventHandler(this.BoolEditor_Clicked);
     if (this._propertyItem.IsEnable && this._propertyItem.PropertyData.Name == "VisibleForFrame")
     {
         this.widget.Sensitive = false;
     }
     if (!(this._propertyItem.DiaplayName == "Display_CanUse"))
     {
         ;
     }
     this.SetControl();
     this.table.Attach((Widget)this.widget, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
     this.table.Attach((Widget) new Label(), 1U, 2U, 0U, 1U, AttachOptions.Expand, AttachOptions.Fill, 0U, 0U);
     this.table.ShowAll();
     return((Widget)this.table);
 }
示例#3
0
        public UIControlSizeEditorWidget()
        {
            this.alignment1                   = new Alignment(0.5f, 0.5f, 1f, 1f);
            this.alignment1.Name              = "alignment1";
            this.table2                       = new Table(5U, 2U, false);
            this.table2.Name                  = "table2";
            this.table2.ColumnSpacing         = 6U;
            this.preSizeEnabled               = new CheckButtonEx();
            this.preSizeEnabled.CanFocus      = true;
            this.preSizeEnabled.Name          = "preSizeEnabled";
            this.preSizeEnabled.DrawIndicator = true;
            this.preSizeEnabled.UseUnderline  = true;
            this.table2.Add((Widget)this.preSizeEnabled);
            Table.TableChild tableChild1 = (Table.TableChild) this.table2[(Widget)this.preSizeEnabled];
            tableChild1.TopAttach    = 0U;
            tableChild1.BottomAttach = 1U;
            tableChild1.LeftAttach   = 1U;
            tableChild1.RightAttach  = 2U;
            tableChild1.XOptions     = AttachOptions.Fill;
            tableChild1.YOptions     = AttachOptions.Fill;
            this.rectSize            = new PointEditorWidget(false);
            this.rectSize.Events     = EventMask.ButtonPressMask;
            this.rectSize.Name       = "rectSize";
            this.table2.Add((Widget)this.rectSize);
            Table.TableChild tableChild2 = (Table.TableChild) this.table2[(Widget)this.rectSize];
            tableChild2.TopAttach            = 4U;
            tableChild2.BottomAttach         = 5U;
            tableChild2.LeftAttach           = 1U;
            tableChild2.RightAttach          = 2U;
            tableChild2.YOptions             = AttachOptions.Fill;
            this.scale9Enabled               = new CheckButtonEx();
            this.scale9Enabled.CanFocus      = true;
            this.scale9Enabled.Name          = "scale9Enabled";
            this.scale9Enabled.DrawIndicator = true;
            this.scale9Enabled.UseUnderline  = true;
            this.tableCheck.Attach((Widget)this.scale9Enabled, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.tableCheck.Attach((Widget) new Label(), 1U, 2U, 0U, 1U, AttachOptions.Expand, AttachOptions.Fill, 0U, 0U);
            this.tableCheck.ShowAll();
            this.table2.Add((Widget)this.tableCheck);
            Table.TableChild tableChild3 = (Table.TableChild) this.table2[(Widget)this.tableCheck];
            tableChild3.TopAttach     = 1U;
            tableChild3.BottomAttach  = 2U;
            tableChild3.LeftAttach    = 1U;
            tableChild3.RightAttach   = 2U;
            tableChild3.XOptions      = AttachOptions.Fill;
            tableChild3.YOptions      = AttachOptions.Fill;
            this.scaleOLRValue        = new PointEditorWidget(false);
            this.scaleOLRValue.Events = EventMask.ButtonPressMask;
            this.scaleOLRValue.Name   = "scaleOriginValue";
            this.table2.Add((Widget)this.scaleOLRValue);
            Table.TableChild tableChild4 = (Table.TableChild) this.table2[(Widget)this.scaleOLRValue];
            tableChild4.TopAttach    = 2U;
            tableChild4.BottomAttach = 3U;
            tableChild4.LeftAttach   = 1U;
            tableChild4.RightAttach  = 2U;
            tableChild4.XOptions     = AttachOptions.Fill;
            tableChild4.YOptions     = AttachOptions.Fill;
            this.scaleTBValue        = new PointEditorWidget(false);
            this.scaleTBValue.Events = EventMask.ButtonPressMask;
            this.scaleTBValue.Name   = "scaleSizeValue";
            this.table2.Add((Widget)this.scaleTBValue);
            Table.TableChild tableChild5 = (Table.TableChild) this.table2[(Widget)this.scaleTBValue];
            tableChild5.TopAttach    = 3U;
            tableChild5.BottomAttach = 4U;
            tableChild5.LeftAttach   = 1U;
            tableChild5.RightAttach  = 2U;
            tableChild5.XOptions     = AttachOptions.Fill;
            tableChild5.YOptions     = AttachOptions.Fill;
            this.txtSize             = new Label();
            Alignment alignment = new Alignment(1f, 0.0f, 0.0f, 0.0f);

            alignment.Add((Widget)this.txtSize);
            this.txtSize.Xalign = 1f;
            this.table2.Add((Widget)alignment);
            alignment.ShowAll();
            Table.TableChild tableChild6 = (Table.TableChild) this.table2[(Widget)alignment];
            tableChild6.TopAttach    = 4U;
            tableChild6.BottomAttach = 5U;
            tableChild6.XOptions     = (AttachOptions)0;
            tableChild6.YOptions     = AttachOptions.Fill;
            this.alignment1.Add((Widget)this.table2);
            this.scale9Lable = new Label();
            this.labelScale.Add((Widget)this.scale9Lable);
            this.labelScale.Xalign = 1f;
            this.labelScale.ShowAll();
            this.scale9Lable.Text = LanguageInfo.Display_Sudoku;
            this.table2.Attach((Widget)this.labelScale, 0U, 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.alighAuto.Add((Widget)this.labelAuto);
            this.alighAuto.Xalign = 1f;
            this.table2.Attach((Widget)this.alighAuto, 0U, 1U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U);
            this.alighAuto.ShowAll();
            this.Add((Widget)this.alignment1);
            if (this.Child != null)
            {
                this.Child.ShowAll();
            }
            this.Hide();
            this.ReadLanuageConfigFile();
            this.AfterEvent();
            this.BeforeValueChanged  += new System.Action(this.BeforEvent);
            this.AfterValueChanged   += new System.Action(this.AfterEvent);
            this.txtSize.WidthRequest = 90;
            this.rectSize.SetMaxMin(int.MaxValue, 0);
            this.rectSize.SetLabel(LanguageInfo.NewFile_Width, LanguageInfo.NewFile_Height);
            this.scaleOLRValue.SetMaxMin(int.MaxValue, 0);
            this.scaleTBValue.SetMaxMin(int.MaxValue, 0);
            this.scaleOLRValue.SetLabel(LanguageInfo.TopEdge, LanguageInfo.BottomEdge);
            this.scaleTBValue.SetLabel(LanguageInfo.LeftEdge, LanguageInfo.RightEdge);
            this.scaleOLRValue.SetMenuVisble(false);
            this.scaleTBValue.SetMenuVisble(false);
            this.SetScale9(false);
        }