コード例 #1
0
ファイル: MainForm.cs プロジェクト: sablezubos/SIPpWrapper
 private void AddReceiveResponse(string name)
 {
     var receiveResponse = new ReceiveResponse((ushort)_actions.Count, name);
     _actions.Add(receiveResponse);
     dataGridViewActions.Invalidate();
     dataGridViewActions.Refresh();
 }
コード例 #2
0
        public ReceiveResponseForm(Action originalAction)
        {
            InitializeComponent();

            _originalAction = originalAction as ReceiveResponse;
            _tempAction = originalAction.GetCopy() as ReceiveResponse;
        }
コード例 #3
0
 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;
 }
コード例 #4
0
ファイル: Action.cs プロジェクト: sablezubos/SIPpWrapper
        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;
        }