Azavea.NijPredictivePolicing.AcsAlchemistGui.MainForm.openJobFileToolStripMenuItem_Click C# (CSharp) Method

openJobFileToolStripMenuItem_Click() private method

private openJobFileToolStripMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void openJobFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!CheckSave()) { return; }

            if (openFileJob.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                txtJobFilePath.Text = openFileJob.FileName;

                //change the current working directory to the folder where the job file was
                //so that relative paths work as expected
                Environment.CurrentDirectory = Path.GetDirectoryName(txtJobFilePath.Text);

                FormController.Instance.LoadNewJobInstance(txtJobFilePath.Text);
                this.PopulateControls();
                this.ValidateChildren();
            }
        }