Exemple #1
0
 /* PUBLIC METHODS */
 public void SelectType(EType type)
 {
     switch (type)
     {
         case EType.Constant:
             SelectedType = _complexType.Constant;
             break;
         case EType.Variable:
             SelectedType = _complexType.Variable;
             break;
         case EType.Function:
             SelectedType = _complexType.Function;
             break;
         case EType.Reference:
             SelectedType = _complexType.Reference;
             break;
         case EType.Keyword:
             SelectedType = _complexType.Keyword;
             break;
     }
 }
Exemple #2
0
 public void SelectType(string type)
 {
     switch (type)
     {
         case "constant":
             SelectedType = _complexType.Constant;
             break;
         case "variable":
             SelectedType = _complexType.Variable;
             break;
         case "function":
             SelectedType = _complexType.Function;
             break;
         case "keyword":
             SelectedType = _complexType.Keyword;
             break;
         case "reference":
             SelectedType = _complexType.Reference;
             break;
     }
 }
Exemple #3
0
 /* PRIVATE METHODS */
 private void SelectType(ComplexType complexType)
 {
     if (complexType.Constant != null)
         SelectedType = complexType.Constant;
     else if (complexType.Variable != null)
         SelectedType = complexType.Variable;
     else if (complexType.Function != null)
         SelectedType = complexType.Function;
     else if (complexType.Keyword != null)
         SelectedType = complexType.Keyword;
     else if (complexType.Reference != null)
         SelectedType = complexType.Reference;
     else
         throw new Exception("ComplexType of item '" + Name + "' does not contain types.");
 }