| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- 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 CtlIVRSendfax : UserControl
- {
- IVRSendfax _IVRSendfax;
- public CtlIVRSendfax(IVRSendfax obj)
- {
- InitializeComponent();
- _IVRSendfax = obj;
- this.Load += new EventHandler(CtlIVRSendfax_Load);
- }
- void CtlIVRSendfax_Load(object sender, EventArgs e)
- {
- this.tb_NodeID.Text = _IVRSendfax.Pos;
- this.tb_NodeName.Text = _IVRSendfax.Name;
- this.rtb_path.Text = _IVRSendfax.Path;
- this.rtb_Note.Text = _IVRSendfax.Note;
- cmb_HangupPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_HangupPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_HangupPos.ValueMember = "ID";
- if (_IVRSendfax.HangupPos != null)
- cmb_HangupPos.SelectedItem = _IVRSendfax.HangupPos;
- this.cmb_successNextNode.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_successNextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_successNextNode.ValueMember = "ID";
- if (_IVRSendfax.SuccessPos != null)
- cmb_successNextNode.SelectedItem = _IVRSendfax.SuccessPos;
- this.cmb_failNextNode.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_failNextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_failNextNode.ValueMember = "ID";
- if (_IVRSendfax.FailPos != null)
- cmb_failNextNode.SelectedItem = _IVRSendfax.FailPos;
-
- }
-
- private void btn_enter_Click(object sender, EventArgs e)
- {
- _IVRSendfax.HangupPos = cmb_HangupPos.SelectedItem as IVRControlBase;
- _IVRSendfax.SuccessPos = this.cmb_successNextNode.SelectedItem as IVRControlBase;
- _IVRSendfax.FailPos = this.cmb_failNextNode.SelectedItem as IVRControlBase;
- _IVRSendfax.Pos = this.tb_NodeID.Text;
- _IVRSendfax.Name = this.tb_NodeName.Text;
- _IVRSendfax.Note = this.rtb_Note.Text;
- _IVRSendfax.Path = this.rtb_path.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();
- }
- private void rtb_path_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- FrmIVREdit frm = new FrmIVREdit(this.rtb_path.Text);
- frm.Text = "传真路径定义";
- if (frm.ShowDialog() == DialogResult.OK)
- {
- this.rtb_path.Text = frm.GetText();
-
- }
- }
- }
- }
|