Esempio n. 1
0
        private void tbMdxSourceFolder_DragDrop(object sender, DragEventArgs e)
        {
            string[] s        = (string[])e.Data.GetData(DataFormats.FileDrop, false);
            MdxUtil  mdxTools = new MdxUtil();
            TreeNode parentNode;
            int      i;

            try
            {
                doCleanup();

                for (i = 0; i < s.Length; i++)
                {
                    if (File.Exists(s[i]))
                    {
                        parentNode = new TreeNode(Path.GetFileName(s[i]));
                        treeViewTools.Nodes.Add(parentNode);
                        mdxTools.getPdxForFile(s[i], tbOutput, parentNode, cbMdxCheckPdxExist.Checked);
                    }
                    else if (Directory.Exists(s[i]))
                    {
                        parentNode = new TreeNode(s[i]);
                        treeViewTools.Nodes.Add(parentNode);
                        mdxTools.getPdxForDir(s[i], tbOutput, parentNode, cbMdxCheckPdxExist.Checked);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
        private void btnMdxFindPdx_Click(object sender, EventArgs e)
        {
            if (tbMdxSourceFolder.Text.Length > 0)
            {
                tbOutput.Clear();
                treeViewTools.Nodes.Clear();

                TreeNode parentNode = new TreeNode(tbMdxSourceFolder.Text);
                treeViewTools.Nodes.Add(parentNode);
                MdxUtil mdxTools = new MdxUtil();
                mdxTools.getPdxForDir(tbMdxSourceFolder.Text, tbOutput, parentNode, cbMdxCheckPdxExist.Checked);
            }
        }