예제 #1
0
        void Form1_Load(object sender, EventArgs e)
        {
            this.Width = 1;
            this.Height = 1;
            this.DoubleBuffered = true;
            this.Invalidate();

            CommControl.Resolution.ChangeRes();
            Pub._memberManage = new MemberManage(this);
            Pub._meetingManage = new MeetingManage(this, Pub._talkControl);

            Pub._memberManage.Init();
            Pub._memberManage.LoadFap();

            Pub._meetingManage.Init();

            LoadAllUser();

            if (superTabControlMeeting.Tabs.Count > 0)
            {
                _currentSelectedMeetingModel = (MeetingGroupModel)superTabControlMeeting.Tabs[0].Tag;
                superTabControlMeeting.SelectedTab = (SuperTabItem)superTabControlMeeting.Tabs[0];
            }

            Pub._talkControl.OnMemberStateChanged += new TalkControl.MemberStateChanaged(_talkControl_OnMemberStateChanged);
            Pub._talkControl.OnWaitingQueensChanged += new TalkControl.WaitingQueensChaanged(_talkControl_OnWaitingQueensChanged);
            Pub._talkControl.OnDispatchStateChanged += new TalkControl.DispatchStateChanaged(_talkControl_OnDispatchStateChanged);
            Pub._talkControl.OnLemcQueensChanged += new TalkControl.LemcQueensChaanged(_talkControl_OnLemcQueensChanged);
            Pub._talkControl.OnHotStandbyChanged += new TalkControl.HotStandbyChaanged(_talkControl_OnHotStandbyChanged);
            //  dgvWait.CellClick += new DataGridViewCellEventHandler(dgvWait_CellClick);

            waitControl1.OnSelect += new DispatchPlatform.Control.WaitControl.SelectWaitDelgate(waitControl1_OnSelect);
            _boxModel = new DB_Talk.BLL.m_Box().GetModel(Pub.manageModel.BoxID.Value);
            stiAllMember.Click += new EventHandler(MemberTabItem_Click);


            lblTitle.Text = Pub._configModel.Title;
            this.Text = Pub._configModel.Title;

            DB_Talk.Model.m_Box box = new DB_Talk.BLL.m_Box().GetModel(Pub.manageModel.BoxID.Value);
            if (box != null)
            {
                Pub.BoxName = box.vc_Name;
            }
            imgBtnDispatch.Checked = true;
            superTabControlMain.SelectedTab = superTabItemDispatch;


            superTabItemDispatch.Tag = CommControl.PublicEnums.EnumGroupType.Normal;
            superTabItemMeeting.Tag = CommControl.PublicEnums.EnumGroupType.Meeting;


            Pub._meetingManage.SetControlIsCanSelect(false);

            // lblUserName.Text = Pub.manageModel.vc_UserName;
            timer1.Enabled = true;
            timer1.Interval = Pub._configModel.CheckBoxOnLineInterval * 1000;
            // this.WindowState = FormWindowState.Maximized;

            Pub.SetAutoRun(Pub._configModel.IsAutoStartBySystem);

            Pub.CanDeleteMemberState = true;
            Pub.CanSort = true;


            _memberGroupIndex = 0;



        }
예제 #2
0
        /// <summary>从当前选中的Tab页面上获取,会议分组信息</summary>
        private void GetCurrentMeetingModel()
        {

            if (superTabControlMeeting.SelectedTab != null)
            {
                superTabControlMeeting.SelectedTab.RaiseClick();
                _currentSelectedMeetingModel = (MeetingGroupModel)superTabControlMeeting.SelectedTab.Tag;
            }
            else
            {
                _currentSelectedMeetingModel = null;
            }
        }
예제 #3
0
 /// <summary>
 /// 删除临时会议成员
 /// </summary>
 /// <param name="model"></param>
 /// <param name="meetingID"></param>
 /// <param name="number"></param>
 private void DeleteTempMeetingMember(MeetingGroupModel model,int meetingID,long number)
 {
     int tempCount = model.lstControl.Count;
     for (int j = tempCount - 1; j >= 0; j--)
     {
         if (model.lstControl[j].Number == number)
         {
             model.lstControl.Remove(model.lstControl[j]);
         }
     }
     if (model.lstControl.Count == 0)
     {
         DeleteMeeting(meetingID);
     }
     else
     {
         Pub.CanDestroyControl = false;
         model.pageControl.Init(model.lstControl);
         Pub.CanDestroyControl = true;
     }
 }
