public void MakeCall(PhoneNumber phoneNumber) { if (CallEvent != null) { CallEvent.Invoke(this, phoneNumber); } }
public void MakeCall(int number) { if (CallEvent != null) { CallEvent.Invoke(this, number); } }
public void Call(string callNumber) { // непосредственно звонок Console.WriteLine("Вызов " + callNumber); Console.ReadKey(); // вызов события по звонку CallEvent?.Invoke(this, new CallEventsArgs(IMEI, callNumber)); }
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; }
public void CallingTo(PhoneNumber targetNumber) { if (targetNumber != phoneNumber) { CallEvent?.Invoke(this, new EventArgsCall(phoneNumber, targetNumber)); } else { interaction.CallingToYourselfMessage(targetNumber); } }
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"); } }
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); }
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); } }
public void Call(string targetNumber) { CallEvent?.Invoke(this, new CallEventArgs(PhoneNumber, targetNumber)); }
public virtual void DoCallEvent(int objectNumber)//генерация события { CallEvent?.Invoke(this, new CallArgsEvent(_number, objectNumber)); }
/// <summary> /// 通知 /// </summary> public virtual void Notify() { CallEvent?.Invoke(); }
protected virtual void OnCall(CallEventArgs e) { CallEvent.Invoke(this, e); }
protected virtual void OnCallEvent(string receivingPhoneNumber) { CallEvent?.Invoke(this, new CallEventArgs(Number, receivingPhoneNumber)); }
public void Calling(object sender, EventArgsCall e) { CallEvent?.Invoke(this, new EventArgsCall(e.Number, e.TargetNumber)); }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { tableView.DeselectRow(indexPath, true); CallEvent?.Invoke(this, _calls[indexPath.Row].CallerId); }
public void Call(int callNumber) { CallEvent?.Invoke(this, new CallArgs(TerminalNumber, callNumber)); }
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); } } }
private void OnCallEvent(int targetNumber) { CallEvent?.Invoke(this, new CallEventArgs(Number, targetNumber)); }
public void MakeCall(PhoneNumber phoneNumber) { CallEvent?.Invoke(this, phoneNumber); }
protected virtual void DoCallingToEvent(int number, int targetNumber) { CallEvent?.Invoke(this, new CallArgsEvent(number, targetNumber)); }