private void img_Icon_ExposeEvent(object o, ExposeEventArgs args) { if ((int)this.BackGroundColor.Blue != (int)this.selectedColor.Blue) { return; } ImageBin imgIcon = this.img_Icon; int num1 = 5; int num2 = imgIcon.Allocation.X - num1; int num3 = imgIcon.Allocation.Y - num1; int num4 = imgIcon.Allocation.X + imgIcon.Allocation.Width - 1 + num1; int num5 = imgIcon.Allocation.Y - num1; int num6 = imgIcon.Allocation.X + imgIcon.Allocation.Width - 1 + num1; int num7 = imgIcon.Allocation.Y + imgIcon.Allocation.Height - 1 + num1; int num8 = imgIcon.Allocation.X - num1; int num9 = imgIcon.Allocation.Y + imgIcon.Allocation.Height - 1 + num1; EventBox parentWidget = imgIcon.GetParentWidget <EventBox>(); if (parentWidget != null) { GC gc1 = new GC((Drawable)parentWidget.GdkWindow); gc1.RgbFgColor = this.unSelectedColor; parentWidget.GdkWindow.DrawRectangle(gc1, true, new Rectangle(0, 0, parentWidget.Allocation.Width, parentWidget.Allocation.Height)); gc1.RgbFgColor = this.selectedColor; parentWidget.GdkWindow.DrawRectangle(gc1, true, new Rectangle(num2, num3, num4 - num2, num7 - num5)); GC gc2 = new GC((Drawable)parentWidget.GdkWindow); gc2.RgbFgColor = this.BorderColor; parentWidget.GdkWindow.DrawLine(gc2, num2, num3, num4, num5); parentWidget.GdkWindow.DrawLine(gc2, num4, num5, num6, num7); parentWidget.GdkWindow.DrawLine(gc2, num6, num7, num8, num9); parentWidget.GdkWindow.DrawLine(gc2, num8, num9, num2, num3); } }
protected virtual void Build() { Gui.Initialize((Widget)this); BinContainer.Attach((Bin)this); this.WidthRequest = 76; this.HeightRequest = 80; this.Name = "CocoStudio.ControlLib.FileTypeItem"; this.event_root = new EventBox(); this.event_root.WidthRequest = 72; this.event_root.HeightRequest = 72; this.event_root.Name = "event_root"; this.event_root.BorderWidth = 4U; this.vbox_main = new VBox(); this.vbox_main.Name = "vbox_main"; this.vbox_main.Spacing = 2; this.vbox_picMain = new VBox(); this.vbox_picMain.WidthRequest = 48; this.vbox_picMain.HeightRequest = 48; this.vbox_picMain.Name = "vbox_picMain"; this.vbox_picMain.Spacing = 6; this.vbox_top = new VBox(); this.vbox_top.Name = "vbox_top"; this.vbox_top.Spacing = 6; this.vbox_picMain.Add((Widget)this.vbox_top); ((Box.BoxChild) this.vbox_picMain[(Widget)this.vbox_top]).Position = 0; this.hbox_picMain = new HBox(); this.hbox_picMain.WidthRequest = 48; this.hbox_picMain.Name = "hbox_picMain"; this.hbox_picMain.Spacing = 6; this.hbox_left = new HBox(); this.hbox_left.Name = "hbox_left"; this.hbox_left.Spacing = 6; this.hbox_picMain.Add((Widget)this.hbox_left); ((Box.BoxChild) this.hbox_picMain[(Widget)this.hbox_left]).Position = 0; this.img_Icon = new ImageBin(); this.img_Icon.WidthRequest = 32; this.img_Icon.HeightRequest = 32; this.img_Icon.Name = "img_Icon"; this.hbox_picMain.Add((Widget)this.img_Icon); Box.BoxChild boxChild1 = (Box.BoxChild) this.hbox_picMain[(Widget)this.img_Icon]; boxChild1.Position = 1; boxChild1.Expand = false; boxChild1.Fill = false; this.hbox_rightOccupy = new HBox(); this.hbox_rightOccupy.Name = "hbox_rightOccupy"; this.hbox_rightOccupy.Spacing = 6; this.hbox_picMain.Add((Widget)this.hbox_rightOccupy); ((Box.BoxChild) this.hbox_picMain[(Widget)this.hbox_rightOccupy]).Position = 2; this.vbox_picMain.Add((Widget)this.hbox_picMain); Box.BoxChild boxChild2 = (Box.BoxChild) this.vbox_picMain[(Widget)this.hbox_picMain]; boxChild2.Position = 1; boxChild2.Expand = false; boxChild2.Fill = false; this.vbox_bottom = new VBox(); this.vbox_bottom.Name = "vbox_bottom"; this.vbox_bottom.Spacing = 6; this.vbox_picMain.Add((Widget)this.vbox_bottom); ((Box.BoxChild) this.vbox_picMain[(Widget)this.vbox_bottom]).Position = 2; this.vbox_main.Add((Widget)this.vbox_picMain); Box.BoxChild boxChild3 = (Box.BoxChild) this.vbox_main[(Widget)this.vbox_picMain]; boxChild3.Position = 0; boxChild3.Expand = false; this.lab_Name = new Label(); this.lab_Name.Name = "lab_Name"; this.lab_Name.LabelProp = Catalog.GetString("场景"); this.vbox_main.Add((Widget)this.lab_Name); Box.BoxChild boxChild4 = (Box.BoxChild) this.vbox_main[(Widget)this.lab_Name]; boxChild4.Position = 1; boxChild4.Expand = false; boxChild4.Fill = false; this.event_root.Add((Widget)this.vbox_main); this.Add((Widget)this.event_root); if (this.Child != null) { this.Child.ShowAll(); } this.Hide(); }
protected virtual void Build() { Gui.Initialize((Widget)this); this.WidthRequest = 720; this.HeightRequest = 615; this.Name = "Modules.Communal.Guide.GuideUC"; this.Title = Catalog.GetString("GuideUC"); this.WindowPosition = WindowPosition.CenterOnParent; this.vbox_root = new VBox(); this.vbox_root.Name = "vbox_root"; this.vbox_root.Spacing = 6; this.label_occupy3 = new Label(); this.label_occupy3.HeightRequest = 15; this.label_occupy3.Name = "label_occupy3"; this.vbox_root.Add((Widget)this.label_occupy3); ((Box.BoxChild) this.vbox_root[(Widget)this.label_occupy3]).Position = 0; this.label_title = new Label(); this.label_title.HeightRequest = 35; this.label_title.Name = "label_title"; this.label_title.LabelProp = Catalog.GetString("label1"); this.vbox_root.Add((Widget)this.label_title); Box.BoxChild boxChild1 = (Box.BoxChild) this.vbox_root[(Widget)this.label_title]; boxChild1.Position = 1; boxChild1.Expand = false; boxChild1.Fill = false; this.imagebin1 = new ImageBin(); this.imagebin1.WidthRequest = 720; this.imagebin1.HeightRequest = 480; this.imagebin1.Events = EventMask.ButtonPressMask; this.imagebin1.Name = "imagebin1"; this.vbox_root.Add((Widget)this.imagebin1); Box.BoxChild boxChild2 = (Box.BoxChild) this.vbox_root[(Widget)this.imagebin1]; boxChild2.Position = 2; boxChild2.Expand = false; boxChild2.Fill = false; this.hseparator1 = new HSeparator(); this.hseparator1.Name = "hseparator1"; this.vbox_root.Add((Widget)this.hseparator1); Box.BoxChild boxChild3 = (Box.BoxChild) this.vbox_root[(Widget)this.hseparator1]; boxChild3.Position = 3; boxChild3.Expand = false; boxChild3.Fill = false; this.hbox_bottom = new HBox(); this.hbox_bottom.Name = "hbox_bottom"; this.hbox_checkBtnExpand = new HBox(); this.hbox_checkBtnExpand.Name = "hbox_checkBtnExpand"; this.hbox_checkBtnExpand.Spacing = 6; this.vbox_expand = new VBox(); this.vbox_expand.Name = "vbox_expand"; this.vbox_expand.Spacing = 6; this.cbtn_show = new CheckButton(); this.cbtn_show.CanFocus = true; this.cbtn_show.Name = "cbtn_show"; this.cbtn_show.Label = Catalog.GetString("下次打开时不再显示该窗口"); this.cbtn_show.DrawIndicator = true; this.cbtn_show.UseUnderline = true; this.vbox_expand.Add((Widget)this.cbtn_show); Box.BoxChild boxChild4 = (Box.BoxChild) this.vbox_expand[(Widget)this.cbtn_show]; boxChild4.Position = 0; boxChild4.Fill = false; this.hbox_checkBtnExpand.Add((Widget)this.vbox_expand); Box.BoxChild boxChild5 = (Box.BoxChild) this.hbox_checkBtnExpand[(Widget)this.vbox_expand]; boxChild5.Position = 0; boxChild5.Expand = false; this.hbox_bottom.Add((Widget)this.hbox_checkBtnExpand); Box.BoxChild boxChild6 = (Box.BoxChild) this.hbox_bottom[(Widget)this.hbox_checkBtnExpand]; boxChild6.Position = 0; boxChild6.Padding = 18U; this.vbox_btnPreviousBorder = new VBox(); this.vbox_btnPreviousBorder.Name = "vbox_btnPreviousBorder"; this.vbox_btnPreviousBorder.Spacing = 6; this.btn_previous = new Button(); this.btn_previous.WidthRequest = 80; this.btn_previous.HeightRequest = 35; this.btn_previous.CanFocus = true; this.btn_previous.Name = "btn_previous"; this.btn_previous.UseUnderline = true; this.btn_previous.Label = Catalog.GetString("GtkButton"); this.vbox_btnPreviousBorder.Add((Widget)this.btn_previous); Box.BoxChild boxChild7 = (Box.BoxChild) this.vbox_btnPreviousBorder[(Widget)this.btn_previous]; boxChild7.Position = 0; boxChild7.Fill = false; this.hbox_bottom.Add((Widget)this.vbox_btnPreviousBorder); Box.BoxChild boxChild8 = (Box.BoxChild) this.hbox_bottom[(Widget)this.vbox_btnPreviousBorder]; boxChild8.Position = 1; boxChild8.Expand = false; boxChild8.Fill = false; this.vbox_btnNextBorder = new VBox(); this.vbox_btnNextBorder.Name = "vbox_btnNextBorder"; this.vbox_btnNextBorder.Spacing = 6; this.btn_next = new Button(); this.btn_next.WidthRequest = 80; this.btn_next.HeightRequest = 35; this.btn_next.CanFocus = true; this.btn_next.Name = "btn_next"; this.btn_next.UseUnderline = true; this.btn_next.Label = Catalog.GetString("GtkButton"); this.vbox_btnNextBorder.Add((Widget)this.btn_next); Box.BoxChild boxChild9 = (Box.BoxChild) this.vbox_btnNextBorder[(Widget)this.btn_next]; boxChild9.Position = 0; boxChild9.Expand = false; boxChild9.Fill = false; this.hbox_bottom.Add((Widget)this.vbox_btnNextBorder); Box.BoxChild boxChild10 = (Box.BoxChild) this.hbox_bottom[(Widget)this.vbox_btnNextBorder]; boxChild10.Position = 2; boxChild10.Expand = false; boxChild10.Fill = false; boxChild10.Padding = 10U; this.label_occupy = new Label(); this.label_occupy.Name = "label_occupy"; this.hbox_bottom.Add((Widget)this.label_occupy); Box.BoxChild boxChild11 = (Box.BoxChild) this.hbox_bottom[(Widget)this.label_occupy]; boxChild11.Position = 3; boxChild11.Expand = false; boxChild11.Fill = false; boxChild11.Padding = 10U; this.vbox_root.Add((Widget)this.hbox_bottom); Box.BoxChild boxChild12 = (Box.BoxChild) this.vbox_root[(Widget)this.hbox_bottom]; boxChild12.Position = 4; boxChild12.Expand = false; boxChild12.Fill = false; boxChild12.Padding = 10U; this.Add((Widget)this.vbox_root); if (this.Child != null) { this.Child.ShowAll(); } this.DefaultWidth = 738; this.DefaultHeight = 615; this.Show(); this.KeyPressEvent += new KeyPressEventHandler(this.OnKeyDown); this.cbtn_show.Toggled += new EventHandler(this.OnCbtnToggled); this.btn_previous.Clicked += new EventHandler(this.OnBtnPreviousClicked); this.btn_next.Clicked += new EventHandler(this.OnBtnNextClicked); }