public SetupForm(AnalogSensor aAnalogSensor, IItemBrowser aBrowser)
        {
            mAnalogSensor = aAnalogSensor;
            mBrowser      = aBrowser;
            InitializeComponent();

            comboBox_Operation.Items.AddRange(ValuesCompare.Operations);

            if (mAnalogSensor.mValueItemHandle != -1)
            {
                itemEditBox_Item.ItemName    = mBrowser.getItemNameByHandle(mAnalogSensor.mValueItemHandle);
                itemEditBox_Item.ItemToolTip = mBrowser.getItemToolTipByHandle(mAnalogSensor.mValueItemHandle);
            }

            textBox_Units.Text     = mAnalogSensor.Units;
            textBox_RawMin.Text    = StringUtils.ObjectToString(mAnalogSensor.mValueScale.InMin);
            textBox_RawMax.Text    = StringUtils.ObjectToString(mAnalogSensor.mValueScale.InMax);
            checkBox_Fault.Checked = mAnalogSensor.mFault;
            textBox_FValue.Text    = StringUtils.ObjectToString(mAnalogSensor.mFaultValue);
            textBox_PMin.Text      = StringUtils.ObjectToString(mAnalogSensor.mValueScale.OutMin);
            textBox_PMax.Text      = StringUtils.ObjectToString(mAnalogSensor.mValueScale.OutMax);

            for (int i = 0; i < mAnalogSensor.mThdItemHandles.Length; i++)
            {
                dataGridView_Thd.Rows.Add(mAnalogSensor.mThdOperations[i].OperationName, StringUtils.ObjectToString(mAnalogSensor.Thresholds[i]), mBrowser.getItemNameByHandle(mAnalogSensor.mThdItemHandles[i]));
            }

            if (dataGridView_Thd.RowCount == 0)
            {
                button_Delete.Enabled = false;
                button_Modify.Enabled = false;
            }
        }
        public SetupForm(AnalogSensor aAnalogSensor, IItemBrowser aBrowser)
        {
            mAnalogSensor   = aAnalogSensor;
            mBrowser        = aBrowser;
            InitializeComponent();

            comboBox_Operation.Items.AddRange(ValuesCompare.Operations);

            if (mAnalogSensor.mValueItemHandle != -1)
            {
                itemEditBox_Item.ItemName    = mBrowser.getItemNameByHandle(mAnalogSensor.mValueItemHandle);
                itemEditBox_Item.ItemToolTip = mBrowser.getItemToolTipByHandle(mAnalogSensor.mValueItemHandle);
            }

            textBox_Units.Text      = mAnalogSensor.Units;
            textBox_RawMin.Text     = StringUtils.ObjectToString(mAnalogSensor.mValueScale.InMin);
            textBox_RawMax.Text     = StringUtils.ObjectToString(mAnalogSensor.mValueScale.InMax);
            checkBox_Fault.Checked  = mAnalogSensor.mFault;
            textBox_FValue.Text     = StringUtils.ObjectToString(mAnalogSensor.mFaultValue);
            textBox_PMin.Text       = StringUtils.ObjectToString(mAnalogSensor.mValueScale.OutMin);
            textBox_PMax.Text       = StringUtils.ObjectToString(mAnalogSensor.mValueScale.OutMax);

            for (int i = 0; i < mAnalogSensor.mThdItemHandles.Length; i++)
            {
                dataGridView_Thd.Rows.Add(mAnalogSensor.mThdOperations[i].OperationName, StringUtils.ObjectToString(mAnalogSensor.Thresholds[i]), mBrowser.getItemNameByHandle(mAnalogSensor.mThdItemHandles[i]));
            }

            if (dataGridView_Thd.RowCount == 0)
            {
                button_Delete.Enabled = false;
                button_Modify.Enabled = false;
            }
        }
        public BackValueFilter(AnalogSensor aAnalogSensor, uint aDelayMS)
        {
            mAnalogSensor = aAnalogSensor;
            mDelayMS      = aDelayMS;

            mOutTimer           = new Timer(aDelayMS);
            mOutTimer.AutoReset = false;

            mInTimer           = new Timer(aDelayMS);
            mInTimer.Elapsed  += new ElapsedEventHandler(InTimerElapsed);
            mInTimer.AutoReset = false;
        }