本文整理汇总了C#中Gtk.MessageDialog.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.MessageDialog.Hide方法的具体用法?C# Gtk.MessageDialog.Hide怎么用?C# Gtk.MessageDialog.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.MessageDialog
的用法示例。
在下文中一共展示了Gtk.MessageDialog.Hide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleActivation
internal void HandleActivation(object sender, EventArgs e)
{
try {
Gnome.Url.Show (url);
} catch (Exception) {
string msg = String.Format (GettextCatalog.GetString ("Could not open the url {0}"), url);
Gtk.MessageDialog md = new Gtk.MessageDialog (null, Gtk.DialogFlags.Modal | Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Error, Gtk.ButtonsType.Ok, msg);
md.Run ();
md.Hide ();
}
}
示例2: DoCancel
private void DoCancel()
{
m_parser.Cancel = true;
this.Hide ();
String message = Catalog.GetString("Import cancelled, all changes reverted.");
Gtk.MessageDialog dlg = new Gtk.MessageDialog (this, Gtk.DialogFlags.Modal, Gtk.MessageType.Info,
Gtk.ButtonsType.Ok, message);
dlg.Run ();
dlg.Hide ();
dlg.Dispose ();
}
示例3: validateEntry
private bool validateEntry()
{
if (String.IsNullOrEmpty(nameEntry.Text))
{
Gtk.MessageDialog msg = new Gtk.MessageDialog(this, Gtk.DialogFlags.DestroyWithParent,
Gtk.MessageType.Error, Gtk.ButtonsType.Ok,
"The name field is required.");
msg.Run();
msg.Hide();
msg.Dispose();
return false;
}
/*if (!locationWidget.Latitude.ValidateEntry())
return false;
if (!locationWidget.Longitude.ValidateEntry())
return false;*/
return true;
}
示例4: ValidateEntry
public bool ValidateEntry()
{
try
{
int degrees = int.Parse(degreeEntry.Text, CultureInfo.InvariantCulture);
double minutes = double.Parse(minuteEntry.Text, CultureInfo.InvariantCulture);
if (degrees < 0 || minutes < 0)
throw new Exception();
return true;
}
catch (Exception)
{
Gtk.MessageDialog dlg = new Gtk.MessageDialog(null, Gtk.DialogFlags.DestroyWithParent,
Gtk.MessageType.Error, Gtk.ButtonsType.Ok,
Catalog.GetString("Invalid Coordinate"));
dlg.Run();
dlg.Hide();
dlg.Dispose();
return false;
}
}