示例#1
0
        private void btnDown_Click(object sender, EventArgs e)
        {
            string    strSend = "S~";
            DataTable tmpDT   = (DataTable)Grid1.DataSource;

            for (short i = 0; i < 2; i++)
            {
                for (short j = 0; j < 10; j++)
                {
                    strSend = strSend + tmpDT.Rows[j][i * 2 + 1] + "~";
                }
            }
            strSend = strSend.Replace("全过程收氟保护", "0");
            strSend = strSend.Replace("收氟过程保护", "1");
            strSend = strSend.Replace("不保护", "2");
            strSend = strSend.Replace("报警", "0");
            strSend = strSend.Replace("停机", "1");
            frmSend f = new frmSend(strSend, frmSend.SendValue.SendSystem);

            f.ShowDialog();
        }
示例#2
0
        private void 关机SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSend fs = new frmSend("E", frmSend.SendValue.SendShutDown);

            fs.ShowDialog();
        }