public TC_CallContent() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); btn_qry.Click += btn_qry_Click; dgrd_callcontent.SelectionChanged += DataGridSelectionChanged; var lstColumnHeader = new List <string> { LanguageResource.FindResourceMessageByKey("textchat_id"), LanguageResource.FindResourceMessageByKey("textchat_callID"), LanguageResource.FindResourceMessageByKey("textchat_subMediaType"), LanguageResource.FindResourceMessageByKey("textchat_sender"), LanguageResource.FindResourceMessageByKey("textchat_receiver"), LanguageResource.FindResourceMessageByKey("textchat_contenttype"), LanguageResource.FindResourceMessageByKey("textchat_content"), LanguageResource.FindResourceMessageByKey("textchat_direction"), }; if (null == dgrd_callcontent || null == dgrd_callcontent.Columns || lstColumnHeader.Count != dgrd_callcontent.Columns.Count) { return; } for (int i = 0; i < dgrd_callcontent.Columns.Count; i++) { dgrd_callcontent.Columns[i].Header = lstColumnHeader[i]; } }
public CallInfoWrapper(CallInfo info) { this.Called = info.Called; this.Caller = info.Caller; this.CallId = info.CallId; this.MediaType = LanguageResource.FindResourceMessageByKey("normalVoiceCall"); }
public TC_CallSession() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); var lstColumnHeader = new List <string> { LanguageResource.FindResourceMessageByKey("textchat_id"), LanguageResource.FindResourceMessageByKey("textchat_callID"), LanguageResource.FindResourceMessageByKey("textchat_isInnerCall"), LanguageResource.FindResourceMessageByKey("textchat_subMediaType"), LanguageResource.FindResourceMessageByKey("textchat_realcaller"), LanguageResource.FindResourceMessageByKey("textchat_callerName"), LanguageResource.FindResourceMessageByKey("textchat_starttime"), LanguageResource.FindResourceMessageByKey("textchat_endtime"), LanguageResource.FindResourceMessageByKey("textchat_releasecause"), }; if (null == dgrd_callsession || null == dgrd_callsession.Columns || lstColumnHeader.Count != dgrd_callsession.Columns.Count) { return; } for (int i = 0; i < dgrd_callsession.Columns.Count; i++) { dgrd_callsession.Columns[i].Header = lstColumnHeader[i]; } }
private void Btn_OK_Click(object sender, RoutedEventArgs e) { if (lstView_Skills.ItemsSource == null) { return; } if (!SkillSelectCheck()) { return; } var lstId = new List <int>(); foreach (SkillItem item in lstView_Skills.Items) { if (!item.isSelected) { continue; } int id = 0; if (Int32.TryParse(item.id, out id)) { lstId.Add(id); } } var res = ((AgentGatewayBusiness)(BusinessAdapter.GetBusinessInstance())).ResetSkillEx(false, lstId, chk_PhoneLink.IsChecked.Value); if (AGWErrorCode.OK.Equals(res)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("otherset_resetskillsucc")); } }
public MsgViewWindow() { InitializeComponent(); if (m_MsgInfo == null) { m_MsgInfo = new List <MessageInfo>(); } #region 控件设置 LanguageResource.ChangeWindowLanguage(this); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("msgview_head")); var lstColumnHeader = new List <string> { LanguageResource.FindResourceMessageByKey("msgview_time"), LanguageResource.FindResourceMessageByKey("msgview_sender"), LanguageResource.FindResourceMessageByKey("msgview_type"), }; if (dgrdMsgList != null && dgrdMsgList.Columns != null) { for (int i = 0; i < dgrdMsgList.Columns.Count; i++) { dgrdMsgList.Columns[i].Header = lstColumnHeader[i]; } } #endregion }
public InstructionWindow() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); tbNotify.Text = LanguageResource.FindResourceMessageByKey("instruction_cti"); btnClose.Content = LanguageResource.FindResourceMessageByKey("cancel"); }
public InnerCall() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); var lstAgent = MainWindow.Instance().GetAgentStateInfoList(); agentInfoCtrl.SetSource(lstAgent); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("internalcall_head")); }
public CallTransferWindow() { InitializeComponent(); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("transcall_head")); LanguageResource.ChangeWindowLanguage(this); LoadAgentStatusInfo(); lstIVRDevice.ItemsSource = MainWindow.Instance().GetIvrInfoList(); lstSkillsQueue.ItemsSource = MainWindow.Instance().GetSkillInfoList(); }
public TransferOutWindow() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); txtCallerNumber.SetText(MainWindowVM.GetInstance().CallerNumber); txtCalledNumber.SetText(MainWindowVM.GetInstance().CalledNumber); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("transout_head")); txtCallerNumber.SetReadOnly(true); txtCalledNumber.SetReadOnly(true); }
/// <summary> /// check if any skill is selected /// </summary> /// <returns> /// false : no skill has been selected /// true : any skill has been selected /// </returns> private bool SkillSelectCheck() { foreach (SkillItem item in lstView_Skills.ItemsSource) { if (item.IsItemSelected) { return(true); } } MessageBox.Show(LanguageResource.FindResourceMessageByKey("pleaseSelectSkills")); return(false); }
/// <summary> /// qry button click /// </summary> /// <param name="sender">button</param> /// <param name="e">click event</param> private void btn_qry_Click(object sender, EventArgs e) { tb_msgshow.Text = string.Empty; if (string.IsNullOrEmpty(tb_pageNo.Text) || string.IsNullOrEmpty(tb_pageSize.Text)) { return; } var instance = (AgentGatewayBusiness)BusinessAdapter.GetBusinessInstance(); if (null == instance) { Log4NetHelper.BaseLog("Instance is null"); return; } var qryParm = new CallSessionQryParm() { startTime = TransferDateToTimeStamp(tb_startTime.Text), endTime = TransferDateToTimeStamp(tb_endTime.Text), pageNo = tb_pageNo.Text, pageSize = tb_pageSize.Text, callType = tb_callType.Text, caller = tb_caller.Text, called = tb_called.Text, mediaType = "1", subMediaType = "2", realCaller = "", callerName = "" }; var qryInfo = HuaweiAgentGateway.Utils.JsonUtil.ToJson(qryParm); try { var res = instance.QryCallSession(qryInfo); if (null == res) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("textchat_qryfailed")); return; } Log4NetHelper.ActionLog("Agw", "QryCallSession", res.retcode); if (null == res.result) { return; } lbl_totalPage.Content = res.result.totalPageNo; lbl_totalCount.Content = res.result.totalCount; UIViewHelper.SelectorResetSource(dgrd_callsession, res.result.weccCallBillList); } catch (Exception exc) { Log4NetHelper.BaseLog(exc.Message); } }
private void btnConfirm_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(tbPhone.Text) || string.IsNullOrEmpty(tbWorkNo.Text)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("login_input")); return; } PhoneNo = tbPhone.Text; WorkNo = tbWorkNo.Text; Password = pbPassword.Password; IsConfirm = true; Close(); }
public ConfigWindow(Dictionary <string, string> settings, AgentInfo agentInfo) { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("config_head")); cbAgentType.ItemsSource = m_dicAgentType.Keys; cbAgentType.SelectedIndex = 0; Settings = settings; LoadConfig(); lblUseSsl.Visibility = Visibility.Collapsed; chkUseHttps.IsChecked = true; chkUseHttps.Visibility = Visibility.Collapsed; tbLongCall.Visibility = System.Windows.Visibility.Collapsed; chkLongCall.Visibility = System.Windows.Visibility.Collapsed; chkLongCall.IsChecked = false; }
public InnerConsultWindow() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); lstSkillsQueue.ItemsSource = MainWindow.Instance().GetSkillInfoList(); var agentSrc = MainWindow.Instance().GetAgentStateInfoList(); if (agentSrc != null) { lstAgentStatusInfo.ItemsSource = agentSrc.Select(item => new AgentStateInfoWrapper(item)).ToList(); } this.Closed += new EventHandler(Close); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("internalhelp_head")); tctlConsultType.SelectionChanged += tctlConsultType_SelectionChanged; }
private void btnConfirm_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(pbNewPwd.Password) || string.IsNullOrEmpty(pbOldPwd.Password)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("modifypwd_inputcheck")); return; } if (!pbNewPwd.Password.Equals(pbPwdConfirm.Password)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("modifypwd_pwdnotsame")); return; } NewPwd = pbNewPwd.Password; OldPwd = pbOldPwd.Password; this.DialogResult = true; }
private void btnConfirm_Click(object sender, RoutedEventArgs e) { if (-1 == dgrdCallList.SelectIndex) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("setdata_selecttalk")); return; } var data = m_CallInfo[dgrdCallList.SelectIndex]; string result = BusinessAdapter.GetBusinessInstance().GetHoldEx(data.CallId); Log4NetHelper.ActionLog("Common", "Vc_GetHold", result); if (!string.IsNullOrEmpty(result) && !AGWErrorCode.OK.Equals(result)) { MainWindow.Instance().MessageBoxForErr(result); } Close(); }
public QryCallDataWindow(List <CallInfo> info) { InitializeComponent(); var items = new List <CallInfoWrapper>(); if (info != null) { for (int i = 0; i < info.Count; i++) { items.Add(new CallInfoWrapper(info[i]) { Index = i + 1 }); } } dgrdCallList.ItemsSource = items; if (null != items && 0 < items.Count) { dgrdCallList.SelectedItem = dgrdCallList.Items[0]; } dgrdCallList.Focus(); #region 控件显示 var lstColumnHeader = new List <string> { LanguageResource.FindResourceMessageByKey("indexNo"), LanguageResource.FindResourceMessageByKey("callingNumber"), LanguageResource.FindResourceMessageByKey("calledNumber"), LanguageResource.FindResourceMessageByKey("mediaType") }; this.Title = LanguageResource.FindResourceMessageByKey("qryDataTitle"); this.btnClose.Content = LanguageResource.FindResourceMessageByKey("close"); this.txtBlockRes.Text = LanguageResource.FindResourceMessageByKey("qryResult"); if (dgrdCallList != null && dgrdCallList.Columns != null) { for (int i = 0; i < dgrdCallList.Columns.Count; i++) { dgrdCallList.Columns[i].Header = lstColumnHeader[i]; } } ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("setdata_head")); #endregion }
public AgentRegisterWindow(IList <SkillInfo> items, string phoneNo) { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); _lstOriSkills = new List <SkillItem>(); lstSelectSkills = new List <SkillInfo>(); RadioButton_AutoRegister.Checked += RadioButton_AutoRegister_Checked; RadioButton_HandMovement.Checked += RadioButton_HandMovement_Checked; btnCancel.Click += Button_Cancel_Click; btnConfirm.Click += Button_Confirm_Click; foreach (SkillInfo item in items) { _lstOriSkills.Add(new SkillItem(item)); } ListView_Skill.ItemsSource = _lstOriSkills; ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("login_head")); }
public AgentStateInfoWrapper(AgentStateInfo info) { this.GroupName = string.IsNullOrEmpty(info.groupName) ? LanguageResource.FindResourceMessageByKey("agentinfo_nogroup") : info.groupName; this.WorkNo = info.workno; this.status = info.status; this.Name = info.name; this.Content = LanguageResource.FindResourceMessageByKey("agentinfo_id") + info.workno; if (TALK_STATUS.Equals(info.status)) { Url = (info.ctiStatus != null && m_talkStatusPicDic.ContainsKey(info.ctiStatus)) ? m_talkStatusPicDic[info.ctiStatus] : "/QuickAgent;component/Resource/Images/icon2-_201.png"; } else { Url = m_agentStatusPicDict.ContainsKey(info.status) ? m_agentStatusPicDict[info.status] : "/QuickAgent;component/Resource/Images/icon2-_117.png"; } }
private void btnReply_Click(object sender, EventArgs e) { if (dgrdMsgList.SelectedItem == null || dgrdMsgList.SelectedItems == null) { return; } var item = dgrdMsgList.SelectedItem as MessageInfo; SendMsgWindow msgWindow = new SendMsgWindow(item.WorkNo); msgWindow.ShowDialog(); if (msgWindow.IsConfirm) { string res = BusinessAdapter.GetBusinessInstance().SendNote(Int32.Parse(msgWindow.WorkNo), msgWindow.TxtContent); Log4NetHelper.ActionLog("Common", "Vc_SendNote", res); if (!res.Equals(AGWErrorCode.OK)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("msgview_fail")); } } }
/// <summary> /// qry button click /// </summary> /// <param name="sender">button</param> /// <param name="e">click event</param> private void btn_qry_Click(object sender, EventArgs e) { tb_msgshow.Text = string.Empty; if (string.IsNullOrEmpty(tb_pageNo.Text) || string.IsNullOrEmpty(tb_pageSize.Text)) { return; } try { if (BusinessAdapter.CurrentBusinessType == BusinessType.OCX) { Log4NetHelper.BaseLog("Instance is ocx"); return; } if (null == BusinessAdapter.GetBusinessInstance()) { Log4NetHelper.BaseLog("Instance is null"); return; } var res = ((AgentGatewayBusiness)BusinessAdapter.GetBusinessInstance()).QryCallContent(tb_callID.Text, tb_pageSize.Text, tb_pageNo.Text); if (null == res) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("textchat_qryfailed")); return; } Log4NetHelper.ActionLog("Agw", "QryCallContent", res.retcode); if (null == res.result) { return; } lbl_totalPage.Content = res.result.totalPageNo; lbl_totalCount.Content = res.result.totalCount; UIViewHelper.SelectorResetSource(dgrd_callcontent, res.result.weccCallContentList); } catch (Exception exc) { Log4NetHelper.BaseLog(exc.Message); } }
public CallInfoCtrl() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); SelectIndex = -1; var lstColumnHeader = new List <string> { LanguageResource.FindResourceMessageByKey("indexNo"), LanguageResource.FindResourceMessageByKey("callingNumber"), LanguageResource.FindResourceMessageByKey("calledNumber"), LanguageResource.FindResourceMessageByKey("mediaType") }; if (dgrdCallList != null && dgrdCallList.Columns != null) { for (int i = 0; i < dgrdCallList.Columns.Count; i++) { dgrdCallList.Columns[i].Header = lstColumnHeader[i]; } } }
private void btnSet_Click(Object sender, EventArgs e) { if (m_CallInfo == null) { return; } if (dgrdCallList.SelectIndex == -1) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("setdata_selecttalk")); return; } var item = m_CallInfo[dgrdCallList.SelectIndex]; var res = BusinessAdapter.GetBusinessInstance().SetData(item.CallId + "", txtBoxData.Text, 5); Log4NetHelper.ActionLog("Common", "Vc_SetData", res); if (res.Equals(AGWErrorCode.OK)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("setDataSucc")); } }
public CallOutWindow() { InitializeComponent(); LanguageResource.ChangeWindowLanguage(this); this.Closed += new EventHandler(Window_Close); #region 控件设置(技能,媒体能力) ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("outcall_head")); cbxMedia.ItemsSource = BusinessAdapter.CurrentBusinessType == BusinessType.OCX ? DIC_MCP_MEDIA.Values : DIC_AGW_MEDIA.Values; cbxMedia.SelectedIndex = BusinessAdapter.CurrentBusinessType == BusinessType.OCX ? 2 : 0; _skillSrc = BusinessAdapter.GetBusinessInstance().GetAgentSkills(); if (null == _skillSrc || _skillSrc.Count == 0) { return; } // 查询技能,增加一项 "默认" _skillSrc.Insert(0, new SkillInfo() { name = LanguageResource.FindResourceMessageByKey("outcall_default"), id = "0", mediatype = "5" }); cbxSkill.ItemsSource = _skillSrc.Select(item => item.name).ToList(); cbxSkill.SelectedIndex = 0; #endregion #region 控件样式 txtBlockSkill.Style = (Style)this.FindResource("txtBlockStyle"); lblCalledNumber.Style = (Style)this.FindResource("txtBlockStyle"); lblCallerNumber.Style = (Style)this.FindResource("txtBlockStyle"); txtBlockMedia.Style = (Style)this.FindResource("txtBlockStyle"); txtBlockCheck.Style = (Style)this.FindResource("txtBlockStyle"); #endregion }
public void OK_Click(object sender, RoutedEventArgs e) { try { AgentStateInfo statusInfo = agentInfoCtrl.SelectedAgent; if (null == statusInfo) { return; } if (string.Compare(MainWindow.Instance().AgentInfo.AgentId, statusInfo.workno, true) == 0) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("innercall_choseselef")); return; } string result = BusinessAdapter.GetBusinessInstance().CallInnerEx(statusInfo.workno, OCX_MEDIA_TYPE); Log4NetHelper.ActionLog("Common", "Vc_CallInner", result); if (result != null) { if (!result.Equals(AGWErrorCode.OK)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("internalcall_fail")); } else { if (BusinessAdapter.CurrentBusinessType == BusinessType.AgentGateway) { MainWindow.Instance().TalkStatus = MainWindow.AgentStatus.InternaCall; } } } this.DialogResult = true; } catch (Exception exc) { Log4NetHelper.ExcepLog("Sys", "InnerCall", exc.Message); } }
private void HoldListWindow_Load(object sender, RoutedEventArgs e) { this.Title = _myType == OperateType.Tripartite ? LanguageResource.FindResourceMessageByKey("threeCall") : LanguageResource.FindResourceMessageByKey("connectHold"); holdList = MainWindow.Instance().GetHoldInfoList(); if (null == holdList || holdList.Count <= 0) { return; } holdInfoList = new ObservableCollection <HoldCallInfo>(); for (int i = 0; i < holdList.Count; ++i) { HoldListData holdInfo = holdList[i]; holdInfoList.Add(new HoldCallInfo { Number = (i + 1).ToString(), CalledNumber = holdInfo.called, CallerNumber = holdInfo.caller, MediaType = LanguageResource.FindResourceMessageByKey("normalVoiceCall"), callId = holdInfo.callid }); } dgrdHoldList.ItemsSource = holdInfoList; }
public void OK_Click(object sender, RoutedEventArgs e) { Button me = sender as Button; if (string.IsNullOrEmpty(txtCalledNumber.Text)) { MessageBox.Show(LanguageResource.FindResourceMessageByKey("calledNumberNotIsNull")); me.Focus(); } else { int id = 0; if (_skillSrc != null && _skillSrc.Count > 0 && cbxSkill.SelectedIndex != -1 && Int32.TryParse(_skillSrc[cbxSkill.SelectedIndex].id, out id)) { SkillID = id; } CallCheck = chkNoCheck.IsChecked == true ? 0 : chkNoCheckBefore.IsChecked == true ? 1 : 2; CalledNumber = txtCalledNumber.Text; CallerNumber = txtCallerNumber.Text; MediaAbility = cbxMedia.SelectedIndex; this.DialogResult = true; } }
public QryCallDataWindow() { InitializeComponent(); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("setdata_head")); }
public void LoadMessage(string key) { lbl_Message.Content = LanguageResource.FindResourceMessageByKey(key); }
/// <summary> /// 界面初始化 /// </summary> private void WindowInitial() { LanguageResource.ChangeWindowLanguage(this); ctrlHead.SetText(LanguageResource.FindResourceMessageByKey("sendnote_head")); }