Exemple #1
0
        private void listBox1_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop) && e.Effect == DragDropEffects.Move)
            {
                string name = ((string[])e.Data.GetData("FileNameW"))[0];

                string[] mass_name = name.Split('.');
                string   TEST      = mass_name[mass_name.Length - 1];
                if ((TEST == "xls") || (TEST == "xlsm"))
                {
                    //if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
                    //{
                    //папка = folderBrowserDialog1.SelectedPath + "\\";
                    папка = "C:\\BNest_Projects\\";
                    waitForm wait = new waitForm();
                    excelReader.CreateProject(name, папка, wait, this);
                    wait.ShowDialog();
                    //}
                }
            }
        }
Exemple #2
0
        public Form1(string patch)
        {
            InitializeComponent();
            button1.AllowDrop = this.AllowDrop = true;
            load_form();

            string[] mass_name = patch.Split('.');
            string   TEST      = mass_name[mass_name.Length - 1];

            if ((TEST == "xls") || (TEST == "xlsm"))
            {
                //if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
                //{
                //папка = folderBrowserDialog1.SelectedPath + "\\";
                папка = "C:\\BNest_Projects\\";
                waitForm wait = new waitForm();
                excelReader.CreateProject(patch, папка, wait, this);
                wait.ShowDialog();
                //}
            }
        }