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

C# Gtk.Button类代码示例

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

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



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

示例1: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MainWindow
     this.Name = "MainWindow";
     this.Title = Mono.Unix.Catalog.GetString("MainWindow");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Container child MainWindow.Gtk.Container+ContainerChild
     this.fixed1 = new Gtk.Fixed();
     this.fixed1.Name = "fixed1";
     this.fixed1.HasWindow = false;
     // Container child fixed1.Gtk.Fixed+FixedChild
     this.button1 = new Gtk.Button();
     this.button1.CanFocus = true;
     this.button1.Name = "button1";
     this.button1.UseUnderline = true;
     this.button1.Label = Mono.Unix.Catalog.GetString("GtkButton");
     this.fixed1.Add(this.button1);
     Gtk.Fixed.FixedChild w1 = ((Gtk.Fixed.FixedChild)(this.fixed1[this.button1]));
     w1.X = 160;
     w1.Y = 113;
     this.Add(this.fixed1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 300;
     this.Show();
     this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
 }
开发者ID:kiike23,项目名称:CompiladoresFEI,代码行数:30,代码来源:window1.cs


示例2: MenuButtonEntry

		public MenuButtonEntry (Gtk.Entry entry, Gtk.Button button)
		{
			if (entry == null) entry = new Gtk.Entry ();
			if (button == null) button = new Gtk.Button (new Gtk.Arrow (Gtk.ArrowType.Right, Gtk.ShadowType.Out));
			
			this.entry = entry;
			this.button = button;
			
			manager = new CommandManager ();
			manager.RegisterGlobalHandler (this);
			
			if (entry.Parent == null)
				PackStart (entry, true, true, 0);
			if (button.Parent == null)
				PackStart (button, false, false, 2);
			
			ActionCommand cmd = new ActionCommand ("InsertOption", "InsertOption", null);
			cmd.CommandArray = true;
			manager.RegisterCommand (cmd);
			entrySet = new CommandEntrySet ();
			entrySet.AddItem ("InsertOption");
			
			button.Clicked += ShowQuickInsertMenu;
			button.StateChanged += ButtonStateChanged;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:25,代码来源:MenuButtonEntry.cs


示例3: Build

 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget OpenVP.GtkGui.BrowsableEditor
     Stetic.BinContainer.Attach(this);
     this.Name = "OpenVP.GtkGui.BrowsableEditor";
     // Container child OpenVP.GtkGui.BrowsableEditor.Gtk.Container+ContainerChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.SheetPane = new Gtk.ScrolledWindow();
     this.SheetPane.CanFocus = true;
     this.SheetPane.Name = "SheetPane";
     this.vbox2.Add(this.SheetPane);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.SheetPane]));
     w1.Position = 0;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbuttonbox2 = new Gtk.HButtonBox();
     this.hbuttonbox2.Name = "hbuttonbox2";
     this.hbuttonbox2.Homogeneous = true;
     this.hbuttonbox2.Spacing = 6;
     this.hbuttonbox2.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
     this.RevertButton = new Gtk.Button();
     this.RevertButton.Sensitive = false;
     this.RevertButton.CanFocus = true;
     this.RevertButton.Name = "RevertButton";
     this.RevertButton.UseStock = true;
     this.RevertButton.UseUnderline = true;
     this.RevertButton.Label = "gtk-revert-to-saved";
     this.hbuttonbox2.Add(this.RevertButton);
     Gtk.ButtonBox.ButtonBoxChild w2 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.RevertButton]));
     w2.Expand = false;
     w2.Fill = false;
     // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
     this.ApplyButton = new Gtk.Button();
     this.ApplyButton.Sensitive = false;
     this.ApplyButton.CanFocus = true;
     this.ApplyButton.Name = "ApplyButton";
     this.ApplyButton.UseStock = true;
     this.ApplyButton.UseUnderline = true;
     this.ApplyButton.Label = "gtk-apply";
     this.hbuttonbox2.Add(this.ApplyButton);
     Gtk.ButtonBox.ButtonBoxChild w3 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.ApplyButton]));
     w3.Position = 1;
     w3.Expand = false;
     w3.Fill = false;
     this.vbox2.Add(this.hbuttonbox2);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbuttonbox2]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     this.Add(this.vbox2);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.RevertButton.Clicked += new System.EventHandler(this.OnRevertButtonClicked);
     this.ApplyButton.Clicked += new System.EventHandler(this.OnApplyButtonClicked);
 }
