private void AddCloud(ManageCloudsData cloud) { cloudsToRemove.Remove(cloud.ID); if (false == cloudData.Contains(cloud)) { cloudData.Add(cloud); } }
private void worker_DoRegistrationWork(object sender, DoWorkEventArgs e) { ManageCloudsData selected = SelectedCloud; IsSelectedCloudAccountRegistered = selected.IsAccountRegistered = false; ProviderResponse <bool> result = provider.RegisterAccount(selected.ServerUrl, selected.Email, selected.Password); e.Result = result; }
private void worker_DoValidationWork(object sender, DoWorkEventArgs e) { var worker = (BackgroundWorker)sender; ManageCloudsData selected = SelectedCloud; IsSelectedCloudAccountValid = selected.IsAccountValid = false; ProviderResponse <bool> result = provider.ValidateAccount(selected.ServerUrl, selected.Email, selected.Password); e.Result = result; }
public ManageCloudsData AddCloud() { var newCloud = new ManageCloudsData(Guid.NewGuid()) { ServerName = "New Server", ServerUrl = "http://api.vcap.me", Email = "*****@*****.**", }; AddCloud(newCloud); return(newCloud); }
private void worker_RegistrationCompleted(object sender, RunWorkerCompletedEventArgs e) { var worker = (BackgroundWorker)sender; IsBusy = false; ManageCloudsData selected = SelectedCloud; var result = (ProviderResponse <bool>)e.Result; if (result.Response) { IsSelectedCloudAccountRegistered = selected.IsAccountRegistered = true; } else { IsSelectedCloudAccountRegistered = selected.IsAccountRegistered = false; ErrorMessage = result.Message; } }
public void AddDefaultCloud(ManageCloudsData cloud) { AddCloud(cloud); }