using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using HySoft.IVRFlowEditor.IVRControlUtility; using HySoft.IVRFlowEditor.Utility; namespace HySoft.IVRFlowEditor.IVRControl { public partial class CtlIVRContinueQueue : UserControl { IVRContinueQueue _IVRContinueQueue; public CtlIVRContinueQueue(IVRContinueQueue obj) { InitializeComponent(); _IVRContinueQueue = obj; this.Load += new EventHandler(CtlIVRContinueQueue_Load); } void CtlIVRContinueQueue_Load(object sender, EventArgs e) { this.tb_NodeID.Text = _IVRContinueQueue.Pos; this.tb_NodeName.Text = _IVRContinueQueue.Name; this.rtb_Note.Text = _IVRContinueQueue.Note; cmb_HangupPos.DataSource = GlobalController.GetComBoBoxofIVR(); this.cmb_HangupPos.DisplayMember = "Note";//2017-5-8将Name改为Note this.cmb_HangupPos.ValueMember = "ID"; if (_IVRContinueQueue.HangupPos != null) cmb_HangupPos.SelectedItem = _IVRContinueQueue.HangupPos; this.cmb_successPos.DataSource = GlobalController.GetComBoBoxofIVR(); this.cmb_successPos.DisplayMember = "Note";//2017-5-8将Name改为Note this.cmb_successPos.ValueMember = "ID"; if (_IVRContinueQueue.SuccessPos != null) cmb_successPos.SelectedItem = _IVRContinueQueue.SuccessPos; this.cmb_TimeoutPos.DataSource = GlobalController.GetComBoBoxofIVR(); this.cmb_TimeoutPos.DisplayMember = "Note";//2017-5-8将Name改为Note this.cmb_TimeoutPos.ValueMember = "ID"; if (_IVRContinueQueue.TimeoutPos != null) cmb_TimeoutPos.SelectedItem = _IVRContinueQueue.TimeoutPos; this.cmb_successPos.DataSource = GlobalController.GetComBoBoxofIVR(); this.cmb_successPos.DisplayMember = "Note";//2017-5-8将Name改为Note this.cmb_successPos.ValueMember = "ID"; if (_IVRContinueQueue.SuccessPos != null) cmb_successPos.SelectedItem = _IVRContinueQueue.SuccessPos; this.num_timeout.Value = _IVRContinueQueue.Timeout; this.tb_audio.Text = _IVRContinueQueue.Audio; this.tb_ExtenVar.Text = _IVRContinueQueue.Exten; this.tb_AgentVar.Text = _IVRContinueQueue.Agent; } private void btn_enter_Click(object sender, EventArgs e) { _IVRContinueQueue.Pos = this.tb_NodeID.Text; _IVRContinueQueue.Name = this.tb_NodeName.Text; _IVRContinueQueue.Note = this.rtb_Note.Text; _IVRContinueQueue.HangupPos = cmb_HangupPos.SelectedItem as IVRControlBase; _IVRContinueQueue.SuccessPos = this.cmb_successPos.SelectedItem as IVRControlBase; _IVRContinueQueue.TimeoutPos = this.cmb_TimeoutPos.SelectedItem as IVRControlBase; _IVRContinueQueue.Timeout = (int)this.num_timeout.Value; _IVRContinueQueue.Audio = this.tb_audio.Text; _IVRContinueQueue.Exten = this.tb_ExtenVar.Text; _IVRContinueQueue.Agent = this.tb_AgentVar.Text; this.FindForm().DialogResult = DialogResult.OK; this.FindForm().Close(); } private void btn_cancel_Click(object sender, EventArgs e) { this.FindForm().DialogResult = DialogResult.No; this.FindForm().Close(); } } }