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();
            }
        }
示例#2
0
        private void settingsGrid_EditorRequired(object sender, PropertyGridEditorRequiredEventArgs e)
        {
            if (!e.Item.Name.ToLower().Contains("path"))
            {
                return;
            }
            PropertyGridBrowseEditor gridBrowseEditor = new PropertyGridBrowseEditor();

            (gridBrowseEditor.EditorElement as RadBrowseEditorElement).DialogType = BrowseEditorDialogType.FolderBrowseDialog;
            e.Editor            = (IValueEditor)gridBrowseEditor;
            this.PathWasChanged = true;
        }