ivr流程编辑器

CtlIVRHangUp.cs 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 IVRFlowEditor.IVRControlUtility;
  10. using HySoft.IVRFlowEditor.Utility;
  11. using HySoft.IVRFlowEditor.IVRControlUtility;
  12. namespace IVRFlowEditor.IVRControl
  13. {
  14. public partial class CtlIVRHangUp : UserControl
  15. {
  16. IVRHangUp _IVRHangUp;
  17. public CtlIVRHangUp(IVRHangUp obj)
  18. {
  19. InitializeComponent();
  20. this.Load += new EventHandler(CtlIVRHangUp_Load);
  21. _IVRHangUp = obj;
  22. }
  23. void CtlIVRHangUp_Load(object sender, EventArgs e)
  24. {
  25. this.cmb_NextNode.DataSource = null;
  26. this.tb_NodeID.Text = _IVRHangUp.Pos;
  27. this.tb_NodeName.Text = _IVRHangUp.Name;
  28. this.rtb_Note.Text = _IVRHangUp.Note;
  29. this.cmb_NextNode.DataSource = GlobalController.GetComBoBoxofIVR(); ;
  30. this.cmb_NextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
  31. this.cmb_NextNode.ValueMember = "ID";
  32. if (_IVRHangUp.Next != null)
  33. this.cmb_NextNode.SelectedItem = _IVRHangUp.Next;
  34. }
  35. private void btn_enter_Click(object sender, EventArgs e)
  36. {
  37. _IVRHangUp.Name = tb_NodeName.Text;
  38. _IVRHangUp.Note = rtb_Note.Text;
  39. if (this.cmb_NextNode.SelectedItem != null)
  40. _IVRHangUp.Next = (this.cmb_NextNode.SelectedItem as IVRControlBase);
  41. this.FindForm().DialogResult = DialogResult.OK;
  42. this.FindForm().Close();
  43. }
  44. private void btn_cancel_Click(object sender, EventArgs e)
  45. {
  46. this.FindForm().DialogResult = DialogResult.No;
  47. this.FindForm().Close();
  48. }
  49. }
  50. }