private void provider_CloudRemoved(object sender, CloudEventArgs e) { Models.Cloud cloud = e.Cloud; CloudViewModel cloudViewItem = clouds.SingleOrDefault((i) => i.Cloud.Equals(cloud)); clouds.Remove(cloudViewItem); }
private void OpenApplication(Application application) { if (application.Parent != null) { CloudViewModel selectedCloudViewModel = Clouds.SingleOrDefault((i) => i.Cloud.Equals(application.Parent)); if (selectedCloudViewModel == null) { Models.Cloud currentCloud = provider.Clouds.SingleOrDefault((c) => c.Equals(application.Parent)); selectedCloudViewModel = new CloudViewModel(currentCloud); Clouds.Add(selectedCloudViewModel); } SelectedCloudView = selectedCloudViewModel; } SelectedCloudView.SelectedApplication = application; SelectedCloudView.IsApplicationViewSelected = true; }
protected override void InitializeData() { Messenger.Default.Send(new NotificationMessageAction<Guid>(Messages.SetUpdateAppData, (id) => { SelectedCloud = Clouds.SingleOrDefault(i => i.ID == id); })); Messenger.Default.Send(new NotificationMessageAction<string>(Messages.SetPushAppDirectory, (directory) => { PushFromDirectory = directory; CanChangeDirectory = false; })); }