예제 #1
0
        private void btnCompute_Click(object sender, RoutedEventArgs e)
        {
            if (!Directory.Exists(MemData.MemDataTemp))
            {
                Directory.CreateDirectory(MemData.MemDataTemp);
            }
            string expName = MemData.MemDataTemp + "/exp_" + txtTable.SelectedValue + ".tab";

            if (ExportData(expName))
            {
                this.Close();
                MyTrees.OpenDBFile(expName, "\t", false);
                File.Delete(expName);
            }
        }
예제 #2
0
        //打开文件
        private void ButtonOpen_Click(object sender, RoutedEventArgs e)
        {
            bool           csv_or_tab  = (sender == btnImportCsv);
            OpenFileDialog openfileDlg = new OpenFileDialog();

            openfileDlg.Title  = "打开要作为会员树数据源的文件";
            openfileDlg.Filter = csv_or_tab ? "CSV逗号分隔文件|*.csv" : "TAB键分割文件|*.tab";
            if (openfileDlg.ShowDialog() == true)
            {
                windowAdmin.progressView.SetCsvFile(openfileDlg.FileName);
                TextUtil.enUpperLower = (EnumUpperLower)comboToLower.SelectedIndex;
                TextUtil.enDBCSBC     = (EnumDBCSBC)comboToHalf.SelectedIndex;
                TextUtil.enTrim       = (EnumTrim)comboTrim.SelectedIndex;
                string separator = csv_or_tab ? "," : "\t";
                MyTrees.OpenDBFile(openfileDlg.FileName, separator, true);
                datasetListView.RefreshDB(MyTrees.treeDB, "");
            }
        }