Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public bool CompareKeys(MLayout another)
 {
     return((keyDecrease == another.keyDecrease) && (keyIncrease == another.keyIncrease));
 }