• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.Image类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Gtk.Image的典型用法代码示例。如果您正苦于以下问题:C# Gtk.Image类的具体用法?C# Gtk.Image怎么用?C# Gtk.Image使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Gtk.Image类属于命名空间,在下文中一共展示了Gtk.Image类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: QueryWidget

		public QueryWidget (PhotoQuery query, Db db, TagSelectionWidget selector)
		{
			tips.Enable ();

			this.query = query;
			query.Changed += HandleChanged;

			Gtk.HSeparator sep = new Gtk.HSeparator ();
			sep.Show ();
			this.PackStart (sep, false, false, 0);
			
			Gtk.HBox hbox = new Gtk.HBox ();
			hbox.Show ();
			this.PackStart (hbox, false, false, 0);
			
			label = new Gtk.Label (Catalog.GetString ("Find: "));
			label.Show ();
			label.Ypad = 9;
			hbox.PackStart (label, false, false, 0);

			untagged = new Gtk.Label (Catalog.GetString ("Untagged photos"));
			untagged.Visible = false;
			hbox.PackStart (untagged, false, false, 0);

			comma_label = new Gtk.Label (", ");
			comma_label.Visible = false;
			hbox.PackStart (comma_label, false, false, 0);

			rollfilter = new Gtk.Label (Catalog.GetString ("Import roll"));	
			rollfilter.Visible = false;
			hbox.PackStart (rollfilter, false, false, 0);

			logic_widget = new LogicWidget (query, db.Tags, selector);
			logic_widget.Show ();
			hbox.PackStart (logic_widget, true, true, 0);

			warning_box = new Gtk.HBox ();
			warning_box.PackStart (new Gtk.Label (System.String.Empty));
			
			Gtk.Image warning_image = new Gtk.Image ("gtk-info", Gtk.IconSize.Button);
			warning_image.Show ();
			warning_box.PackStart (warning_image, false, false, 0);
			
			clear_button = new Gtk.Button ();
			clear_button.Add (new Gtk.Image ("gtk-close", Gtk.IconSize.Button));
			clear_button.Clicked += HandleClearButtonClicked;
			clear_button.Relief = Gtk.ReliefStyle.None;
			hbox.PackEnd (clear_button, false, false, 0);
			tips.SetTip (clear_button, Catalog.GetString("Clear search"), null);

			Gtk.Label warning = new Gtk.Label (Catalog.GetString ("No matching photos found"));
			warning_box.PackStart (warning, false, false, 0);
			warning_box.ShowAll ();
			warning_box.Spacing = 6;
			warning_box.Visible = false;

			hbox.PackEnd (warning_box, false, false, 0);
			
			warning_box.Visible = false;
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:60,代码来源:QueryWidget.cs


示例2: GameAdvertisementGraph

            public GameAdvertisementGraph(ICSClient c)
            {
                graph = new Graph ();
                categories = new Hashtable ();
                categories["blitz"] = 1;
                categories["standard"] = 1;
                categories["lightning"] = 1;
                categories["untimed"] = 1;

                graph.GameFocusedEvent += OnGameFocused;
                graph.GameClickedEvent += OnGameClicked;

                infoLabel = new Label ();
                infoLabel.Xalign = 0;
                infoLabel.Xpad = 4;
                this.client = c;

                client.GameAdvertisementAddEvent +=
                    OnGameAdvertisementAddEvent;
                client.GameAdvertisementRemoveEvent +=
                    OnGameAdvertisementRemoveEvent;
                client.GameAdvertisementsClearedEvent +=
                    OnGameAdvertisementsCleared;
                SetSizeRequest (600, 400);

                image = new Gtk.Image ();
                PackStart (graph, true, true, 4);

                HBox box = new HBox ();
                  box.PackStart (image, false, false, 4);
                  box.PackStart (infoLabel, true, true, 4);

                  PackStart (box, false, true, 4);
                  ShowAll ();
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:35,代码来源:GameAdvertisementGraph.cs


示例3: ScreenshotViewerController

        public ScreenshotViewerController(Glade.XML gxml, ScreenshotViewerModel ssViewerModel)
        {
            this.ssViewerModel = ssViewerModel;

            nextNoteButton = (Gtk.Button)gxml.GetWidget ("nextNoteButton");
            previousNoteButton = (Gtk.Button)gxml.GetWidget ("previousNoteButton");
            forwardHourButton = (Gtk.Button)gxml.GetWidget ("forwardHourButton");
            backHourButton = (Gtk.Button)gxml.GetWidget ("backHourButton");

            forward10MinButton = (Gtk.Button)gxml.GetWidget ("foward10MinButton");
            back10MinButton = (Gtk.Button)gxml.GetWidget ("back10MinButton");

            noteViewBox = (Gtk.VBox)gxml.GetWidget ("noteViewBox");

            screenshotImage = (Gtk.Image)gxml.GetWidget ("noteImage");

            nextNoteButton.Clicked += this.NextNoteButtonPressed;
            previousNoteButton.Clicked += this.PrevNoteButtonPressed;

            forwardHourButton.Clicked += this.ForwardHourButtonPressed;
            backHourButton.Clicked += this.BackHourButtonPressed;

            forward10MinButton.Clicked += this.Forward10MinButtonPressed;
            back10MinButton.Clicked += this.Back10MinButtonPressed;

            noteViewBox.ScrollEvent += this.NoteViewScroll;
            screenshotImage.ScrollEvent += this.NoteViewScroll;

            doUpdateTimeCheckFilters ();
        }
开发者ID:simon-g-crosby,项目名称:time-track-client,代码行数:30,代码来源:ScreenshotViewerController.cs


示例4: Fill

		public void Fill (Extension ext, ITreeNavigator nav)
		{
			labelName.Markup = "<small>Extension</small>\n<big><b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ext)) + "</b></big>";
			object parent = ext.GetExtendedObject ();
			
			if (parent is ExtensionPoint) {
				ExtensionPoint ep = (ExtensionPoint) parent;
				string txt = "<small>Extension Point</small>\n<b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ep)) + "</b>";
				if (!string.IsNullOrEmpty (ep.Description))
					txt += "\n" + GLib.Markup.EscapeText (ep.Description);
				Gtk.Label lab = new Gtk.Label ();
				lab.Xalign = lab.Yalign = 0;
				lab.Markup = txt;
				lab.WidthRequest = 400;
				lab.Wrap = true;
				Gtk.Image img = new Gtk.Image (ImageService.GetPixbuf ("md-extension-point", Gtk.IconSize.Menu));
				img.Yalign = 0;
				Gtk.HBox box = new Gtk.HBox (false, 6);
				box.PackStart (img, false, false, 0);
				box.PackStart (lab, true, true, 0);
				buttonExt.Add (box);
				buttonExt.ShowAll ();
				buttonExt.Clicked += delegate {
					if (nav.MoveToObject (ext)) {
						nav.MoveToParent (typeof(Solution));
						nav.Expanded = true;
						if (nav.MoveToObject (ep.ParentAddinDescription)) {
							nav.Expanded = true;
							if (nav.MoveToObject (ep))
								nav.Selected = true;
						}
					}
				};
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:35,代码来源:ExtensionView.cs


示例5: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget omvviewerlight.TexturePreview
     this.Name = "omvviewerlight.TexturePreview";
     this.Title = Mono.Unix.Catalog.GetString("TexturePreview");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Container child omvviewerlight.TexturePreview.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.label_title = new Gtk.Label();
     this.label_title.Name = "label_title";
     this.vbox1.Add(this.label_title);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox1[this.label_title]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.image = new Gtk.Image();
     this.image.Name = "image";
     this.vbox1.Add(this.image);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.image]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 300;
     this.Show();
 }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:35,代码来源:omvviewerlight.TexturePreview.cs


示例6: StatusProgressMonitor

 public StatusProgressMonitor(string title, string iconName, bool showErrorDialogs)
 {
     this.showErrorDialogs = showErrorDialogs;
     icon = Runtime.Gui.Resources.GetImage (iconName, Gtk.IconSize.Menu);
     Runtime.Gui.StatusBar.BeginProgress (title);
     Runtime.Gui.StatusBar.SetMessage (icon, title);
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:StatusProgressMonitor.cs


示例7: LoadPdf

        /// <summary>
        /// Loads the pdf.  This is the function you call when you want to display a pdf.
        /// </summary>
        /// <param name='pdfFileName'>
        /// Pdf file name.
        /// </param>
        public void LoadPdf(string pdfFileName)
        {
            pdf = Poppler.Document.NewFromFile(pdfFileName, "");
            PageCountLabel.Text = @"/" + (pdf.NPages - 1).ToString();
            CurrentPage.Value = 0;
            CurrentPage.Adjustment.Upper = pdf.NPages-1;

            foreach (Gtk.Widget w in vboxImages.AllChildren)
            {
                vboxImages.Remove(w);
            }

            for (this.pageIndex = 0; this.pageIndex < pdf.NPages; this.pageIndex++)
            {
                Gdk.Pixbuf pixbuf = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, false, 8, 0, 0);
                Gtk.Image img = new Gtk.Image();
                img.Pixbuf = pixbuf;
                img.Name = "image1";

                //vboxImages.Add (img);
                RenderPage(ref img);
            }

            this.ShowAll();
        }
开发者ID:majorsilence,项目名称:gtk-sharp-pdf-widget,代码行数:31,代码来源:PdfWidget.cs


示例8: GetVisualizerWidget

		public override Gtk.Widget GetVisualizerWidget (ObjectValue val)
		{
			var ops = DebuggingService.DebuggerSession.EvaluationOptions.Clone ();
			string file = Path.GetTempFileName ();
			Gdk.Pixbuf pixbuf;

			ops.AllowTargetInvoke = true;

			try {
				var pix = (RawValue) val.GetRawValue (ops);
				pix.CallMethod ("Save", file, "png");
				pixbuf = new Gdk.Pixbuf (file);
			} finally {
				File.Delete (file);
			}

			var sc = new Gtk.ScrolledWindow ();
			sc.ShadowType = Gtk.ShadowType.In;
			sc.HscrollbarPolicy = Gtk.PolicyType.Automatic;
			sc.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			var image = new Gtk.Image (pixbuf);
			sc.AddWithViewport (image);
			sc.ShowAll ();
			return sc;
		}
开发者ID:neXyon,项目名称:monodevelop,代码行数:25,代码来源:PixbufVisualizer.cs


示例9: ThumbnailRequest

			public ThumbnailRequest (Gtk.Image image, string thumbnail_file, Beagle.Hit hit, int size)
			{
				Image = image;
				ThumbnailFile = thumbnail_file;
				Hit = hit;
				Size = size;
			}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:7,代码来源:ThumbnailFactory.cs


示例10: EngineManagerDialog

        public EngineManagerDialog(EngineManager engineManager)
        {
            Trace.Call(engineManager);

            if (engineManager == null) {
                throw new ArgumentNullException("engineManager");
            }

            _EngineManager = engineManager;

            Modal = true;
            Title = "Smuxi - " + _("Engine Manager");
            SetPosition(Gtk.WindowPosition.CenterAlways);

            Gtk.HBox connect_hbox = new Gtk.HBox();
            Gtk.Image connect_image = new Gtk.Image(
                new Gdk.Pixbuf(null, "connect-button.svg", 22, 22));
            connect_hbox.Add(connect_image);
            connect_hbox.Add(new Gtk.Label(_("_Connect")));
            AddActionWidget(new Gtk.Button(connect_hbox), 1);

            AddActionWidget(new Gtk.Button(Gtk.Stock.New), 3);

            Gtk.Button edit_button = new Gtk.Button(Gtk.Stock.Edit);
            _EditButton = edit_button;
            AddActionWidget(edit_button, 2);

            _DeleteButton = new Gtk.Button(Gtk.Stock.Delete);
            AddActionWidget(_DeleteButton, 4);
            AddActionWidget(new Gtk.Button(Gtk.Stock.Quit), 5);
            Response += new Gtk.ResponseHandler(_OnResponse);

            Gtk.VBox vbox = new Gtk.VBox();
            Gtk.Label label = new Gtk.Label("<b>" +
                                            _("Select which Smuxi engine you want to connect to") +
                                            "</b>");
            label.UseMarkup = true;
            vbox.PackStart(label, false, false, 5);

            Gtk.HBox hbox = new Gtk.HBox();
            hbox.PackStart(new Gtk.Label(_("Engine:")), false, false, 5);

            _ListStore = new Gtk.ListStore(typeof(string));
            _ComboBox = new Gtk.ComboBox();
            Gtk.CellRendererText cell = new Gtk.CellRendererText();
            _ComboBox.PackStart(cell, false);
            _ComboBox.AddAttribute(cell, "text", 0);
            _ComboBox.Changed += new EventHandler(_OnComboBoxChanged);
            _ComboBox.Model = _ListStore;
            _InitEngineList();

            hbox.PackStart(_ComboBox, true, true, 10);

            vbox.PackStart(hbox, false, false, 10);

            VBox.Add(vbox);

            ShowAll();
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:59,代码来源:EngineManagerDialog.cs


示例11: ImageButton

		public ImageButton ()
		{
			Events |= Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonReleaseMask;
			VisibleWindow = false;
			imageWidget = new Gtk.Image ();
			imageWidget.Show ();
			Add (imageWidget);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:8,代码来源:ImageButton.cs


示例12: CrashDialog

        public CrashDialog(Gtk.Window parent, Exception e)
            : base(null, parent, Gtk.DialogFlags.Modal)
        {
            SetDefaultSize(640, 480);
            Title = "Smuxi - " + _("Oops, I did it again...");

            Gtk.HBox hbox = new Gtk.HBox();

            Gtk.Image image = new Gtk.Image(Gtk.Stock.DialogError, Gtk.IconSize.Dialog);
            hbox.PackStart(image, false, false, 2);

            Gtk.VBox label_vbox = new Gtk.VBox();
            Gtk.Label label1 = new Gtk.Label();
            Gtk.Label label2 = new Gtk.Label();
            label1.Markup = String.Format(
                "<b>{0}</b>",
                GLib.Markup.EscapeText(
                    _("Smuxi crashed because an unhandled exception was thrown!")
                )
            );
            label2.Markup = GLib.Markup.EscapeText(
                _("Here is the stacktrace, please report this bug!")
            );
            label_vbox.PackStart(label1, false, false, 0);
            label_vbox.PackStart(new Gtk.Fixed(), true, true, 0);
            label_vbox.PackStart(label2, false, false, 0);
            hbox.PackStart(label_vbox, true, true, 0);

            Gtk.VBox vbox = new Gtk.VBox();
            vbox.PackStart(hbox, false, false, 2);

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            sw.ShadowType = Gtk.ShadowType.In;
            Gtk.TextView tv = new Gtk.TextView();
            tv.Editable = false;
            tv.CursorVisible = false;
            sw.Add(tv);
            vbox.PackStart(sw, true, true, 2);

            // add to the dialog
            VBox.PackStart(vbox, true, true, 2);
            AddButton(_("_Report Bug"), -1);
            AddButton(Gtk.Stock.Quit, 0);

            string message = String.Empty;
            if (e.InnerException != null) {
                message = "Inner-Exception Type:\n"+e.InnerException.GetType()+"\n\n"+
                          "Inner-Exception Message:\n"+e.InnerException.Message+"\n\n"+
                          "Inner-Exception StackTrace:\n"+e.InnerException.StackTrace+"\n";
            }
            message += "Exception Type:\n"+e.GetType()+"\n\n"+
                       "Exception Message:\n"+e.Message+"\n\n"+
                       "Exception StackTrace:\n"+e.StackTrace;
            tv.Buffer.Text = message;

            ShowAll();
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:57,代码来源:CrashDialog.cs


示例13: createGui

        public void createGui()
        {
            basedir_section=new Section("cuesheets-basedir","CueSheet Music Directory:",20);
            source_page.Add (basedir_section);

            string dir=_source.getCueSheetDir();
            Gtk.Label lbl=new Gtk.Label("CueSheet Music Directory:");
            Gtk.FileChooserButton btn=new Gtk.FileChooserButton("CueSheet Music Directory:",Gtk.FileChooserAction.SelectFolder);
            if (dir!=null) {
                btn.SelectFilename (dir);
            }
            Gtk.HBox box=new Gtk.HBox();
            box.Add (lbl);
            box.Add (btn);
            box.ShowAll ();
            btn.CurrentFolderChanged+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Folder changed to = "+dir1);
            };
            btn.FileSet+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Base directory changed to = "+dir1);
                _source.setCueSheetDir(dir1);
            };

            Console.WriteLine (_source);

            Gtk.VBox vb=new Gtk.VBox();
            vb.PackStart (box,false,false,0);

            Gtk.Image icn_about=new Gtk.Image(Gtk.Stock.About,Gtk.IconSize.Button);
            Gtk.Button about=new Gtk.Button(icn_about);
            about.Clicked+=new EventHandler(handleAbout);
            Gtk.HBox hb=new Gtk.HBox();
            Gtk.Label _about=new Gtk.Label("About the CueSheet extension");
            hb.PackEnd (about,false,false,0);
            hb.PackEnd (_about,false,false,5);
            vb.PackStart (hb,false,false,0);
            Gtk.HBox hb1=new Gtk.HBox();
            Gtk.Label _info=new Gtk.Label("How to use the Cuesheet extension (opens browser)");
            Gtk.Image icn_info=new Gtk.Image(Gtk.Stock.Info,Gtk.IconSize.Button);
            Gtk.Button btn_info=new Gtk.Button(icn_info);
            btn_info.Clicked+=new EventHandler(handleInfo);
            hb1.PackEnd(btn_info,false,false,0);
            hb1.PackEnd(_info,false,false,5);
            vb.PackStart (hb1,false,false,0);

            Gtk.HBox hbX=new Gtk.HBox();
            vb.PackEnd (hbX,true,true,0);

            vb.ShowAll ();

            source_page.DisplayWidget = vb;
        }
开发者ID:nailyk,项目名称:banshee-community-extensions,代码行数:54,代码来源:CueSheetsPrefs.cs


示例14: appendFrameToVideo

 public void appendFrameToVideo(Gtk.Image frame)
 {
     lock (myQueue)
     {
         lock (frame) {
             Gtk.Image newframe = new Gtk.Image ();
             newframe.Pixbuf = (Gdk.Pixbuf)frame.Pixbuf.Clone ();
             myQueue.Enqueue (newframe);
         }
     }
 }
开发者ID:rastabaddon,项目名称:QCCTV,代码行数:11,代码来源:ffmpeg.cs


示例15: DetailsPane

		public DetailsPane () : base (1, 2, false)
		{
			RowSpacing = ColumnSpacing = 6;
			BorderWidth = 6;

			icon = new Gtk.Image ();
			icon.SetAlignment (0.5f, 0.5f);
			icon.Show ();
			Attach (icon, 0, 1, 0, 1, fill, fill, 6, 0);

			base.SizeRequested += DetailsSizeRequested;
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:12,代码来源:DetailsPane.cs


示例16: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.ImageDialog
     this.Name = "ocmgtk.ImageDialog";
     this.Title = Mono.Unix.Catalog.GetString("Image");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Internal child ocmgtk.ImageDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.scrolledwindow1 = new Gtk.ScrolledWindow();
     this.scrolledwindow1.CanFocus = true;
     this.scrolledwindow1.Name = "scrolledwindow1";
     this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
     // Container child scrolledwindow1.Gtk.Container+ContainerChild
     Gtk.Viewport w2 = new Gtk.Viewport();
     w2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child GtkViewport.Gtk.Container+ContainerChild
     this.image = new Gtk.Image();
     this.image.Name = "image";
     w2.Add(this.image);
     this.scrolledwindow1.Add(w2);
     w1.Add(this.scrolledwindow1);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w1[this.scrolledwindow1]));
     w5.Position = 0;
     // Internal child ocmgtk.ImageDialog.ActionArea
     Gtk.HButtonBox w6 = this.ActionArea;
     w6.Name = "dialog1_ActionArea";
     w6.Spacing = 10;
     w6.BorderWidth = ((uint)(5));
     w6.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-close";
     this.AddActionWidget(this.buttonOk, -7);
     Gtk.ButtonBox.ButtonBoxChild w7 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonOk]));
     w7.Expand = false;
     w7.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 300;
     this.Show();
     this.buttonOk.Clicked += new System.EventHandler(this.OnCloseClick);
 }
