private void Window_Loaded(object sender, RoutedEventArgs e) { DataContext.Load(); AppRootFolder.Focus(); AppRootFolder.SelectAll(); }
private void DossierRacineParcourir_Click(object sender, RoutedEventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.Description = "Choississez l'emplacement des données de l'application :"; if (Directory.Exists(DataContext.AppRootFolder)) { dialog.SelectedPath = DataContext.AppRootFolder; } else { dialog.RootFolder = Environment.SpecialFolder.MyComputer; } if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { AppRootFolder.Text = dialog.SelectedPath; AppRootFolder.Focus(); AppRootFolder.SelectAll(); } }