Пример #1
0
        /// <summary>
        /// This will be called when the state of a phone line has changed.
        /// </summary>
        private void Line_PhoneLineStateChanged(object sender, VoIPEventArgs <PhoneLineState> e)
        {
            IPhoneLine line = sender as IPhoneLine;

            if (line == null)
            {
                return;
            }

            PhoneLineState state = e.Item;

            // registration succeeded, subscribe for MWI
            if (state == PhoneLineState.RegistrationSucceeded)
            {
                line.SubscribeToMWI();
            }

            OnPhoneLineStateChanged(line);
            OnPropertyChanged("SelectedLine.RegisteredInfo");
        }
Пример #2
0
 /// <summary>
 /// Occurs when phone line state has changed.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void phoneLine_PhoneLineInformation(object sender, VoIPEventArgs<PhoneLineState> e)
 {
     phoneLineInformation = e.Item;
     InvokeGUIThread(() => {
         if (e.Item == PhoneLineState.RegistrationSucceeded) {
             m_PhoneRegisterSuccessful = true;
             this.PhoneRegisterSuccess();
         }
         else if (e.Item == PhoneLineState.RegistrationRequested) {
         }
         else if (e.Item == PhoneLineState.RegistrationFailed) {
             m_PhoneRegisterSuccessful = false;
         }
     });
 }