Ejemplo n.º 1
0
        private void btSimpleSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog
            {
                Filter = String.Format("{0}|{0}|All files|*.*", FileExtension)
            };

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                String fileName, rawFileName, dirName, extension;
                GetFileNameParts(ofd.FileName, out dirName, out fileName, out rawFileName, out extension);

                tbInputFiles.Text = fileName;
                tbRootFolder.Text = dirName;

                FrmDefineReference fdr = new FrmDefineReference();
                if (fdr.ShowDialog() == DialogResult.OK)
                {
                    var refDef = fdr.ReferenceDefinition;
                    tbReferenceFile.Text = refDef.Replace("{path}", dirName).Replace("{name}", rawFileName).Replace("{ext}", extension);

                    Run();
                }
            }
        }
Ejemplo n.º 2
0
        private void btSimpleSelect_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog
            {
                Filter = String.Format("{0}|{0}|All files|*.*", FileExtension)
            };

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                String fileName, rawFileName, dirName, extension;
                GetFileNameParts(ofd.FileName, out dirName, out fileName, out rawFileName, out extension);

                tbInputFiles.Text = fileName;
                tbRootFolder.Text = dirName;

                FrmDefineReference fdr = new FrmDefineReference();
                if (fdr.ShowDialog() == DialogResult.OK)
                {
                    var refDef = fdr.ReferenceDefinition;
                    tbReferenceFile.Text = refDef.Replace("{path}", dirName).Replace("{name}", rawFileName).Replace("{ext}", extension);

                    Run();
                }
            }
        }