ivr流程编辑器

CtlIVRSendfax.cs 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using HySoft.IVRFlowEditor.IVRControlUtility;
  10. using HySoft.IVRFlowEditor.Utility;
  11. namespace HySoft.IVRFlowEditor.IVRControl
  12. {
  13. public partial class CtlIVRSendfax : UserControl
  14. {
  15. IVRSendfax _IVRSendfax;
  16. public CtlIVRSendfax(IVRSendfax obj)
  17. {
  18. InitializeComponent();
  19. _IVRSendfax = obj;
  20. this.Load += new EventHandler(CtlIVRSendfax_Load);
  21. }
  22. void CtlIVRSendfax_Load(object sender, EventArgs e)
  23. {
  24. this.tb_NodeID.Text = _IVRSendfax.Pos;
  25. this.tb_NodeName.Text = _IVRSendfax.Name;
  26. this.rtb_path.Text = _IVRSendfax.Path;
  27. this.rtb_Note.Text = _IVRSendfax.Note;
  28. cmb_HangupPos.DataSource = GlobalController.GetComBoBoxofIVR();
  29. this.cmb_HangupPos.DisplayMember = "Note";//2017-5-8将Name改为Note
  30. this.cmb_HangupPos.ValueMember = "ID";
  31. if (_IVRSendfax.HangupPos != null)
  32. cmb_HangupPos.SelectedItem = _IVRSendfax.HangupPos;
  33. this.cmb_successNextNode.DataSource = GlobalController.GetComBoBoxofIVR();
  34. this.cmb_successNextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
  35. this.cmb_successNextNode.ValueMember = "ID";
  36. if (_IVRSendfax.SuccessPos != null)
  37. cmb_successNextNode.SelectedItem = _IVRSendfax.SuccessPos;
  38. this.cmb_failNextNode.DataSource = GlobalController.GetComBoBoxofIVR();
  39. this.cmb_failNextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
  40. this.cmb_failNextNode.ValueMember = "ID";
  41. if (_IVRSendfax.FailPos != null)
  42. cmb_failNextNode.SelectedItem = _IVRSendfax.FailPos;
  43. }
  44. private void btn_enter_Click(object sender, EventArgs e)
  45. {
  46. _IVRSendfax.HangupPos = cmb_HangupPos.SelectedItem as IVRControlBase;
  47. _IVRSendfax.SuccessPos = this.cmb_successNextNode.SelectedItem as IVRControlBase;
  48. _IVRSendfax.FailPos = this.cmb_failNextNode.SelectedItem as IVRControlBase;
  49. _IVRSendfax.Pos = this.tb_NodeID.Text;
  50. _IVRSendfax.Name = this.tb_NodeName.Text;
  51. _IVRSendfax.Note = this.rtb_Note.Text;
  52. _IVRSendfax.Path = this.rtb_path.Text;
  53. this.FindForm().DialogResult = DialogResult.OK;
  54. this.FindForm().Close();
  55. }
  56. private void btn_cancel_Click(object sender, EventArgs e)
  57. {
  58. this.FindForm().DialogResult = DialogResult.No;
  59. this.FindForm().Close();
  60. }
  61. private void rtb_path_MouseDoubleClick(object sender, MouseEventArgs e)
  62. {
  63. FrmIVREdit frm = new FrmIVREdit(this.rtb_path.Text);
  64. frm.Text = "传真路径定义";
  65. if (frm.ShowDialog() == DialogResult.OK)
  66. {
  67. this.rtb_path.Text = frm.GetText();
  68. }
  69. }
  70. }
  71. }