public void MakeCall(PhoneNumber phoneNumber)
 {
     if (CallEvent != null)
     {
         CallEvent.Invoke(this, phoneNumber);
     }
 }
示例#2
0
 public void MakeCall(int number)
 {
     if (CallEvent != null)
     {
         CallEvent.Invoke(this, number);
     }
 }
示例#3
0
        public void Call(string callNumber)
        {
            // непосредственно звонок
            Console.WriteLine("Вызов " + callNumber);
            Console.ReadKey();

            // вызов события по звонку
            CallEvent?.Invoke(this, new CallEventsArgs(IMEI, callNumber));
        }
示例#4
0
        public void OutgoingCall(int outgoingNumber)
        {
            ICallInfo callInfo = new CallInfo()
            {
                ClientNumberOfTelephone = ClientNumberOfTelephone, OutgoingNumber = outgoingNumber
            };

            MessageHandlerEvent(this, $"Попытка вызова абонентом  {callInfo.ClientNumberOfTelephone} абонента {callInfo.OutgoingNumber}");
            CallEvent?.Invoke(this, callInfo);
            CurrentCallInfo = callInfo;
        }
示例#5
0
 public void CallingTo(PhoneNumber targetNumber)
 {
     if (targetNumber != phoneNumber)
     {
         CallEvent?.Invoke(this, new EventArgsCall(phoneNumber, targetNumber));
     }
     else
     {
         interaction.CallingToYourselfMessage(targetNumber);
     }
 }
示例#6
0
 public void OutgoingCall(string targetPhoneNumber)
 {
     if (isConnectedToPort)
     {
         Console.WriteLine($"Terminal {PhoneNumber} calling to {targetPhoneNumber}");
         CallEvent?.Invoke(this, new CallEventArgs(PhoneNumber, targetPhoneNumber));
     }
     else
     {
         throw new ArgumentException("Your terminal didn't connect to terminal");
     }
 }
示例#7
0
        private void RegDroppedCall(CallEventArgs arg)
        {
            var call = calls.FirstOrDefault(x => x.Source == arg.SourceNumber && x.Target == arg.TargetNumber);

            if (call == null)
            {
                return;
            }
            calls.Remove(call);

            call.Duration = DateTime.Now - call.CallDate;
            CallEvent?.Invoke(this, call);
        }
示例#8
0
    private void ParseStringToVK()
    {
        try
        {
            string   queryStr = instance.commandField.text;
            string[] tmpArray = queryStr.Split('?');
            string   method   = tmpArray[0];
            Dictionary <string, string> parameters = null;

            //find array after ?
            if (tmpArray.Length > 1 && tmpArray[1].Length > 0)
            {
                //find array after &
                tmpArray = tmpArray[1].Split(new[] { '&' }, StringSplitOptions.RemoveEmptyEntries);
                if (tmpArray[0].Contains('='))
                {
                    parameters = tmpArray.ToDictionary(x => x.Split('=')[0], x => x.Split('=')[1]);
                }
                else
                {
                    string action = tmpArray[0];

                    if (instance.clientAPIToggle.isOn)
                    {
                        CallClientAPIEvent.Invoke(method, action, null);
                    }
                }
            }

            if (instance.clientAPIToggle.isOn)
            {
                CallClientAPIEvent.Invoke(method, null, parameters);
            }
            else
            {
                CallEvent.Invoke(method, parameters);
            }
        }
        catch (Exception e) {
            Debug.LogError(e);
        }
    }
示例#9
0
 public void Call(string targetNumber)
 {
     CallEvent?.Invoke(this, new CallEventArgs(PhoneNumber, targetNumber));
 }
示例#10
0
 public virtual void DoCallEvent(int objectNumber)//генерация события
 {
     CallEvent?.Invoke(this, new CallArgsEvent(_number, objectNumber));
 }
示例#11
0
 /// <summary>
 /// 通知
 /// </summary>
 public virtual void Notify()
 {
     CallEvent?.Invoke();
 }
示例#12
0
 protected virtual void OnCall(CallEventArgs e)
 {
     CallEvent.Invoke(this, e);
 }
