private void OpenOpenDialog() { FileChooserDialog = new FileChooserDialog("Open Game", Window, FileChooserAction.Open, "Open"); FileChooserDialog.SetCurrentFolderUri("F:/isos/psp2"); //FileChooserDialog.AddShortcutFolder("F:/isos/psp2"); //FileChooserDialog. //FileChooserDialog.SelectionChanged += FileChooserDialog_FileActivated; FileChooserDialog.FileActivated += FileChooserDialog_FileActivated; FileChooserDialog.ShowAll(); }
/// <summary> /// Handles the add path button clicked event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> protected void OnAddPathButtonClicked(object sender, EventArgs e) { Uri defaultLocation = new Uri(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); GameSelectionFileChooserDialog.SetCurrentFolderUri(defaultLocation.ToString()); if (GameSelectionFileChooserDialog.Run() == (int)ResponseType.Ok) { Uri uriToStore = new Uri(GameSelectionFileChooserDialog.CurrentFolderUri); if (Directory.Exists(uriToStore.LocalPath)) { this.GamePathListStore.AppendValues(uriToStore.LocalPath); GamePathStorage.Instance.StorePath(uriToStore.LocalPath); } } GameSelectionFileChooserDialog.Hide(); }