本文整理汇总了C#中Gtk.Window.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Window.Hide方法的具体用法?C# Window.Hide怎么用?C# Window.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Window
的用法示例。
在下文中一共展示了Window.Hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
public void Run ()
{
var poof_file = DockServices.Paths.SystemDataFolder.GetChild ("poof.png");
if (!poof_file.Exists)
return;
poof = new Pixbuf (poof_file.Path);
window = new Gtk.Window (Gtk.WindowType.Toplevel);
window.AppPaintable = true;
window.Resizable = false;
window.KeepAbove = true;
window.CanFocus = false;
window.TypeHint = WindowTypeHint.Splashscreen;
window.SetCompositeColormap ();
window.Realized += delegate { window.GdkWindow.SetBackPixmap (null, false); };
window.SetSizeRequest (size, size);
window.ExposeEvent += HandleExposeEvent;
GLib.Timeout.Add (30, delegate {
if (AnimationState == 1) {
window.Hide ();
window.Destroy ();
poof.Dispose ();
return false;
} else {
window.QueueDraw ();
return true;
}
});
window.Move (x, y);
window.ShowAll ();
run_time = DateTime.UtcNow;
}
示例2: ShowClientUpgradeMessageBox
private void ShowClientUpgradeMessageBox()
{
if(this.NewClientVersion == null || this.ClientUpgradeStatus == null || this.NewClientDomainID == null)
{
return;
}
if (ClientUpgradeDialog != null)
return;
if(DomainController.upgradeStatus.statusCode == StatusCodes.ServerOld)
{
ClientUpgradeDialog = new iFolderMsgDialog(
null,
iFolderMsgDialog.DialogType.Info,
iFolderMsgDialog.ButtonSet.Ok,
Util.GS("iFolder Server Older"),
Util.GS("The server is running an older version."),
string.Format(Util.GS("The server needs to be upgraded to be connected from this client")));
}
else if(DomainController.upgradeStatus.statusCode == StatusCodes.UpgradeNeeded)
{
ClientUpgradeDialog = new iFolderMsgDialog(
null,
iFolderMsgDialog.DialogType.Info,
iFolderMsgDialog.ButtonSet.AcceptDeny,
Util.GS("iFolder Client Upgrade"),
Util.GS("Would you like to download new iFolder Client?"),
string.Format(Util.GS("The client needs to be upgraded to be connected to the server")));
}
else
{
ClientUpgradeDialog = new iFolderMsgDialog(
null,
iFolderMsgDialog.DialogType.Info,
iFolderMsgDialog.ButtonSet.AcceptDeny,
Util.GS("iFolder Client Upgrade"),
Util.GS("Would you like to download new iFolder Client?"),
string.Format(Util.GS("A newer version \"{0}\" of the iFolder Client is available."), this.NewClientVersion));
}
int rc = ClientUpgradeDialog.Run();
ClientUpgradeDialog.Hide();
ClientUpgradeDialog.Destroy();
ClientUpgradeDialog = null;
if (rc == -8)
{
bool bUpdateRunning = false;
Gtk.Window win = new Gtk.Window("");
string initialPath = (string)System.IO.Path.GetTempPath();
Debug.PrintLine(String.Format("Initial Path: {0}", initialPath));
CopyLocation cp = new CopyLocation(win, (string)System.IO.Path.GetTempPath());
string selectedFolder = "";
int rc1 = 0;
do
{
rc1 = cp.Run();
cp.Hide();
if(rc1 ==(int)ResponseType.Ok)
{
selectedFolder = cp.iFolderPath.Trim();
cp.Destroy();
cp = null;
break;
}
}while( rc1 == (int)ResponseType.Ok);
if( cp != null)
{
cp.Destroy();
cp=null;
}
win.Hide();
win.Destroy();
win=null;
if( rc1 != (int) ResponseType.Ok)
{
Debug.PrintLine("OnClientUpgradeAvailableEvent return");
ClientUpgradeDialog = null;
return;
}
try
{
if(ifws !=null)
{
Debug.PrintLine("ifws.RunClientUpdate");
bUpdateRunning = ifws.RunClientUpdate(this.NewClientDomainID, selectedFolder);
}
}
catch(Exception e)
{
Debug.PrintLine(String.Format("ifws.RunClientUpdate exception :{0}", e.Message));
ClientUpgradeDialog = null;
return;
}
if (bUpdateRunning)
{
ClientUpgradeDialog = new iFolderMsgDialog(
null,
iFolderMsgDialog.DialogType.Info,
iFolderMsgDialog.ButtonSet.Ok,
Util.GS("Download Complete..."),
Util.GS("Download Finished "),
string.Format(Util.GS("The new client rpm's have been downloaded.")));
//.........这里部分代码省略.........