Esempio n. 1
0
        public void AddEndTest(int[] array, int value, int[] expected)
        {
            DoubleLinkedList Expect = new DoubleLinkedList(expected);
            DoubleLinkedList actual = new DoubleLinkedList(array);

            actual.AddEnd(value);
            Assert.AreEqual(Expect, actual);
        }
Esempio n. 2
0
        public void Test_AddRemoveOrder_End()
        {
            DoubleLinkedList <Int32> list = new DoubleLinkedList <Int32>
            {
                18,
                2
            };

            list.AddEnd(88);

            Assert.Equal(2, list.Remove());
            Assert.Equal(18, list.Remove());
            Assert.Equal(88, list.Remove());
        }
Esempio n. 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            //listBox1.Items.Clear(); //clears items in playlist
            openFileDialog1.Multiselect = true;              //for selecting multiple files
            openFileDialog1.Filter      = "Mp3 Files|*.mp3"; //filter



            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                files = openFileDialog1.SafeFileNames; //save file name
                paths = openFileDialog1.FileNames;     //save file path

                for (int i = 0; i < files.Length; i++)
                {
                    MyList.AddEnd(paths[i]);
                    listBox1.Items.Add(paths[i]); //add file name to our listbox
                }
            }
        }