Example #1
0
        /// <summary>
        /// Редактирование аккаунта
        /// </summary>
        private void AccEdit()
        {
            PjsipAccount acc = lbAccounts.SelectedItem as PjsipAccount;

            if (acc != null)
            {
                AccountForm af = new AccountForm();
                af.Account = acc;
                if (af.ShowDialog() == DialogResult.OK)
                {
                    SaveConfig();
                }
            }
        }
Example #2
0
        /// <summary>
        /// Добавление нового аккаунта
        /// </summary>
        private void AccAdd()
        {
            AccountForm af = new AccountForm();

            af.Account = new PjsipAccount();
            if (af.ShowDialog() == DialogResult.OK)
            {
                PjsipAccount acc = af.Account;
                acc.OnAccountRegState     = UpdateStatus;
                acc.OnAccountIncomingCall = IncomingCall;
                lbAccounts.Items.Add(acc);
                SaveConfig();
            }
            else
            {
                af.Account.Dispose();
            }
        }