开发者ID:Bamistro,项目名称:openvisualizationplatform,代码行数:60,代码来源:OpenVP.GtkGui.BrowsableEditor.cs


示例4: WebSyncPreferencesWidget

		public WebSyncPreferencesWidget (Api.OAuth oauth, string server, EventHandler requiredPrefChanged) : base (false, 5)
		{
			this.oauth = oauth;
			
			Gtk.Table prefsTable = new Gtk.Table (1, 2, false);
			prefsTable.RowSpacing = 5;
			prefsTable.ColumnSpacing = 10;

			serverEntry = new Gtk.Entry ();
			serverEntry.Text = server;
			AddRow (prefsTable, serverEntry, Catalog.GetString ("Se_rver:"), 0);
			
			Add (prefsTable);

			authButton = new Gtk.Button ();
			// TODO: If Auth is valid, this text should change
			if (!Auth.IsAccessToken)
				authButton.Label = Catalog.GetString ("Connect to Server");
			else {
				authButton.Label = Catalog.GetString ("Connected");
				authButton.Sensitive = false;
			}
			authButton.Clicked += OnAuthButtonClicked;

			serverEntry.Changed += delegate {
				Auth = null;
			};
			serverEntry.Changed += requiredPrefChanged;

			Add (authButton);

			// TODO: Add a section that shows the user something to verify they put
			//       in the right URL...something that constructs their user URL, maybe?
			ShowAll ();
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:35,代码来源:WebSyncPreferencesWidget.cs


示例5: Initialize

		public override void Initialize ()
		{
			NeedsEventBox = false;
			Widget = new Gtk.Button ();
			base.Widget.Show ();
			
		}
开发者ID:TheBrainTech,项目名称:xwt,代码行数:7,代码来源:ButtonBackend.cs


示例6: ThreadProgressDialog

		public ThreadProgressDialog (Thread thread, int total) {
			/*
			if (parent_window)
				this.TransientFor = parent_window;

			*/
			this.Title = thread.Name;
			this.thread = thread;
			
			HasSeparator = false;
			BorderWidth = 6;
			SetDefaultSize (300, -1);
			
			message_label = new Gtk.Label (String.Empty);
			VBox.PackStart (message_label, true, true, 12);
			
			progress_bar = new Gtk.ProgressBar ();
			VBox.PackStart (progress_bar, true, true, 6);

			retry_button = new Gtk.Button (Mono.Unix.Catalog.GetString ("Retry"));
			retry_button.Clicked += new EventHandler (HandleRetryClicked);
			skip_button = new Gtk.Button (Mono.Unix.Catalog.GetString ("Skip"));
			skip_button.Clicked += new EventHandler (HandleSkipClicked);

			ActionArea.Add (retry_button);
			ActionArea.Add (skip_button);

			button_label = Gtk.Stock.Cancel;
			button = (Gtk.Button) AddButton (button_label, (int)Gtk.ResponseType.Cancel);
			
			delay = new Delay (new GLib.IdleHandler (HandleUpdate));

			Response += HandleResponse;
			Destroyed += HandleDestroy;
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:35,代码来源:ThreadProgressDialog.cs


示例7: 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


示例8: DiffWidget

		public DiffWidget (VersionControlDocumentInfo info, bool viewOnly = false)
		{
			this.info = info;
			this.Build ();
			comparisonWidget = new ComparisonWidget (viewOnly);
			buttonNext = new DocumentToolButton (Gtk.Stock.GoUp, GettextCatalog.GetString ("Previous Change"));
			buttonPrev = new DocumentToolButton (Gtk.Stock.GoDown, GettextCatalog.GetString ("Next Change"));
			labelOverview = new Gtk.Label () { Xalign = 0 };
			buttonDiff = new Gtk.Button (GettextCatalog.GetString ("Unified Diff"));
			
			this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext ();
			this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev ();
			notebook1.Page = 0;
			vboxComparisonView.PackStart (comparisonWidget, true, true, 0);
			comparisonWidget.Show ();
			
			comparisonWidget.DiffChanged += delegate {
				labelOverview.Markup = LabelText;
				SetButtonSensitivity ();
			};
			comparisonWidget.SetVersionControlInfo (info);
			this.buttonDiff.Clicked += HandleButtonDiffhandleClicked;
			diffTextEditor = new global::Mono.TextEditor.MonoTextEditor (new Mono.TextEditor.TextDocument (), CommonTextEditorOptions.Instance);
			diffTextEditor.Document.MimeType = "text/x-diff";
			
			diffTextEditor.Options.ShowFoldMargin = false;
			diffTextEditor.Options.ShowIconMargin = false;
			diffTextEditor.Options.DrawIndentationMarkers = PropertyService.Get ("DrawIndentationMarkers", false);
			diffTextEditor.Document.ReadOnly = true;
			scrolledwindow1.Child = diffTextEditor;
			diffTextEditor.Show ();
			SetButtonSensitivity ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:33,代码来源:DiffWidget.cs


示例9: 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


示例10: Initialize

		public override void Initialize (IPadWindow window)
		{
			base.Initialize(window);

			// Call ctors
			inputEditor = new TextEditor() { Name = "input", Events = Gdk.EventMask.AllEventsMask, HeightRequest = 80 };
			editor = new TextEditor() { Name = "output", Events = Gdk.EventMask.AllEventsMask };
			vpaned = new Gtk.VPaned();
			var scr1 = new Gtk.ScrolledWindow();
			var scr2 = new Gtk.ScrolledWindow();

			// Init layout
			scr1.ShadowType = Gtk.ShadowType.In;
			scr1.Child = inputEditor;
			vpaned.Add1(scr1);
			scr1.ShowAll();
			inputEditor.ShowAll();

			scr2.ShadowType = Gtk.ShadowType.In;
			scr2.Child = editor;
			vpaned.Add2(scr2);
			scr2.ShowAll();
			editor.ShowAll();

			vpaned.ShowAll();

			// Init editors
			var o = editor.Options;
			inputEditor.Options = o;
			o.ShowLineNumberMargin = false;
			o.ShowFoldMargin = false;
			o.ShowIconMargin = false;

			editor.Document.ReadOnly = true;
			inputEditor.Text = PropertyService.Get(lastInputStringPropId, string.Empty);
			editor.Text = string.Empty;
			editor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
			inputEditor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
			editor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
			inputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;

			// Init toolbar
			var tb = window.GetToolbar(Gtk.PositionType.Top);

			executeButton = new Gtk.Button();
			executeButton.Image = new Gtk.Image(Gtk.Stock.Execute, Gtk.IconSize.Menu);
			executeButton.TooltipText = "Evaluates the expression typed in the upper input editor.";
			executeButton.Clicked += Execute;
			tb.Add(executeButton);

			abortButton = new Gtk.Button();
			abortButton.Sensitive = false;
			abortButton.Image = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
			abortButton.TooltipText = "Stops the evaluation.";
			abortButton.Clicked += (object sender, EventArgs e) => AbortExecution();
			tb.Add(abortButton);

			tb.ShowAll();
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:59,代码来源:ExpressionEvaluationWidget.cs


示例11: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget HollyLibrary.HColorPickerDialog
     this.Name = "HollyLibrary.HColorPickerDialog";
     this.Title = "Pick a color";
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Resizable = false;
     this.AllowGrow = false;
     this.HasSeparator = false;
     // Internal child HollyLibrary.HColorPickerDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.Picker = new HollyLibrary.HColorPickerWidget();
     this.Picker.Events = ((Gdk.EventMask)(256));
     this.Picker.Name = "Picker";
     w1.Add(this.Picker);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.Picker]));
     w2.Position = 0;
     // Internal child HollyLibrary.HColorPickerDialog.ActionArea
     Gtk.HButtonBox w3 = this.ActionArea;
     w3.Name = "dialog1_ActionArea";
     w3.Spacing = 6;
     w3.BorderWidth = ((uint)(5));
     w3.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonCancel]));
     w4.Expand = false;
     w4.Fill = false;
     // 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-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonOk]));
     w5.Position = 1;
     w5.Expand = false;
     w5.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 591;
     this.DefaultHeight = 394;
     this.Show();
 }
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:59,代码来源:HollyLibrary.HColorPickerDialog.cs


