예제 #1
0
 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));
 }
예제 #2
0
 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));
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
 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);
     }
 }
예제 #8
0
        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;
        }
예제 #9
0
 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);
     }
 }
예제 #10
0
 public void SaveProject(IVRProject project, string path)
 {
 }
예제 #11
0
 public void SaveProject(IVRProject project, string path)
 {
     projectStore.SaveProject(path, project);
 }
예제 #12
0
 //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);
 }
예제 #13
0
 public IVRProject GetModelProject()
 {
     var pr = new IVRProject();
     pr.Name = Name;
     pr.MenuList = ConverterMenu.ConvertToMenuModels(MenuList);
     pr.IVRMenuRoot = IVRMenuRoot.GetModel();
     return pr;
 }