コード例 #1
0
        private void toolBtnSearchAppByPort_Click(object sender, EventArgs e)
        {
            FormFilterApp formFilterApp = new FormFilterApp();

            formFilterApp.ShowDialog();
            if (formFilterApp.dialogResult != DialogResult.OK)
            {
                return;
            }
            try
            {
                String temp = formFilterApp.txtSearchValue.Text.Trim();
                if (temp.Equals(""))
                {
                    this.txtConsoleLog.Text = this.sshControll.read("netstat -anp");
                }
                else
                {
                    this.txtConsoleLog.Text = this.sshControll.read("netstat -anp | grep " + temp);
                }
            }
            catch (Exception exp)
            {
                Console.WriteLine(exp.Message);
            }
        }
コード例 #2
0
        private void toolBtnSearchApp_Click(object sender, EventArgs e)
        {
            FormFilterApp formFilterApp = new FormFilterApp();

            formFilterApp.ShowDialog();
            if (formFilterApp.dialogResult != DialogResult.OK)
            {
                return;
            }
            this.dataApplication.Rows.Clear();
            String temp = formFilterApp.txtSearchValue.Text.Trim();

            if (temp.Equals(""))
            {
                loadPsAux("");
            }
            else
            {
                loadPsAux(" | grep " + temp);
            }
        }