/// <summary>Displays a dialog prompting the user for connection details. The isNewConnection /// parameter will be true if the user is creating a new connection rather than editing an /// existing connection. This should return true if the user clicked OK. If it returns false, /// any changes to the IConnectionInfo object will be rolled back.</summary> public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection) { CassandraConnectionInfo connInfo; connInfo = isNewConnection ? new CassandraConnectionInfo { ConntectionInfo = cxInfo } : CassandraConnectionInfo.Load(cxInfo); var win = new ConnectionDialog(connInfo); var result = win.ShowDialog() == true; if (result) connInfo.Save(); CacheDefinitionIfNessisary(connInfo); return result; }
/// <summary>Displays a dialog prompting the user for connection details. The isNewConnection /// parameter will be true if the user is creating a new connection rather than editing an /// existing connection. This should return true if the user clicked OK. If it returns false, /// any changes to the IConnectionInfo object will be rolled back.</summary> public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection) { CassandraConnectionInfo connInfo; connInfo = isNewConnection ? new CassandraConnectionInfo { ConntectionInfo = cxInfo } : CassandraConnectionInfo.Load(cxInfo); var win = new ConnectionDialog(connInfo); var result = win.ShowDialog() == true; if (result) { connInfo.Save(); } CacheDefinitionIfNessisary(connInfo); return(result); }