示例#1
0
 private void OnAddExecute(string obj)
 {
     if (SelectedItem != null)
     {
         ListTwo.Add(obj);
     }
 }
示例#2
0
 private void OnAddExecute()
 {
     if (SelectedItem != null)
     {
         ListTwo.Add(SelectedItem);
     }
 }
示例#3
0
        public void TestList()
        {
            Console.WriteLine($"\n\nListOne: ");
            ListOne list = new ListOne();

            list.Add(1); list.Add(2); list.Add(4);
            list.Print(); Console.WriteLine();
            list.Insert(2, 3);
            list.Print(); Console.WriteLine();
            list.RemoveAt(3); list.RemoveAt(0);
            list.Print(); Console.WriteLine();
            list.Remove(2);
            list.Print();


            Console.WriteLine($"\n\nListOneC: ");
            ListOneC listC = new ListOneC();

            listC.Add(1); listC.Add(2); listC.Add(3); listC.Add(4);
            listC.Print(); Console.WriteLine();
            listC.RemoveAt(3); listC.RemoveAt(0);
            listC.Print(); Console.WriteLine();
            listC.Remove(2);
            listC.Print();

            Console.WriteLine($"\n\nListTwo: ");
            ListTwo listTwo = new ListTwo();

            listTwo.Add(1); listTwo.Add(2); listTwo.Add(4);
            listTwo.Print(); Console.WriteLine();
            listTwo.Insert(2, 3);
            listTwo.Print(); Console.WriteLine();
            listTwo.RemoveAt(3); listTwo.RemoveAt(0);
            listTwo.Print(); Console.WriteLine();
            listTwo.Remove(2);
            listTwo.Print();

            Console.WriteLine($"\n\nListTwoF: ");
            ListTwoF ListTwoF = new ListTwoF();

            ListTwoF.Add(1); ListTwoF.Add(2); ListTwoF.Add(3); ListTwoF.Add(4);
            ListTwoF.Print(); Console.WriteLine();
            ListTwoF.Remove(1);
            ListTwoF.Print(); Console.WriteLine();
            ListTwoF.Remove(2);
            ListTwoF.Print();
        }
示例#4
0
        public void TestMethod2ListAdd4()
        {
            //Arrange
            Random        rand = new Random();
            ListTwo <int> l    = new ListTwo <int>();

            //Act
            l.Add(1, 3);
            //Assert
            Assert.IsTrue(l.Length() == 3);
        }
示例#5
0
        public void TestMethod2ListDel3()
        {
            //Arrange
            Random        rand = new Random();
            ListTwo <int> l    = new ListTwo <int>();

            //Act
            l.Add(1, 3);
            l.Delete(2, 8);
            //Assert
            Assert.IsTrue(l.Length() == 1);
        }
示例#6
0
        public void TestMethod2ListAdd3()
        {
            //Arrange
            Random         rand = new Random();
            PointTwo <int> p    = new PointTwo <int>(4);
            ListTwo <int>  l    = new ListTwo <int>(p);

            //Act
            l.Add(2, rand);
            //Assert
            Assert.IsTrue(l.Length() == 2);
        }
示例#7
0
        public DragAndDropVm()
        {
            ListOne.Add(new DragableData {
                Name = "Steve"
            });
            ListOne.Add(new DragableData {
                Name = "Fred"
            });
            ListOne.Add(new DragableData {
                Name = "Sally"
            });
            ListOne.Add(new DragableData {
                Name = "Hank"
            });
            ListOne.Add(new DragableData {
                Name = "Jane"
            });

            ListTwo.Add(new DragableData {
                Name = "Zach"
            });
        }