/// <summary> /// 从DMP文件中读取原用户名 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnReadSchema_Click(object sender, EventArgs e) { DmpFile dmpFile = cmbDmps.SelectedItem as DmpFile; if (dmpFile == null) { return; } if (!string.IsNullOrEmpty(dmpFile.Schema)) { return; } dmpFile.Schema = DmpSchemaReader.Read(dmpFile.FilePath).ToUpper(); if (!string.IsNullOrEmpty(dmpFile.Schema)) { txtDestUser.Text = dmpFile.Schema; } else { MessageBox.Show("读取失败,仅支持数据泵模式备份文件"); } }
private void cmbDmps_SelectedIndexChanged(object sender, EventArgs e) { DmpFile dmpFile = cmbDmps.SelectedItem as DmpFile; if (dmpFile == null) { return; } //if (string.IsNullOrEmpty(dmpFile.Schema)) // dmpFile.Schema = DmpSchemaReader.Read(dmpFile.FilePath); txtDestUser.Text = dmpFile.Schema; }