Esempio n. 1
0
        /// <summary>
        /// Refreshes all exist informations (without lbxData)
        /// </summary>
        private void RefreshResults()
        {
            Data data = listData.ElementAt(selectedData);

            //Aktualizowanie wyświtlanych informacji
            lblDataAverage.Text  = data.Average().ToString();
            lblDataVariance.Text = data.Variance().ToString();
            lblDataMin.Text      = data.Min().ToString();
            lblDataMax.Text      = data.Max().ToString();
            listPages.ElementAt(selectedData).Text = data.GetFileName();
            this.chart = new SpecialChart(chartData, listData.ElementAt(selectedData));

            //Odpowiednie wypisanie ilości wyników
            if (data.GetDataLenght() == 1)
            {
                this.listDataGUI.ElementAt(selectedData).Setlbl(data.GetDataLenght().ToString() + " wynik");
            }
            if (data.GetDataLenght() < 5 && data.GetDataLenght() > 1)
            {
                this.listDataGUI.ElementAt(selectedData).Setlbl(data.GetDataLenght().ToString() + " wyniki");
            }
            if (data.GetDataLenght() > 4)
            {
                this.listDataGUI.ElementAt(selectedData).Setlbl(data.GetDataLenght().ToString() + " wyników");
            }
            this.chart.SetNewDataToChart(data);
        }
Esempio n. 2
0
        public FormAdvancedChart(Data data)
        {
            InitializeComponent();
            this.MinimumSize = new System.Drawing.Size(900, 350);
            CreateListSettings();
            CreateColorsList();

            this.data  = data;
            this.chart = new SpecialChart(chartFromData, this.data, true);

            // Tworzenie list rozwijanych
            foreach (var item in listSettings)
            {
                item.cbo.ValueMember   = "color";
                item.cbo.DisplayMember = "PL";
                item.cbo.DataSource    = item.ColorList;
                item.cbo.SelectedValue = item.color;
            }

            // Ustawienie wartości minimalnej w textbox
            tboxYMinValue.Text   = chart.GetYMin().ToString();
            lblYMinERROR.Visible = false;
        }