Esempio n. 1
0
        private void Application_Exit(object sender, ExitEventArgs e)
        {
            if (SIPUA != null)
            {
                SIPUA.Stop();
            }

            if (HandsetMgr != null)
            {
                HandsetMgr.UnInitialize();
            }

            foreach (Subsystem system in Systeminfo.Subsystems.Where(system => system.InitResult != InitResult.InitNone))
            {
                system.Uninitialize();
            }
        }
Esempio n. 2
0
        public void InitializeSipAccounts()
        {
            var stopWatch = new Stopwatch();

            stopWatch.Start();

            foreach (var system in Systeminfo.Subsystems)
            {
                Account account = system.GetSIPAccount();
                if (account == null)
                {
                    continue;
                }

                SIPUA.AddAccount(account);
                system.AccountId = account.Id;

                string proxy = "";
                if (!account.IsDomainRegistration)
                {
                    proxy = account.Proxy;
                }

                if (HandsetMgr.HandsetLeft != null)
                {
                    HandsetMgr.HandsetLeft.AddAccount(account.User,
                                                      account.Password, account.Domain,
                                                      proxy, false);
                }

                if (HandsetMgr.HandsetRight != null)
                {
                    HandsetMgr.HandsetRight.AddAccount(account.User,
                                                       account.Password, account.Domain,
                                                       proxy, false);
                }
            }

            stopWatch.Stop();
            Log.Info(string.Format("TimeSpendCounter__InitializeSipAccounts__{0}", stopWatch.ElapsedMilliseconds));
        }