예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
        }