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; }
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 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; }
public Room(TempRange daysTempRange) { _daysTempRange = daysTempRange; }
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); }
public bool Includes(TempRange arg) => arg.Low >= Low && arg.High <= High;
public bool WithinRange(TempRange roomRange) => _range.Includes(roomRange);
public bool Includes(TempRange arg) => arg.GetLow() >= GetLow() && arg.GetHigh() <= GetHigh();
public HeatingPlan(TempRange range) { _range = range; }
public bool WithinRange(TempRange roomRange) { return(roomRange.GetLow() >= _range.GetLow() && roomRange.GetHigh() <= _range.GetHigh()); }
public bool WithinRange(TempRange roomRange) { return(roomRange.Low > roomRange.Low && roomRange.High <= roomRange.High); }