Esempio n. 1
0
 public NodeModel(ViewModel model, XNodeIn xNode)
 {
     Model = model;
     XNode = xNode;
     Name = XNode.Name;
     ID = XNode.ID;
     ObjType = XNode.ObjType;
 }
Esempio n. 2
0
        public GraphSet(ViewModel model, NodeModel root, NodeModel container=null, int depth = -1)
        {
            Model = model;
            GraphMode = Model.GraphMode;
            GraphContainer = container;

            // iternate nodes at this zoom level
            if (GraphMode == CallGraphMode.Intermediates)
            {
                AddDependencyNodes();
            }

            else if (GraphMode == CallGraphMode.Layers)
            {
                foreach (var child in root.Nodes)
                    AddCalledNodes(child, true, 0);
            }

            else
            {
                AddCalledNodes(root, true, depth);

                if (GraphContainer == null)
                {
                    if (Model.ShowOutside || CenterMap.Count == 1) // prevent blank screen
                        AddCalledNodes(Model.InternalRoot, false);

                    if (Model.ShowExternal)
                        AddCalledNodes(Model.ExternalRoot, false);
                }
            }

            // process subsets before building graphs so we can prune empty subset graphs
            if (GraphMode == CallGraphMode.Layers)
            {
                foreach (var child in root.Nodes)
                    Subsets[child.ID] = new GraphSet(Model, child, child);
            }

            else if (GraphMode == CallGraphMode.Class &&
                     Model.ShowMethods &&
                     GraphContainer == null)
            {
                foreach (var classNode in PositionMap.Values)
                    Subsets[classNode.ID] = new GraphSet(Model, classNode, classNode, 1);
            }

            if (PositionMap.Count > 0)
            {
                BuildGraphs();

                if (Graphs.Count > 0)
                    LayoutGraphs();
            }
        }
Esempio n. 3
0
        public GdiRenderer(ViewModel model)
        {
            Model = model;

            InitializeComponent();

            MouseWheel += GdiRenderer_MouseWheel;

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            LabelFormat.Trimming = StringTrimming.EllipsisCharacter;
            LabelFormat.FormatFlags |= StringFormatFlags.NoWrap;
        }
Esempio n. 4
0
        public GLRenderer(ViewModel model)
        {
            Model = model;

            Load += GLRenderer_Load;
            Paint += GLRenderer_Paint;
            Resize += GLRenderer_Resize;

            MouseWheel += new MouseEventHandler(GLRenderer_MouseWheel);
            MouseDown += new MouseEventHandler(GLRenderer_MouseDown);
            MouseUp += new MouseEventHandler(GLRenderer_MouseUp);
            MouseMove += new MouseEventHandler(GLRenderer_MouseMove);
            MouseDoubleClick += new MouseEventHandler(GLRenderer_MouseDoubleClick);
            KeyDown += new KeyEventHandler(GLRenderer_KeyDown);
            KeyUp += new KeyEventHandler(GLRenderer_KeyUp);
            MouseLeave += new EventHandler(GLRenderer_MouseLeave);

            ClientRect = ClientRectangle;
        }
        public GibsonRenderer(ViewModel model)
        {
            Model = model;

            Load += GLRenderer_Load;
            Paint += GLRenderer_Paint;
            Resize += GLRenderer_Resize;

            KeyDown += new KeyEventHandler(FpsRenderer_KeyDown);
            KeyUp += new KeyEventHandler(FpsRenderer_KeyUp);
            MouseDown += new MouseEventHandler(FpsRenderer_MouseDown);
            MouseUp += new MouseEventHandler(FpsRenderer_MouseUp);
            Leave += new EventHandler(FpsRenderer_Leave);
            MouseMove += new MouseEventHandler(FpsRenderer_MouseMove);
            MouseDoubleClick += new MouseEventHandler(FpsRenderer_MouseDoubleClick);
            MouseWheel += new MouseEventHandler(FpsRenderer_MouseWheel);

            LogicTimer = new Timer();
            LogicTimer.Interval = 1000 / LogicFPS;
            LogicTimer.Tick += new EventHandler(LogicTimer_Tick);
            LogicTimer.Enabled = true;
        }
Esempio n. 6
0
 public void Init(MainForm main)
 {
     Main = main;
     Model = main.Model;
 }
Esempio n. 7
0
 public NodeModel(ViewModel model)
     : this(model, new XNodeIn())
 {
     // used to create intermediate nodes
 }