Esempio n. 1
0
 public void SetGraphViewPanelPos(GraphView listViewPanel, int row, int column)
 {
     listViewPanel.SetValue(Grid.ColumnProperty, column);
     listViewPanel.SetValue(Grid.RowProperty, row);
 }
Esempio n. 2
0
        // Real time graph
        public GraphView ShowGraphView(ListViewPanel panel, DataListener dataListener, bool realTime)
        {
            GraphView graphView = new GraphView(realTime);
            graphView.Interval = 30;
            if (dataListener.DeviceKey == "scada.naidevice")
            {
                graphView.Interval = 60 * 5;
            }
            graphView.AddDataListener(dataListener);

            var columnInfoList = dataListener.GetColumnsInfo();
            string deviceKey = dataListener.DeviceKey;

            foreach (var columnInfo in columnInfoList)
            {
                // Time would be deal as a Chart.
                if (columnInfo.BindingName.ToLower() == "time")
                {
                    continue;
                }

                if (columnInfo.DisplayInChart)
                {
                    graphView.AddLineName(deviceKey, columnInfo.BindingName, columnInfo.Header);
                }
            }

            return graphView;
        }