コード例 #1
0
ファイル: frmMain.cs プロジェクト: q55x8x/Peronality-Creator
        private void newFolderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFolderDialog nfd = new NewFolderDialog();

            if (nfd.Show() == DialogResult.OK)
            {
                string newFolderPath = ((Folder)this.projectView.SelectedNode.Tag).Directory.FullName + @"\" + nfd.NewFolderName;
                Directory.CreateDirectory(newFolderPath);

                Folder newFolder = new Folder(newFolderPath);
                newFolder.Persona = ((Folder)this.projectView.SelectedNode.Tag)?.Persona; //if persona is set in parent folder set it to the new folder too

                this.projectView.SelectedNode.Nodes.Add(Folder.getNode(newFolder));
            }
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: q55x8x/Peronality-Creator
        private void newFolderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewFolderDialog nfd = new NewFolderDialog();

            if (nfd.Show() == DialogResult.OK)
            {
                string newFolderPath = ((Folder)this.projectView.SelectedNode.Tag).Directory.FullName + @"\" + nfd.NewFolderName;
                Directory.CreateDirectory(newFolderPath);

                Folder newFolder = new Folder(newFolderPath);
                newFolder.Persona = ((Folder)this.projectView.SelectedNode.Tag)?.Persona; //if persona is set in parent folder set it to the new folder too

                this.projectView.SelectedNode.Nodes.Add(Folder.getNode(newFolder));
            }
        }