Exemple #1
0
        private void FileToOpenFileSelected(FileFolderPickerWindow window)
        {
            FileInfo      fi         = new FileInfo(window.SelectedFileOrFolder);
            DirectoryInfo projfolder = fi.Directory;

            OpenProject(projfolder);
        }
Exemple #2
0
        private void OpenProjectMenuItem_Click(object sender, RoutedEventArgs e)
        {
            FileFolderPickerWindow _ffpw = new FileFolderPickerWindow(FileFolderPickerWindow.FileFolderPickerType.Files);

            _ffpw.Selected += FileToOpenFileSelected;
            _ffpw.Owner     = this;
            _ffpw.Title     = "Open Project";
            _ffpw.ShowDialog();
        }
 private void BrowseFolder_Click(object sender, RoutedEventArgs e)
 {
     if (_ffpw == null)
     {
         _ffpw           = new FileFolderPickerWindow(FileFolderPickerWindow.FileFolderPickerType.Directories);
         _ffpw.Selected += _ffpw_Selected;
         _ffpw.Owner     = this;
         _ffpw.Title     = "Select folder for project ";
     }
     _ffpw.ShowDialog();
 }
 void _ffpw_Selected(FileFolderPickerWindow window)
 {
     ProjectDirectory.Text = window.SelectedFileOrFolder;
 }