public static CustomList <T> operator -(CustomList <T> List1, CustomList <T> List2)
        {
            CustomList <T> List3 = new CustomList <T>();
            int            i;

            {
                for (i = 0; i <= List1.count; i++)
                {
                    if (List2[0].Equals(List1[i]))
                    {
                        List1.Remove(List2[0]);
                    }
                }
            }
            {
                for (i = 0; i <= List1.count; i++)
                {
                    if (List2[1].Equals(List1[i]))
                    {
                        List1.Remove(List2[1]);
                    }
                }
            }
            return(List3);
        }
Exemple #2
0
        private void ListView_Drop(object sender, DragEventArgs e)
        {
            if (list == 1)
            {
                if (e.Data.GetDataPresent("myFormat"))
                {
                    Model.Softver soft = e.Data.GetData("myFormat") as Model.Softver;

                    List1.Remove(soft);
                    List2.Add(soft);
                    //SaveList2.Add(soft);
                }
            }
        }
Exemple #3
0
        public void TestListImplicitImplementation()
        {
            IList <int> list = new List1 <int>();

            Assert.AreEqual(0, list[0]);
            Assert.True(list.Contains(0));
            Assert.AreEqual(100, list.Count);
            Assert.False(list.IsReadOnly);
            Assert.Null(list.GetEnumerator());
            Assert.AreEqual(200, list.IndexOf(0));
            Assert.True(list.Remove(0));

            var a = new int[] { 1, 2 };

            list.CopyTo(a, 0);
            Assert.AreEqual(0, a[0]);
        }
Exemple #4
0
        private void Execute_List1_SelectedIndexChanged(object o)
        {
            My_thread thread = list1_SelectedIndex;

            list1_SelectedIndex = null;
            if (thread != null)
            {
                List1.Remove(thread);
                OnPropertyChanged(nameof(List1));
                List2.Add(thread);
                OnPropertyChanged(nameof(List2));
                thread.isWeit = true;


                thread.temp.Start();
            }
        }
Exemple #5
0
        public static CustomList <T> operator -(CustomList <T> List1, CustomList <T> List2)
        {
            T value;

            for (int i = 0; i < List1.count; i++)
            {
                value = List1[i];
                for (int j = 0; j < List2.count; j++)
                {
                    if (value.Equals(List2[j]))
                    {
                        List1.Remove(List1[i]);
                    }
                }
            }
            return(List1);
        }