示例12: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget DirectoryHistory.UI.HistoryDialog
     this.Name = "DirectoryHistory.UI.HistoryDialog";
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.DefaultWidth = 640;
     this.DefaultHeight = 480;
     // Internal child DirectoryHistory.UI.HistoryDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.entriesVbox = new Gtk.VBox();
     this.entriesVbox.Name = "entriesVbox";
     this.entriesVbox.Spacing = 6;
     // Container child entriesVbox.Gtk.Box+BoxChild
     this.label = new Gtk.Label();
     this.label.Name = "label";
     this.label.LabelProp = Mono.Unix.Catalog.GetString("label1");
     this.entriesVbox.Add(this.label);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.entriesVbox[this.label]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     // Container child entriesVbox.Gtk.Box+BoxChild
     this.scrolledwindow1 = new Gtk.ScrolledWindow();
     this.scrolledwindow1.CanFocus = true;
     this.scrolledwindow1.Name = "scrolledwindow1";
     this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
     this.entriesVbox.Add(this.scrolledwindow1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.entriesVbox[this.scrolledwindow1]));
     w3.Position = 1;
     w1.Add(this.entriesVbox);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.entriesVbox]));
     w4.Position = 0;
     // Internal child DirectoryHistory.UI.HistoryDialog.ActionArea
     Gtk.HButtonBox w5 = this.ActionArea;
     w5.Name = "dialog1_ActionArea";
     w5.Spacing = 10;
     w5.BorderWidth = ((uint)(5));
     w5.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-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w6 = ((Gtk.ButtonBox.ButtonBoxChild)(w5[this.buttonOk]));
     w6.Expand = false;
     w6.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
 }
