Example #1
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib ();

            m_colorBackground = GuiUtils.ConvertColor(Colors.LightChartBackground);
            m_colorGrid = GuiUtils.ConvertColor(Colors.LightChartGrid);
            m_colorAxis = GuiUtils.ConvertColor (Colors.LightChartAxis);
            m_colorMouse = GuiUtils.ConvertColor(Colors.LightChartMouse);
            m_colorDownloadGraph = GuiUtils.ConvertColor(Colors.LightChartLineDownload);
            m_colorDownloadLine = GuiUtils.ConvertColor(Colors.LightChartLineDownload);
            m_colorUploadGraph = GuiUtils.ConvertColor(Colors.LightChartLineUpload);
            m_colorUploadLine = GuiUtils.ConvertColor(Colors.LightChartLineUpload);
            //m_colorLegendText = GuiUtils.ConvertColor(Colors.LightChartLegend);
            m_colorDownloadText = GuiUtils.ConvertColor(Colors.LightChartLineDownload);
            m_colorUploadText = GuiUtils.ConvertColor(Colors.LightChartLineUpload);

            m_font = NSFont.FromFontName ("Menlo", 10);

            m_chart = Engine.Instance.Stats.Charts.ChartsList[m_chartIndex];

            Engine.Instance.Stats.Charts.UpdateEvent += new Core.UI.Charts.UpdateHandler(Charts_UpdateEvent);
        }
Example #2
0
        public ChartSpeed()
        {
            m_penGrid = new Pen(Colors.LightChartGrid, 1);
            m_penMouse = new Pen(Colors.LightChartMouse, 1);
            m_brushMouse = new SolidBrush(Colors.LightChartMouse);
            m_penDownloadGraph = new Pen(Colors.LightChartLineDownload, 1);
            m_penDownloadLine = new Pen(Colors.LightChartLineDownload, 1);
            m_penUploadGraph = new Pen(Colors.LightChartLineUpload, 1);
            m_penUploadLine = new Pen(Colors.LightChartLineUpload, 1);
            //m_brushLegendText = new SolidBrush(Colors.LightChartLegend);
            m_brushDownloadText = new SolidBrush(Colors.LightChartLineDownload);
            m_brushUploadText = new SolidBrush(Colors.LightChartLineUpload);

            FontLabel = new Font("Small Fonts", 7);

            formatRight = new StringFormat();
            formatRight.Alignment = StringAlignment.Far;
            formatRight.LineAlignment = StringAlignment.Center;
            formatBottomRight = new StringFormat();
            formatBottomRight.Alignment = StringAlignment.Far;
            formatBottomRight.LineAlignment = StringAlignment.Far;
            formatBottomLeft = new StringFormat();
            formatBottomLeft.Alignment = StringAlignment.Near;
            formatBottomLeft.LineAlignment = StringAlignment.Far;
            formatTopRight = new StringFormat();
            formatTopRight.Alignment = StringAlignment.Far;
            formatTopRight.LineAlignment = StringAlignment.Near;
            formatTopLeft = new StringFormat();
            formatTopLeft.Alignment = StringAlignment.Near;
            formatTopLeft.LineAlignment = StringAlignment.Near;
            formatTopCenter = new StringFormat();
            formatTopCenter.Alignment = StringAlignment.Center;
            formatTopCenter.LineAlignment = StringAlignment.Near;

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

            m_chart = Engine.Instance.Stats.Charts.ChartsList[m_chartIndex];

            Engine.Instance.Stats.Charts.UpdateEvent += new Core.UI.Charts.UpdateHandler(Charts_UpdateEvent);
        }
Example #3
0
        public void Switch(int chartIndex)
        {
            m_chartIndex = chartIndex;
            if ((m_chartIndex < 0) || (m_chartIndex >= Engine.Instance.Stats.Charts.ChartsList.Count))
                m_chartIndex = 0;

            m_chart = Engine.Instance.Stats.Charts.ChartsList[m_chartIndex];

            NeedsDisplay = true;
        }
Example #4
0
        public void Switch(int chartIndex)
        {
            m_chartIndex = chartIndex;
            if( (m_chartIndex<0) || (m_chartIndex >= Engine.Instance.Stats.Charts.ChartsList.Count) )
                m_chartIndex = 0;

            m_chart = Engine.Instance.Stats.Charts.ChartsList[m_chartIndex];

            Invalidate();
        }