private void LaunchDrivePicker(string fileName = null) { drivePicker = new DrivePicker(userSession, fileName); // Register a method to receive click event callback. drivePicker.Click += DrivePickerOnClick; try { drivePicker.ShowDialog(this); } finally { drivePicker.Dispose(); } }
private void BrowseUploadPath() { drivePicker = new DrivePicker(userSession); // Register a method to recieve click event callback. drivePicker.Click += DrivePickerOnClick; drivePicker.ShowDialog(this); if (isDrivePickerSuccess) { // Valid. Clear any previous error. ClearDriveFolderMessage(); // Display folder in dialog box. LoadDriveLocation(uploadDriveItemId); // Save Drive item ID. userSession.Settings.FolderToDriveDestinationId = uploadDriveItemId; userSession.Settings.Save(); } SetButtonState(); }