Пример #1
0
 private AccountModel GetAccount()
 {
     account = this.accountBasicInfo1.Account;
     account.CDChannelList = this.cdCannelList.GetChannelList();
     account.TYChannelList = this.tyCannelList.GetChannelList();
     account.UserID = UserModel.Current.UserID;
     return account;
 }
Пример #2
0
 public void Connect(AccountModel para)
 {
     {
         var temp = new SocketPara();
         temp.ID = para.AccountName;
         //temp.IP = para.IP;
         temp.IP = "127.0.0.1";
         temp.Port = 8888;
         SocketClient.ConnectServer(temp);
     }
 }
Пример #3
0
 public void AddAccount(AccountModel p)
 {
     AccountTag accountTag = new AccountTag(this, p);
     ItemList.Add(accountTag);
     accountTag.Dock = System.Windows.Forms.DockStyle.Fill;
     accountTag.Name = "accountTag" + (++i);
     accountTag.Padding = new System.Windows.Forms.Padding(2);
     accountTag.Size = new System.Drawing.Size(207, 27);
     accountTag.TabIndex = 1;
     this.tlp_CountList.RowCount = ItemList.Count + 1;
     this.tlp_CountList.RowStyles.Insert(0, new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
     this.tlp_CountList.Controls.Add(accountTag, 0, ItemList.Count - 1);
     Current = accountTag;
 }
Пример #4
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            this.account = GetAccount();
            SaveAccount(account);
            if (this.IsNew)
            {
                this.accountList.AddAccount(account);
            }
            else
            {
                this.accountList.Update(account);
            }

            this.Close();
        }
Пример #5
0
        public AccountSetting(AccountList accList, AccountModel acc, bool isNew)
        {
            InitializeComponent();
            this.account = acc;
            this.IsNew = isNew;
            this.accountList = accList;
            source = Buz.GetDestinationByAccount(acc.AccountName);
            tyCannelList = new ChannelList(acc.TYChannelList, false);
            tyCannelList.Dock = DockStyle.Fill;
            this.tabPage1.Controls.Add(tyCannelList);

            cdCannelList = new ChannelList(acc.CDChannelList, true);
            cdCannelList.Dock = DockStyle.Fill;
            this.tabPage2.Controls.Add(cdCannelList);

            this.accountBasicInfo1.SetChannelSource(source);
            this.tyCannelList.SetChannelSource(source);
            this.cdCannelList.SetChannelSource(source);
            this.accountBasicInfo1.Account = this.account;
        }
Пример #6
0
 internal void Update(AccountModel account)
 {
     this.Current.Account = account;
 }
Пример #7
0
 private void tsb_addAccount_Click(object sender, EventArgs e)
 {
     AccountModel acc = new AccountModel();
     new AccountSetting(this, acc, true).ShowDialog();
 }
Пример #8
0
 private void SaveAccount(AccountModel res)
 {
     AccountBuz buz = new AccountBuz();
     buz.Save(res);
 }
Пример #9
0
 public void Save(AccountModel para)
 {
     new AccountFile<AccountModel>(UserModel.Current.UserID).Save(para, para.Alias);
 }