public void SetControl(List <PropertyItem> list) { foreach (Widget child in this.ThirdTable.Children) { this.ThirdTable.Remove(child); } if (list.FirstOrDefault <PropertyItem>((Func <PropertyItem, bool>)(w => w.DiaplayName == "Display_Name")) != null) { ContentLabel contentLabel = new ContentLabel(68); contentLabel.SetLabelText(LanguageOption.GetValueBykey(list[0].DiaplayName)); this.ThirdTable.Attach((Widget)contentLabel, 0U, 1U, 0U, 1U, AttachOptions.Shrink, AttachOptions.Fill, 0U, 0U); this.contentEM.GetEditor(list[0]); Widget widgetDate = list[0].WidgetDate; widgetDate.WidthRequest = 162; this.ThirdTable.Attach(widgetDate, 1U, 2U, 0U, 1U, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 0U, 0U); } PropertyItem propertyItem = list.FirstOrDefault <PropertyItem>((Func <PropertyItem, bool>)(w => w.DiaplayName == "Display_Target")); if (propertyItem != null) { ContentLabel contentLabel = new ContentLabel(68); contentLabel.SetLabelText(LanguageOption.GetValueBykey(list[1].DiaplayName)); this.ThirdTable.Attach((Widget)contentLabel, 0U, 1U, 1U, 2U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U); UndoEntryIntEx undoEntryIntEx = this.contentEM.GetEditor(list[1]).ResolveEditor(propertyItem) as UndoEntryIntEx; undoEntryIntEx.SetEntryPRoperty(true, 0, 1.0); undoEntryIntEx.WidthRequest = 162; this.ThirdTable.Attach((Widget)undoEntryIntEx, 1U, 2U, 1U, 2U, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 0U, 0U); } this.ThirdTable.ShowAll(); }
public EntryNumWidget() { this.table1 = new Table(2U, 3U, false); this.table1.Name = "table1"; this.table1.ColumnSpacing = 6U; this.entryNum = new UndoEntryIntEx(); this.entryNum.WidthRequest = 10; this.entryNum.CanFocus = true; this.entryNum.Name = "entryNum"; this.entryNum.IsEditable = true; this.entryNum.InvisibleChar = '●'; this.table1.Add((Widget)this.entryNum); Table.TableChild tableChild1 = (Table.TableChild) this.table1[(Widget)this.entryNum]; tableChild1.XOptions = AttachOptions.Expand | AttachOptions.Fill; tableChild1.YOptions = AttachOptions.Fill; this.imageMenu = new ImageCombox(); this.imageMenu.Name = "imageMenu"; this.table1.Add((Widget)this.imageMenu); Table.TableChild tableChild2 = (Table.TableChild) this.table1[(Widget)this.imageMenu]; tableChild2.LeftAttach = 2U; tableChild2.RightAttach = 3U; tableChild2.XOptions = AttachOptions.Fill; tableChild2.YOptions = AttachOptions.Fill; this.labTxt = new Label(); this.labTxt.Name = "labTxt"; this.table1.Add((Widget)this.labTxt); Table.TableChild tableChild3 = (Table.TableChild) this.table1[(Widget)this.labTxt]; tableChild3.LeftAttach = 1U; tableChild3.RightAttach = 2U; tableChild3.XOptions = AttachOptions.Fill; tableChild3.YOptions = AttachOptions.Fill; this.lbName = new Label(); this.lbName.Name = "lbName"; this.table1.Add((Widget)this.lbName); Table.TableChild tableChild4 = (Table.TableChild) this.table1[(Widget)this.lbName]; tableChild4.TopAttach = 1U; tableChild4.BottomAttach = 2U; tableChild4.XOptions = AttachOptions.Fill; tableChild4.YOptions = AttachOptions.Fill; this.Add((Widget)this.table1); if (this.Child != null) { this.Child.ShowAll(); } this.imageMenuNoVisible = new Label(); this.imageMenuNoVisible.WidthRequest = 10; this.table1.Attach((Widget)this.imageMenuNoVisible, 2U, 3U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U); this.imageMenuNoVisible.Visible = false; this.labTxt.WidthRequest = 30; this.table1.RowSpacing = 4U; Color color = new Color((byte)165, (byte)168, (byte)176); this.labTxt.ModifyFg(StateType.Normal, color); this.lbName.ModifyFg(StateType.Normal, color); this.lbName.SetFontSize(10.0); this.labTxt.Text = LanguageInfo.NewFile_Pixel; this.imageMenu.MenuChanged += new EventHandler(this.imageMenu_MenuChanged); this.entryNum.EntryValueChanged += new EventHandler <EntryIntEventArgs>(this.entryNum_EntryValueChanged); }
public Widget ResolveEditor(PropertyItem item = null) { double result = 1.0; if (item != null && item.DefaultValueDescriptor != null) { double.TryParse(item.DefaultValueDescriptor.Value.ToString(), out result); } this.widget = new UndoEntryIntEx(); this.SetControl(); this.widget.EntryValueChanged += new EventHandler <EntryIntEventArgs>(this.IntEditor_ValueChanged); if (this._propertyItem.IsEnable && this._propertyItem.DiaplayName == "Display_Rotation") { this.widget.Sensitive = false; } return((Widget)this.widget); }
public AstrictLengthEditorWidget() { this.table2 = new Table(1U, 2U, false); this.table2.Name = "table2"; this.table2.ColumnSpacing = 6U; this.checkBox_MaxLength = new CheckButton(); this.checkBox_MaxLength.CanFocus = true; this.checkBox_MaxLength.Name = "checkBox_MaxLength"; this.checkBox_MaxLength.Active = true; this.checkBox_MaxLength.DrawIndicator = true; this.checkBox_MaxLength.UseUnderline = true; this.table2.Add((Widget)this.checkBox_MaxLength); Table.TableChild tableChild1 = (Table.TableChild) this.table2[(Widget)this.checkBox_MaxLength]; tableChild1.XOptions = AttachOptions.Fill; tableChild1.YOptions = AttachOptions.Fill; this.numLength = new UndoEntryIntEx(); this.numLength.WidthRequest = 10; this.numLength.CanFocus = true; this.numLength.Name = "spinbutton1"; this.numLength.IsInteger = true; this.table2.Add((Widget)this.numLength); Table.TableChild tableChild2 = (Table.TableChild) this.table2[(Widget)this.numLength]; tableChild2.TopAttach = 0U; tableChild2.BottomAttach = 1U; tableChild2.LeftAttach = 1U; tableChild2.RightAttach = 2U; tableChild2.YOptions = AttachOptions.Fill; this.Add((Widget)this.table2); if (this.Child != null) { this.Child.ShowAll(); } this.Hide(); this.ReadLanuageConfigFile(); this.numLength.MinValue = 1; this.BeforeValueChanged += new System.Action(this.BeforEvent); this.AfterValueChanged += new System.Action(this.AfterEvent); this.AfterEvent(); }
public SliderEditorWidget() { this.table1 = new Table(1U, 3U, false); this.table1.Name = "table1"; this.table1.ColumnSpacing = 6U; this.hscale1 = new SliderEditorEx(0.0, 100.0, 1.0); this.hscale1.CanFocus = true; this.hscale1.Name = "hscale1"; this.hscale1.Adjustment.Upper = 100.0; this.hscale1.Adjustment.PageIncrement = 10.0; this.hscale1.Adjustment.StepIncrement = 1.0; this.hscale1.DrawValue = false; this.hscale1.Digits = 0; this.hscale1.ValuePos = PositionType.Top; this.table1.Add((Widget)this.hscale1); ((Table.TableChild) this.table1[(Widget)this.hscale1]).YOptions = AttachOptions.Fill; this.entry = new UndoEntryIntEx(); this.entry.CanFocus = true; this.entry.Name = "spinbutton1"; this.entry.WidthRequest = 40; this.table1.Attach((Widget)this.entry, 1U, 2U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U); this.label = new Label(); this.label.WidthRequest = 15; this.label.Text = "%"; this.table1.Attach((Widget)this.label, 2U, 3U, 0U, 1U, AttachOptions.Fill, AttachOptions.Fill, 0U, 0U); this.Add((Widget)this.table1); if (this.Child != null) { this.Child.ShowAll(); } this.Hide(); this.entry.MaxValue = 100; this.entry.MinValue = 0; this.entry.SetEntryPRoperty(true, 1, 1.0); this.hscale1.WidthRequest = 20; this.AfterEvent(); this.BeforeValueChanged += new System.Action(this.BeforEvent); this.AfterValueChanged += new System.Action(this.AfterEvent); }