Exemplo n.º 1
0
 public StdThresholdZRDI(string basePath, string name, RGB colour, string trackedPath, float minThreshold, float maxThreshold)
     : base(basePath, name, colour, minThreshold, maxThreshold)
 {
     TrackedPath = trackedPath;
 }
 protected void ItemColourRandomButton_Click()
 {
     SetItemColour(RGB.RandomHueRGB());
 }
Exemplo n.º 3
0
 public StdThresholdZRDI(string basePath, string name)
     : base(basePath, name, RGB.RandomHueRGB(), 0.0f, 0.0f)
 {
 }
        private void FillNode(TreemapNode n, RectD nBounds, RectD vBounds, double pxX, double pxY, int depth)
        {
            if (Overlaps(nBounds, vBounds))
            {
                GLTexture tex = n.Texture;
                if (tex != null && tex.Valid)
                {
                    OpenGL.glEnd();
                    OpenGL.glEnable(OpenGL.GL_TEXTURE_2D);
                    OpenGL.glDisable(OpenGL.GL_BLEND);
                    tex.Bind();

                    OpenGL.glColor3f(1.0f, 1.0f, 1.0f);
                    OpenGL.glBegin(OpenGL.GL_QUADS);
                }
                else
                {
                    RGB col = new RGB(new HSV(depth * (1.0f / 6.0f), 0.5f - depth / 256.0f, 1));
                    OpenGL.glColor3f(col.r, col.g, col.b);
                }

                {
                    OpenGL.glTexCoord2f(0.0f, 0.0f);
                    OpenGL.glVertex2f((float)nBounds.Left, (float)nBounds.Top);

                    OpenGL.glTexCoord2f(0.0f, 1.0f);
                    OpenGL.glVertex2f((float)nBounds.Left, (float)nBounds.Bottom);

                    OpenGL.glTexCoord2f(1.0f, 1.0f);
                    OpenGL.glVertex2f((float)nBounds.Right, (float)nBounds.Bottom);

                    OpenGL.glTexCoord2f(1.0f, 0.0f);
                    OpenGL.glVertex2f((float)nBounds.Right, (float)nBounds.Top);
                }

                if (tex != null && tex.Valid)
                {
                    OpenGL.glEnd();
                    tex.Unbind();
                    OpenGL.glDisable(OpenGL.GL_TEXTURE_2D);
                    OpenGL.glEnable(OpenGL.GL_BLEND);
                    OpenGL.glBegin(OpenGL.GL_QUADS);
                }

                RectD conBounds = new RectD(
                    nBounds.Left + nBounds.Width * 0.01f,
                    nBounds.Top + nBounds.Height * 0.03f,
                    nBounds.Right - nBounds.Width * 0.01f,
                    nBounds.Bottom - nBounds.Height * 0.01f);

                for (int i = 0, c = n.Children.Count; i != c; ++i)
                {
                    TreemapNode cn = n.Children[i];

                    RectD cBounds = new RectD(
                        cn.Bounds.Left * conBounds.Width + conBounds.Left,
                        cn.Bounds.Top * conBounds.Height + conBounds.Top,
                        cn.Bounds.Right * conBounds.Width + conBounds.Left,
                        cn.Bounds.Bottom * conBounds.Height + conBounds.Top);

                    if (cBounds.Width > pxX * 5)
                    {
                        cBounds.Left  += pxX * m_pxNodeMargin;
                        cBounds.Right -= pxX * m_pxNodeMargin;
                    }

                    if (cBounds.Height > pxY * 5)
                    {
                        cBounds.Top    += pxY * m_pxNodeMargin;
                        cBounds.Bottom -= pxY * m_pxNodeMargin;
                    }

                    FillNode(cn, cBounds, vBounds, pxX, pxY, depth + 1);
                }
            }
        }
 protected virtual void SetItemColour(RGB colour)
 {
     RDI.Colour = colour;
     LogControl.InvalidateGraphControl();
 }
 public UserMarkerZRDI(string basePath, string name, RGB colour, UserMarker fromMarker, UserMarker toMarker)
     : base(basePath, name, colour)
 {
     FromMarker = fromMarker;
     ToMarker   = toMarker;
 }
