Ejemplo n.º 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;
            }
Ejemplo n.º 2
0
 /// <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);
     }
 }
Ejemplo n.º 3
0
        /// <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);
            }
        }
Ejemplo n.º 4
0
        /// <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;
        }
Ejemplo n.º 5
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;
			}