예제 #1
0
        /// <summary>
        /// The Historgram Constructor
        /// </summary>
        /// <param name="d"></param>
        /// <param name="o"></param>
        public Histogram(DataReader d, HistogramOptions o)
        {
            ArrayList qwert = new ArrayList();
                  qwert = d.inputData;

            if (o.LCLB == true)
            {
               qwert = setLCL(d.inputData, o.LCL);
            }
            if (o.UCLB == true)
            {
                qwert = setUCL(qwert, o.UCL);
            }

            max = getMax(qwert);
            min = getMin(qwert);
            total = qwert.Count;

            if (o.num_binsB == true)
                numBars = o.num_bins;
            else
                numBars = getNumBars(qwert);
            decimalPlaces = getDecimals(qwert);
            width = getClassWidth(min, max, (float)numBars);
            X_Axis = setBins(qwert, numBars, width);
            frequency = getFreq(qwert, numBars, width, X_Axis);
        }
예제 #2
0
        private void go()
        {
            ImageTesterSub testSub = new ImageTesterSub();


            data = "";
            Random random = new Random();

            for (int a = 0; a < 50; a++)
            {
                int z = random.Next(1, 100);
                data = data + z.ToString() + " ";
            }

            DataReader       d   = new DataReader(data);
            HistogramOptions ho  = new HistogramOptions();
            DisplayOptions   opt = new DisplayOptions();
            Histogram        h   = new Histogram(d, ho);

            pic.BackgroundImage = Image.draw(h, pic.Width, pic.Height, opt);


            string alpha = "";

            for (int i = 0; i < d.inputData.Count; i++)
            {
                alpha = alpha + d.inputData[i].ToString() + "\r\n";
            }

            testSub.value(alpha);

            testSub.Visible = true;
        }
예제 #3
0
        /// <summary>
        /// The Historgram Constructor
        /// </summary>
        /// <param name="d"></param>
        /// <param name="o"></param>
        public Histogram(DataReader d, HistogramOptions o)
        {
            ArrayList qwert = new ArrayList();

            qwert = d.inputData;


            if (o.LCLB == true)
            {
                qwert = setLCL(d.inputData, o.LCL);
            }
            if (o.UCLB == true)
            {
                qwert = setUCL(qwert, o.UCL);
            }


            max   = getMax(qwert);
            min   = getMin(qwert);
            total = qwert.Count;

            if (o.num_binsB == true)
            {
                numBars = o.num_bins;
            }
            else
            {
                numBars = getNumBars(qwert);
            }
            decimalPlaces = getDecimals(qwert);
            width         = getClassWidth(min, max, (float)numBars);
            X_Axis        = setBins(qwert, numBars, width);
            frequency     = getFreq(qwert, numBars, width, X_Axis);
        }
예제 #4
0
        /// <summary>
        /// Calls the Input_Data Method when button is pressed, and creates the Histogram.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Input_Data_Button_Click(object sender, EventArgs e)
        {
            if (txtInput_Window.Text != "")
            {
                ho  = new HistogramOptions();
                opt = new DisplayOptions();

                if (Input_Data())
                {
                    Historgram(d);
                    DrawHistoGram(h);
                }
            }
            else if (txtInput_Window.Text == "")
            {
                MessageBox.Show("You must add some data first", "Ok");
            }
        }
예제 #5
0
        /// <summary>
        /// Calls the Input_Data Method when button is pressed, and creates the Histogram.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Input_Data_Button_Click(object sender, EventArgs e)
        {
            if (txtInput_Window.Text != "")
            {
                ho = new HistogramOptions();
                opt = new DisplayOptions();

                if (Input_Data())
                {
                    Historgram(d);
                    DrawHistoGram(h);
                }
            }
            else if (txtInput_Window.Text == "")
            {

                MessageBox.Show("You must add some data first", "Ok");
            }
        }