Пример #1
0
 protected MLayout FindChildrenLayoutWithSameControls(MLayout who)
 {
     foreach (MWidget w in Children)
     {
         MLayout ml = w as MLayout;
         if (ml != null && ml.CompareKeys(who) && !ml.IsLocked)
         {
             return(ml);
         }
         ml = w.FindChildrenLayoutWithSameControls(who);
         if (ml != null && !ml.IsLocked)
         {
             return(ml);
         }
     }
     return(null);
 }
Пример #2
0
        bool Move(ConsoleKeyInfo keyInfo)
        {
            MLayout childLay = this.FindChildrenLayoutWithSameControls(this);

            if (childLay != null)
            {
                return(false);
            }
            if (keyInfo.Key == keyIncrease)
            {
                AddIndex(1);
                return(true);
            }
            if (keyInfo.Key == keyDecrease)
            {
                AddIndex(-1);
                return(true);
            }
            return(false);
        }
Пример #3
0
 public bool CompareKeys(MLayout another)
 {
     return((keyDecrease == another.keyDecrease) && (keyIncrease == another.keyIncrease));
 }