예제 #1
0
        private void timerTick(object sender, EventArgs e)
        {
            double val = ReadNewValue();

            Logger.Info(string.Format("Monitor {0} got value {1:N4}", Key, val));
            if (MinValue > 0)
            {
                val = val - MinValue;
                if (val < 0)
                {
                    val = 0;
                }
                val = val / (100 - MinValue) * 100;
            }
            Value += (val - Value) * (1 - Smooth);
            Logger.Info(string.Format("Monitor {0} reported value {1:N4}", Key, Value));
            Updated.Fire(this);
        }