Пример #1
0
 public void Save(Playbackband playbackband)
 {
     IFormatter formatter = new BinaryFormatter();
     Stream stream = new FileStream(this.filename, FileMode.Create, FileAccess.Write, FileShare.None);
     formatter.Serialize(stream, playbackband);
     stream.Close();
 }
Пример #2
0
        public LiedjeControl(Playbackband current)
        {
            InitializeComponent();

            label4.Text = "";
            comboBox1.SelectedIndex = 0;
            this.currentPBB = current;
        }
Пример #3
0
        public void Save(Playbackband playbackband)
        {
            IFormatter formatter = new BinaryFormatter();
            Stream     stream    = new FileStream(this.filename, FileMode.Create, FileAccess.Write, FileShare.None);

            formatter.Serialize(stream, playbackband);
            stream.Close();
        }
Пример #4
0
        public Playbackband Open()
        {
            IFormatter   formatter = new BinaryFormatter();
            Stream       stream    = new FileStream(this.filename, FileMode.Open, FileAccess.Read, FileShare.Read);
            Playbackband obj       = (Playbackband)formatter.Deserialize(stream);

            stream.Close();

            return(obj);
        }
Пример #5
0
        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();
        }
Пример #6
0
        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;
        }
Пример #7
0
        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[]>();
        }
Пример #8
0
        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;
        }
Пример #9
0
        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;
        }
Пример #10
0
        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);
                }
            }
        }
Пример #11
0
        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();
        }