开发者ID:scheibenkaes,项目名称:DirectoryHistory,代码行数:59,代码来源:DirectoryHistory.UI.HistoryDialog.cs


示例13: Build

 protected virtual void Build() {
     Stetic.Gui.Initialize();
     // Widget Monodoc.Editor.SaveDocDialog
     this.Name = "Monodoc.Editor.SaveDocDialog";
     this.Title = Mono.Unix.Catalog.GetString("Save as...");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.HasSeparator = false;
     // Internal child Monodoc.Editor.SaveDocDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.saveFileDialog = new Gtk.FileChooserWidget(((Gtk.FileChooserAction)(1)));
     this.saveFileDialog.Name = "saveFileDialog";
     w1.Add(this.saveFileDialog);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.saveFileDialog]));
     w2.Position = 0;
     // Internal child Monodoc.Editor.SaveDocDialog.ActionArea
     Gtk.HButtonBox w3 = this.ActionArea;
     w3.Name = "dialog1_ActionArea";
     w3.Spacing = 6;
     w3.BorderWidth = ((uint)(5));
     w3.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonCancel]));
     w4.Expand = false;
     w4.Fill = false;
     // 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-save";
     w3.Add(this.buttonOk);
     Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonOk]));
     w5.Position = 1;
     w5.Expand = false;
     w5.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 703;
     this.DefaultHeight = 178;
     this.Show();
     this.saveFileDialog.FileActivated += new System.EventHandler(this.OnSaveFileDialogFileActivated);
     this.buttonCancel.Clicked += new System.EventHandler(this.OnButtonCancelClicked);
     this.buttonOk.Clicked += new System.EventHandler(this.OnButtonOkClicked);
 }
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:58,代码来源:Monodoc.Editor.SaveDocDialog.cs


