| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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 CtlIVRTimer : UserControl
- {
- IVRTimer _IVRTimer;
- public CtlIVRTimer(IVRTimer obj)
- {
- InitializeComponent();
- _IVRTimer = obj;
- this.Load += new EventHandler(CtlIVRTimer_Load);
- }
- void CtlIVRTimer_Load(object sender, EventArgs e)
- {
- this.tb_NodeID.Text = _IVRTimer.Pos;
- this.tb_NodeName.Text = _IVRTimer.Name;
- this.rtb_Note.Text = _IVRTimer.Note;
- cmb_HangupPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_HangupPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_HangupPos.ValueMember = "ID";
- if (_IVRTimer.Next != null)
- cmb_HangupPos.SelectedItem = _IVRTimer.Next;
- this.tb_begintime.Text = _IVRTimer.BeginTime;
- this.tb_endtime.Text = _IVRTimer.EndTime;
- this.num_TimerInterval.Value = _IVRTimer.TimerInterval;
-
- }
- private void btn_enter_Click(object sender, EventArgs e)
- {
- _IVRTimer.Next = cmb_HangupPos.SelectedItem as IVRControlBase;
- _IVRTimer.EndTime=this.tb_endtime.Text;
- _IVRTimer.BeginTime=this.tb_begintime.Text;
- _IVRTimer.TimerInterval = (int)this.num_TimerInterval.Value;
- _IVRTimer.Pos = this.tb_NodeID.Text;
- _IVRTimer.Name = this.tb_NodeName.Text;
- _IVRTimer.Note = this.rtb_Note.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();
- }
- }
- }
|