public static IndexUnderViewModel CreateIndexUnder(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Index serial_underIndex = serial_Class as FpmlSerializedCSharp.Index; string indexType = serial_underIndex.Type_.ValueStr; return(IndexUnderViewModel.CreateIndexUnder(indexType)); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.UnderlyingInformation serial_underInfo = serial_Class as FpmlSerializedCSharp.UnderlyingInformation; FpmlSerializedCSharp.IndexUnderInfo serial_indexUnderInfo = serial_underInfo.IndexUnderInfo_; this.indexUnderList_ = new ObservableCollection <IndexUnderViewModel>(); foreach (var item in serial_indexUnderInfo.Index_) { IndexUnderViewModel indexUnderVM = IndexUnderViewModel.CreateIndexUnder(item); indexUnderVM.setFromSerial(item); this.indexUnderList_.Add(indexUnderVM); } this.view_ = new IndexUnderInfoView(); this.view_.DataContext = this; }