Beispiel #1
0
 public void setIT(int n, ConfiguratorItem _it)
 {
     if (n == 0)
     {
         it1 = _it;
     }
     else if (n == 1)
     {
         it2 = _it;
     }
 }
Beispiel #2
0
        public void addItemSensor(int _str)
        {
            ConfiguratorItem temp = new ConfiguratorItem();

            temp.idOfSensor       = _str;
            temp.isDaughter       = false;
            temp.type             = 2;
            temp.getNameOfSensor  = DataBase.getNameOfSensorById;
            temp.getValueOfSensor = DataBase.getValueOfSensorById;
            temp.id = currentId++;
            items.Add(temp);
        }
Beispiel #3
0
        public void addItemConst(int _val)
        {
            ConfiguratorItem temp = new ConfiguratorItem();

            temp.valueOfConst     = _val;
            temp.getNameOfSensor  = DataBase.getNameOfSensorById;
            temp.getValueOfSensor = DataBase.getValueOfSensorById;
            temp.isDaughter       = false;
            temp.type             = 1;
            temp.id = currentId++;
            items.Add(temp);
        }
Beispiel #4
0
 public void addItemLink(int id1, int _typeOfMath)
 {
     if (_typeOfMath == 2)
     {
         ConfiguratorItem temp = new ConfiguratorItem();
         temp.type = 0;
         temp.it1  = findConfigutaorItemById(id1);
         findConfigutaorItemById(id1).isDaughter = true;
         temp.typeOfMath = _typeOfMath;
         temp.id         = currentId++;
         items.Add(temp);
     }
 }
Beispiel #5
0
        public void addItemLink(int id1, int id2, int _typeOfMath)
        {
            ConfiguratorItem temp = new ConfiguratorItem();

            temp.getNameOfSensor  = DataBase.getNameOfSensorById;
            temp.getValueOfSensor = DataBase.getValueOfSensorById;
            temp.type             = 0;
            temp.it1 = findConfigutaorItemById(id1);
            temp.it2 = findConfigutaorItemById(id2);
            findConfigutaorItemById(id1).isDaughter = true;
            findConfigutaorItemById(id2).isDaughter = true;
            temp.typeOfMath = _typeOfMath;
            temp.id         = currentId++;
            items.Add(temp);
        }
Beispiel #6
0
        public string getName()
        {
            ConfiguratorItem temp = findConfigutaorItemById(resultId);

            return(temp.getName());
        }
Beispiel #7
0
        public int getValue()
        {
            ConfiguratorItem temp = findConfigutaorItemById(resultId);

            return(temp.getValue() == 0 ? 0 : 1);
        }