Exemplo n.º 1
0
        private void rightButton_Click(object sender, EventArgs e)
        {
            if (rightTree.Nodes.Count > 0)
            {
                return;
            }

            executeCommand();
            System.Threading.Thread.Sleep(200);

            FolderBrowserDialog fbd = new FolderBrowserDialog();

            //上部に表示する説明テキストを指定する
            fbd.Description = "フォルダを指定してください。";
            //ルートフォルダを指定する
            //デフォルトでDesktop
            fbd.RootFolder = Environment.SpecialFolder.Desktop;
            //最初に選択するフォルダを指定する
            //fbd.SelectedPath = @"Z:\Interstage\J2EE\var\deployment\ijserver\Cloud11\apps\Cloud11.war\WEB-INF\classes\jp\fujitsu\saas";

            fbd.SelectedPath = System.Configuration.ConfigurationManager.AppSettings.Get("DefaultServerProjectPath");
            //ユーザーが新しいフォルダを作成できるようにする
            //デフォルトでTrue
            fbd.ShowNewFolderButton = true;

            //ダイアログを表示する
            if (fbd.ShowDialog(this) == DialogResult.OK)
            {
                rightRootPath = fbd.SelectedPath + "\\";
                List <string[]> fileNameList = FolderSupport.getFileNameList(rightRootPath, rightRootPath);
                NodeSupport.addRootNode(fileNameList, rightTree);
            }
        }
Exemplo n.º 2
0
        private void leftButton_Click(object sender, EventArgs e)
        {
            if (leftTree.Nodes.Count > 0)
            {
                return;
            }

            FolderBrowserDialog fbd = new FolderBrowserDialog();

            //上部に表示する説明テキストを指定する
            fbd.Description = "フォルダを指定してください。";
            //ルートフォルダを指定する
            //デフォルトでDesktop
            fbd.RootFolder = Environment.SpecialFolder.Desktop;
            //最初に選択するフォルダを指定する


            fbd.SelectedPath = System.Configuration.ConfigurationManager.AppSettings.Get("DefaultLocalProjectPath");
            //ユーザーが新しいフォルダを作成できるようにする
            //デフォルトでTrue
            fbd.ShowNewFolderButton = true;

            //ダイアログを表示する
            if (fbd.ShowDialog(this) == DialogResult.OK)
            {
                leftRootPath = fbd.SelectedPath + "\\";
                List <string[]> fileNameList = FolderSupport.getFileNameList(leftRootPath, leftRootPath);
                NodeSupport.addRootNode(fileNameList, leftTree);
            }
        }