예제 #4
0
        /// <summary>增加会议分组</summary>
        public void AddMeetingGroup(MeetingGroupModel.EnumMeetingState meetingState, DispatchPlatform.MeetingGroupModel.EnumMeetingType meetingType, int groupID, int meetingID, string meetingGroupName, List<DB_Talk.Model.m_Member> lstMembers, long dispatchNumber, bool tabVisible)
        {
            foreach (SuperTabItem item in _mainForm.superTabControlMeeting.Tabs)
            {
                MeetingGroupModel model = (MeetingGroupModel)item.Tag;
                if (model.GroupName == meetingGroupName || lstMembers.Count==0)
                {
                    return;
                }
            }


            SuperTabItem tabItem = new SuperTabItem();
            
            tabItem.GlobalItem = false;
            tabItem.SelectedTabFont = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
            superTabLinearGradientColorTable1.Colors = new System.Drawing.Color[] {
        System.Drawing.Color.FromArgb(((int)(((byte)(36)))), ((int)(((byte)(41)))), ((int)(((byte)(48))))),
        System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(113)))), ((int)(((byte)(130)))))};
            superTabItemStateColorTable1.Background = superTabLinearGradientColorTable1;
            superTabColorStates1.Selected = superTabItemStateColorTable1;
            superTabItemColorTable1.Bottom = superTabColorStates1;
            tabItem.TabColor = superTabItemColorTable1;
            
            tabItem.Text = meetingGroupName;


            Pub.SetSupperTabColor(tabItem);

            tabItem.Click += new EventHandler(_mainForm.MeetingTabItem_Click);

            MeetingGroupModel mModel = new MeetingGroupModel();
            
            mModel.MeetingState = meetingState;
            mModel.MeetingID = meetingID;
            mModel.GroupID = groupID;
            mModel.GroupName = meetingGroupName;
            mModel.MeetingType = meetingType;
            mModel.DispatchNumber = dispatchNumber;
            tabItem.Tag = mModel;

            _lstGroup.Add(mModel);

           
            _mainForm.superTabControlMeeting.Tabs.Add(tabItem);

            _mainForm.superTabControlMeeting.SelectedTab = tabItem;
            SuperTabControlPanel sp = new SuperTabControlPanel();

            tabItem.Visible = tabVisible;

            _mainForm.superTabControlMeeting.Controls.Add(sp);
            tabItem.AttachedControl = sp;

            //_lstGroup.Add(mModel);
            PageControl pControl = new PageControl();
            mModel.pageControl = pControl;
            pControl.Dock = DockStyle.Fill;
            sp.Controls.Add(pControl);
            
            foreach (DB_Talk.Model.m_Member item in lstMembers)
            {
                if (item.i_Number != Pub.manageModel.LeftDispatchNumber.Value && item.i_Number != Pub.manageModel.RightDispatchNumber.Value)
                {
                    SingleUserControl sc = new SingleUserControl();

                    sc.Number = item.i_Number.Value;
                    sc.MemberName = item.vc_Name;
                    sc.ID = item.ID;
                    if (item.DepartmentID!=null)
                    {
                        sc.DepartmentID = item.DepartmentID.Value;    
                    }

                    if (item.i_TellType != null)
                    {
                        sc.TellType = (CommControl.PublicEnums.EnumTelType)item.i_TellType.Value;
                        if (item.i_TellType.Value==0)
                        {
                            sc.TellType = PublicEnums.EnumTelType.WiFi手机;
                        }
                    }
                    else
                    {
                        sc.TellType = PublicEnums.EnumTelType.WiFi手机;
                    }

                    if (meetingType == MeetingGroupModel.EnumMeetingType.Temp)
                    {
                        sc.PeerNumber = meetingGroupName;
                        sc.UserLineStatus = Pub._memberManage.GetMemberState(item.i_Number.Value);
                    }

                    mModel.lstControl.Add(sc);
                    sc.Click += new EventHandler(_mainForm.single_Click);
                }
            }
            if (meetingType == MeetingGroupModel.EnumMeetingType.Temp)
            {
                mModel.DispatchNumber = dispatchNumber;
                tabItem.RaiseClick();
            }
            pControl.Init(mModel.lstControl);
        }
예제 #5
0
        /// <summary>
        /// 删除正式会议成员
        /// </summary>
        /// <param name="model"></param>
        /// <param name="meetingID"></param>
        /// <param name="number"></param>
        private void DeleteFormlMeetingMember(SuperTabItem sti,MeetingGroupModel model, long number)
        {
            List<DB_Talk.Model.v_GroupMembers> lstGroupMember = new DB_Talk.BLL.v_GroupMembers().GetModelList("groupid=" + model.GroupID);

            DB_Talk.Model.v_GroupMembers member = lstGroupMember.Find(m => m.i_Number == number);

            if (member == null)//说明是邀请过来的
            {
                model.lstControl.Remove(model.lstControl.Find(p => p.Number == number));
            }
            //int tempCount = model.lstControl.Count;
            //for (int j = tempCount - 1; j >= 0; j--)
            //{
            //    bool isFind = false;
            //    foreach (DB_Talk.Model.v_GroupMembers mem in lstGroupMember)
            //    {
            //        if (model.lstControl[j].Number == mem.i_Number.Value)
            //        {
            //            isFind = true;
            //            break;
            //        }
            //    }
            //    if (isFind == false)
            //    {
            //        model.lstControl.Remove(model.lstControl[j]);
            //    }
            //}
            Pub.CanDestroyControl = false;
            model.pageControl.Init(model.lstControl);
            Pub.CanDestroyControl = true;

            List<SingleUserControl> lstControl = model.lstControl.FindAll(p =>
                    p.UserLineStatus == TalkControl.EnumUserLineStatus.Busy
                    || p.UserLineStatus == TalkControl.EnumUserLineStatus.Forbid
                    || p.UserLineStatus == TalkControl.EnumUserLineStatus.Isolate
                    || p.UserLineStatus == TalkControl.EnumUserLineStatus.Ring
                    || p.UserLineStatus == TalkControl.EnumUserLineStatus.Record
                    );

            if (lstControl != null && lstControl.Count > 0)
            {

            }
            else
            {
                model.MeetingState = MeetingGroupModel.EnumMeetingState.Off;
                sti.RaiseClick();
            }

            //bool allIdel = true;//所有都空闲改变会议状态为结束
            ////
            //foreach (SingleUserControl item in model.lstControl)
            //{
            //    if (item.UserLineStatus == TalkControl.EnumUserLineStatus.Busy)
            //    {
            //        allIdel = false;
            //        break;
            //    }
            //}
            //if (allIdel)
            //{
            //    model.MeetingState = MeetingGroupModel.EnumMeetingState.Off;
             //_mainForm.superTabControlMeeting.Tabs[i].RaiseClick();
            //}
        }