开发者ID:cbuehler,项目名称:opencachemanager,代码行数:53,代码来源:ocmgtk.ImageDialog.cs


示例17: MultipleObjectViewer

 protected MultipleObjectViewer(IBroadcaster hub, string caption)
     : base(false, 0)
 {
     _hub = hub;
     // --- first line: caption and buttons
     Gtk.HBox hbxFirstLine = new Gtk.HBox(false, 2);
     // Caption label
     Gtk.Alignment labelAlign = new Gtk.Alignment(0F, 0F, 1F, 1F);
     labelAlign.Add(new Gtk.Label(caption));
     hbxFirstLine.PackStart(labelAlign, false, false, 0);
     hbxFirstLine.PackStart(new Gtk.Label(String.Empty), true, true, 0);
     // "Add" button
     Gtk.Image image = new Gtk.Image();
     image.Stock = Gtk.Stock.Add;
     _btnAdd = new Gtk.Button();
     _btnAdd.Add(image);
     _btnAdd.Relief = Gtk.ReliefStyle.None;
     _btnAdd.Clicked += new EventHandler(OnAddButtonClicked);
     _btnAdd.Sensitive = false;
     hbxFirstLine.PackStart(_btnAdd, false, false, 0);
     // "Edit" button
     image = new Gtk.Image();
     image.Stock = Gtk.Stock.JumpTo;
     _btnEdit = new Gtk.Button();
     _btnEdit.Add(image);
     _btnEdit.Relief = Gtk.ReliefStyle.None;
     _btnEdit.Clicked += new EventHandler(OnEditButtonClicked);
     _btnEdit.Sensitive = false;
     hbxFirstLine.PackStart(_btnEdit, false, false, 0);
     // "Delete" button
     image = new Gtk.Image();
     image.Stock = Gtk.Stock.Remove;
     _btnDelete = new Gtk.Button();
     _btnDelete.Add(image);
     _btnDelete.Relief = Gtk.ReliefStyle.None;
     _btnDelete.Clicked += new EventHandler(OnDeleteButtonClicked);
     _btnDelete.Sensitive = false;
     hbxFirstLine.PackStart(_btnDelete, false, false, 0);
     base.PackStart(hbxFirstLine, false, false, 0);
     // --- second line: element list
     _store = new Gtk.TreeStore(typeof(string));
     _tvList = new Gtk.TreeView();
     _tvList.HeadersVisible = false;
     _tvList.AppendColumn("", new Gtk.CellRendererText(), "text", 0);
     _tvList.Model = _store;
     _tvList.FocusInEvent += new Gtk.FocusInEventHandler(EnableButtons);
     _tvList.ButtonPressEvent += new Gtk.ButtonPressEventHandler(ListClickedHandler);
     Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
     sw.ShadowType = Gtk.ShadowType.In;
     sw.Add(_tvList);
     base.PackStart(sw, true, true, 0);
     sw.Show();
 }
