private void loadBookInfo() { this.batchInstVMWrapperList_ = new ObservableCollection <BatchInstrumentVMWrapper>(); FpmlSerializedCSharp.BookInformation serial_bookInfo = new FpmlSerializedCSharp.BookInformation(this.bookInfoVM_.BookInfoXml_); this.PathURLInfo_ = this.bookInfoVM_.PathURLInfo_; //serial_bookInfo.PathInfo_.Url_.ValueStr; DirectoryInfo directoryInfo = new DirectoryInfo(this.PathURLInfo_); foreach (var item in serial_bookInfo.InstrumentList_.InstHirachyInfo_) { string itemCode = item.Code_.ValueStr; string itemType = item.Type_.ValueStr; InstUriInfo instUri = bookInfoVM_.InstUri(item); //ResultUriInfo resultUri = bookInfoVM_.resultUri(item); FileInfo fileInfo = new FileInfo(directoryInfo.FullName + itemCode + "_" + itemType + ".xml"); InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri); //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper // = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM); BatchInstrumentVMWrapper batchInstVMWrapper = new BatchInstrumentVMWrapper(instBaseVM); batchInstVMWrapper.setFromSerial(item); this.batchInstVMWrapperList_.Add(batchInstVMWrapper); } }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.BookInformation serial_BookInformation = serial_Class as FpmlSerializedCSharp.BookInformation; this.name_ = serial_BookInformation.Name_.ValueStr; FpmlSerializedCSharp.PathInfo serial_pathInfo = serial_BookInformation.PathInfo_; string pathInfotype = serial_pathInfo.Excel_type_.ValueStr; this.pathInfoViewModel_ = PathInfoViewModel.CreatePathInfo(pathInfotype); this.pathInfoViewModel_.setFromSerial(serial_pathInfo); FpmlSerializedCSharp.InstrumentList serial_instrumentList = serial_BookInformation.InstrumentList_; string instrumentListtype = serial_instrumentList.Excel_type_.ValueStr; this.instrumentListViewModel_ = InstrumentListViewModel.CreateInstrumentList(instrumentListtype); this.instrumentListViewModel_.setFromSerial(serial_instrumentList); }
public void loadBookInfo() { //FileInfo file = bookInfoVM_.BookFile_; //XmlDocument xmlDoc = new XmlDocument(); //xmlDoc.Load(file.FullName); XmlNode node = this.bookInfoVM_.BookInfoXml_; XmlNode bookInfoNode = node.SelectSingleNode("/bookInformation"); FpmlSerializedCSharp.BookInformation serial_bookInfo = new FpmlSerializedCSharp.BookInformation(bookInfoNode); this.instHierarchyList_ = new ObservableCollection<ExploreHirachyVMWrapper>(); //this.PathURLInfo_ = this.bookInfoVM_.PathURLInfo_; //DirectoryInfo directoryInfo = new DirectoryInfo(this.PathURLInfo_); foreach (var item in serial_bookInfo.InstrumentList_.InstHirachyInfo_) { //FileInfo fileInfo = new FileInfo(directoryInfo.FullName + itemCode + "_" + itemType + ".xml"); InstUriInfo instUri = this.bookInfoVM_.InstUri(item); //ResultUriInfo resultUri = this.bookInfoVM_.resultUri(item); InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri); //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper // = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM); //ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instUri, resultUri, instBaseVM); ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instBaseVM); hirachyInstVMWrapper.setFromSerial(item); this.hirachyLoop(item, hirachyInstVMWrapper); this.instHierarchyList_.Add(hirachyInstVMWrapper); } }
public void loadBookInfo() { //FileInfo file = bookInfoVM_.BookFile_; //XmlDocument xmlDoc = new XmlDocument(); //xmlDoc.Load(file.FullName); XmlNode node = this.bookInfoVM_.BookInfoXml_; XmlNode bookInfoNode = node.SelectSingleNode("/bookInformation"); FpmlSerializedCSharp.BookInformation serial_bookInfo = new FpmlSerializedCSharp.BookInformation(bookInfoNode); this.instHierarchyList_ = new ObservableCollection <ExploreHirachyVMWrapper>(); //this.PathURLInfo_ = this.bookInfoVM_.PathURLInfo_; //DirectoryInfo directoryInfo = new DirectoryInfo(this.PathURLInfo_); foreach (var item in serial_bookInfo.InstrumentList_.InstHirachyInfo_) { //FileInfo fileInfo = new FileInfo(directoryInfo.FullName + itemCode + "_" + itemType + ".xml"); InstUriInfo instUri = this.bookInfoVM_.InstUri(item); //ResultUriInfo resultUri = this.bookInfoVM_.resultUri(item); InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri); //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper // = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM); //ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instUri, resultUri, instBaseVM); ExploreHirachyVMWrapper hirachyInstVMWrapper = ExploreHirachyVMWrapper.CreateExploreHirachyWrapper(instBaseVM); hirachyInstVMWrapper.setFromSerial(item); this.hirachyLoop(item, hirachyInstVMWrapper); this.instHierarchyList_.Add(hirachyInstVMWrapper); } }
private void loadBookInfo() { this.batchInstVMWrapperList_ = new ObservableCollection<BatchInstrumentVMWrapper>(); FpmlSerializedCSharp.BookInformation serial_bookInfo = new FpmlSerializedCSharp.BookInformation(this.bookInfoVM_.BookInfoXml_); this.PathURLInfo_ = this.bookInfoVM_.PathURLInfo_; //serial_bookInfo.PathInfo_.Url_.ValueStr; DirectoryInfo directoryInfo = new DirectoryInfo(this.PathURLInfo_); foreach (var item in serial_bookInfo.InstrumentList_.InstHirachyInfo_) { string itemCode = item.Code_.ValueStr; string itemType = item.Type_.ValueStr; InstUriInfo instUri = bookInfoVM_.InstUri(item); //ResultUriInfo resultUri = bookInfoVM_.resultUri(item); FileInfo fileInfo = new FileInfo(directoryInfo.FullName + itemCode + "_" + itemType + ".xml"); InstrumentBaseViewModel instBaseVM = InstrumentBaseViewModel.CreateInstBaseVM(instUri); //ExploreHirachyInstrumentVMWrapper hirachyInstVMWrapper // = new ExploreHirachyInstrumentVMWrapper(itemCode, itemType, instBaseVM); BatchInstrumentVMWrapper batchInstVMWrapper = new BatchInstrumentVMWrapper(instBaseVM); batchInstVMWrapper.setFromSerial(item); this.batchInstVMWrapperList_.Add(batchInstVMWrapper); } }