示例#1
0
        public IPendingChangeControl Create(IAnkhServiceProvider context, IContainer container)
        {
            ElementHost host = new ElementHost();

            PendingChangesUserControl puc = new PendingChangesUserControl();

            puc.Resources.MergedDictionaries.RemoveAt(VSVersion.VS2012OrLater ? 0 : 1);

            puc.Context = context;

            host.Child = puc;

            return(new PendingChangeControlWrapper(context, host, puc));
        }
示例#2
0
        public PendingChangeControlWrapper(IAnkhServiceProvider context, WFControl control, PendingChangesUserControl puc)
            : base(context)
        {
            _puc = puc;
            //_puc.Context = context; // Done by cakker
            _puc.DataContext = this;

            control.Disposed += OnControlDisposed;
            _control          = control;

            _sim = SelectionItemMap.Create(this);
            _sim.PublishHierarchy = true;
            _sim.Context          = context;

            // Set Notify that we have a selection, otherwise the first selection request fails.
            _sim.NotifySelectionUpdated();
            puc.PendingChangesList.SelectionChanged += PendingChangesList_SelectionChanged;
        }