/// <summary> /// “确定”按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void certainButton_Click(object sender, EventArgs e) { string str = "["; foreach (Control control in this.Controls) { if (control is PanelExLine) { PanelExLine pe = (PanelExLine)control; if (pe.panelEx == null) { MessageBox.Show("请完成所有连线"); return; } else { str += pe.index + "(" + pe.panelEx.index + "),"; } } } str = str.Substring(0, str.Length - 1); str += "]"; AnswerEvent?.Invoke(str); Close(); //System.Diagnostics.Debug.WriteLine(str); }
public void Answered(object o, EventArgs e) { Terminal.ToAnswerCall -= Answered; Terminal.ToRejectCall -= Rejected; Terminal.ToNoAnswerCall -= NoAnswered; Mode = Enums.Mode.Busy; AnswerEvent?.Invoke(this, null); Terminal.EndCallEvent += EndCallOnPort; ATS.GetStation().EndCallEvent += EndCallOnPort; }
public void TakeIncomingCall(object sender, CallArgs e) { Console.WriteLine("Incoming call from number: {0} to terminal {1}", e.TelephoneNumber, e.TargetTelephoneNumber); Console.WriteLine("Y-Answer\nN-Rejekt"); char k = Char.ToUpper(Console.ReadKey().KeyChar); if (k == 'Y') { Console.WriteLine(); AnswerEvent?.Invoke(this, new AnswerArgs(e.TelephoneNumber, e.TargetTelephoneNumber, true)); } else if (k == 'N') { Console.WriteLine(); EndCall(); } }
public void AnswerClick(object sender, EventArgs e) { label = sender as Label; label.BackColor = Color.Orange; label.ForeColor = Color.White; // label.Text.Substring(2); // Thread.Sleep(2000); foreach (Answer item in question.answers) { if (item.ToString() == label.Text.Substring(2)) { AnswerEvent?.Invoke(sender, new AnswerEventArgs() { answer = item, num = uint.Parse(labels[indexlabels].Text.Substring((indexlabels >= 9 ? 6 : 5))) }); } } }
public void AnswerCall(PhoneNumber targetNumber, RespondState state) { AnswerEvent?.Invoke(this, new EventArgsAnswer(phoneNumber, targetNumber, state)); }
public virtual void DoAnswerEvent(int objectNumber, StatusCall status, Guid id) //генерация события { AnswerEvent?.Invoke(this, new AnswerArgsEvent(_number, objectNumber, status, id)); //запуск события }
protected virtual void OnAnswerEvent(CallEventArgs e) { AnswerEvent.Invoke(this, e); }
private void OnAnswerEvent(int targetNumber) { AnswerEvent?.Invoke(this, new AnswerEventArgs(targetNumber)); }
public void AnswerToCall(int target, CallState state) { AnswerEvent?.Invoke(this, new EventArgsAnswer(TelephonNumber, target, state)); }
public void AnswerToCall(string incoming, CallState state) { AnswerEvent?.Invoke(this, new AnswerEventArgs(incoming, PhoneNumber, state)); }
public void Answer(int fromNumber) { AnswerEvent?.Invoke(this, new CallEventArgs(fromNumber, TelephoneNumber)); }
public void Answer(object sender, EventArgsAnswer e) { AnswerEvent?.Invoke(this, new EventArgsAnswer(e.Number, e.TargetNumber, e.CurrentState)); }
protected virtual void DoAnswerToEvent(AnswerArgsEvent even) { AnswerEvent?.Invoke(this, new AnswerArgsEvent(even.TelephoneNumber, even.ObjectTelephoneNumber, even.StatusInCall, even.Id));//запуск события }