Exemple #1
0
        private void nextSubnetButt_Click(object sender, System.EventArgs e)
        {
            if (ip == null || ip.getIp() == null || fill)
            {
                return;
            }
            nextNumOfHosts.BackColor = Color.White;

            try
            {
                int hosts = Int32.Parse(nextNumOfHosts.Text);

                IPTool newIp = ip.getNextSubNet(hosts);
                if (newIp == null)
                {
                    //ToManyHosts
                    noticeLabel.Text = "Info stuff: Number of hosts in this network-class not possible!";
                    return;
                }
                ip             = newIp;
                ipAddress.Text = ip.getIp();
            }
            catch (System.FormatException)
            {
                nextNumOfHosts.BackColor = Color.Red;
                return;
            }
            catch (Exception e1)
            {
                MessageBox.Show(e1.StackTrace);
                return;
            }

            fillIPCalc();
        }