Пример #1
0
        private IList <DensityTrackbar> CreateConfiguration()
        {
            var ranges = new List <DoubleLimit>();

            foreach (string variableName in variableNames)
            {
                var    values = Content.ProblemData.Dataset.GetDoubleValues(variableName, Content.ProblemData.AllIndices);
                double min, max, interval;
                ChartUtil.CalculateAxisInterval(values.Min(), values.Max(), 10, out min, out max, out interval);
                ranges.Add(new DoubleLimit(min, max));
            }

            var newTrackbars = new List <DensityTrackbar>();

            for (int i = 0; i < variableNames.Count; i++)
            {
                var name         = variableNames[i];
                var trainingData = Content.ProblemData.Dataset.GetDoubleValues(name, Content.ProblemData.TrainingIndices).ToList();

                var dimensionTrackbar = new DensityTrackbar(name, ranges[i], trainingData)
                {
                    Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right
                };
                newTrackbars.Add(dimensionTrackbar);
            }

            return(newTrackbars);
        }
Пример #2
0
 private void DeregisterEvents(DensityTrackbar trackbar)
 {
     trackbar.CheckedChanged -= trackbar_CheckedChanged;
     trackbar.ValueChanged   -= trackbar_ValueChanged;
     trackbar.LimitsChanged  -= trackbar_LimitsChanged;
 }