Example #1
0
        //List<int> UKI_getKeyPostureId()
        //{
        //    String[] keyPostureStr = TheTool.splitText(txtUKI_keyID.Text, ",");
        //    List<int> keyPostureId = new List<int> { };
        //    for (int i = 0; i < keyPostureStr.Count(); i++)
        //    {
        //        keyPostureId.Add(TheTool.getInt(keyPostureStr[i]));
        //    }
        //    return keyPostureId;
        //}

        private void butSortIndy_Click(object sender, RoutedEventArgs e)
        {
            foreach (DataRow r in dataTable.Rows)
            {
                string        path        = r[col_path].ToString();
                List <string> list_output = new List <string>();       //keep output
                list_output.Add(TheTool.read_File_getFirstLine(path)); //add header
                //------------------
                List <List <double> > row_col = TheTool.read_File_getListListDouble(path, true);
                List <List <double> > col_row = TheTool.ListList_SwitchColumnToRow(row_col);
                TheTool.SortData(col_row);
                row_col = TheTool.ListList_SwitchColumnToRow(col_row);
                list_output.AddRange(TheTool.getListString(row_col));
                TheTool.exportCSV_orTXT(TheURL.url_saveFolder + TheTool.getFileName_byPath(path) + " (Indy Sort).csv", list_output, false);
            }
            System.Windows.MessageBox.Show("Export to " + TheURL.url_saveFolder);
        }