示例#1
0
        } // btn_group_Click

        /// <summary>
        /// 单击添加好友
        /// </summary>
        /// <param name="sender">the sender</param>
        /// <param name="e">the e</param>
        private void btn_addFrd_Click(object sender, EventArgs e)
        {
            W_AddFrd addFrd = new W_AddFrd(userName);

            if (addFrd.ShowDialog() == DialogResult.OK)
            {
                // 刷新好友列表
                pnl_userList.Controls.Clear();
                IMSLogStateChangeClient getUserList = new IMSLogStateChangeClient(); // 引用的网络服务(本地)
                userList = getUserList.getFrdList(userName);
                UIHandler.AddButton(userName, pnl_userList, userList);
            } // if
        }     // btn_addFrd_Click
示例#2
0
        /// <summary>
        /// Initializes a new instance of the W_Main class
        /// </summary>
        /// <param name="userName">current userName</param>
        /// <param name="userPwd">password of currentUser</param>
        public W_Main(string userName, string userPwd)
        {
            InitializeComponent();

            this.userName     = userName;
            this.userPwd      = userPwd;
            lbl_userName.Text = userName;

            IMSLogStateChangeClient getUserList = new IMSLogStateChangeClient();

            userList = getUserList.getFrdList(userName);
            //根据用户列表添加按钮
            UIHandler.AddButton(userName, pnl_userList, userList);
        } // W_Main