private void button2_Click(object sender, EventArgs e)
        {
            isConnect = false;
            try
            {
                this.Cursor = Cursors.WaitCursor;
                ps_interface cc1 = (ps_interface)Activator.GetObject(typeof(ps_interface), "http://" + textBox2.Text + ":" + textBox3.Text + "/abcd");
                int          st  = cc1.IsDSRunning();

                this.Cursor = Cursors.Default;
                if (st == 1)
                {
                    isConnect       = true;
                    label5.Text     = "Status : Running";
                    button1.Enabled = true;
                }
            }
            catch (Exception ee)
            {
                this.Cursor = Cursors.Default;
                label5.Text = ee.Message;
            }

            label5.Visible = true;
        }
示例#2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            listView2.Items.Clear();
            ps_interface pp = list2[comboBox1.SelectedIndex];

            if (pp != null)
            {
                int[] a = pp.getInputA();
                int[] b = pp.getInputB();
                int[] c = pp.getOutputC();

                for (int i = 0; i < c.Length; i++)
                {
                    int cnt = i + 1;
                    listView2.Items.Add(cnt.ToString());
                    listView2.Items[i].SubItems.Add(a[i].ToString());
                    listView2.Items[i].SubItems.Add(b[i].ToString());
                    listView2.Items[i].SubItems.Add(c[i].ToString());
                }
            }
            else
            {
                listView2.Items.Clear();
            }
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;

            LoadDomainList();

            dt.Rows.Clear();
            for (int i = 0; i < clist.Count; i++)
            {
                DataRow dr = dt.NewRow();
                dr[0] = clist[i];
                dr[1] = getIP(clist[i]);
                dr[2] = "12345";
                dr[3] = "Not Running";
                dt.Rows.Add(dr);

                try
                {
                    string ip   = dt.Rows[i]["ip address"].ToString();
                    string port = dt.Rows[i]["port no"].ToString();
                    string url  = "http://" + ip + ":" + port + "/abcd";

                    ps_interface pp  = (ps_interface)Activator.GetObject(typeof(ps_interface), url);
                    int          sta = pp.IsDSRunning();
                    if (sta == 1)
                    {
                        dt.Rows[i][3] = "Running";
                    }
                }
                catch (Exception ee) { }
            }

            if (dt.Rows.Count > 0)
            {
                button2.Enabled = true;
            }
            else
            {
                button2.Enabled = false;
            }

            button1.Enabled = true;
        }
示例#4
0
        private void button2_Click(object sender, EventArgs e)
        {
            DataView dv = new DataView(dt);

            dv.RowFilter = "Status='Running'";
            dt2          = dv.ToTable();

            List <ps_interface> list = new List <ps_interface>();

            for (int i = 0; i < dt2.Rows.Count; i++)
            {
                string ip   = dt2.Rows[i]["ip address"].ToString();
                string port = dt2.Rows[i]["port no"].ToString();
                string url  = "http://" + ip + ":" + port + "/abcd";

                ps_interface pp = (ps_interface)Activator.GetObject(typeof(ps_interface), url);
                list.Add(pp);
            }

            SendRequest2 ss = new SendRequest2(list, dt2);

            ss.Show();
        }