using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LadyBug_TestHarness
{
    public partial class RgrTst_SetPulseRef : Form
    {
        public RgrTst_SetPulseRef()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }

        int addr = 0;
        public void SetAddress(int newAddr)
        {
            addr = newAddr;
        }

        private int m_Addr;
        public int Addr
        {
            get { return m_Addr; }
            set { m_Addr = value; }
        }

        public double Peak
        {
            get { return (double)udPeak.Value; }
            set { udPeak.Value = (decimal)value; }
        }

        public double Pulse
        {
            get { return (double)udPulse.Value; }
            set { udPulse.Value = (decimal)value; }
        }

        public double Avg
        {
            get { return (double)udAvg.Value; }
            set { udAvg.Value = (decimal)value; }
        }

        public double DCRef
        {
            get { return ((double)udDC.Value)/100.0; }
            set { udDC.Value = (decimal)(value *100.0); }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
    }
}