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; }
public void VerwijderFragment(Fragment fragment) { for (int i = 0; i < blokken.Count; i++) { for (int j = 0; j < blokken[i].Fragmenten.Count; j++) { if (blokken[i].Fragmenten[j] == fragment) { blokken[i].Fragmenten[j] = new Fragment(fragment.Nummer); } } } }
private void button2_Click(object sender, EventArgs e) { if (MessageBox.Show("Weet je zeker dat je het muziek fragment wil verwijderen?", "Playbackband maker", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { //OnRenewMe(); comboBox1.SelectedIndex = 0; this.currentPBB.VerwijderFragment(this.liedje); this.filename = ""; this.liedje = new Fragment(this.liedje.Nummer); this.mp = null; UpdateView(); button1_Click(null, null); button1_Click(null, null); } }
/// <summary> /// Add a fragment object to export /// </summary> /// <param name="fragment"></param> public void AddFragment(Fragment fragment) { if (this.fragmenten.Contains(fragment)) return; lock (this.fragmenten) { this.fragmenten.Add(fragment); } if(fragment.Liedje.FileContent != null) this.totalFragments++; }