//---- New Project private void radMenuItem11_Click(object sender, EventArgs e) { //Show Form NewProject _newproject = new NewProject(); _newproject.ShowDialog(); // Dua Vao CAY DirectoryTreeview NewDir = treeView as DirectoryTreeview; // NewDir.PathTree = _newproject.duongdanproject; pathproject = _newproject.duongdanproject; string Pathproject = duongdanproject; NewDir.NameProject = _newproject._nameproject; DirectoryTreeview Tree = treeView as DirectoryTreeview; Tree.PathTree = Pathproject; Tree.Runother(); IFileParser WorkDir = new IFileParser(); WorkDir.WorkingDir = duongdanproject; }
private void _openproject_Click_1(object sender, EventArgs e) { string duongdan; PropertyGridBrowseEditor editor = new PropertyGridBrowseEditor(); RadBrowseEditorElement element = editor.EditorElement as RadBrowseEditorElement; element.DialogType = BrowseEditorDialogType.FolderBrowseDialog; FolderBrowserDialog Chonduongdan = new FolderBrowserDialog(); Chonduongdan.RootFolder = Environment.SpecialFolder.MyComputer; if (Chonduongdan.ShowDialog() == DialogResult.OK) { duongdan = Chonduongdan.SelectedPath; pathproject = duongdan; int namprojectpost = duongdan.LastIndexOf("\\"); string valuenameproject = duongdan.Substring(namprojectpost + 1); DirectoryTreeview NewTree = DirTreeview as DirectoryTreeview; NewTree.PathTree = duongdan; NewTree.NameProject = valuenameproject; duongdanproject = duongdan; NewTree.Runother(); counttabpage(); } }
//---- New Project public void newproject() { //Show Form NewProject _newproject = new NewProject(); _newproject.ShowDialog(); // Dua Vao CAY DirectoryTreeview NewDir = DirTreeview as DirectoryTreeview; // NewDir.PathTree = _newproject.duongdanproject; pathproject = _newproject.duongdanproject; string Pathproject = duongdanproject; NewDir.NameProject = _newproject._nameproject; DirectoryTreeview Tree = DirTreeview as DirectoryTreeview; Tree.PathTree = Pathproject; Tree.Runother(); ExcelFileParser WorkDir = new ExcelFileParser(); WorkDir.WorkingDir = duongdanproject; }
//--- Open Project private void radMenuItemOpenProject_Click(object sender, EventArgs e) { string duongdan; FolderBrowserDialog Chonduongdan = new FolderBrowserDialog(); Chonduongdan.RootFolder = Environment.SpecialFolder.MyComputer; if (Chonduongdan.ShowDialog() == DialogResult.OK) { duongdan = Chonduongdan.SelectedPath; DirectoryTreeview NewTree = treeView as DirectoryTreeview; NewTree.PathTree = duongdan; duongdanproject = duongdan; NewTree.Runother(); } }
// RUn PRoject again public void RunProJectAgain() { try { duongdan = duongdanproject; pathproject = duongdan; int namprojectpost = duongdan.LastIndexOf("\\"); string valuenameproject = duongdan.Substring(namprojectpost + 1); DirectoryTreeview NewTree = DirTreeview as DirectoryTreeview; NewTree.PathTree = duongdan; NewTree.NameProject = valuenameproject; duongdanproject = duongdan; NewTree.Runother(); } catch { } }
//--- Open Project private void radMenuItemOpenProject_Click(object sender, EventArgs e) { string duongdan; FolderBrowserDialog Chonduongdan = new FolderBrowserDialog(); Chonduongdan.RootFolder = Environment.SpecialFolder.MyComputer; if (Chonduongdan.ShowDialog() == DialogResult.OK) { duongdan = Chonduongdan.SelectedPath; pathproject = duongdan; int namprojectpost = duongdan.LastIndexOf("\\"); string valuenameproject = duongdan.Substring(namprojectpost + 1); DirectoryTreeview NewTree = DirTreeview as DirectoryTreeview; NewTree.PathTree = duongdan; NewTree.NameProject = valuenameproject; duongdanproject = duongdan; NewTree.Runother(); counttabpage(); } }