Ejemplo n.º 1
0
        public void SetCurrent(ExtendedTox tox)
        {
            _toxAv?.Dispose();

            _toxAv = new ToxAv(tox);

            RegisterHandlers();
        }
Ejemplo n.º 2
0
        public void SetCurrent(ExtendedTox tox)
        {
            if (_toxAv != null)
            {
                _toxAv.Dispose();
            }

            _toxAv = new ToxAv(tox);

            RegisterHandlers();
        }
Ejemplo n.º 3
0
        private ToxModel()
        {
            var tox = new ExtendedTox(new ToxOptions(true, true))
            {
                Name = "User",
                StatusMessage = "Using OneTox."
            };
            SetCurrent(tox);

            _semaphore = new SemaphoreSlim(1);

            _lastConnectionStatusRegistry = new LastConnectionStatusRegistry();
        }
Ejemplo n.º 4
0
        /// <summary>
        ///     Replaces the current underlying EntededTox instance with a new one.
        ///     It's used for profile switching.
        /// </summary>
        /// <param name="tox">The new ExtendedTox instance.</param>
        public void SetCurrent(ExtendedTox tox)
        {
            ToxAvModel.Instance.SetCurrent(tox);

            if (_tox != null)
            {
                _tox.Dispose();
            }

            _tox = tox;
            RegisterHandlers();

            RaiseAllPropertiesChanged();
            RaiseFriendListReseted();
        }