Пример #1
0
        protected virtual void SceneFocusChanged(object sender, GraphSceneEventArgs <IVisual, IVisualEdge> e)
        {
            if (ViewMode != SplitViewMode.GraphContent)
            {
                return;
            }
            var display = sender as IGraphSceneDisplay <IVisual, IVisualEdge>;

            CurrentDisplay = display;
            lock (locker) {
                var adjacent           = AdjacentDisplay(display);
                var contentViewManager = this.ContentViewManager;
                try {
                    display.ActionDispatcher.UserEventsDisabled  = true;
                    adjacent.ActionDispatcher.UserEventsDisabled = true;
                    contentViewManager.SheetViewer = adjacent;
                    contentViewManager.ShowViewer(sender, e);
                } catch (Exception ex) {
                    ExceptionHandler.Catch(ex, MessageType.OK);
                } finally {
                    display.ActionDispatcher.UserEventsDisabled  = false;
                    adjacent.ActionDispatcher.UserEventsDisabled = false;
                }
            }
        }
Пример #2
0
 public virtual void SceneFocusChangedCallback(IGraphScene <TItem, TEdge> scene, TItem item)
 {
     if (SceneFocusChanged != null)
     {
         focusChangedEventArgs = new GraphSceneEventArgs <TItem, TEdge>(scene, item);
     }
 }
Пример #3
0
 public void ShowViewer(object sender, GraphSceneEventArgs <IVisual, IVisualEdge> e)
 {
     if (e.Item != null)
     {
         LoadThing(e.Scene.Graph, e.Item);
     }
 }
Пример #4
0
        public virtual void OnSceneFocusChanged()
        {
            if (SceneFocusChanged != null && focusChangedEventArgs != null)
            {
                SceneFocusChanged(this, focusChangedEventArgs);
                focusChangedEventArgs = null;

                ActionDispatcher.Actions.OfType <MouseTimerActionBase> ()
                .ForEach(a => a.LastMouseTime = 0);
            }
        }
Пример #5
0
        public void GraphContentView()
        {
            var currentDisplay = this.CurrentDisplay;

            if (currentDisplay != null &&
                currentDisplay.Data != null &&
                currentDisplay.Data.Focused != null)
            {
                var eventArgs = new GraphSceneEventArgs <IVisual, IVisualEdge> (currentDisplay.Data, currentDisplay.Data.Focused);

                var contentViewManager = this.ContentViewManager;

                if (contentViewManager.SheetViewer == currentDisplay)
                {
                    contentViewManager.SheetViewer = AdjacentDisplay(currentDisplay);
                }

                contentViewManager.ShowViewer(currentDisplay, eventArgs);
            }
            if (Backend != null)
            {
                Backend.GraphContentView();
            }
        }