当前位置: 首页>>代码示例>>C#>>正文


C# Button.Hide方法代码示例

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


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

示例1: CommonAboutDialog

		public CommonAboutDialog ()
		{
			Name = "wizard_dialog";
			Title = string.Format (GettextCatalog.GetString ("About {0}"), BrandingService.ApplicationName);
			TransientFor = IdeApp.Workbench.RootWindow;
			AllowGrow = false;
			HasSeparator = false;
			BorderWidth = 0;

			var notebook = new Notebook ();
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			notebook.BorderWidth = 0;
			notebook.AppendPage (new AboutMonoDevelopTabPage (), new Label (Title));
			notebook.AppendPage (new VersionInformationTabPage (), new Label (GettextCatalog.GetString ("Version Information")));
			VBox.PackStart (notebook, true, true, 0);
			
			var copyButton = new Button () { Label = GettextCatalog.GetString ("Copy Information") };
			copyButton.Clicked += (sender, e) => CopyBufferToClipboard ();
			ActionArea.PackEnd (copyButton, false, false, 0);
			copyButton.NoShowAll = true;

			var backButton = new Button () { Label = GettextCatalog.GetString ("Show Details") };
			ActionArea.PackEnd (backButton, false, false, 0);
			backButton.Clicked += (sender, e) => {
				if (notebook.Page == 0) {
					backButton.Label = GettextCatalog.GetString ("Hide Details");
					copyButton.Show ();
					notebook.Page = 1;
				}
				else {
					backButton.Label = GettextCatalog.GetString ("Show Details");
					copyButton.Hide ();
					notebook.Page = 0;
				}
			};

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

			ShowAll ();
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:41,代码来源:CommonAboutDialog.cs

示例2: MessageBar

        public MessageBar()
            : base(0.0f, 0.5f, 1.0f, 0.0f)
        {
            win = new Window (WindowType.Popup);
            win.Name = "gtk-tooltips";

            HBox shell_box = new HBox ();
            shell_box.Spacing = 10;

            box = new HBox ();
            box.Spacing = 10;

            image = new AnimatedImage ();
            try {
                image.Pixbuf = Gtk.IconTheme.Default.LoadIcon ("process-working", 22, IconLookupFlags.NoSvg);
                image.FrameHeight = 22;
                image.FrameWidth = 22;
                Spinning = false;
                image.Load ();
            } catch {
            }

            label = new WrapLabel ();
            label.Show ();

            box.PackStart (image, false, false, 0);
            box.PackStart (label, true, true, 0);
            box.Show ();

            button_box = new HBox ();
            button_box.Spacing = 3;

            close_button = new Button (new Image (Stock.Close, IconSize.Menu));
            close_button.Relief = ReliefStyle.None;
            close_button.Clicked += delegate { Hide (); };
            close_button.ShowAll ();
            close_button.Hide ();

            shell_box.PackStart (box, true, true, 0);
            shell_box.PackStart (button_box, false, false, 0);
            shell_box.PackStart (close_button, false, false, 0);
            shell_box.Show ();

            Add (shell_box);

            BorderWidth = 3;
        }
开发者ID:GNOME,项目名称:hyena,代码行数:47,代码来源:MessageBar.cs

示例3: SetText

		void SetText (IEnumerable<ISystemInformationProvider> text)
		{
			Clear ();

			var buf = new Gtk.Label ();
			buf.Selectable = true;
			buf.Xalign = 0;

			StringBuilder sb = new StringBuilder ();

			foreach (var info in text) {
				sb.Append ("<b>").Append (GLib.Markup.EscapeText (info.Title)).Append ("</b>\n");
				sb.Append (GLib.Markup.EscapeText (info.Description.Trim ())).Append ("\n\n");
			}

			buf.Markup = sb.ToString ().Trim () + "\n";

			var contentBox = new VBox ();
			contentBox.BorderWidth = 4;
			contentBox.PackStart (buf, false, false, 0);

			var asmButton = new Gtk.Button ("Show loaded assemblies");
			asmButton.Clicked += (sender, e) => {
				asmButton.Hide ();
				contentBox.PackStart (CreateAssembliesTable (), false, false, 0);
			};
			var hb = new Gtk.HBox ();
			hb.PackStart (asmButton, false, false, 0);
			contentBox.PackStart (hb, false, false, 0);

			var sw = new MonoDevelop.Components.CompactScrolledWindow () {
				ShowBorderLine = true,
				BorderWidth = 2
			};
			sw.AddWithViewport (contentBox);
			sw.ShadowType = ShadowType.None;
			((Gtk.Viewport)sw.Child).ShadowType = ShadowType.None;

			PackStart (sw, true, true, 0);
			ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:41,代码来源:VersionInformationTabPage.cs

示例4: ModeButton

		public ModeButton ()
		{
			this.Events |= EventMask.PointerMotionMask
			            |  EventMask.ButtonPressMask
			            |  EventMask.VisibilityNotifyMask;

			this.VisibilityNotifyEvent += delegate { this.QueueDraw (); };

			Sensitive = false;
			
			m_box = new HBox (true, 6);
			m_box.BorderWidth = 6;
			Add (m_box);
			m_box.Show ();

			m_button = new Button ();
			m_button.Hide();
			m_box.PackStart (m_button, true, true, 0);
		}
开发者ID:QualitySolution,项目名称:Gtk.DataBindings,代码行数:19,代码来源:ModeButton.cs

示例5: Install

		void Install (Gtk.Alignment commandBox, Button installButton, Update update)
		{
			if (update.InstallAction == null) {
				DesktopService.ShowUrl (update.Url);
				return;
			}
			
			installButton.Hide ();
			
			if (installing) {
				Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Waiting"));
				commandBox.Child.Destroy ();
				commandBox.Add (lab);
				lab.Show ();
				installQueue.Enqueue (delegate {
					lab.Hide ();
					RunInstall (commandBox, update);
				});
				return;
			}
			
			RunInstall (commandBox, update);
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:23,代码来源:UpdateDialog.cs

示例6: Install

		void Install (HBox labelBox, Button installButton, Update update)
		{
			if (update.InstallAction == null) {
				DesktopService.ShowUrl (update.Url);
				return;
			}
			
			installButton.Hide ();
			
			if (installing) {
				Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Waiting"));
				labelBox.PackStart (lab, false, false, 0);
				lab.Show ();
				installQueue.Enqueue (delegate {
					lab.Hide ();
					RunInstall (labelBox, update);
				});
				return;
			}
			
			RunInstall (labelBox, update);
		}
开发者ID:thild,项目名称:monodevelop,代码行数:22,代码来源:UpdateDialog.cs


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