private void toolStripMenuItem1_Click(object sender, EventArgs e) { //New Project >> Wax Deposition Prediction >> Single-PHase Oil FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog(); folderBrowserDialog1.Description = "Select/create the destination folder for the calculation results"; folderBrowserDialog1.SelectedPath = AppDomain.CurrentDomain.BaseDirectory; string coreCalculationExePath = AppDomain.CurrentDomain.BaseDirectory; if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { Deposition1P dep1p = new Deposition1P(folderBrowserDialog1, coreCalculationExePath); dep1p.Show(); } else { MessageBox.Show("A folder for deposition calculation must be selected before proceeds"); } }
private void singlePhaseOilToolStripMenuItem_Click(object sender, EventArgs e) { //File >> Open Project >> Wax Deposition Prediction >> Single-Phase Oil OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory; openFileDialog1.Filter = "hydro_all |default_Dep1L_.HyAll"; openFileDialog1.DefaultExt = "HyAll"; openFileDialog1.Title = "Open file bundle in all extension with the same name"; openFileDialog1.ShowDialog(); if (openFileDialog1.FileName != "") { int index = openFileDialog1.FileName.LastIndexOf('\\'); string dir_name = openFileDialog1.FileName.Substring(0, index - 7); FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog(); folderBrowserDialog1.SelectedPath = dir_name; Deposition1P dep1p = new Deposition1P(folderBrowserDialog1, AppDomain.CurrentDomain.BaseDirectory); dep1p.OpenProject(openFileDialog1.FileName); dep1p.Show(); } }