public void Start(string IVRProjectPath, IAPIExtension extension) { ivrProject = (projectStore.LoadProject(IVRProjectPath)); this.extension = extension; this.extension.IncomingCall += extension_IncomingCall; OnNotifyAction(string.Format("IVR engine ready to receive call on '{0}' Api extension.",extension.ExtensionId)); }
public void Start(string IVRProjectPath, IAPIExtension extension) { ivrProject = (projectStore.LoadProject(IVRProjectPath)); this.extension = extension; this.extension.IncomingCall += extension_IncomingCall; OnNotifyAction(string.Format("IVR engine ready to receive call on '{0}' Api extension.", extension.ExtensionId)); }
private IVRProject GenerateIVRProjectFromConfig(IVRProjectConfig config) { IVRProject resproject = new IVRProject(); resproject.Name = config.Name; foreach (var curMenuConfig in config.MenuList) { resproject.MenuList.Add(GetIVRMenuFromConfig(curMenuConfig)); } return resproject; }
private IVRProjectConfig CreateIVRProjectConfig(IVRProject project) { IVRProjectConfig resProject= new IVRProjectConfig(); resProject.Name = project.Name; foreach (var curMenu in project.MenuList) { resProject.MenuList.Add(curMenu.GetConfig()); } return resProject; }
private IVRProjectConfig CreateIVRProjectConfig(IVRProject project) { IVRProjectConfig resProject = new IVRProjectConfig(); resProject.Name = project.Name; foreach (var curMenu in project.MenuList) { resProject.MenuList.Add(curMenu.GetConfig()); } return(resProject); }
private IVRProject GenerateIVRProjectFromConfig(IVRProjectConfig config) { IVRProject resproject = new IVRProject(); resproject.Name = config.Name; foreach (var curMenuConfig in config.MenuList) { resproject.MenuList.Add(GetIVRMenuFromConfig(curMenuConfig)); } return(resproject); }
public void SaveProject(string path, IVRProject project) { try { using (var file = File.Create(path)) { XmlSerializer serializer = new XmlSerializer(typeof(IVRProjectConfig)); serializer.Serialize(file, CreateIVRProjectConfig(project)); } } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
public IVRProject LoadProject(string path) { IVRProject pr= new IVRProject(); pr.Name = "Sample project"; pr.MenuList=new List<IVRMenuElementBase>(); pr.MenuList.Add(new IVRMenuElementInfoReader() {Id="0",ParentId = "", Name = "root"}); pr.MenuList.Add(new IVRMenuElementVoiceMessageRecorder() { Id = "1", ParentId = "0", Name = "subtree1" }); pr.MenuList.Add(new IVRMenuElementInfoReader() { Id = "2", ParentId = "0", Name = "subtree2" }); pr.MenuList.Add(new IVRMenuElementInfoReader() { Id = "3", ParentId = "0", Name = "subtree3", NarratorType = NarratorType.FilePlayback }); pr.MenuList.Add(new IVRMenuElementInfoReader() { Id = "4", ParentId = "2", Name = "subtree2.1", NarratorType = NarratorType.FilePlayback }); pr.MenuList.Add(new IVRMenuElementInfoReader() { Id = "5", ParentId = "2", Name = "subtree2.2", NarratorType = NarratorType.FilePlayback }); pr.MenuList.Add(new IVRMenuElementCallTransfer() { Id = "6", ParentId = "5", Name = "subtree2.2.1" }); return pr; }
public void SaveProject(IVRProject project, string path) { }
public void SaveProject(IVRProject project, string path) { projectStore.SaveProject(path, project); }
//public VmIVRProject(IVRProjectConfig mProject) //{ // Name = mProject.Name; // MenuList = ConverterMenu.GetMenuViewModels(mProject.MenuList); // // IVRMenuRoot = ConverterMenu.GetMenuViewModel(mProject.IVRMenuRoot); //} public VmIVRProject(IVRProject mProject) { Name = mProject.Name; MenuList = ConverterMenu.GetMenuViewModels(mProject.MenuList); IVRMenuRoot = ConverterMenu.GetMenuViewModel(mProject.IVRMenuRoot); }
public IVRProject GetModelProject() { var pr = new IVRProject(); pr.Name = Name; pr.MenuList = ConverterMenu.ConvertToMenuModels(MenuList); pr.IVRMenuRoot = IVRMenuRoot.GetModel(); return pr; }