Esempio n. 1
0
 /// <summary>
 /// Observer which is receiving every item from sequence and pushing it to VisualizerItemHandler
 /// </summary>
 /// <param name="sequenceName">Text for label</param>
 /// <param name="stringifier">Function which transform any input data to string</param>
 /// <param name="mapper">Mark appearance controller</param>
 /// <returns></returns>
 private static IObserver <T> GetReceiver <T>(InjectionData <T> injectionData)
 {
     return(Observer.Create <T>(
                data => VisualizerItemHandler.Handle(injectionData.sequenceName, injectionData.stringifier(data), injectionData.mapper.GetMark(data)),
                exception => VisualizerItemHandler.Handle(injectionData.sequenceName, exception),
                () => VisualizerItemHandler.Handle(injectionData.sequenceName)));
 }
Esempio n. 2
0
        private void OnGUI()
        {
            DrawLayout();

            var noLayoutRect = new Rect(0, 50, position.width, position.height - 50);

            GUILayout.BeginArea(noLayoutRect);

            Drawer.DrawLines(
                rect: noLayoutRect,
                countOfLines: VisualizerItemHandler.CountOfContainers(),
                yAxisShift: _origin.y,
                distanceBetweenLines: DistanceBetweenLines);

            DrawItems();

            GUILayout.EndArea();

            HandleMouseDrag();
        }
Esempio n. 3
0
 /// Revert state to initial
 private static void Revert()
 {
     VisualizerItemHandler.Clear();
     _origin = DefaultOrigin;
 }