コード例 #1
0
        public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection)
        {
            var properties = new CsvDataContextDriverProperties(cxInfo);
            if (isNewConnection)
            {
                properties.Files = "#Drag&Drop or type file paths, or directory paths with pattern like *.csv or **.csv (** will recurse subdirectory)\nc:\\*.csv";
            }

            bool? result = new ConnectionDialog(properties).ShowDialog();
            if (result == true)
            {
                cxInfo.DisplayName = GetConnectionDescription(cxInfo);
                return true;
            }
            return false;
        }
コード例 #2
0
        public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection)
        {
            var properties = new CsvDataContextDriverProperties(cxInfo);

            if (isNewConnection)
            {
                properties.Files = "#Drag&Drop or type file paths, or directory paths with pattern like *.csv or **.csv (** will recurse subdirectory)\nc:\\*.csv";
            }

            bool?result = new ConnectionDialog(properties).ShowDialog();

            if (result == true)
            {
                cxInfo.DisplayName = GetConnectionDescription(cxInfo);
                return(true);
            }
            return(false);
        }