Esempio n. 1
0
        private void BTN_AutoOff_Click(object sender, EventArgs e)
        {
            BTN_AutoOn.Enabled  = true;
            BTN_AutoOff.Enabled = false;

            HIOKI3540.Write(Hioki.AutoOff());
        }
Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 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];
        }
Esempio n. 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();
        }
Esempio n. 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");
                }));
            }
        }
Esempio n. 7
0
 private void BTN_HiokiReset_Click(object sender, EventArgs e)
 {
     HIOKI3540.Write(Hioki.Reset());
 }
Esempio n. 8
0
 private void BTN_Measure_Click(object sender, EventArgs e)
 {
     HIOKI3540.Write(Hioki.Measure());
 }
Esempio n. 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");
        }
Esempio n. 10
0
 private void BTN_SendMsg_Click(object sender, EventArgs e)
 {
     HIOKI3540.Write(SendMsg.Text + "\r\n");
     SendMsg.Clear();
 }