Beispiel #1
0
 public void MoveQuery(int target, QueryMenuItems menus, Query query)
 {
     _MenuItems[_MenuItems.IndexOf(menus[0])].QuerySet.RemoveAt(menus[0].QuerySet.IndexOf(query));
     if (target >= _MenuItems[_MenuItems.IndexOf(menus[1])].QuerySet.Count - 1)
     { _MenuItems[_MenuItems.IndexOf(menus[1])].QuerySet.Add(query); }
     else { _MenuItems[_MenuItems.IndexOf(menus[1])].QuerySet.Insert(target, query); }
     _MenuItems[_MenuItems.IndexOf(menus[0])].Update_QuerySet();
     _MenuItems[_MenuItems.IndexOf(menus[1])].Update_QuerySet();
     _MenuItems.UpdateIndex();
     AlignControls();
 }
Beispiel #2
0
 public QueryMenuItemEnum(QueryMenuItems questionList)
 {
     list = questionList;
 }
Beispiel #3
0
 public void AddRange(QueryMenuItems collection)
 {
     for (int i = 0; i < collection.Count; i++)
         this.List.Add(collection[i]);
 }
Beispiel #4
0
 private void AlignItems()
 {
     int x = 0;
     QueryMenuItems tmpItems = new QueryMenuItems();
     for (int i = 0; i < _MenuItems.Count; i++)
         if (_MenuItems[i].Action != QAction.Delete)
         {
             if (_MenuItems[i].Index == x)
             { tmpItems.Add(_MenuItems[i]); x++; i = -1; }
         }
         else i = _MenuItems.Count;
     _MenuItems.Clear();
     _MenuItems = tmpItems;
     AlignControls();
 }
Beispiel #5
0
 public QueryMenu()
 { _MenuItems = new QueryMenuItems(); }