| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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.Propretity
- {
- public partial class CtlIVRStartNode : UserControl
- {
- public CtlIVRStartNode()
- {
- InitializeComponent();
-
- }
- public IVRStartNode _IVRStartNode;
- public CtlIVRStartNode(IVRStartNode obj)
- {
- InitializeComponent();
- this.Load += new EventHandler(CtlIVRStartNode_Load);
- _IVRStartNode = obj;
-
- }
- void CtlIVRStartNode_Load(object sender, EventArgs e)
- {
- this.cmb_NextNode.DataSource=null;
- this.tb_NodeID.Text = _IVRStartNode.Pos;
- this.tb_NodeName.Text = _IVRStartNode.Name;
- this.rtb_Note.Text = _IVRStartNode.Note;
- this.cmb_NextNode.DataSource = GlobalController.GetComBoBoxofIVR(); ;
- this.cmb_NextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_NextNode.ValueMember = "ID";
- if (_IVRStartNode.Next != null)
- this.cmb_NextNode.SelectedItem = _IVRStartNode.Next;
-
- }
-
- private void btn_enter_Click(object sender, EventArgs e)
- {
- _IVRStartNode.Name = tb_NodeName.Text;
- _IVRStartNode.Note = rtb_Note.Text;
- if (this.cmb_NextNode.SelectedItem!=null)
- _IVRStartNode.Next = (this.cmb_NextNode.SelectedItem as IVRControlBase);
-
- 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();
- }
- }
- }
|