public void CopyToGroup(ViewGroup group) { var selectedNames = new HashSet <ViewName>(chooseViewsControl1.SelectedViews); var currentGroupId = chooseViewsControl1.SelectedGroup.Id; var selectedViews = ViewContext.GetViewSpecList(chooseViewsControl1.SelectedGroup.Id) .Filter(view => selectedNames.Contains(currentGroupId.ViewName(view.Name))); ViewContext.CopyViewsToGroup(this, group, selectedViews); }
public void CopyToGroup(ViewGroup group) { var selectedViews = new ViewSpecList(chooseViewsControl1.SelectedViews.Select(viewName => ViewContext.GetViewSpecList(viewName.GroupId).GetView(viewName.Name))); ViewContext.CopyViewsToGroup(this, group, selectedViews); }