Ejemplo n.º 1
0
        public bool LoadFromIni(string section)
        {
            string rng = Util.ConstIni.StringValue(section, "range");
            if (!rng.StartsWith("RNG"))
                return false;
            range = (TempRange)Enum.Parse(typeof(TempRange), rng);


            if (!Double.TryParse(Util.ConstIni.StringValue(section, "rtp"), out rtp))
                rtp = 0;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a4"), out a4)) a4 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b4"), out b4)) b4 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a5"), out a5)) a5 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b5"), out b5)) b5 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a7"), out a7)) a7 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b7"), out b7)) b7 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "c7"), out c7)) c7 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a8"), out a8)) a8 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b8"), out b8)) b8 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "c8"), out c8)) c8 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a9"), out a9)) a9 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b9"), out b9)) b9 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a10"), out a10)) a10 = -1000;
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a11"), out a11)) a11 = -1000;
            return true;
        }
Ejemplo n.º 2
0
        public bool LoadFromIni(string section)
        {
            string rng = Util.ConstIni.StringValue(section, "range");

            if (!rng.StartsWith("RNG"))
            {
                return(false);
            }
            range = (TempRange)Enum.Parse(typeof(TempRange), rng);
            Double.TryParse(Util.ConstIni.StringValue(section, "rtp"), out rtp);
            Double.TryParse(Util.ConstIni.StringValue(section, "a4"), out a4);
            Double.TryParse(Util.ConstIni.StringValue(section, "b4"), out b4);
            Double.TryParse(Util.ConstIni.StringValue(section, "a5"), out a5);
            Double.TryParse(Util.ConstIni.StringValue(section, "b5"), out b5);
            Double.TryParse(Util.ConstIni.StringValue(section, "a7"), out a7);
            Double.TryParse(Util.ConstIni.StringValue(section, "b7"), out b7);
            Double.TryParse(Util.ConstIni.StringValue(section, "c7"), out c7);
            Double.TryParse(Util.ConstIni.StringValue(section, "a8"), out a8);
            Double.TryParse(Util.ConstIni.StringValue(section, "b8"), out b8);
            Double.TryParse(Util.ConstIni.StringValue(section, "a9"), out a9);
            Double.TryParse(Util.ConstIni.StringValue(section, "b9"), out b9);
            Double.TryParse(Util.ConstIni.StringValue(section, "a10"), out a10);
            Double.TryParse(Util.ConstIni.StringValue(section, "a11"), out a11);
            return(true);
        }
Ejemplo n.º 3
0
 public bool LoadFromIni(string section)
 {
     string rng = Util.ConstIni.StringValue(section, "range");
     if (!rng.StartsWith("RNG"))
         return false;
     range = (TempRange)Enum.Parse(typeof(TempRange), rng);
     Double.TryParse(Util.ConstIni.StringValue(section, "rtp"), out rtp);
     Double.TryParse(Util.ConstIni.StringValue(section, "a4"), out a4);
     Double.TryParse(Util.ConstIni.StringValue(section, "b4"), out b4);
     Double.TryParse(Util.ConstIni.StringValue(section, "a5"), out a5);
     Double.TryParse(Util.ConstIni.StringValue(section, "b5"), out b5);
     Double.TryParse(Util.ConstIni.StringValue(section, "a7"), out a7);
     Double.TryParse(Util.ConstIni.StringValue(section, "b7"), out b7);
     Double.TryParse(Util.ConstIni.StringValue(section, "c7"), out c7);
     Double.TryParse(Util.ConstIni.StringValue(section, "a8"), out a8);
     Double.TryParse(Util.ConstIni.StringValue(section, "b8"), out b8);
     Double.TryParse(Util.ConstIni.StringValue(section, "a9"), out a9);
     Double.TryParse(Util.ConstIni.StringValue(section, "b9"), out b9);
     Double.TryParse(Util.ConstIni.StringValue(section, "a10"), out a10);
     Double.TryParse(Util.ConstIni.StringValue(section, "a11"), out a11);
     return true;
 }
 public HeatingPlan(TempRange range)
 {
     this.range = range;
 }
Ejemplo n.º 5
0
 public Room(TempRange daysTempRange)
 {
     _daysTempRange = daysTempRange;
 }
Ejemplo n.º 6
0
        public bool LoadFromIni(string section)
        {
            string rng = Util.ConstIni.StringValue(section, "range");

            if (!rng.StartsWith("RNG"))
            {
                return(false);
            }
            range = (TempRange)Enum.Parse(typeof(TempRange), rng);


            if (!Double.TryParse(Util.ConstIni.StringValue(section, "rtp"), out rtp))
            {
                rtp = 0;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a4"), out a4))
            {
                a4 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b4"), out b4))
            {
                b4 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a5"), out a5))
            {
                a5 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b5"), out b5))
            {
                b5 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a7"), out a7))
            {
                a7 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b7"), out b7))
            {
                b7 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "c7"), out c7))
            {
                c7 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a8"), out a8))
            {
                a8 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b8"), out b8))
            {
                b8 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "c8"), out c8))
            {
                c8 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a9"), out a9))
            {
                a9 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "b9"), out b9))
            {
                b9 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a10"), out a10))
            {
                a10 = -1000;
            }
            if (!Double.TryParse(Util.ConstIni.StringValue(section, "a11"), out a11))
            {
                a11 = -1000;
            }
            return(true);
        }
Ejemplo n.º 7
0
 public bool Includes(TempRange arg) => arg.Low >= Low && arg.High <= High;
Ejemplo n.º 8
0
 public bool WithinRange(TempRange roomRange) => _range.Includes(roomRange);
Ejemplo n.º 9
0
 public bool Includes(TempRange arg) => arg.GetLow() >= GetLow() && arg.GetHigh() <= GetHigh();
Ejemplo n.º 10
0
 public HeatingPlan(TempRange range)
 {
     _range = range;
 }
Ejemplo n.º 11
0
 public bool WithinRange(TempRange roomRange)
 {
     return(roomRange.GetLow() >= _range.GetLow() &&
            roomRange.GetHigh() <= _range.GetHigh());
 }
Ejemplo n.º 12
0
 public bool WithinRange(TempRange roomRange)
 {
     return(roomRange.Low > roomRange.Low && roomRange.High <= roomRange.High);
 }