示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        static public DialogResult ShowDialog(ref ConnectionType connectionType)
        {
            ConnectionStringBuilderUIEditor frmStringBuilder = new ConnectionStringBuilderUIEditor();

            frmStringBuilder.ConnectionType = connectionType;

            DialogResult result = frmStringBuilder.ShowDialog();

            if (result == DialogResult.OK)
            {
                connectionType = frmStringBuilder.ConnectionType;
            }

            return(result);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        static public DialogResult ShowDialog(ref string connectionString)
        {
            ConnectionType connectionType = new ConnectionType("SQL", connectionString);

            connectionType.ConnectionStringBuilder.ConnectionString = connectionString;
            ConnectionStringBuilderUIEditor frmStringBuilder = new ConnectionStringBuilderUIEditor();

            frmStringBuilder.ConnectionType = connectionType;

            DialogResult result = frmStringBuilder.ShowDialog();

            if (result == DialogResult.OK)
            {
                connectionString = frmStringBuilder.ConnectionType.ConnectionStringBuilder.ConnectionString;
            }

            return(result);
        }