public void Sum(TcpAppInputCommand sender) { TcpAppParameter param = sender.Command.Parameter("Values"); double result = param.Values.Select(x => Convert.ToDouble(x)).Sum(); sender.OutputMessage = result.ToString(); sender.Status = TcpAppCommandStatus.OK; }
private void SplitString(TcpAppInputCommand sender) { string inputString = sender.Command.Parameter("Input").Value; string searchString = sender.Command.Parameter("Search").Value; string replaceString = sender.Command.Parameter("Replace").Value; sender.OutputMessage = inputString.Replace(searchString, replaceString); sender.Status = TcpAppCommandStatus.OK; }
private void customFunctionCallback(TcpAppInputCommand sender) { sender.Status = TcpAppCommandStatus.OK; sender.OutputMessage = "Custom Function Executed!"; }
private void customFunction2Callback(TcpAppInputCommand sender) { sender.Status = TcpAppCommandStatus.OK; sender.OutputMessage = "P1 Value = " + sender.Command.Parameter("P1").Value + " P2 Value = " + sender.Command.Parameter("P2").Value; }
private void SlowCommand(TcpAppInputCommand sender) { System.Threading.Thread.Sleep(4500); sender.OutputMessage = "Snail command completed"; sender.Status = TcpAppCommandStatus.OK; }
public void ShowHelp(TcpAppInputCommand sender) { throw new NotImplementedException(); }
private void Custom1Callback(TcpAppInputCommand sender) { sender.OutputMessage = "Result_1"; sender.Status = TcpAppCommandStatus.OK; }
public void ShowHelp(TcpAppInputCommand sender) { TcpAppPlugin.ShowHelp(sender); }
private void TimeoutSim(TcpAppInputCommand sender) { System.Threading.Thread.Sleep(5000); }