private void SetInitialOutputData(MonteCarloWithRanks[] models, int numberOfEvents)
 {
     for (int i = 1; i <= 12; i++)
     {
         TabItem tab = (TabItem)tabMonths.Items[i - 1];
         ((MonthTabItemContent)tab.Content).SetInitialOutputData(models[i], numberOfEvents);
     }
 }
        private void Simulation(Distribution[] distributions)
        {
            double ErrorOfConvergence = double.Parse(txtConvError.Text);
            this.numberOfEvents = string.IsNullOrEmpty(txtCountEvents.Text) ? NUMBER_OF_EVENTS_DEFAULT : int.Parse(txtCountEvents.Text);

            // Set Parsed Data
            SetInitialInputData(distributions);

            for (int i = 1; i <= 12; i++)
            {
                // Iniciar la simulacion
                models[i] = new MonteCarloWithRanks(ErrorOfConvergence, distributions[i]);
            }

            // Set Simulated Data
            SetInitialOutputData(models, numberOfEvents);
        }
        public void SetInitialOutputData(MonteCarloWithRanks model, int numberOfEvents)
        {
            myModel = model;
            myDistribution = new Distribution(myModel.MyDistribution.SimulationData, int.Parse(myModel.MyDistribution.Month));
            eventsCount = numberOfEvents;

            ucOutputData.CleanData();
            ucOutputData.CleanDataList();
            ucOutputData.SetConvergenceData(model.ConvergenceAvg, model.ConvergenceDesv, model.ConvergenceValue);

            ListRainPeriods.Clear();
            serieRainPeriod.Title = GetLabelText();
            serieConsumedPeriod2.Title = GetLabelTextConsumePeriod("2");
            serieConsumedPeriod4.Title = GetLabelTextConsumePeriod("4");
            serieConsumedPeriod6.Title = GetLabelTextConsumePeriod("6");
            serieConsumedPeriod8.Title = GetLabelTextConsumePeriod("8");
            serieConsumedRain2.Title = GetLabelTextConsumeRain("2");
            serieConsumedRain4.Title = GetLabelTextConsumeRain("4");
            serieConsumedRain6.Title = GetLabelTextConsumeRain("6");
            serieConsumedRain8.Title = GetLabelTextConsumeRain("8");

            ListConsumePeriod2.Clear();
            ListConsumePeriod4.Clear();
            ListConsumePeriod6.Clear();
            ListConsumePeriod8.Clear();
            List2.Clear();
            List4.Clear();
            List6.Clear();
            List8.Clear();
        }