/// <summary> /// Customization step of remote folder addition wizard is complete, start CmisSync. /// </summary> public void CustomizePageCompleted(string repoName, string localrepopath) { try { this.CheckRepoPathExists(localrepopath); } catch (ArgumentException) { if (this.LocalPathExists != null && !this.LocalPathExists(localrepopath)) { return; } } this.SyncingReponame = repoName; this.saved_local_path = localrepopath; RepoInfo repoInfo = new RepoInfo { DisplayName = repoName, Address = this.saved_address, Binding = this.saved_binding, User = this.saved_user, ObfuscatedPassword = new Password(this.saved_password).ObfuscatedPassword, RepositoryId = this.PreviousRepository, RemotePath = this.PreviousPath, LocalPath = localrepopath }; foreach (string ignore in this.ignoredPaths) { repoInfo.AddIgnorePath(ignore); } // Check that the folder exists. if (Directory.Exists(repoInfo.LocalPath)) { Logger.Info(string.Format("DataSpace Repository Folder {0} already exist, this could lead to sync conflicts", repoInfo.LocalPath)); } else { // Create the local folder. Directory.CreateDirectory(repoInfo.LocalPath); } try { new Thread(() => { Program.Controller.AddRepo(repoInfo); }).Start(); } catch (Exception ex) { Logger.Fatal(ex.ToString()); } this.ChangePageEvent(PageType.Finished); }