本文整理汇总了C#中IXenConnection.EndConnect方法的典型用法代码示例。如果您正苦于以下问题:C# IXenConnection.EndConnect方法的具体用法?C# IXenConnection.EndConnect怎么用?C# IXenConnection.EndConnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IXenConnection
的用法示例。
在下文中一共展示了IXenConnection.EndConnect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConnectToServer
/// <param name="connection">May be null, in which case a new connection will be created</param>
protected void ConnectToServer(IXenConnection conn, string hostname, int port, string username, string password, string version)
{
if (conn == null)
{
XenConnection connection = new XenConnection();
connection.CachePopulated += conn_CachePopulated;
connection.fromDialog = true;
conn = connection;
}
else if (!_changedPass)
{
conn.EndConnect(); // in case we're already connected
}
conn.Hostname = hostname;
conn.Port = port;
conn.Username = username;
conn.Password = password;
conn.ExpectPasswordIsCorrect = false;
conn.Version = version;
if (!_changedPass)
XenConnectionUI.BeginConnect(conn, true, Owner, false);
}
示例2: DoDisconnect
private void DoDisconnect(IXenConnection connection)
{
string msg = string.Format(Messages.CONNECTION_CLOSED_NOTICE_TEXT, connection.Hostname);
log.Warn(msg);
ActionBase notice = new ActionBase(ActionType.Information, msg, msg, false);
notice.Pool = Helpers.GetPoolOfOne(connection);
notice.Host = Helpers.GetMaster(connection);
MainWindowCommandInterface.CloseActiveWizards(connection);
XenDialogBase.CloseAll(connection);
connection.EndConnect();
MainWindowCommandInterface.SaveServerList();
MainWindowCommandInterface.Refresh();
}