Пример #1
0
        private bool disposed;                  // disposal management flag

        /// <summary>
        /// Assign internal properties to default values and prepare for initialization.
        /// </summary>
        /// <param name="codecData">the data object created when parsing a JSON config file.</param>
        public SshVtcCodec(Source codecData)
        {
            disposed               = false;
            this.codecData         = codecData;
            Model                  = codecData.Name;
            Manufacturer           = codecData.Type;
            GUID                   = new Guid(codecData.GuId);
            numberToDial           = string.Empty;
            CurrentState           = eCallState.NotConnected;
            previousState          = eCallState.NotConnected;
            clientControl          = new SshClientControl();
            clientControl.RxEvent += SshClientHandler;
        }
Пример #2
0
        private void ChangeState(eCallState newState)
        {
            if (newState != CurrentState)
            {
                previousState = CurrentState;
                CurrentState  = newState;

                EventHandler <GenericEventArgs <eCallState> > temp = CallEvent;
                if (temp != null)
                {
                    temp(this, new GenericEventArgs <eCallState>(CurrentState));
                }
            }
        }