예제 #1
0
        private void saveWitsmlFileDialog_FileOk(object sender, CancelEventArgs e)
        {
            var pathSaveWitsmlFile = saveWitsmlFileDialog.FileName;

            outputStream = new StreamWriter(pathSaveWitsmlFile);
            label3.Text  = pathSaveWitsmlFile;
            int version = Convert.ToInt32(textBoxVersionWitsml.Text);

            witsmlFile = new Witsml(outputStream, version, uom);
            string uidWell     = textBox1.Text;
            string uidWellbore = textBox2.Text;
            string uid         = textBox3.Text;
            string name        = textBox4.Text;

            saveWitsmlFileDialog.Dispose();

            try
            {
                lasFile.Process();
                witsmlFile.FromLasFile(lasFile, uidWell, uidWellbore, uid, name);
                outputStream.Close();
                inputStream.Close();
                MessageBox.Show("Complete!");
            }
            catch (Exception ee)
            {
                MessageBox.Show("Error!");
            }
        }
예제 #2
0
        // Программа для проверки работоспособности библиотеки
        static void Main(string[] args)
        {
            Uom uom = new Uom(@"C:\Users\Борис\Desktop\las2witsml-master\lib\oum.json");

            StreamReader inputStream = new StreamReader(@"C:\Users\Борис\Desktop\las2witsml-master\Untitled_3 las.dat");
            Las          lasFile     = new Las(inputStream);

            lasFile.Process();

            StreamWriter outputStream = new StreamWriter(@"C:\Users\Борис\Desktop\las2witsml-master\c#Untitled3.xml");
            Witsml       witsmlFile   = new Witsml(outputStream, 1411, uom);

            witsmlFile.FromLasFile(lasFile, "123", "456", "789", "007");

            Console.Write("thats all");
            Console.ReadKey();
        }