Example #1
0
 private void msr_sample_Click(object sender, RoutedEventArgs e)
 {
     TheConverter.MSR_showSample();
     TheSys.showError("Link: http://research.microsoft.tcom/en-us/um/people/zliu/ActionRecoRsrc/default.htm");
     TheSys.showError("Below is an example of data");
     TheSys.showError("");
     foreach (String s in TheTool.read_File_getListString(TheURL.url_tv_sample_msr))
     {
         TheSys.showError(s);
     }
 }
Example #2
0
 private void butConvertVerLab_Click(object sender, RoutedEventArgs e)
 {
     foreach (DataRow r in dataTable.Rows)
     {
         try
         {
             string path_origin = r[col_path].ToString();
             TheTool.Folder_CreateIfMissing(path_folder_convert);
             string path_save = path_folder_convert + TheTool.getFileName_byPath(path_origin) + ".csv";
             TheConverter.Verlab_convertFile(path_origin, path_save);
         }
         catch (Exception ex) { TheSys.showError(r[col_path].ToString() + " : " + ex.ToString()); }
     }
     System.Windows.MessageBox.Show(@"Save to file\[Convert]\");
 }
Example #3
0
 private void butConvertMSRAction_Click(object sender, RoutedEventArgs e)
 {
     foreach (DataRow r in dataTable.Rows)
     {
         try
         {
             string path_origin = r[col_path].ToString();
             TheTool.Folder_CreateIfMissing(path_folder_convert);
             //-----------
             string sub_folder = path_folder_convert + "MSRAction " + TheTool.splitText(TheTool.getFileName_byPath(path_origin), "_")[0];
             TheTool.Folder_CreateIfMissing(sub_folder);
             //-----------
             string path_save = sub_folder + @"\" + TheTool.getFileName_byPath(path_origin) + ".csv";
             TheUKI.saveData_Raw(path_save, TheConverter.MSRAction_convert(path_origin));
         }
         catch (Exception ex) { TheSys.showError(r[col_path].ToString() + " : " + ex.ToString()); }
     }
     System.Windows.MessageBox.Show(@"Save to file\[Convert]\");
 }
Example #4
0
        private void butBrowse_Click(object sender, RoutedEventArgs e)
        {
            Nullable <bool> openDialog = TheTool.openFileDialog_01(false, ".*", "");

            if (openDialog == true && TheTool.dialog.FileNames.Count() > 0)
            {
                this.fileFullPath = TheTool.dialog.FileNames[0];
                this.fileFolder   = System.IO.Path.GetDirectoryName(fileFullPath);
                this.fileName     = TheTool.getFileName_byPath(fileFullPath);
                Title             = TheTool.getFileName_byPath(fileName);
                List <UKI_DataRaw> data = new List <UKI_DataRaw>();
                if (TheTool.getExtension_byPath(this.fileFullPath) == ".csv")
                {
                    data.AddRange(TheUKI.csv_loadFileTo_DataRaw(fileFullPath, 0));
                    if (checkFPSauto.IsChecked.Value)
                    {
                        txtFPS.Text = "20";
                    }
                }
                else if (TheTool.getExtension_byPath(this.fileFullPath) == ".bvh")
                {
                    data.AddRange(TheConverter.BVH_convert(fileFullPath));
                    TheUKI.saveData_Raw(fileFolder + @"/" + fileName + "(copy).csv", data);
                    if (checkFPSauto.IsChecked.Value)
                    {
                        txtFPS.Text = "120";
                    }
                }
                if (checkCamera.IsChecked.Value)
                {
                    data = TheUKI.UKI_DataRaw_centerize(data, 3);
                }
                loadData(data);
                txtMark.Text = "";
                mark_count   = 0;
            }
        }
Example #5
0
 private void butMsrConv_Click(object sender, RoutedEventArgs e)
 {
     TheConverter.MSR_convertFile(dataTable, col_path, path_folder_convert);
 }
Example #6
0
 private void msr_sample_Click(object sender, RoutedEventArgs e)
 {
     TheConverter.MSR_showSample();
 }