Exemplo n.º 7
0
 public void SetSingleOrdiColour(RGB rgb)
 {
     m_singleOrdiColour = rgb;
     m_logControl.InvalidateGraphControl();
 }
 public FPSTargetLineRDI(string path, float value, RGB colour)
     : base(path, String.Format("{0:g}", value), value, colour, 1.0f, ELabelLocation.ELL_Left)
 {
     ValueIsFPS    = true;
     NameFromValue = true;
 }
 protected override void SetItemColour(RGB colour)
 {
     base.SetItemColour(colour);
     itemColourButton.BackColor = colour.ConvertToSysDrawCol();
 }
 public ZoneHighlighterRDI(string basePath, string name, RGB colour)
     : base(basePath, name, 1.0f)
 {
     Colour = colour;
 }
 public TargetLineRDI(string basePath, string name, float value, RGB colour, ELabelLocation labelLocation)
     : this(basePath, name, value, colour, 1.0f, labelLocation)
 {
 }
Exemplo n.º 12
0
            string GetCanvasTargetLineString(float value, string name, bool textRight, RGB rgb, float graphStartX, float graphStartY, float graphWidth, float graphHeight, float graphScaleY)
            {
                float y = graphStartY + graphHeight - value * graphScaleY;

                string ret = "";

                if (y >= graphStartY)
                {
                    ret += "context.strokeStyle = '" + string.Format("rgb({0},{1},{2})", (int)(rgb.r * 255.0f), (int)(rgb.g * 255.0f), (int)(rgb.b * 255.0f)) + "';\n";
                    ret += "context.beginPath();\n";
                    ret += string.Format("context.moveTo({0}, {1});\n", graphStartX, y);
                    ret += string.Format("context.lineTo({0}, {1});\n", graphStartX + graphWidth, y);
                    ret += "context.stroke();\n";
                    ret += "context.closePath();\n";
                    ret += "context.textBaseline = 'middle';\n";
                    ret += "context.fillStyle = '" + string.Format("rgb({0},{1},{2})", (int)(rgb.r * 255.0f), (int)(rgb.g * 255.0f), (int)(rgb.b * 255.0f)) + "';\n";
                    ret += string.Format("context.fillText(\"{0:n0}\", {1}, {2});\n", name, textRight ? graphStartX + graphWidth + 10 : graphStartX - 25, y);
                }

                return(ret);
            }
Exemplo n.º 13
0
 string GetCanvasTargetLineString(float value, RGB rgb, float graphStartX, float graphStartY, float graphWidth, float graphHeight, float graphScaleY)
 {
     return(GetCanvasTargetLineString(value, value.ToString(), false, rgb, graphStartX, graphStartY, graphWidth, graphHeight, graphScaleY));
 }
Exemplo n.º 14
0
 public LogViewSerializeState(UserMarker startUM, UserMarker endUM, RGB singleORDIColour)
 {
     StartUM          = startUM;
     EndUM            = endUM;
     SingleORDIColour = singleORDIColour;
 }
