| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- using SAGA.GplotRelationComputerManage;
- using SAGA.Models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SAGA.GplotManage
- {
- public class ElectricalRelationUploader : RelationUploader
- {
- public ElectricalRelationUploader(string relationType, string relationDisplay) : base(relationType, relationDisplay)
- {
- CurrentHandler=ElectricalRelationHandlerFactory.Create(relationType);
- }
- public IElectricalRelationHandler CurrentHandler { get; private set; }
- public override void Upload()
- {
- //计算数据
- if (CurrentHandler == null)
- return;
-
- //加载数据
- var data = CurrentHandler.GetComputeData(new PowerComputerContext()); ;
- //使用数据
- Upload(data);
- }
- public override void Upload(object loadData)
- {
- List<DataNode> dataNodes = loadData as List<DataNode>;
- if(dataNodes==null)
- {
- return;
- }
- //上传数据处理
- }
- }
- }
|