Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            result.Text  = "";
            comment.Text = "";
            bool valid_input = validate();

            if (valid_input == false)
            {
                warning2.Close();
                warning2 = new Form4();
                warning2.Show();
            }
            else
            {
                dt = double.Parse(dt_text.Text);
                if (dt > update_opt_dt())
                {
                    warning1.Close();
                    warning1 = new Form3();
                    warning1.Show();
                }
                else
                {
                    numericUpDown1.Enabled = false;
                    numericUpDown2.Enabled = false;
                    pictureBox1.Enabled    = false;
                    button1.Enabled        = false;
                    button4.Enabled        = false;
                    bw.RunWorkerAsync();
                }
            }
        }
Example #2
0
        //开始IP搜寻
        private void Start_IpSearch()
        {
            StartHeck_flag = 1;//防止跳窗
            string IpSearch_Begin   = "192.168.0.";
            string IpSearch_End     = "192.168.0.";
            string IpSearch_Reflash = "192.168.0.";        //用于刷新动态IP
            string Box6_IP          = textBox6.Text;       //获取box6的输入IP
            string Box7_IP          = textBox7.Text;       //获取box7的输入IP
            int    Box_Flag         = int.Parse(Box6_IP);; //动态boxIP

            IpSearch_Begin += textBox6.Text;               //起始IP
            IpSearch_End   += textBox7.Text;               //截止IP
            string IpSearch_Flag = IpSearch_Begin;         //动态IP

            while (IpSearch_Flag != IpSearch_End)
            {
                Form4 client = new Form4();
                client.SocketClient(IpSearch_Flag, int.Parse(textBox4.Text));
                client.StartClient();
                Search_Info(IpSearch_Flag);
                client.Close();
                Box_Flag++;
                IpSearch_Flag = IpSearch_Reflash + Convert.ToInt32(Box_Flag);
            }
            StartHeck_flag = 0;
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form4 client = new Form4();

            client.SocketClient(textBox3.Text, int.Parse(textBox4.Text));
            client.StartClient();
            client.Close();
        }
Example #4
0
        private void Inapoi_La_Lectii_Click(object sender, EventArgs e)
        {
            (System.Windows.Forms.Application.OpenForms["Form1"] as Form1).Afisare_Forma("LECTII", this, "CLOSE");
            //Inchidem ferestele ascunse
            Form f = new Form();

            f = new Form3();
            f.Close();
            f = new Form4();
            f.Close();
        }
Example #5
0
 private void itemsToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     Form4 updateitemform = new Form4();
     if (updateitemform.ShowDialog() == DialogResult.OK)
     {
         updateitemform.Close();
         DataTable dt = new DataTable();
         db.dataGrid(dt, "itemtable");
         dataGridView1.DataSource = dt;
         this.squery = "items";
         textBox1.SelectionStart = textBox1.Text.Length;
         textBox1.Font = new Font(textBox1.Font, FontStyle.Italic);
         textBox1.ForeColor = Color.Gray;
         textBox1.Text = "Items";
         textBox1.Enabled = false;
         textBox1.Enabled = true;
     }
 }