コード例 #1
0
ファイル: ManageViewsForm.cs プロジェクト: zrolfs/pwiz
        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);
        }
コード例 #2
0
        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);
        }