public void DataBindTable(IEnumerable dataSource, string xField) { if (dataSource != null) { ArrayList dataSourceMemberNames = ChartImage.GetDataSourceMemberNames(dataSource, true); if (xField != null && xField.Length > 0) { int num = dataSourceMemberNames.IndexOf(xField); if (num >= 0) { dataSourceMemberNames.RemoveAt(num); } else { try { num = int.Parse(xField, CultureInfo.InvariantCulture); if (num >= 0 && num < dataSourceMemberNames.Count) { dataSourceMemberNames.RemoveAt(num); } } catch { } } } int count = dataSourceMemberNames.Count; if (count > 0) { ArrayList arrayList = new ArrayList(); int num2 = 0; foreach (string item in dataSourceMemberNames) { Series series = new Series(item); series.ValueMembersY = item; series.ValueMemberX = xField; arrayList.Add(series); num2++; } this.DataBind(dataSource, arrayList); foreach (Series item2 in arrayList) { item2.ValueMembersY = string.Empty; item2.ValueMemberX = string.Empty; base.common.Chart.Series.Add(item2); } } } }
public static bool CheckLicense() { bool result = false; try { string keyName = "SOFTWARE\\Dundas Software\\Charting\\WebControlVS2005"; string fileName = "AspNetCore.Reporting.Chart.WebForms.Chart.lic"; result = ChartImage.CheckLicense(keyName, fileName); return(result); } catch { return(result); } }