private void AddReceiveResponse(string name) { var receiveResponse = new ReceiveResponse((ushort)_actions.Count, name); _actions.Add(receiveResponse); dataGridViewActions.Invalidate(); dataGridViewActions.Refresh(); }
public ReceiveResponseForm(Action originalAction) { InitializeComponent(); _originalAction = originalAction as ReceiveResponse; _tempAction = originalAction.GetCopy() as ReceiveResponse; }
public override Action GetCopy() { var receiveResponse = new ReceiveResponse(Id, CodeOrActionName) { Direction = this.Direction, Enabled = this.Enabled, IsAddContent = this.IsAddContent, LocalIp = this.LocalIp, LocalPort = this.LocalPort, LocalTerminal = this.LocalTerminal, Optional = this.Optional, RemoteIp = this.RemoteIp, RemotePort = this.RemotePort, RemoteTerminal = this.RemoteTerminal, Transport = this.Transport, IsPerformGoto = this.IsPerformGoto, GotoLabelId = this.GotoLabelId, Id = this.Id, CodeOrActionName = this.CodeOrActionName, }; return receiveResponse; }
public static Action CreateFromActionName(IEnumerable<string> lines) { Action action = null; foreach (var line in lines) { if (line.StartsWith(Strings.ActionName)) { if (line.EndsWith(Strings.Label)) { action = new Label(); } else if (line.EndsWith(Strings.Pause)) { action = new Pause(); } else if (line.EndsWith(Strings.ReceiveRequest)) { action = new ReceiveRequest(); } else if (line.EndsWith(Strings.ReceiveResponse)) { action = new ReceiveResponse(); } else if (line.EndsWith(Strings.SendResponse)) { action = new SendResponse(); } else if (line.EndsWith(Strings.SendRequest)) { action = new SendRequest(); } else if (line.EndsWith(Strings.SendRequestRegister)) { action = new SendRequestRegister(); } break; } } if (action != null) { action.LoadFromStringList(lines); } return action; }