public InitEx ( ConfigurationService configService, StorageService storageService, Mode mode ) : void | ||
configService | ConfigurationService | |
storageService | StorageService | |
mode | Mode | |
return | void |
private void OnOpenFromCloudDrive(object sender, EventArgs eventArgs) { // First usage: register new account if (!HasAccounts()) return; var form = new CloudDriveFilePicker(); form.InitEx(_configService, _storageService, CloudDriveFilePicker.Mode.Open); var result = UIUtil.ShowDialogAndDestroy(form); if (result != DialogResult.OK) return; var ci = IOConnectionInfo.FromPath(form.ResultUri); ci.CredSaveMode = IOCredSaveMode.SaveCred; _host.MainWindow.OpenDatabase(ci, null, false); }
private void OnSaveToCloudDrive(object sender, EventArgs e) { if (_host.Database == null) return; // First usage: register new account if (!HasAccounts()) return; _uiService.ShowDonationDialog(); var form = new CloudDriveFilePicker(); form.InitEx(_configService, _storageService, CloudDriveFilePicker.Mode.Save); var result = UIUtil.ShowDialogAndDestroy(form); if (result != DialogResult.OK) return; var ci = IOConnectionInfo.FromPath(form.ResultUri); ci.CredSaveMode = IOCredSaveMode.SaveCred; var isCopy = sender == _tsSaveCopyToCloudDrive; _host.MainWindow.SaveDatabaseAs(_host.Database, ci, true, null, isCopy); }