示例#1
0
        public static void HandleShellCommandResponse(Client client, ShellCommandResponse packet)
        {
            if (client.Value.FrmRs == null)
            {
                return;
            }

            try
            {
                client.Value.FrmRs.Invoke(
                    (MethodInvoker) delegate
                {
                    if (packet.IsError)
                    {
                        client.Value.FrmRs.PrintError(packet.Output);
                    }
                    else
                    {
                        client.Value.FrmRs.PrintMessage(packet.Output);
                    }
                }
                    );
            }
            catch
            {
            }
        }
示例#2
0
        public static void HandleShellCommandResponse(Client client, ShellCommandResponse packet)
        {
            if (client.Value.FrmRs == null)
            {
                return;
            }

            try
            {
                client.Value.FrmRs.Invoke(
                    (MethodInvoker) delegate { client.Value.FrmRs.txtConsoleOutput.Text += packet.Output; });
            }
            catch
            {
            }
        }
示例#3
0
        public static void HandleShellCommandResponse(Client client, ShellCommandResponse packet)
        {
            if (client.Value.FrmRs == null || string.IsNullOrEmpty(packet.Output))
            {
                return;
            }

            if (packet.IsError)
            {
                client.Value.FrmRs.PrintError(packet.Output);
            }
            else
            {
                client.Value.FrmRs.PrintMessage(packet.Output);
            }
        }