Exemplo n.º 1
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public override void Dispose()
 {
     foreach (var item in DataSources)
     {
         item.Dispose();
     }
     DataSources.Clear();
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 public void RefreshDataSources()
 {
     DataSources.Clear();
     FillSerialPorts();
     FillSocketAddresses();
 }