public void AddMeasurementToCollection(GraphLineCollection coll, string Graphname, string SymbolName, DateTime Timestamp, float value, float minrange, float maxrange, Color linecolor)
        {
            bool _linefound = false;

            foreach (GraphLine line in coll)
            {
                if (line.Symbol == SymbolName)
                {
                    _linefound = true;
                    //                    if (value < minrange) minrange = value - 5;
                    //                    if (value > maxrange) maxrange = value + 5;

                    line.AddPoint(value, Timestamp, minrange, maxrange, linecolor);
                    break;
                }
            }
            if (!_linefound)
            {
                GraphLine _newline = new GraphLine();
                _newline.Symbol      = SymbolName;
                _newline.ChannelName = Graphname;
                _newline.Clear();
                coll.Add(_newline);
                _newline.AddPoint(value, Timestamp, minrange, maxrange, linecolor);
                _newline.LineVisible = GetRegistryValue(Graphname);
            }
        }
        public void AddMeasurement(string Graphname, string SymbolName, DateTime Timestamp, float value, float minrange, float maxrange, Color linecolor)
        {
            bool _linefound = false;

            //Console.WriteLine(Graphname + " " + SymbolName + " " + value.ToString());
            foreach (GraphLine line in _lines)
            {
                if (line.Symbol == SymbolName)
                {
                    _linefound = true;
//                    if (value < minrange) minrange = value - 5;
//                    if (value > maxrange) maxrange = value + 5;

                    line.AddPoint(value, Timestamp, minrange, maxrange, linecolor);
                    break;
                }
            }
            if (!_linefound)
            {
                GraphLine _newline = new GraphLine();
                _newline.Symbol      = SymbolName;
                _newline.ChannelName = Graphname;
                _newline.Clear();
                _lines.Add(_newline);
//                if (value < minrange) minrange = value;
//                if (value > maxrange) maxrange = value;
                _newline.AddPoint(value, Timestamp, minrange, maxrange, linecolor);
                // set visible or invisible according to registry setting
                _newline.LineVisible = GetRegistryValue(Graphname);
            }
        }
        public void AddMeasurementToCollection(GraphLineCollection coll, string Graphname, string SymbolName, DateTime Timestamp, float value, float minrange, float maxrange, Color linecolor)
        {
            bool _linefound = false;
            foreach (GraphLine line in coll)
            {
                if (line.Symbol == SymbolName)
                {
                    _linefound = true;
                    //                    if (value < minrange) minrange = value - 5;
                    //                    if (value > maxrange) maxrange = value + 5;

                    line.AddPoint(value, Timestamp, minrange, maxrange, linecolor);
                    break;
                }
            }
            if (!_linefound)
            {
                GraphLine _newline = new GraphLine();
                _newline.Symbol = SymbolName;
                _newline.ChannelName = Graphname;
                _newline.Clear();
                coll.Add(_newline);
                _newline.AddPoint(value, Timestamp, minrange, maxrange, linecolor);
                _newline.LineVisible = GetRegistryValue(Graphname);
            }
        }