コード例 #1
0
        public static bool GetDatabaseConnectionInfoFromUser()
        {
            frm_GetDatabaseConnectionProperties form = new frm_GetDatabaseConnectionProperties(DatabaseType, DatabaseName, ServerAddress, UserName, Password);

            form.FormSubmitted += TryToConnectDatabase;
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
        private static bool GetDatabaseConnectionInfoFromUser(string databaseType, string databaseName, string serverAddress, string userName, string password)
        {
            frm_GetDatabaseConnectionProperties form = new frm_GetDatabaseConnectionProperties(databaseType, databaseName, serverAddress, userName, password);

            form.FormSubmitted += TryToConnectDatabase;
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                return(true);
            }
            return(false);
        }