Example #1
0
 /// <summary>
 /// Processes basic modeling chart selection and prepares windows for displaying the chart
 /// </summary>
 private void PrepareBasicCharts()
 {
     if (type != MovementModelingType.Basic)
     {
         return;
     }
     numberOfDotsChart          = new ChartWindow();
     numberOfDotsChart.Closing += (sender, e) => numberOfDotsChart = null;
 }
Example #2
0
        /// <summary>
        /// Processes selected types of sandpile chart and prepares windows for displaying these charts
        /// </summary>
        private void PrepareSandpileCharts()
        {
            if (type != MovementModelingType.Sandpile)
            {
                return;
            }
            if (SandpileChartTypes.Contains(SandpileChartType.NumberOfDotsChart))
            {
                numberOfDotsChart = new ChartWindow();
            }

            if (SandpileChartTypes.Contains(SandpileChartType.AvalancheSizesDistributionChart))
            {
                distributionChart = new ChartWindow();
                avalanche         = new bool[digraph.Vertices.Count];
                MovementEnded    += delegate
                {
                    AddAvalancheSize();
                    avalanche = new bool[digraph.Vertices.Count];
                };
                distributionChart.AvalancheSizesDistributionChartPrepare();
                distributionChart.Closing += (sender, e) => distributionChart = null;
            }
        }