Quote:
/// <summary>
///
/// </summary>
/// <param name="SLD"></param>
/// <returns>-1 for not processed</returns>
public long ReturnSlider(ref string SLD)
{
switch (SLD.ToLower())
{
// SETTINGS
case "rrcoretemp_updatedelay":
return ((UpdateDelay / 10) * 65535);
case "rrcoretemp_maxtemp_alarm":
return ((((CoreTempAlarm - 9) * 10) * 65535) / 20);
}
return -1;
}
...
public long SetSlider(ref string SLD,ref int Value, ref bool Direction)
{
return -1;
switch (SLD.ToLower())
{
// SETTINGS
case "rrcoretemp_maxtemp_alarm":
CoreTempAlarm = Convert.ToInt32((Value * 20) / 65535);
case "rrcoretemp_updatedelay":
UpdateDelay = Convert.ToInt32((Value * 10) / 65535);
}
}
Is it the good way!