示例#1
0
        private void btnJobOpen_Click(object sender, EventArgs e)
        {
            mf.filePickerFileAndDirectory = "";

            using (FormFilePicker form = new FormFilePicker(mf))
            {
                //returns full field.txt file dir name
                if (form.ShowDialog(this) == DialogResult.Yes)
                {
                    mf.FileOpenField(mf.filePickerFileAndDirectory);
                    Close();
                }
                else
                {
                    return;
                }
            }
        }
示例#2
0
        private void btnTemplate_Click(object sender, EventArgs e)
        {
            using (var form = new FormFilePicker(mf))
            {
                var result = form.ShowDialog();

                //returns full field.txt file dir name
                if (result == DialogResult.Yes)
                {
                    isTemplateSet          = true;
                    lblTemplateChosen.Text = new DirectoryInfo(Path.GetDirectoryName(mf.filePickerFileAndDirectory)).Name;
                }
                else
                {
                    isTemplateSet = false;
                    mf.TimedMessageBox(1500, gStr.gsTemplateCancelled, gStr.gsYoucanstillstartnewfield);
                    return;
                }
            }
        }