Exemple #1
0
        private void AddGraphDetails(DesignedGraph designedGraph, int index)
        {
            int y = (GRAPH_HEIGHT + CONTROL_PADDING) * index;

            if (VScroll)
            {
                y = y - VerticalScroll.Value;
            }

            DataPlot newplot =
                CreatePlot(new Point(CONTROL_LEFT - HorizontalScroll.Value, CONTROL_PADDING + y));

            int left = ClientSize.Width - (KEY_WIDTH + (2 * CONTROL_PADDING));

            if (left < GRAPH_MIN_WIDTH + (2 * CONTROL_PADDING))
            {
                left = GRAPH_MIN_WIDTH + (2 * CONTROL_PADDING);
            }
            DataKey newkey =
                CreateKey(new Point(left - HorizontalScroll.Value, CONTROL_PADDING + y + GRAPH_PADDING));

            foreach (DataSourceItem item in designedGraph.DataSources)
            {
                newkey.DataSourceUUIDsToShow.Add(item.Uuid);
            }
            newplot.DataKey          = newkey;
            newkey.Enter            += new EventHandler(dataKey_Enter);
            newkey.MouseDown        += new MouseEventHandler(dataKey_MouseDown);
            newkey.MouseDoubleClick += new MouseEventHandler(dataKey_MouseDoubleClick);
            newkey.UpdateItems();
            newplot.DisplayName       = designedGraph.DisplayName;
            newplot.MouseDown        += new MouseEventHandler(dataPlot_MouseDown);
            newplot.MouseDoubleClick += new MouseEventHandler(dataPlot_MouseDoubleClick);
            newplot.RefreshBuffer();
        }
Exemple #2
0
 private void PlotNav_RangeChanged()
 {
     DataKey.UpdateItems();
     RefreshBuffer();
 }