Ejemplo n.º 1
0
        public UserOnlineList(ABCChatScreen form)
        {
            ChatScreen = form;

            InitializeComponent();

            lstAllUsers = new BindingList <ABCUserInfo>(ABCUserProvider.GetAllUsers(true, true));

            this.gridControl1.DataSource = lstAllUsers;
            this.gridControl1.RefreshDataSource();
            this.gridView1.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(gridView1_CustomDrawCell);
            this.gridView1.FocusRectStyle  = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.None;
            this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.gridView1.OptionsSelection.EnableAppearanceFocusedRow  = false;
            this.gridView1.Click        += new EventHandler(gridView1_Click);
            this.gridView1.MouseMove    += new MouseEventHandler(gridView1_MouseMove);
            this.gridView1.RowCellStyle += new RowCellStyleEventHandler(gridView1_RowCellStyle);
            this.gridView1.ExpandAllGroups();

            btnShowOnlineOnly.Checked = false;
            ChangeView(false);

            btnSoundOn.Checked = true;
            ChangeSoundOnOff(true);

            Timer timer = new Timer();

            timer.Interval = 15000;
            timer.Tick    += new EventHandler(timer_Tick);
            timer.Start();
        }
Ejemplo n.º 2
0
        public void LoadAllUsers( )
        {
            lstAllUsers.Clear();
            List <ABCUserInfo> lstTemp = ABCUserProvider.GetAllUsers(false, false);

            foreach (ABCUserInfo user in lstTemp)
            {
                lstAllUsers.Add(user);
            }

            this.gridControl1.DataSource = lstAllUsers;
            this.gridControl1.RefreshDataSource();
        }