示例14: Build

 protected virtual void Build() {
     Stetic.Gui.Initialize();
     // Widget CBinding.AddPathDialog
     this.Name = "CBinding.AddPathDialog";
     this.Title = Mono.Unix.Catalog.GetString("Add Path");
     this.Modal = true;
     // Internal child CBinding.AddPathDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.Spacing = 6;
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.file_chooser_widget = new Gtk.FileChooserWidget(((Gtk.FileChooserAction)(0)));
     this.file_chooser_widget.Name = "file_chooser_widget";
     this.file_chooser_widget.ShowHidden = true;
     w1.Add(this.file_chooser_widget);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.file_chooser_widget]));
     w2.Position = 0;
     // Internal child CBinding.AddPathDialog.ActionArea
     Gtk.HButtonBox w3 = this.ActionArea;
     w3.Name = "dialog1_ActionArea";
     w3.Spacing = 6;
     w3.BorderWidth = ((uint)(5));
     w3.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonCancel]));
     w4.Expand = false;
     w4.Fill = false;
     // 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-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonOk]));
     w5.Position = 1;
     w5.Expand = false;
     w5.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 649;
     this.DefaultHeight = 436;
     this.Show();
     this.buttonCancel.Clicked += new System.EventHandler(this.OnCancelButtonClick);
     this.buttonOk.Clicked += new System.EventHandler(this.OnOkButtonClick);
 }
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:58,代码来源:CBinding.AddPathDialog.cs


示例15: NoteDialog

        public NoteDialog(Gtk.Window parentWindow, ITask task)
            : base()
        {
            this.ParentWindow = parentWindow.GdkWindow;
            this.task = task;
            this.Title = String.Format(Catalog.GetString("Notes for: {0:s}"), task.Text);
            this.HasSeparator = false;
            this.SetSizeRequest(500,320);
            this.Icon = Utilities.GetIcon ("tasque", 16);
            //this.Flags = Gtk.DialogFlags.DestroyWithParent;

            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;

            sw.BorderWidth = 0;
            sw.CanFocus = true;
            sw.Show ();

            Gtk.EventBox innerEb = new Gtk.EventBox();
            innerEb.BorderWidth = 0;

            targetVBox = new Gtk.VBox();
            targetVBox.BorderWidth = 5;
            targetVBox.Show ();
            innerEb.Add(targetVBox);
            innerEb.Show ();

            if(task.Notes != null) {
                foreach (var note in task.Notes) {
                    NoteWidget noteWidget = new NoteWidget (note);
                    noteWidget.TextChanged += OnNoteTextChanged;
                    noteWidget.DeleteButtonClicked += OnDeleteButtonClicked;
                    noteWidget.EditCanceled += OnEditCanceled;
                    noteWidget.Show ();
                    targetVBox.PackStart (noteWidget, false, false, 0);
                }
            }

            sw.AddWithViewport(innerEb);
            sw.Show ();

            VBox.PackStart (sw, true, true, 0);

            if(task.NoteSupport == NoteSupport.Multiple) {
                addButton = new Gtk.Button(Gtk.Stock.Add);
                addButton.Show();
                this.ActionArea.PackStart(addButton);
                addButton.Clicked += OnAddButtonClicked;
            }

            AddButton (Gtk.Stock.Close, Gtk.ResponseType.Close);

            Response += delegate (object sender, Gtk.ResponseArgs args) {
                // Hide the window.  The TaskWindow watches for when the
                // dialog is hidden and will take care of the rest.
                Hide ();
            };
        }
开发者ID:GNOME,项目名称:tasque,代码行数:58,代码来源:NoteDialog.cs


示例16: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Bot.DialogError
     this.Name = "Bot.DialogError";
     this.Title = Mono.Unix.Catalog.GetString("Error");
     this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-dialog-error", Gtk.IconSize.Menu, 16);
     this.TypeHint = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.AllowShrink = true;
     this.HasSeparator = false;
     // Internal child Bot.DialogError.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox4 = new Gtk.HBox();
     this.hbox4.Name = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.label9 = new Gtk.Label();
     this.label9.Name = "label9";
     this.label9.LabelProp = Mono.Unix.Catalog.GetString("Error al Connectarse");
     this.hbox4.Add(this.label9);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox4[this.label9]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     w1.Add(this.hbox4);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(w1[this.hbox4]));
     w3.Position = 0;
     w3.Expand = false;
     w3.Fill = false;
     // Internal child Bot.DialogError.ActionArea
     Gtk.HButtonBox w4 = this.ActionArea;
     w4.Name = "dialog1_ActionArea";
     w4.Spacing = 6;
     w4.BorderWidth = ((uint)(5));
     w4.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-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w4[this.buttonOk]));
     w5.Expand = false;
     w5.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 264;
     this.DefaultHeight = 141;
     this.Show();
 }
