Beispiel #1
0
 /// <summary>
 /// Добавление метода в компановщик
 /// </summary>
 /// <param name="m"></param>
 override public void Add(EmptyMethod m)
 {
     if (listMs != null)
     {
         listMs.Add(m);
     }
 }
Beispiel #2
0
 public void SwapMethods(int indexFirst, int indexSecond)
 {
     if (listMs.Count > indexFirst && listMs.Count > indexSecond)
     {
         EmptyMethod t = listMs[indexFirst];
         listMs[indexFirst]  = listMs[indexSecond];
         listMs[indexSecond] = t;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Получение метода по имени
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 override public EmptyMethod GetMethodByName(string name)
 {
     if (listMs != null)
     {
         foreach (EmptyMethod Ms in listMs)
         {
             if (Ms.Name == name)
             {
                 return(Ms);
             }
             else if (Ms as Composite != null)
             {
                 EmptyMethod method = ((Composite)Ms).GetMethodByName(name);
                 if (method != null)
                 {
                     return(method);
                 }
             }
         }
     }
     return(null);
 }
Beispiel #4
0
 /// <summary>
 /// Добавление метода в компановщик
 /// </summary>
 /// <param name="m"></param>
 abstract public void Add(EmptyMethod m);