示例#13
0
 protected virtual void OnCallEvent(string receivingPhoneNumber)
 {
     CallEvent?.Invoke(this, new CallEventArgs(Number, receivingPhoneNumber));
 }
示例#14
0
文件: Port.cs 项目: CarryBerry/Task_3
 public void Calling(object sender, EventArgsCall e)
 {
     CallEvent?.Invoke(this, new EventArgsCall(e.Number, e.TargetNumber));
 }
示例#15
0
 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     tableView.DeselectRow(indexPath, true);
     CallEvent?.Invoke(this, _calls[indexPath.Row].CallerId);
 }
示例#16
0
 public void Call(int callNumber)
 {
     CallEvent?.Invoke(this, new CallArgs(TerminalNumber, callNumber));
 }
示例#17
0
 public void Call(int numberToCall)
 {
     CallEvent?.Invoke(this, new CallEventArgs(TelephoneNumber, numberToCall));
 }
        public void HandleHandHistory(string handHistory)
        {
            _summary = false;
            ResetOpponentsEvent?.Invoke();

            foreach (var line in handHistory.Split('\n'))
            {
                if (line.Contains("Seat") && !line.Contains("button") && !_summary)
                {
                    var split = line.Split(':');
                    var name  = split[1].Substring(1, split[1].IndexOf('(') - 2);
                    if (name == Controller.User.UserName)
                    {
                        continue;
                    }

                    if (!Controller.Opponents.ContainsKey(name))
                    {
                        Controller.Opponents[name] = new Opponent {
                            Name = name, HandsPlayed = 1
                        }
                    }
                    ;
                    else
                    {
                        Controller.Opponents[name].HandsPlayed++;
                        Controller.Opponents[name].InPlay = true;
                    }
                }
                else if (line.Contains("HOLE") || line.Contains("FLOP") || line.Contains("TURN") ||
                         line.Contains("RIVER") || line.Contains("SHOW DOWN") || line.Contains("SUMMARY"))
                {
                    var split = line.Split(' ');
                    SetHandHistoryStateEvent?.Invoke(split[1]);

                    if (line.Contains("SUMMARY"))
                    {
                        _summary = true;
                    }
                }
                else if (line.Contains(Controller.User.UserName) && line.Contains("collected"))
                {
                    SetHandWonEvent?.Invoke();
                }
                else if (line.Contains(Controller.User.UserName))
                {
                    if (line.Contains("calls"))
                    {
                        CallEvent?.Invoke();
                    }
                    else if (line.Contains("bets"))
                    {
                        BetEvent?.Invoke();
                    }
                    else if (line.Contains("raises"))
                    {
                        RaiseEvent?.Invoke();
                    }
                    else if (line.Contains("checks"))
                    {
                        CheckEvent?.Invoke();
                    }
                    else if (line.Contains("folds"))
                    {
                        FoldEvent?.Invoke();
                    }
                }
                else if (line.Contains("Hand #"))
                {
                    var split = line.Split(' ');
                    SetHandNumEvent?.Invoke(split[2]);
                }
                else if (line.Contains("calls"))
                {
                    var user = line.Split(':')[0];
                    OpponentCallEvent?.Invoke(user);
                }
                else if (line.Contains("checks"))
                {
                    var user = line.Split(':')[0];
                    OpponentCheckEvent?.Invoke(user);
                }
                else if (line.Contains("bets"))
                {
                    var user = line.Split(':')[0];
                    OpponentBetEvent?.Invoke(user);
                }
                else if (line.Contains("raises"))
                {
                    var user = line.Split(':')[0];
                    OpponentRaiseEvent?.Invoke(user);
                }
                else if (line.Contains("folds"))
                {
                    var user = line.Split(':')[0];
                    OpponentFoldEvent?.Invoke(user);
                }
            }
        }
示例#19
0
 private void OnCallEvent(int targetNumber)
 {
     CallEvent?.Invoke(this, new CallEventArgs(Number, targetNumber));
 }
示例#20
0
 public void MakeCall(PhoneNumber phoneNumber)
 {
     CallEvent?.Invoke(this, phoneNumber);
 }
示例#21
0
 protected virtual void DoCallingToEvent(int number, int targetNumber)
 {
     CallEvent?.Invoke(this, new CallArgsEvent(number, targetNumber));
 }