Beispiel #1
0
        internal PickMembersDialog(PickMembersDialogViewModel viewModel, string title)
        {
            PickMembersTitle = title;
            _viewModel       = viewModel;
            SetCommandBindings();

            InitializeComponent();
            DataContext = viewModel;
        }
Beispiel #2
0
        public PickMembersResult PickMembers(string title, ImmutableArray <ISymbol> members)
        {
            var viewModel = new PickMembersDialogViewModel(_glyphService, members);
            var dialog    = new PickMembersDialog(viewModel, title);
            var result    = dialog.ShowModal();

            if (result.HasValue && result.Value)
            {
                return(new PickMembersResult(
                           viewModel.MemberContainers.Where(c => c.IsChecked)
                           .Select(c => c.MemberSymbol)
                           .ToImmutableArray()));
            }
            else
            {
                return(PickMembersResult.Canceled);
            }
        }