本文整理汇总了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 ();
}
示例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;
}
示例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 ();
}
示例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);
}
示例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);
}
示例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);
}