예제 #1
0
 private void addNewAccountButton_Click(object sender, EventArgs e)
 {
     SipAccountConfig cfg = new SipAccountConfig();
     SipAccountEditorForm f = new SipAccountEditorForm(cfg);
     if (f.ShowDialog() == DialogResult.OK)
     {
         if (SipAccountManager.Default.DefaultAcrcount == null)
         {
             cfg.IsDefault = true;
         }
         bindingSourceSipAccounts.Add(cfg);
     }
 }
 public SipAccountEditorForm(SipAccountConfig cfg)
 {
     InitializeComponent();
     this.iAccountBindingSource.DataSource = cfg;
 }
예제 #3
0
 public SipAccountConfig(SipAccountConfig cfg)
 {
     copy(cfg);
 }
예제 #4
0
 private void copy(SipAccountConfig cfg)
 {
     this.AccountName = cfg.AccountName;
     this.DisplayName = cfg.DisplayName;
     this.DomainName = cfg.DomainName;
     this.HostName = cfg.HostName;
     this.Id = cfg.Id;
     this.Index = cfg.Index;
     this.Password = cfg.Password;
     this.ProxyAddress = cfg.ProxyAddress;
     this.RegState = cfg.RegState;
     this.TransportMode = cfg.TransportMode;
     this.UserName = cfg.UserName;
 }
예제 #5
0
        public virtual void CancelEdit()
        {
            if (!editing) return;

            editing = false;
            copy(savedObject);
            savedObject = null;
        }
예제 #6
0
 public virtual void BeginEdit()
 {
     if (editing) return;
     savedObject = this.Copy();
     editing = true;
 }