示例#1
0
        public FrmSalesConsultant()
        {
            InitializeComponent();

            #region Background Thread for Event Logging
            nextRefreshTime = DateTime.Now;
            refreshInterval = TimeSpan.FromSeconds(0.20);

            stats = new int[6];

            work = new WorkQueue();
            work.ConcurrentLimit = 100;
            work.AllWorkCompleted += new EventHandler(work_AllWorkCompleted);
            work.WorkerException += new ResourceExceptionEventHandler(work_WorkerException);
            work.ChangedWorkItemState += new ChangedWorkItemStateEventHandler(work_ChangedWorkItemState);

            minThreads = ((WorkThreadPool)work.WorkerPool).MinThreads;
            maxThreads = ((WorkThreadPool)work.WorkerPool).MaxThreads;
            concurrentLimit = work.ConcurrentLimit;
            #endregion
            #region Toggle Bar Menu
            m_oCallViewBar = new CallViewBar() {
                Dock = DockStyle.Fill
            };

            m_oCallLogBar = new CallLogBar() {
                Dock = DockStyle.Fill,
                Visible = false
            };

            pnlToggleBar.Controls.Clear();
            pnlToggleBar.Controls.AddRange(new Control[] { m_oCallViewBar, m_oCallLogBar });
            #endregion
            #region Follow Up Popup Window
            m_oFollowUp = new FollowUpEditor() {
                Dock = DockStyle.Fill
            };
            m_oFollowUp.btnSave_OnClick += new FollowUpEditor.btnSaveOnClickEventHandler(m_oFollowUp_btnSave_OnClick);
            m_oFollowUp.GetListSource += new FollowUpEditor.GetListSourceEventHandler(m_oFollowUp_GetListSource);
            m_oFollowUpDialog = new PopupDialog() {
                FormBorderStyle = FormBorderStyle.FixedSingle,
                MinimizeBox = false,
                MaximizeBox = false,
                StartPosition = FormStartPosition.CenterScreen,
                Text = "Follow Up Window",
                ClientSize = new Size(m_oFollowUp.Width + 2, m_oFollowUp.Height + 2),
                CloseBox = false
            };
            m_oFollowUpDialog.Controls.Add(m_oFollowUp);
            //m_oFollowUpDialog.FormClosing += new FormClosingEventHandler(m_oFollowUpDialog_FormClosing);
            #endregion
            #region Call & Follow Up Toggle Bar
            m_oFollowUpBar = new FollowUpBar() {
                Dock = DockStyle.Fill
            };
            //m_oFollowUpBar.btnTop_OnClick += new FollowUpBar.btnTopOnClickEventHandler(m_oFollowUpBar_btnTop_OnClick);
            //m_oFollowUpBar.btnPrevious_OnClick += new FollowUpBar.btnPreviousOnClickEventHandler(m_oFollowUpBar_btnPrevious_OnClick);
            //m_oFollowUpBar.btnNext_OnClick += new FollowUpBar.btnNextOnClickEventHandler(m_oFollowUpBar_btnNext_OnClick);
            //m_oFollowUpBar.btnLoad_OnClick += new FollowUpBar.btnLoadOnClickEventHandler(m_oFollowUpBar_btnLoad_OnClick);
            //m_oFollowUpBar.GetCampaignBookingContactList += new FollowUpBar.GetCampaignBookingContactListEventHandler(m_oFollowUpBar_GetCampaignBookingContactList);
            //m_oFollowUpBar.GetCampaignBookingArgs += new FollowUpBar.GetCampaignBookingArgsEventHandler(m_oFollowUpBar_GetCampaignBookingArgs);
            //m_oFollowUpBar.HasBrowsableData += new FollowUpBar.HasBrowsableDataEventHandler(m_oFollowUpBar_HasBrowsableData);
            //m_oFollowUpBar.HasPendingCallAndLog += new FollowUpBar.HasPendingCallAndLogEventHandler(m_oFollowUpBar_HasPendingCallAndLog);
            //m_oFollowUpBar.btnSave_OnClick += new FollowUpBar.btnSaveOnClickEventHandler(m_oFollowUpBar_btnSave_OnClick);
            //m_oFollowUpBar.LoadFollowUps += new FollowUpBar.LoadFollowUpsEventHandler(m_oFollowUpBar_LoadFollowUps);
            //m_oFollowUpBar.CanWorkOnCompany += new FollowUpBar.CanWorkOnCompanyEventHandler(m_oFollowUpBar_CanWorkOnCompany); //+= new FollowUpBar.DialogOnEditModeEventHandler(m_oFollowUpBar_DialogOnEditMode);

            m_oCallLogRemarksBar = new CallLogRemarks() {
                Dock = DockStyle.Fill,
                Visible = false
            };
            m_oCallLogRemarksBar.btnSaveCallLog_OnClick += new CallLogRemarks.btnSaveCallLogOnClickEventHandler(m_oCallLogRemarksBar_btnSaveCallLog_OnClick);
            m_oCallLogRemarksBar.EndCall_Initiated += new CallLogRemarks.EndCallInitiatedEventHandler(m_oCallLogRemarksBar_EndCall_Initiated);
            m_oCallLogRemarksBar.GetContactPerson += new CallLogRemarks.GetContactPersonEventHandler(m_oCallLogRemarksBar_GetContactPerson);
            m_oCallLogRemarksBar.UserOnCall += new CallLogRemarks.UserOnCallEventHandler(m_oCallLogRemarksBar_UserOnCall);
            m_oCallLogRemarksBar.UserOnCallForceStop += new CallLogRemarks.UserOnCallForceStopEventHandler(m_oCallLogRemarksBar_UserOnCallForceStop);
            pnlCallLogAndFollowUp.Controls.Clear();
            pnlCallLogAndFollowUp.Controls.AddRange(new Control[] {
                m_oFollowUpBar,
                m_oCallLogRemarksBar
            });
            #endregion
            #region Help Information Form
            m_HelpInfo.Shown += new EventHandler(m_HelpInfo_Shown);
            m_HelpInfo.FormClosed += new FormClosedEventHandler(m_HelpInfo_FormClosed);
            #endregion

            this.RegisterEvents();
            this.SetStateCallerBarGroup(false);

            tcSalesConsultant.CustomHeaderButtons[0].Enabled = false;
            tcSalesConsultant.CustomHeaderButtons[0].Visible = false;

            /**
             * https://brightvision.jira.com/browse/PLATFORM-3141
             * disable the mouse wheel scrolling.
             */
            cboCampaignList.MouseWheel += cboCampaignList_MouseWheel;
        }
