Ejemplo n.º 1
0
        private void btnSendSubnet_Click(object sender, EventArgs e)
        {
            DialogResult result3 = MessageBox.Show(
                "Change Modules and AgIO Subnet To: \r\n\r\n" +
                ipToSend[0].ToString() + "." +
                ipToSend[1].ToString() + "." +
                ipToSend[2].ToString() + "??????? ",
                "Are you sure ?",
                MessageBoxButtons.YesNo,
                MessageBoxIcon.Question,
                MessageBoxDefaultButton.Button2);

            if (result3 == DialogResult.Yes)
            {
                sendIPToModules[7] = ipToSend[0];
                sendIPToModules[8] = ipToSend[1];
                sendIPToModules[9] = ipToSend[2];

                mf.SendUDPMessage(sendIPToModules, mf.epModuleSet);

                Properties.Settings.Default.etIP_SubnetOne   = ipToSend[0];
                Properties.Settings.Default.etIP_SubnetTwo   = ipToSend[1];
                Properties.Settings.Default.etIP_SubnetThree = ipToSend[2];
                Properties.Settings.Default.Save();

                lblNetworkHelp.Text =
                    ipToSend[0].ToString() + "." +
                    ipToSend[1].ToString() + "." +
                    ipToSend[2].ToString();

                counter = 0;
            }
        }