public static void MoveItem(ExplorerItemModel source, ExplorerItemModel destination, IStudioResourceRepository rep) { if (source != null) { if (source.EnvironmentId != destination.EnvironmentId) { var popup = CustomContainer.Get <IPopupController>(); popup.Description = "You are not allowed to move items between Servers using the explorer. Please use the deploy instead"; popup.Buttons = MessageBoxButton.OK; popup.Header = "Invalid Action"; popup.ImageType = MessageBoxImage.Error; popup.Show(); } else { switch (destination.ResourceType) { case ResourceType.Folder: case ResourceType.Server: rep.MoveItem(source, destination.ResourcePath); break; default: rep.MoveItem(source, destination.Parent.ResourcePath); break; } } } }
public static void MoveItem(ExplorerItemModel source, ExplorerItemModel destination, IStudioResourceRepository rep) { if (source != null) { if(source.EnvironmentId != destination.EnvironmentId) { var popup = CustomContainer.Get<IPopupController>(); popup.Description = "You are not allowed to move items between Servers using the explorer. Please use the deploy instead"; popup.Buttons = MessageBoxButton.OK; popup.Header = "Invalid Action"; popup.ImageType = MessageBoxImage.Error; popup.Show(); } else switch (destination.ResourceType) { case ResourceType.Folder: case ResourceType.Server: rep.MoveItem(source, destination.ResourcePath); break; default: rep.MoveItem(source, destination.Parent.ResourcePath); break; } } }