开发者ID:MonoBrasil,项目名称:historico,代码行数:53,代码来源:MultipleObjectViewer.cs


示例18: PersonChatView

        public PersonChatView(PersonChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            PersonChatModel = chat;

            var tabImage = new Gtk.Image(IconPixbuf);
            TabHBox.PackStart(tabImage, false, false, 2);
            TabHBox.ShowAll();

            Add(OutputScrolledWindow);
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:13,代码来源:PersonChatView.cs


示例19: SessionChatView

        public SessionChatView(ChatModel chat)
            : base(chat)
        {
            Trace.Call(chat);

            OutputMessageTextView.ShowMarkerline = false;

            var tabImage = new Gtk.Image(IconPixbuf);
            TabHBox.PackStart(tabImage, false, false, 2);
            TabHBox.ShowAll();

            Add(OutputScrolledWindow);
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:13,代码来源:SessionChatView.cs


示例20: StatusProgressMonitor

		public StatusProgressMonitor (string title, string iconName, bool showErrorDialogs, bool showTaskTitles, bool lockGui, Pad statusSourcePad)
		{
			this.lockGui = lockGui;
			this.showErrorDialogs = showErrorDialogs;
			this.showTaskTitles = showTaskTitles;
			this.title = title;
			this.statusSourcePad = statusSourcePad;
			icon = ImageService.GetImage (iconName, Gtk.IconSize.Menu);
			statusBar = IdeApp.Workbench.StatusBar.CreateContext ();
			statusBar.StatusSourcePad = statusSourcePad;
			statusBar.BeginProgress (icon, title);
			if (lockGui)
				IdeApp.Workbench.LockGui ();
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:14,代码来源:StatusProgressMonitor.cs



注:本文中的Gtk.Image类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.Label类代码示例发布时间:2022-05-24
下一篇:
C# Gtk.HBox类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap