Пример #1
0
        private void BTN_AutoOff_Click(object sender, EventArgs e)
        {
            BTN_AutoOn.Enabled  = true;
            BTN_AutoOff.Enabled = false;

            HIOKI3540.Write(Hioki.AutoOff());
        }
Пример #2
0
        private void BTN_HiokiDis_Click(object sender, EventArgs e)
        {
            BTN_HiokiCon.Enabled = true;
            BTN_HiokiDis.Enabled = false;
            BTN_SendMsg.Enabled  = false;

            HIOKI3540.Close();
        }
Пример #3
0
        private void BTN_HiokiCon_Click(object sender, EventArgs e)
        {
            BTN_HiokiCon.Enabled = false;
            BTN_HiokiDis.Enabled = true;
            BTN_SendMsg.Enabled  = true;

            HIOKI3540.PortName = ini.GetIniValue("HIOKI", "PortName");
            HIOKI3540.Open();
        }
Пример #4
0
        public SelfForm(Analog analog)
        {
            InitializeComponent();

            anal  = analog;
            Hioki = new HIOKI3540();
            digit = new Digit();
            ini   = new iniUtil(@"C:\Users\gy157\Documents\Info.ini");

            HIOKI3540.PortName = ini.GetIniValue("HIOKI", "PortName");
            //HIOKI3540.Open();

            Iszoomin = false;
            Iscon    = false;
            state    = new bool[8];
        }
Пример #5
0
        public AutoForm(Analog analog)
        {
            InitializeComponent();

            anal    = analog;
            binary  = new Binary();
            digit   = new Digit();
            hioki   = new HIOKI3540();
            ini     = new iniUtil(@"C:\Users\gy157\Documents\Info.ini");
            logfile = new logFile();

            list  = new List <string>();
            state = new bool[8];
            Hioki3540.PortName = ini.GetIniValue("HIOKI", "PortName");
            //Hioki3540.Open();
        }
Пример #6
0
        private void HIOKI3540_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
        {
            readMsg = HIOKI3540.ReadLine();

            if (ReadMsg.InvokeRequired)
            {
                readMsg = readMsg.Trim();
                double value;

                bool isDouble = double.TryParse(readMsg, out value);
                if (isDouble)
                {
                    ReadMsg.BeginInvoke(new Action(() =>
                    {
                        MeasureMsg.AppendText(readMsg + "\r\n");
                    }));
                }
                ReadMsg.BeginInvoke(new Action(() =>
                {
                    ReadMsg.AppendText(readMsg + "\r\n");
                }));
            }
        }
Пример #7
0
 private void BTN_HiokiReset_Click(object sender, EventArgs e)
 {
     HIOKI3540.Write(Hioki.Reset());
 }
Пример #8
0
 private void BTN_Measure_Click(object sender, EventArgs e)
 {
     HIOKI3540.Write(Hioki.Measure());
 }
Пример #9
0
        private void BTN_Range_Click(object sender, EventArgs e)
        {
            int RangeValue = Convert.ToInt32(UD_Range.Value);

            HIOKI3540.Write(Hioki.Range() + RangeValue + "\r\n");
        }
Пример #10
0
 private void BTN_SendMsg_Click(object sender, EventArgs e)
 {
     HIOKI3540.Write(SendMsg.Text + "\r\n");
     SendMsg.Clear();
 }