| | |
| | | |
| | | //构造一个List<LinkViewModel>类,能够实现List的所有功能 |
| | | [Serializable] |
| | | public class LinkViewModelList : List<Q3DLinkCalcModel> |
| | | public class LinkViewModelList : List<LinkViewModel> |
| | | { |
| | | |
| | | Dictionary<string, LinkViewModel> dict; |
| | |
| | | //构造一个List<NodeViewModel>类,能够实现List的所有功能 |
| | | [Serializable] |
| | | |
| | | public class NodeViewModelList : List<Q3DNodeCalcModel> |
| | | public class NodeViewModelList : List<NodeViewModel> |
| | | { |
| | | //List<NodeCalcModel> base; |
| | | Dictionary<string, Q3DNodeCalcModel> dict;//=new Dictionary<string, NodeCalcModel>();// |
| | | Dictionary<string, NodeViewModel> dict;//=new Dictionary<string, NodeCalcModel>();// |
| | | public NodeViewModelList() : base() |
| | | { |
| | | this.dict = new Dictionary<string, Q3DNodeCalcModel>(); |
| | | this.dict = new Dictionary<string, NodeViewModel>(); |
| | | } |
| | | //public NodeViewModelList(List<NodeCalcModel> nodes) |
| | | //{ |
| | |
| | | /// </summary> |
| | | public void UpdateDict() |
| | | { |
| | | this.dict = new Dictionary<string, Q3DNodeCalcModel>(); |
| | | this.dict = new Dictionary<string, NodeViewModel>(); |
| | | base.ForEach(node => |
| | | { |
| | | if (!dict.ContainsKey(node.ID)) |