/// <summary> /// 释放资源 /// </summary> public override void Dispose() { foreach (var item in DataSources) { item.Dispose(); } DataSources.Clear(); }
public bool LoadReportItems() { AllItems.Clear(); DataSources.Clear(); var service = Service; var rootItem = new ReportItem { Name = "/", Path = "/", ItemType = ItemTypeEnum.Unknown }; RootItem = rootItem; return(LoadReportItems(service, rootItem)); }
public void ProcessJson(dynamic dataSources) { DataSources.Clear(); foreach (var source in dataSources) { var dataSourceObject = new DataSourceObject(); if (source.DocumentDataSource != null) { var documentDataSource = new DocumentDataSource(); documentDataSource.ObjectInspector = ObjectInspector; documentDataSource.LoadProperties(source.DocumentDataSource); dataSourceObject.DataSource = documentDataSource; } else if (source.ObjectDataSource != null) { var objectDataSource = new ObjectDataSource(); objectDataSource.ObjectInspector = ObjectInspector; objectDataSource.LoadProperties(source.ObjectDataSource); dataSourceObject.DataSource = objectDataSource; } DataSources.Add(dataSourceObject); } GridViewDataSources.RefreshData(); }
public void RefreshDataSources() { DataSources.Clear(); FillSerialPorts(); FillSocketAddresses(); }