Example #1
0
        /// <summary>
        /// Notifies to external listeners selection updated.
        /// </summary>
        public void NotifySelectionUpdated()
        {
            if (_updatingSelection)
            {
                return;
            }

            _shouldUpdate      = false;
            _updatingSelection = true;
            try
            {
                if (SelectionPublishServiceProvider != null)
                {
                    if (SelectionMap.Context != SelectionPublishServiceProvider)
                    {
                        SelectionMap.Context = SelectionPublishServiceProvider;
                    }

                    SelectionMap.NotifySelectionUpdated();
                }
            }
            finally
            {
                _updatingSelection = false;
            }
        }
Example #2
0
        internal void SetSelection(IAnnotateSection section)
        {
            // Check if necessary
            //Focus();
            //Select();

            _selected = (AnnotateSource)section;

            _map.NotifySelectionUpdated();
        }
Example #3
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;
        }
Example #4
0
        protected override void OnFrameCreated(EventArgs e)
        {
            base.OnFrameCreated(e);

            if (DesignMode || Context == null)
            {
                return;
            }

            _map = SelectionItemMap.Create <IAnnotateSection>(this);
            _map.PublishHierarchy = false;
            _map.Context          = Context;

            // Set Notify that we have a selection, otherwise the first selection request fails.
            _map.NotifySelectionUpdated();

            CommandContext  = AnkhId.AnnotateContextGuid;
            KeyboardContext = new Guid(0x8B382828, 0x6202, 0x11d1, 0x88, 0x70, 0x00, 0x00, 0xF8, 0x75, 0x79, 0xD2); // Editor
            SetFindTarget(editor.FindTarget);

            blameMarginControl1.Init(Context, this, blameSections);
        }
Example #5
0
 void PendingChangesList_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
 {
     _sim.NotifySelectionUpdated();
 }