Esempio n. 1
0
        private void CalculateClick(object sender, EventArgs e)
        {
            if (tree1.SelectedFolders.Length == 0)
            {
                Series[] list = tree1.GetSelectedSeries();
                ProcessSelectedSeries(SeriesProcess.Calculate, list);
            }
            else if (tree1.SelectedFolders.Length == 1)
            {
                SeriesList list = new SeriesList();
                foreach (Series s in tree1.GetSeriesRecursive())
                {
                    list.Add(s);
                }
                ProcessSelectedSeries(SeriesProcess.Calculate, list.ToArray());
            }
            else
            {
                MessageBox.Show("Please select a single folder to calculate.");
                ClearDisplay();
                return;
            }

            //tree1_SelectionChanged(this, EventArgs.Empty);
            DrawBasedOnTreeSelection();
        }
Esempio n. 2
0
        private void CalculateClick(object sender, EventArgs e)
        {
            if (tree1.SelectedFolders.Length == 0)
            {
                Series[] list = tree1.GetSelectedSeries();
                ProcessSelectedSeries(SeriesProcess.Calculate, list);
            }
            else if (tree1.SelectedFolders.Length == 1)
            {
                SeriesList list = new SeriesList();
                foreach (Series s in tree1.GetSeriesRecursive())
                {
                    if (s.Expression != "") // only perform calculations on calculation series with a valid expression
                    {
                        list.Add(s);
                    }
                }
                if (list.Count > 0)
                {
                    ProcessSelectedSeries(SeriesProcess.Calculate, list.ToArray());
                }
                else
                {
                    MessageBox.Show("No Calculation Series found in folder.");
                    ClearDisplay();
                    return;
                }
            }
            else
            {
                MessageBox.Show("Please select a single folder to calculate.");
                ClearDisplay();
                return;
            }

            //tree1_SelectionChanged(this, EventArgs.Empty);
            DrawBasedOnTreeSelection();
        }