private void openenToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog of = new OpenFileDialog(); of.FileName = ""; of.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); of.Filter = "Playbackband bestanden|*.pbb"; if (of.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { return; } backgroundWorker1.RunWorkerAsync(); File f = new File(of.FileName); currentPBB = f.Open(); currentPBB.Filename = of.FileName; WorkingControlsEnabled(true); UpdateView(); backgroundWorker1.CancelAsync(); }
public CustomExport(Playbackband pbb, string filename, bool multifiles) { InitializeComponent(); PBBRenderer.Instance = new PBBRenderer(File.defaultDir, filename, multifiles); PBBRenderer.Instance.Updated += Instance_Updated; WAVFile.Updated += Instance_Updated; PBBRenderer.Instance.Start(); startTime = DateTime.Now; timer1.Enabled = true; for (int i = 0; i < pbb.Blokken.Count; i++) { for (int j = 0; j < pbb.Blokken[i].Fragmenten.Count; j++) { if (!pbb.Blokken[i].Fragmenten[j].IsDummy()) { PBBRenderer.Instance.AddFragment(pbb.Blokken[i].Fragmenten[j]); } } } PBBRenderer.Instance.StopWhenDone(); }
public LiedjeControl(Playbackband current) { InitializeComponent(); label4.Text = ""; comboBox1.SelectedIndex = 0; this.currentPBB = current; }
public PlayAll(Playbackband pbb, string directoryToUse) { InitializeComponent(); this.directoryToUse = directoryToUse; playbackband = pbb; //play_thread = new System.Threading.Thread(backgroundWorker1_DoWork); //play_thread.SetApartmentState(System.Threading.ApartmentState.STA); player1 = new MediaPlayer(); player2 = new MediaPlayer(); }
public Export(Playbackband pbb) { InitializeComponent(); liedjes = new List <Fragment>(); errors = new List <string>(); for (int i = 0; i < pbb.Blokken.Count; i++) { for (int j = 0; j < pbb.Blokken[i].Fragmenten.Count; j++) { liedjes.Add(pbb.Blokken[i].Fragmenten[j]); } } aantal_liedjes = liedjes.Count; }
public EditPBB(Playbackband pbb) { InitializeComponent(); Roman = new Dictionary <int, string>(); Roman.Add(1, "I"); Roman.Add(2, "II"); Roman.Add(3, "III"); Roman.Add(4, "IV"); Roman.Add(5, "V"); Roman.Add(6, "VI"); Roman.Add(7, "VII"); Roman.Add(8, "VIII"); bloks = new List <BlokInfo>(); legeBlokken = new List <int>(); legeFragmenten = new List <int[]>(); }
public Wisselen(Playbackband currentPBB) { InitializeComponent(); int nummers_in_pbb = 0; for (int i = 0; i < currentPBB.Blokken.Count; i++) { nummers_in_pbb += currentPBB.Blokken[i].AantalInBlok; } numericUpDown1.Maximum = nummers_in_pbb; numericUpDown2.Maximum = nummers_in_pbb - 1; pbb = currentPBB; numericUpDown1.Value = 1; numericUpDown2.Value = 2; }
private void nieuwToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sf = new SaveFileDialog(); sf.FileName = "example.pbb"; sf.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); sf.Filter = "Playbackband bestanden|*.pbb"; if (sf.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { return; } newPBB npbb = new newPBB(); npbb.Filename = sf.FileName; if (npbb.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { return; } backgroundWorker1.RunWorkerAsync(); currentPBB = new Playbackband(sf.FileName); for (int i = npbb.Blokken.Count - 1; i > -1; i--) { currentPBB.AddBlok(((BlokInfo)npbb.Blokken[i]).Naam, (int)((BlokInfo)npbb.Blokken[i]).AantalNummers); } currentPBB.Save(); WorkingControlsEnabled(true); UpdateView(); backgroundWorker1.CancelAsync(); }
public LiedjeControl(Fragment song, Playbackband current) { InitializeComponent(); label4.Text = ""; liedje = song; this.rodeDraad = song.RodeDraad; this.currentPBB = current; DateTime t = new DateTime(1990, 1, 1); if (liedje.BeginTijd != t) { label3.Text = GetTimeFromDouble((liedje.BeginTijd - new DateTime(2000, 1, 1)).TotalSeconds).ToString("mm.ss") + " - " + GetTimeFromDouble((liedje.EindTijd - new DateTime(2000, 1, 1)).TotalSeconds).ToString("mm.ss"); } else { label3.Text = "00.00 - 00.00"; } UpdateView(); comboBox1.SelectedIndex = this.rodeDraad; }
private void AnalysePBB(Playbackband pbb) { // Vind lege blokken en fragmenten en markeer deze for (int i = 0; i < pbb.Blokken.Count; i++) { bool emptyBlok = true; for (int j = 0; j < pbb.Blokken[i].Fragmenten.Count; j++) { if (pbb.Blokken[i].Fragmenten[j].IsDummy()) { legeFragmenten.Add(new int[] { i, j }); } else { emptyBlok = false; } } if (emptyBlok) { legeBlokken.Add(i); } } }