public static Operator1DViewModel CreateOperator1D(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Operator1D serial_Operator1D = serial_Class as FpmlSerializedCSharp.Operator1D; string typeStr = serial_Operator1D.Type_.ValueStr; return(Operator1DViewModel.CreateOperator1D(typeStr)); }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Operator1DList serial_Operator1DList = serial_Class as FpmlSerializedCSharp.Operator1DList; List <FpmlSerializedCSharp.Operator1D> serial_operator1D = serial_Operator1DList.Operator1D_; this.operator1DViewModel_ = new ObservableCollection <Operator1DViewModel>(); foreach (var item in serial_operator1D) { string type = item.Type_.ValueStr; Operator1DViewModel viewModel = Operator1DViewModel.CreateOperator1D(type); viewModel.setFromSerial(item); this.operator1DViewModel_.Add(viewModel); } //this.view_ = new Operator1DListView(); this.view_.DataContext = this; }