예제 #1
0
        private void InitGraph()
        {
            SuspendLayout();

            display.DataSources.Clear();
            display.SetDisplayRangeX(0, 400);

            display.DataSources.Add(new DataSource());
            display.DataSources[0].Name = Item.VarName;
            display.DataSources[0].OnRenderXAxisLabel += RenderXLabel;

            display.PanelLayout           = PlotterGraphPaneEx.LayoutMode.TILES_HOR;
            display.DataSources[0].Length = Item.ActBufferSize;



            if (Item.ActBufferSize > 0)
            {
                float valueAct = float.Parse(Item.GetStringValue(Item.ActBufferSize - 1));
                display.DataSources[0].SetDisplayRangeY(valueAct - 1, valueAct + 1);
            }
            else
            {
                display.DataSources[0].SetDisplayRangeY(-1, 1);
            }

            display.DataSources[0].AutoScaleY       = false;
            display.DataSources[0].AutoScaleX       = false;
            display.DataSources[0].XAutoScaleOffset = 50;
            FillGraph(display.DataSources[0]);
            display.DataSources[0].OnRenderYAxisLabel = RenderYLabel;

            timer1.Start();
        }
예제 #2
0
        private void UpdateWatchView()
        {
            lock (ReaderArduino.lockobj)
            {
                foreach (ListViewItem item in listViewVarDebug.Items)
                {
                    clsVariableInfo ele = item.Tag as clsVariableInfo;

                    if (ele != null)
                    {
                        item.SubItems[5].Text = ele.GetStringValue();
                    }
                }
            }
        }
예제 #3
0
        public void SetItem(clsVariableInfo ItemToSet, clsArduinoReader ReaderArduinoToSet)
        {
            ReaderArduino = ReaderArduinoToSet;

            if (ItemToSet != null)
            {
                Item = ItemToSet;

                lblVarName.Text = Item.VarName;
                lblSize.Text    = Item.Size.ToString();

                txtForceValue.Text = Item.GetStringValue();

                AllowGraph = !(Item.IsArray || Item.IsString);

                if (AllowGraph)
                {
                    InitGraph();
                }


                timer1.Start();
            }
        }