示例#2
0
        public FrmManagerApplication()
        {
            InitializeComponent();
            this.KeyPreview = true;
            ContextMenuStrip _cmsMenu = new ContextMenuStrip();
            m_tsmiLogOut = new ToolStripMenuItem("Log Out");
            m_tsmiLogOut.Click += new EventHandler(m_tsmiLogOut_Click);
            m_tsmiLogOut.Image = Properties.Resources.logout;
            m_tsmiExit = new ToolStripMenuItem("Exit");
            m_tsmiExit.Click += new EventHandler(m_tsmiExit_Click);
            m_tsmiExit.Image = Properties.Resources.close;
            _cmsMenu.Items.Add(m_tsmiLogOut);
            _cmsMenu.Items.Add(m_tsmiExit);
            this.ContextMenuStrip = _cmsMenu;
            this.ContextMenuStrip.BringToFront();

            #region Background Thread for Event Logging
            nextRefreshTime = DateTime.Now;
            refreshInterval = TimeSpan.FromSeconds(0.20);

            stats = new int[6];

            work = new WorkQueue();
            work.ConcurrentLimit = 100;
            work.AllWorkCompleted += new EventHandler(work_AllWorkCompleted);
            work.WorkerException += new ResourceExceptionEventHandler(work_WorkerException);
            work.ChangedWorkItemState += new ChangedWorkItemStateEventHandler(work_ChangedWorkItemState);

            minThreads = ((WorkThreadPool)work.WorkerPool).MinThreads;
            maxThreads = ((WorkThreadPool)work.WorkerPool).MaxThreads;
            concurrentLimit = work.ConcurrentLimit;
            #endregion

            m_EventBus.GetEvent<LoginSuccessEventNotifier>().Subscribe(LoginSuccess);
        }