开发者ID:ibarra,项目名称:bot,代码行数:58,代码来源:Bot.DialogError.cs


示例17: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MainWindow
     this.Name = "MainWindow";
     this.Title = "MainWindow";
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Container child MainWindow.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.button1 = new Gtk.Button();
     this.button1.CanFocus = true;
     this.button1.Name = "button1";
     this.button1.UseUnderline = true;
     this.button1.Label = "button1";
     this.vbox1.Add(this.button1);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox1[this.button1]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.gtkcontrol1 = new HollyLibrary.GtkControl();
     this.gtkcontrol1.Name = "gtkcontrol1";
     this.vbox1.Add(this.gtkcontrol1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.gtkcontrol1]));
     w2.Position = 1;
     // Container child vbox1.Gtk.Box+BoxChild
     this.button2 = new Gtk.Button();
     this.button2.CanFocus = true;
     this.button2.Name = "button2";
     this.button2.UseUnderline = true;
     this.button2.Label = "button2";
     this.vbox1.Add(this.button2);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.button2]));
     w3.Position = 2;
     w3.Expand = false;
     w3.Fill = false;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 577;
     this.DefaultHeight = 400;
     this.Show();
     this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.gtkcontrol1.KeyUp += new HollyLibrary.GcKeyUp(this.OnGtkcontrol1KeyUp);
     this.gtkcontrol1.KeyDown += new HollyLibrary.GcKeyDown(this.OnGtkcontrol1KeyDown);
     this.gtkcontrol1.KeyPressed += new HollyLibrary.GcKeyPressed(this.OnGtkcontrol1KeyPressed);
     this.gtkcontrol1.MouseMove += new HollyLibrary.GcMouseMove(this.OnGtkcontrol1MouseMove);
     this.gtkcontrol1.MouseUp += new HollyLibrary.GcMouseUp(this.OnGtkcontrol1MouseUp);
     this.gtkcontrol1.MouseDown += new HollyLibrary.GcMouseDown(this.OnGtkcontrol1MouseDown);
     this.gtkcontrol1.MouseClick += new HollyLibrary.GcMouseClick(this.OnGtkcontrol1MouseClick);
     this.gtkcontrol1.MouseDoubleClick += new HollyLibrary.GcMouseDoubleClick(this.OnGtkcontrol1MouseDoubleClick);
     this.gtkcontrol1.MouseWheel += new HollyLibrary.GcMouseWheel(this.OnGtkcontrol1MouseWheel);
 }
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:57,代码来源:MainWindow.cs


示例18: CustomBuild

        public void CustomBuild()
        {
            this.vboxWindow = new Gtk.VBox ();
            this.vboxWindow.Name = "vboxWindow";

            this.evntboxTitleBar = new Gtk.EventBox ();
            this.evntboxTitleBar.Name = "evntboxTitleBar";
            this.evntboxTitleBar.Visible = false;
            this.evntboxTitleBar.ChildVisible = false;
            this.evntboxTitleBar.Sensitive = false;
            this.vboxWindow.PackStart(this.evntboxTitleBar, false, false, 0);

            this.vboxClient = new Gtk.VBox ();
            this.vboxClient.Name = "vboxClient";
            this.vboxWindow.PackStart(this.vboxClient, true, true, 0);

            this.hboxTitleBar = new Gtk.HBox ();
            this.hboxTitleBar.Name = "hboxTitleBar";
            this.evntboxTitleBar.Add (this.hboxTitleBar);

            this.labelCaption = new Gtk.Label ();
            this.labelCaption.Name = "labelCaption";
            this.labelCaption.Xalign = 0f;
            this.labelCaption.LabelProp = Mono.Unix.Catalog.GetString ("Title");
            this.labelCaption.SingleLineMode = true;
            this.hboxTitleBar.PackStart (this.labelCaption, true, true, 0);

            this.btnMinimize = new Gtk.Button ();
            this.btnMinimize.Name = "btnMinimize";
            this.btnMinimize.WidthRequest = 22;
            this.btnMinimize.HeightRequest = 22;
            this.btnMinimize.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnMinimize, false, false, 0);

            this.btnMaximize = new Gtk.Button ();
            this.btnMaximize.Name = "btnMaximize";
            this.btnMaximize.WidthRequest = 22;
            this.btnMaximize.HeightRequest = 22;
            this.btnMaximize.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnMaximize, false, false, 0);

            this.btnClose = new Gtk.Button ();
            this.btnClose.Name = "btnClose";
            this.btnClose.WidthRequest = 22;
            this.btnClose.HeightRequest = 22;
            this.btnClose.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnClose, false, false, 0);

            this.btnMinimize.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.minimizeBtnId);
            this.btnMinimize.SetAlignment(0.5f, 0.5f);
            this.btnMaximize.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.maximizeBtnId);
            this.btnMaximize.SetAlignment(0.5f, 0.5f);
            this.btnClose.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.closeBtnId);
            this.btnClose.SetAlignment(0.5f, 0.5f);
        }
