public static Oilfield_File OpenData(string filename) { if (!File.Exists(filename)) { return(null); } if (CSV_File.IsCSVFile(filename)) { return(new CSV_File(filename)); } if (SEGY_File.IsSEGYFile(filename)) { return(new SEGY_File(filename)); } if (LAS_File.IsLASFile(filename)) { return(new LAS_File(filename, true)); } if (Petrolog_File.IsPetrologFile(filename)) { Petrolog_File pf = new Petrolog_File(filename); //Petrolog_Channel index = pf.GetIndex(); //index.LoadData(); pf.CreateIndexMetric(); return(pf); } return(null); }
private void textBox1_TextChanged(object sender, EventArgs e) { myFile = null; dataGridView1.Rows.Clear(); if (!File.Exists(textBox1.Text)) { return; } myFile = new SEGY_File(textBox1.Text, false); string[] tmp = new string[2]; for (int i = 1; i <= 40; i++) { tmp[0] = "C" + i.ToString().PadLeft(2, '0'); tmp[1] = myFile.Parameters[i - 1].Value; dataGridView1.Rows.Add(tmp); } }
public static Oilfield_File OpenHeader(string filename) { if (!File.Exists(filename)) { return(null); } if (CSV_File.IsCSVFile(filename)) { return(new CSV_File(filename)); } if (SEGY_File.IsSEGYFile(filename)) { return(new SEGY_File(filename)); } if (LAS_File.IsLASFile(filename)) { return(new LAS_File(filename, false)); } if (Petrolog_File.IsPetrologFile(filename)) { return(new Petrolog_File(filename)); } return(null); }