Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            CanTrongLuong.CanTrongLuong test = new CanTrongLuong.CanTrongLuong(cbbPort.Text);
            double a = test.StringToDouble("=00101.06(kg)");

            MessageBox.Show((a * 1000).ToString());
        }
Exemplo n.º 2
0
        private void btn_ghi_Click(object sender, EventArgs e)
        {
            CanTrongLuong.CanTrongLuong db = new CanTrongLuong.CanTrongLuong(cbbPort.Text);
            string so = db.DocTrongLuongV2().ToString();

            txt_so.Text = so.ToString();
            rtbTrongLuong.AppendText(so.ToString() + Environment.NewLine);
            rtbTrongLuong.ScrollToCaret();

            //string tem = db.DuLieuGoc();
            //txt_so.Text = tem;
            //rtbTrongLuong.AppendText(tem + Environment.NewLine);
            //rtbTrongLuong.ScrollToCaret();

            MessageBox.Show("Đã đọc xong", "Thông báo");
        }