开发者ID:MagistrTot,项目名称:DGLE,代码行数:55,代码来源:CustomWindowBuild.cs


示例19: Build

 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget Gedcom.UI.GTK.FileSelectorDialog
     this.Events = ((Gdk.EventMask)(256));
     this.Name = "Gedcom.UI.GTK.FileSelectorDialog";
     this.Title = Mono.Unix.Catalog.GetString("FileSelectorDialog");
     this.TypeHint = ((Gdk.WindowTypeHint)(1));
     this.DestroyWithParent = true;
     this.HasSeparator = false;
     // Internal child Gedcom.UI.GTK.FileSelectorDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Events = ((Gdk.EventMask)(256));
     w1.Name = "dialog_VBox";
     w1.Spacing = 6;
     w1.BorderWidth = ((uint)(2));
     // Internal child Gedcom.UI.GTK.FileSelectorDialog.ActionArea
     Gtk.HButtonBox w2 = this.ActionArea;
     w2.Events = ((Gdk.EventMask)(256));
     w2.Name = "Gedcom.UI.GTK.FileSelectorDialog_ActionArea";
     w2.Spacing = 6;
     w2.BorderWidth = ((uint)(5));
     w2.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child Gedcom.UI.GTK.FileSelectorDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.button49 = new Gtk.Button();
     this.button49.CanDefault = true;
     this.button49.CanFocus = true;
     this.button49.Name = "button49";
     this.button49.UseStock = true;
     this.button49.UseUnderline = true;
     this.button49.Label = "gtk-cancel";
     this.AddActionWidget(this.button49, -6);
     Gtk.ButtonBox.ButtonBoxChild w3 = ((Gtk.ButtonBox.ButtonBoxChild)(w2[this.button49]));
     w3.Expand = false;
     w3.Fill = false;
     // Container child Gedcom.UI.GTK.FileSelectorDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.ActionButton = new Gtk.Button();
     this.ActionButton.CanDefault = true;
     this.ActionButton.CanFocus = true;
     this.ActionButton.Name = "ActionButton";
     this.ActionButton.UseStock = true;
     this.ActionButton.UseUnderline = true;
     this.ActionButton.Label = "gtk-open";
     this.AddActionWidget(this.ActionButton, 0);
     Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(w2[this.ActionButton]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 612;
     this.DefaultHeight = 159;
     this.Show();
     this.Response += new Gtk.ResponseHandler(this.OnResponse);
 }
开发者ID:Bert6623,项目名称:Gedcom.Net,代码行数:55,代码来源:Gedcom.UI.GTK.FileSelectorDialog.cs


示例20: BuildFileNameGroup

        private void BuildFileNameGroup(Gtk.HBox hbFileName)
        {
            this.btOpen = new Gtk.Button( Gtk.Stock.Open );
            this.edFileName = new Gtk.Entry();

            this.edFileName.IsEditable = false;
            this. 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.CellRendererText类代码示例发布时间:2022-05-24
下一篇:
C# Gtk.Alignment类代码示例发布时间: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