public SystemDataSourceProvide()
 {
     _systemDataSource.Add(new SystemDataSoure(_language.EnumSystemDataSource_UserId, "0"));
     _systemDataSource.Add(new SystemDataSoure(_language.EnumSystemDataSource_UserName, "1"));
     _systemDataSource.Add(new SystemDataSoure(_language.EnumSystemDataSource_UserLoginName, "2"));
     _systemDataSource.Add(new SystemDataSoure(_language.EnumSystemDataSource_Date, "5"));
     _systemDataSource.Add(new SystemDataSoure(_language.EnumSystemDataSource_DateTime, "6"));
 }
        public static void MergeDataSources(DataSourceCollection fromDataSources, DashboardMerger dashboardMerger)
        {
            DataSourceCollection toDataSources = dashboardMerger.TargetDashboard.DataSources;

            foreach (IDashboardDataSource dataSource in fromDataSources)
            {
                AddDataSourceCopy(dataSource, dashboardMerger, (dataSourceCopy) => {
                    toDataSources.Add(dataSourceCopy);
                });
            }
        }
        public DataSourceCollection GetAvailableDataSource(DataSourceProvideArgs args)
        {
            DataSourceCollection collection = new DataSourceCollection();

            if (args == null || args.WindowEntity == null)
            {
                Debug.Assert(false, "args.WindowEntity 为空");
                return(collection);
            }
            WindowEntity window = args.WindowEntity;

            foreach (var item in window.GetFormElement())
            {
                if (item.DataSourceUseable)
                {
                    UIElementDataSoure dataSource = new UIElementDataSoure(item);
                    collection.Add(dataSource);
                }
            }
            return(collection);
        }