コード例 #1
0
        void IVSEditorControlInit.InitializedForm(Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy hier, uint id, IVsWindowFrame frame, IAnkhEditorPane pane)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            _frame = frame;
            _pane  = pane;

            if (_targets != null && pane != null)
            {
                foreach (IOleCommandTarget t in _targets)
                {
                    _pane.AddCommandTarget(t);
                }
            }

            IVsWindowFrame2 frame2 = _frame as IVsWindowFrame2;

            if (frame2 != null)
            {
                if (frame2.Advise(this, out _frameNotifyCookie) != 0)
                {
                    _frameNotifyCookie = 0;
                }
            }

            OnFrameLoaded(EventArgs.Empty);
        }
コード例 #2
0
ファイル: VSEditorControl.cs プロジェクト: necora/ank_git
        void IVSEditorControlInit.InitializedForm(Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy hier, uint id, IVsWindowFrame frame, IAnkhEditorPane pane)
        {
            _frame = frame;
            _pane = pane;

            if (_targets != null && pane != null)
                foreach (IOleCommandTarget t in _targets)
                    _pane.AddCommandTarget(t);

            IVsWindowFrame2 frame2 = _frame as IVsWindowFrame2;

            if (frame2 != null)
            {
                if (frame2.Advise(this, out _frameNotifyCookie) != 0)
                    _frameNotifyCookie = 0;
            }

            OnFrameLoaded(EventArgs.Empty);
        }