Esempio n. 1
0
 private void buttonPhaseSpace_Click(object sender, EventArgs e)
 {
     if (File.Exists(textTrack.Text))
     {
         if (dialogPhaseSpaceOutput.ShowDialog() == DialogResult.OK)
         {
             try {
                 TrackHandler.OutputAsPhaseSpace(textTrack.Text, dialogPhaseSpaceOutput.FileName, numLocaltime.Value);
                 MessageBox.Show("Succeeded to Output", "Notice");
                 refreshFileList();
             } catch (Exception ex) {
                 ErrorLogger.Tell(ex, "Failed");
             }
         }
     }
 }
Esempio n. 2
0
 private void buttonCutAdd_Click(object sender, EventArgs e)
 {
     if (File.Exists(textTrack.Text))
     {
         dialogCutAddOutput.FileName = new StringBuilder().AppendFormat("{0}.{1}{2}.trc", Path.GetFileNameWithoutExtension(textTrack.Text), radioCut.Checked ? "Cut" : "Add", radioHead.Checked ? "Head" : "Tail").ToString();
         if (dialogCutAddOutput.ShowDialog() == DialogResult.OK)
         {
             if (radioCut.Checked)
             {
                 TrackHandler.CutFramesTrackFile(textTrack.Text, dialogCutAddOutput.FileName, (int)numCutAdd.Value, radioTail.Checked);
             }
             else
             {
                 TrackHandler.AddFramesTrackFile(textTrack.Text, dialogCutAddOutput.FileName, (int)numCutAdd.Value, radioTail.Checked);
             }
         }
     }
 }
Esempio n. 3
0
 private void buttonTrimUnnamed_Click(object sender, EventArgs e)
 {
     if (dialogTrimOutput.ShowDialog() == DialogResult.OK)
     {
         textOutput.Text = dialogTrimOutput.FileName;
         try {
             if (TrackHandler.TrimUnnamedFile(textTrack.Text, dialogTrimOutput.FileName))
             {
                 MessageBox.Show("Succeeded to Trim", "Notice");
                 refreshFileList();
             }
             else
             {
                 MessageBox.Show("Error", "Failed");
             }
         } catch (Exception ex) {
             ErrorLogger.Tell(ex, "Failed");
         }
     }
 }
Esempio n. 4
0
 private void buttonConcat_Click(object sender, EventArgs e)
 {
     if (dialogConcatOutput.ShowDialog() == DialogResult.OK)
     {
         textOutput.Text = dialogConcatOutput.FileName;
         try {
             if (TrackHandler.ConcatTrackFile(getTrackFiles(), textOutput.Text))
             {
                 MessageBox.Show("Succeeded to Concatinate", "Notice");
                 refreshFileList();
             }
             else
             {
                 MessageBox.Show("Error", "Failed");
             }
         } catch (Exception ex) {
             ErrorLogger.Tell(ex, "Failed");
         }
     }
 }