public IVRProject GetModelProject() { var pr = new IVRProject(); pr.Name = Name; pr.MenuList = ConverterMenu.ConvertToMenuModels(MenuList); pr.IVRMenuRoot = IVRMenuRoot.GetModel(); return(pr); }
public VmMain() { // model = new MockModel(); model = new RealModel(); IVRToolboxElementList = new ObservableCollection <VmIVRMenuElementBase>(ConverterMenu.GetMenuViewModels(model.GetToolboxElements())); ToolboxSource = CollectionViewSource.GetDefaultView(IVRToolboxElementList); Init(); }
//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); }
private void OpenIVRProject() { Messenger.Default.Send(new NotificationMessageEx(MsgDestination.WindowMain, MsgCommand.ShowLoadDialog, new FileOperationMessage(( resPath) => { CurrentProject = new ProjectStore().LoadProject(resPath); LoadedProjectPath = resPath; LogEvent("IVR project Loaded from " + LoadedProjectPath); Messenger.Default.Send(new NotificationMessageEx(MsgDestination.WindowMain, MsgCommand.PopulateTreeView, ConverterMenu.GetMenuViewModels(CurrentProject.MenuList))); }))); }