Ejemplo n.º 1
0
        private void uselessButton_Click(object sender, EventArgs e)
        {
            TextTableLoader tl = new TextTableLoader();

            tl.Load(this.uselessTextbox.Text);
        }
Ejemplo n.º 2
0
        private bool loadTables(ref TextTableLoader _textTableLoader, string _tablePath)
        {
            _textTableLoader = new TextTableLoader();

            bool properLoaded = _textTableLoader.Load(_tablePath);

            return properLoaded;
        }
Ejemplo n.º 3
0
        private bool loadTables(string _tablePath = "./Data/")
        {
            TextTableLoader tl = new TextTableLoader();

            bool properLoaded = tl.Load(_tablePath + "pdg.dat");

            #region tymczasowe wczytywanie danych z list do stringow
            string tmp2 = ""; //wynikowy string dla nazw wierszy(tymczasowy)
            string tmp3 = ""; //wynikowy string dla nazw kolumn(tymczasowy)
            string tmp4 = ""; //wynikowy string dla danych(tymczasowy)

            foreach (string rowName in tl.rowHeaders)
            {
                tmp2 += rowName + " ";
            }

            foreach (string columnName in tl.columnHeaders)
            {
                tmp3 += columnName + " ";
            }

            foreach (List<string> row in tl.rowsData)
            {
                foreach (string rowData in row)
                {
                    tmp4 += rowData + " ";
                }

                tmp4 += '\n';
            }
            #endregion

            //wyniki(tymczasowe)
            if (MessageBox.Show(tmp2, "Wiersze: " + tl.rowNumber.ToString()) == DialogResult.OK)
            {
                if (MessageBox.Show(tmp3, "Kolumny: " + tl.columnNumber.ToString()) == DialogResult.OK)
                {
                    MessageBox.Show(tmp4, "Dane");
                }
            }

            properLoaded = tl.Load(_tablePath + "wyd.dat");

            #region tymczasowe wczytywanie danych z list do stringow
            tmp2 = ""; //wynikowy string dla nazw wierszy(tymczasowy)
            tmp3 = ""; //wynikowy string dla nazw kolumn(tymczasowy)
            tmp4 = ""; //wynikowy string dla danych(tymczasowy)

            foreach (string rowName in tl.rowHeaders)
            {
                tmp2 += rowName + " ";
            }

            foreach (string columnName in tl.columnHeaders)
            {
                tmp3 += columnName + " ";
            }

            foreach (List<string> row in tl.rowsData)
            {
                foreach (string rowData in row)
                {
                    tmp4 += rowData + " ";
                }

                tmp4 += '\n';
            }
            #endregion

            //wyniki(tymczasowe)
            if (MessageBox.Show(tmp2, "Wiersze: " + tl.rowNumber.ToString()) == DialogResult.OK)
            {
                if (MessageBox.Show(tmp3, "Kolumny: " + tl.columnNumber.ToString()) == DialogResult.OK)
                {
                    MessageBox.Show(tmp4, "Dane");
                }
            }

            return properLoaded;
        }