Ejemplo n.º 1
0
        public void Push(T item)
        {
            var newT = new MyT()
            {
                Item = item
            };

            if (Tail != null)
            {
                newT.Previous = Tail;
            }
            Tail = newT;
            Count++;
        }
Ejemplo n.º 2
0
        private List <MyT> MethodRow(DataTable dt)
        {
            List <MyT> someData = new List <MyT>();

            foreach (DataRow row in dt.Rows)
            {
                MyT m = new MyT();

                for (int i = 0; i < row.ItemArray.Count(); i++)
                {
                    m.value += string.Format(dt.Columns[i].ColumnName + " = " + row.ItemArray[i] + " ");
                }

                someData.Add(m);
            }

            return(someData);
        }
Ejemplo n.º 3
0
 public void Enqueue(T item)
 {
     if (Head == null)
     {
         Head = new MyT()
         {
             Item = item
         };
         Tail = Head;
     }
     else
     {
         var newT = new MyT()
         {
             Item = item
         };
         Tail.Next = newT;
         Tail      = newT;
     }
     Count++;
 }
Ejemplo n.º 4
0
        private void TableStructButton_Click(object sender, RoutedEventArgs e)
        {
            if (TablesComboBox.SelectedIndex != -1)
            {
                string    str  = ((ComboBoxItem)(TablesComboBox.SelectedItem)).Content.ToString();
                DataTable dtcb = ds.Tables[str];

                List <MyT> strcts = new List <MyT>();

                foreach (DataColumn item in dtcb.Columns)
                {
                    MyT t = new MyT();
                    t.value = item.ColumnName + "\t\t\t\t" + item.DataType;
                    strcts.Add(t);
                }

                TrackEvalutionPartListBox.ItemsSource = strcts;
            }
            else
            {
                MessageBox.Show("Выберите таблицу");
            }
        }