本文整理汇总了C#中Gtk.MessageDialog.Stick方法的典型用法代码示例。如果您正苦于以下问题:C# MessageDialog.Stick方法的具体用法?C# MessageDialog.Stick怎么用?C# MessageDialog.Stick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.MessageDialog
的用法示例。
在下文中一共展示了MessageDialog.Stick方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDeleteDockButtonClicked
protected virtual void OnDeleteDockButtonClicked (object sender, System.EventArgs e)
{
if (!(Docky.Controller.Docks.Count () > 1))
return;
if (ActiveDock != null) {
Gtk.MessageDialog md = new Gtk.MessageDialog (null,
0,
Gtk.MessageType.Warning,
Gtk.ButtonsType.None,
"<b><big>" + Catalog.GetString ("Delete the currently selected dock?") + "</big></b>");
md.Icon = DockServices.Drawing.LoadIcon ("docky", 22);
md.SecondaryText = Catalog.GetString ("If you choose to delete the dock, all settings\n" +
"for the deleted dock will be permanently lost.");
md.Modal = true;
md.KeepAbove = true;
md.Stick ();
md.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel);
md.AddButton (Catalog.GetString ("_Delete Dock"), Gtk.ResponseType.Ok);
md.DefaultResponse = Gtk.ResponseType.Ok;
if ((ResponseType)md.Run () == Gtk.ResponseType.Ok) {
ActiveDock.ConfigurationClick -= HandleDockConfigurationClick;
ActiveDock.LeaveConfigurationMode ();
Docky.Controller.DeleteDock (ActiveDock);
if (Docky.Controller.Docks.Count () == 1)
ActiveDock = Docky.Controller.Docks.First ();
else
ActiveDock = null;
}
md.Destroy ();
}
}