コード例 #1
0
        /// <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);
        }
コード例 #2
0
 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;
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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)))
                    });
                }
            }
        }
コード例 #5
0
 public void AnswerCall(PhoneNumber targetNumber, RespondState state)
 {
     AnswerEvent?.Invoke(this, new EventArgsAnswer(phoneNumber, targetNumber, state));
 }
コード例 #6
0
 public virtual void DoAnswerEvent(int objectNumber, StatusCall status, Guid id)        //генерация события
 {
     AnswerEvent?.Invoke(this, new AnswerArgsEvent(_number, objectNumber, status, id)); //запуск события
 }
コード例 #7
0
ファイル: Port.cs プロジェクト: GrinevichAS/Task3
 protected virtual void OnAnswerEvent(CallEventArgs e)
 {
     AnswerEvent.Invoke(this, e);
 }
コード例 #8
0
 private void OnAnswerEvent(int targetNumber)
 {
     AnswerEvent?.Invoke(this, new AnswerEventArgs(targetNumber));
 }
コード例 #9
0
 public void AnswerToCall(int target, CallState state)
 {
     AnswerEvent?.Invoke(this, new EventArgsAnswer(TelephonNumber, target, state));
 }
コード例 #10
0
ファイル: Terminal.cs プロジェクト: dante909/PhoneStation
 public void AnswerToCall(string incoming, CallState state)
 {
     AnswerEvent?.Invoke(this, new AnswerEventArgs(incoming, PhoneNumber, state));
 }
コード例 #11
0
 public void Answer(int fromNumber)
 {
     AnswerEvent?.Invoke(this, new CallEventArgs(fromNumber, TelephoneNumber));
 }
コード例 #12
0
ファイル: Port.cs プロジェクト: CarryBerry/Task_3
 public void Answer(object sender, EventArgsAnswer e)
 {
     AnswerEvent?.Invoke(this, new EventArgsAnswer(e.Number, e.TargetNumber, e.CurrentState));
 }
コード例 #13
0
ファイル: Port.cs プロジェクト: Pahanbl4/EpamTrainingC
 protected virtual void DoAnswerToEvent(AnswerArgsEvent even)
 {
     AnswerEvent?.Invoke(this, new AnswerArgsEvent(even.TelephoneNumber, even.ObjectTelephoneNumber, even.StatusInCall, even.Id));//запуск события
 }