private void LaunchAssociateDirectory() { if (!string.IsNullOrEmpty(_directoryToAssociate) && !string.IsNullOrEmpty(_cloudConfigPath) && !string.IsNullOrEmpty(_cloudConnectionType) && !_cloudRepositories.Contains(new KeyValuePair <string, string> (_directoryToAssociate, _cloudConnectionType))) { SyncanyAdapter.Connect(_cloudConfigPath, _directoryToAssociate, _cloudConnectionType); _cloudRepositories.Add(new KeyValuePair <string, string>(_directoryToAssociate, _cloudConnectionType)); Daemon.AddWatch(_directoryToAssociate); } }
private void LaunchCloudCreation() { if (!string.IsNullOrEmpty(_cloudConfigPath) && !string.IsNullOrEmpty(_directoryOriginal) && !string.IsNullOrEmpty(_cloudConnectionType)) { SyncanyAdapter.PluginInstall("sftp"); SyncanyAdapter.Init(_cloudConfigPath, _directoryOriginal, _login, _password, _cloudConnectionType); _cloudRepositories.Add(new KeyValuePair <string, string>(_directoryOriginal, _cloudConnectionType)); Daemon.AddWatch(_directoryOriginal); } }