Exemplo n.º 15
0
        //bool m_nonNumberEntered;

        public LogControl(List <LogRange> logRanges, StatoscopeForm statoscopeForm)
        {
            m_statoscopeForm = statoscopeForm;

            InitializeComponent();
            InitializeDisplayScales();

            if (components == null)
            {
                components = new Container();
            }

            intervalPath.Text = "";

            Dock = DockStyle.Fill;

            m_ordiTree = new OverviewRDI();
            m_prdiTree = new ProfilerRDI();
            m_urdiTree = new UserMarkerRDI();
            m_trdiTree = new TargetLineRDI();
            m_zrdiTree = new ZoneHighlighterRDI();

            m_ordiTreeView = new ORDICheckboxTreeView(this, m_ordiTree);
            m_prdiTreeView = new PRDICheckboxTreeView(this, m_prdiTree);
            m_urdiTreeView = new URDICheckboxTreeView(this, m_urdiTree);
            m_trdiTreeView = new TRDICheckboxTreeView(this, m_trdiTree);
            m_zrdiTreeView = new ZRDICheckboxTreeView(this, m_zrdiTree);

            InitializeItemInfoControls();

            foreach (LogRange logRange in logRanges)
            {
                LogView logView = new LogView(this, logRange);

                components.Add(logView);
                m_logViews.Add(logView);
            }

            m_intervalControl         = new IntervalControl();
            m_intervalControl.Dock    = DockStyle.Fill;
            m_intervalControl.Visible = false;

            m_intervalControl.Tree = m_logViews[0].m_logData.IntervalTree;

            m_intervalControl.ViewChanged           += new EventHandler(m_intervalControl_ViewChanged);
            m_intervalControl.ActiveIntervalChanged += new EventHandler(m_intervalControl_ActiveIntervalChanged);

            intervalTreemapTableLayoutPanel.Controls.Add(m_intervalControl, 0, 0);

            m_treemapControl         = new ProfilerTreemapControl(this);
            m_treemapControl.Dock    = DockStyle.Fill;
            m_treemapControl.Visible = false;

            m_treemapControl.SelectionChanged += new EventHandler(m_treemapControl_SelectionChanged);

            intervalTreemapTableLayoutPanel.Controls.Add(m_treemapControl, 0, 1);

            m_OGLGraphingControl                    = new OpenGLGraphingControl(this);
            m_OGLGraphingControl.Dock               = DockStyle.Fill;
            m_OGLGraphingControl.SelectionChanged  += new EventHandler(m_OGLGraphingControl_SelectionChanged);
            m_OGLGraphingControl.SelectedHighlight += new EventHandler(m_OGLGraphingControl_SelectedHighlight);

            displayTableLayoutPanel.Controls.Add(m_OGLGraphingControl, 0, 1);

            logListTableLayoutPanel.SuspendLayout();

            foreach (LogView logView in m_logViews)
            {
                if (m_logViews.Count > 1)
                {
                    logView.SetSingleOrdiColour(RGB.RandomHueRGB());
                }

                LogListItem logListItem = new LogListItem(logView);
                logListTableLayoutPanel.Controls.Add(logListItem);
            }

            logListTableLayoutPanel.ResumeLayout();

            m_spikeFinder = new SpikeFinder(this);

            overviewTabPage.Controls.Add(new CTVControl(m_ordiTreeView));
            functionProfileTabPage.Controls.Add(new CTVControl(m_prdiTreeView));
            userMarkersTabPage.Controls.Add(new CTVControl(m_urdiTreeView));
            targetLinesTabPage.Controls.Add(new CTVControl(m_trdiTreeView, new TargetLineCTVControlPanel(m_trdiTreeView)));
            spikeFinderTabPage.Controls.Add(m_spikeFinder);
            zoneHighlightersTabPage.Controls.Add(new CTVControl(m_zrdiTreeView, new ZoneHighlighterCTVControlPanel(m_zrdiTreeView)));

            //m_nonNumberEntered = false;

            InitializeTargetLines();
            InitializeZoneHighlighters();

            UpdateControls(0);

            m_OGLGraphingControl.FitViewToFrameRecords();

            AutoEnableTargetLines();
            //CreateSummaryTabPage();	// this will be replaced with a much better Dr Statoscope feature later
        }
 public SignedDifferenceThresholdZRDI(string basePath, string name, RGB colour, string typeNameLower, string typeNameUpper, float minThreshold, float maxThreshold)
     : base(basePath, name, colour, minThreshold, maxThreshold)
 {
     TypeNameLower = typeNameLower;
     TypeNameUpper = typeNameUpper;
 }