コード例 #1
0
            private void DocumentWindowChanged(Object sender, MonitorSelectionEventArgs e)
            {
                IMonitorSelectionService monitor  = (IMonitorSelectionService)sender;
                IORMDesignerView         testView = monitor.CurrentSelectionContainer as IORMDesignerView;

                this.CurrentDesignerView = (testView != null && testView.CurrentDesigner != null) ? testView : monitor.CurrentDocumentView as IORMDesignerView;
            }
コード例 #2
0
ファイル: WindowPane.cs プロジェクト: malain/candle
 /// <summary>
 /// Handles the SelectionChanged event of the MonitorSelection control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Microsoft.VisualStudio.Modeling.Shell.MonitorSelectionEventArgs"/> instance containing the event data.</param>
 private void MonitorSelection_SelectionChanged(object sender, MonitorSelectionEventArgs e)
 {
     if (((e.NewValue != null) && (e.NewValue != this)) && (e.NewValue is ISelectionService))
     {
         ISelectionService selectionService = e.NewValue as ISelectionService;
         OnMonitorSelectionChanged(selectionService);
     }
 }
コード例 #3
0
ファイル: ToolWindowActivator.cs プロジェクト: ozialien/NORMA
        /// <summary>
        /// Handles the DocumentWindowChanged event on the IMonitorSelectionService
        /// </summary>
        private void DocumentWindowChanged(object sender, MonitorSelectionEventArgs e)
        {
            IMonitorSelectionService monitor = (IMonitorSelectionService)sender;
            DocDataType docData = monitor.CurrentDocument as DocDataType;
            DocViewType docView = monitor.CurrentDocumentView as DocViewType;

            if (!CurrentDocumentChanging(docData, docView))
            {
                SetCurrentDocument(docData, docView);
            }
        }
コード例 #4
0
ファイル: ToolWindowActivator.cs プロジェクト: ozialien/NORMA
        /// <summary>
        /// Handles the SelectionChanged event on the IMonitorSelectionService
        /// </summary>
        private void MonitorSelectionChanged(object sender, MonitorSelectionEventArgs e)
        {
            IMonitorSelectionService monitor      = (IMonitorSelectionService)sender;
            SelectionContainerType   newContainer = monitor.CurrentSelectionContainer as SelectionContainerType;

            if (newContainer == null)
            {
                IProvideFrameVisibility visibility = myCurrentSelectionContainer as IProvideFrameVisibility;
                if (visibility == null || visibility.CurrentFrameVisibility == FrameVisibility.Hidden)
                {
                    newContainer = monitor.CurrentDocumentView as SelectionContainerType;
                }
            }
            CurrentSelectionContainer = newContainer;
        }
コード例 #5
0
ファイル: FactEditorScanner.cs プロジェクト: cjheath/NORMA
			private void DocumentWindowChanged(Object sender, MonitorSelectionEventArgs e)
			{
				IMonitorSelectionService monitor = (IMonitorSelectionService)sender;
				IORMDesignerView testView = monitor.CurrentSelectionContainer as IORMDesignerView;
				this.CurrentDesignerView = (testView != null && testView.CurrentDesigner != null) ? testView : monitor.CurrentDocumentView as IORMDesignerView;
			}