Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmey-Jiang committed Oct 16, 2017
1 parent 2e6a16f commit 3125276
Show file tree
Hide file tree
Showing 118 changed files with 67,040 additions and 2,585 deletions.
Binary file not shown.
1,038 changes: 1,038 additions & 0 deletions Utility基础类大全/.vs/config/applicationhost.config

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.DirectoryServices;
using System.Security.Principal;
using System.Runtime.InteropServices;
using NPOI.POIFS.FileSystem;
//Download by http://www.codefans.net
namespace UserDLL
{
Expand Down
191 changes: 97 additions & 94 deletions Utility基础类大全/Chart图形/Assistant.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System;
/*
源码己托管:http://git.oschina.net/kuiyu/dotnetcodes
*/
using System;
using System.Text;
using System.Data;
using OWCChart;

namespace Utilities
namespace Common.Utility
{
/// <summary>
/// Assistant 的摘要说明。
Expand Down Expand Up @@ -424,98 +427,98 @@ public static string CreateTagOld(string filename, string desc, string FileType,

#endregion

#region 创建数据图形文件

/// <summary>
/// 创建数据图形文件
/// </summary>
/// <param name="dt">数据源</param>
/// <param name="CharType">图类型 Column,Pie</param>
/// <param name="ImagePath">图像存放目录</param>
/// <param name="Title">图形标题</param>
/// <returns></returns>
public static string CreateChart(DataTable dt, string CharType, string ImagePath, string Title)
{
String PhaysicalImagePath = ImagePath;
OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 530, 300, new OWCChartFontStyle());
OWCChart.OWCSeriesClass MyItem = new OWCSeriesClass();

MyItem.SeriesName = "次数";
MyItem.SetDataSource(dt, "Item", "Value");
switch (CharType)
{
case "Column":
mychart.CreateOneColumn("时间", "次", MyItem);
break;
case "Pie":
mychart.CreateSinglePie(MyItem);
break;

}
String imageName = mychart.ExportPictuire();
return imageName;
// Image1.ImageUrl = ".\\"+m_imagePath+imageName;

}
public static string CreateMultiColumns(DataTable[] dts, string ImagePath, string Title)
{
String PhaysicalImagePath = ImagePath;
OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 530, 300, new OWCChartFontStyle());
OWCChart.OWCSeriesClass[] MyItems = new OWCSeriesClass[dts.Length];

MyItems[0] = new OWCSeriesClass();
MyItems[0].SeriesName = "显示次数";
MyItems[0].SetDataSource(dts[0], "Item", "Value");

MyItems[1] = new OWCSeriesClass();
MyItems[1].SeriesName = "点击次数";
MyItems[1].SetDataSource(dts[1], "Item", "Value");


mychart.CreateMultiColumns("时间", "次", MyItems);


String imageName = mychart.ExportPictuire();
return imageName;

}

public static string CreateSingleBar(DataTable dt, string CharType, string ImagePath, string Title)
{
String PhaysicalImagePath = ImagePath;
OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 500, 600, new OWCChartFontStyle());
OWCChart.OWCSeriesClass MyItem = new OWCSeriesClass();

MyItem.SeriesName = "次数";
MyItem.SetDataSource(dt, "Item", "Value");
mychart.CreateSingleBar(" ", "", MyItem);
String imageName = mychart.ExportPictuire();
return imageName;
}
public static string CreateMultiBar(DataTable[] dts, string ImagePath, string Title)
{
String PhaysicalImagePath = ImagePath;
OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 500, 600, new OWCChartFontStyle());
OWCChart.OWCSeriesClass[] MyItems = new OWCSeriesClass[dts.Length];

MyItems[0] = new OWCSeriesClass();
MyItems[0].SeriesName = "显示次数";
MyItems[0].SetDataSource(dts[0], "Item", "Value");

MyItems[1] = new OWCSeriesClass();
MyItems[1].SeriesName = "点击次数";
MyItems[1].SetDataSource(dts[1], "Item", "Value");


mychart.CreateMultiBar(" ", "", MyItems);


String imageName = mychart.ExportPictuire();
return imageName;

}

#endregion
//#region 创建数据图形文件

///// <summary>
///// 创建数据图形文件
///// </summary>
///// <param name="dt">数据源</param>
///// <param name="CharType">图类型 Column,Pie</param>
///// <param name="ImagePath">图像存放目录</param>
///// <param name="Title">图形标题</param>
///// <returns></returns>
//public static string CreateChart(DataTable dt, string CharType, string ImagePath, string Title)
//{
// String PhaysicalImagePath = ImagePath;
// OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 530, 300, new OWCChartFontStyle());
// OWCChart.OWCSeriesClass MyItem = new OWCSeriesClass();
// MyItem.SeriesName = "次数";
// MyItem.SetDataSource(dt, "Item", "Value");
// switch (CharType)
// {
// case "Column":
// mychart.CreateOneColumn("时间", "次", MyItem);
// break;
// case "Pie":
// mychart.CreateSinglePie(MyItem);
// break;

// }
// String imageName = mychart.ExportPictuire();
// return imageName;
// // Image1.ImageUrl = ".\\"+m_imagePath+imageName;

//}
//public static string CreateMultiColumns(DataTable[] dts, string ImagePath, string Title)
//{
// String PhaysicalImagePath = ImagePath;
// OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 530, 300, new OWCChartFontStyle());
// OWCChart.OWCSeriesClass[] MyItems = new OWCSeriesClass[dts.Length];

// MyItems[0] = new OWCSeriesClass();
// MyItems[0].SeriesName = "显示次数";
// MyItems[0].SetDataSource(dts[0], "Item", "Value");

// MyItems[1] = new OWCSeriesClass();
// MyItems[1].SeriesName = "点击次数";
// MyItems[1].SetDataSource(dts[1], "Item", "Value");


// mychart.CreateMultiColumns("时间", "次", MyItems);


// String imageName = mychart.ExportPictuire();
// return imageName;

//}

//public static string CreateSingleBar(DataTable dt, string CharType, string ImagePath, string Title)
//{
// String PhaysicalImagePath = ImagePath;
// //OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 500, 600, new OWCChartFontStyle());
// //OWCChart.OWCSeriesClass MyItem = new OWCSeriesClass();

// MyItem.SeriesName = "次数";
// MyItem.SetDataSource(dt, "Item", "Value");
// mychart.CreateSingleBar(" ", "", MyItem);
// String imageName = mychart.ExportPictuire();
// return imageName;
//}
//public static string CreateMultiBar(DataTable[] dts, string ImagePath, string Title)
//{
// String PhaysicalImagePath = ImagePath;
// //OWCChart.OWCChartFactory mychart = new OWCChartFactory(Title, PhaysicalImagePath, 500, 600, new OWCChartFontStyle());
// //OWCChart.OWCSeriesClass[] MyItems = new OWCSeriesClass[dts.Length];

// MyItems[0] = new OWCSeriesClass();
// MyItems[0].SeriesName = "显示次数";
// MyItems[0].SetDataSource(dts[0], "Item", "Value");

// MyItems[1] = new OWCSeriesClass();
// MyItems[1].SeriesName = "点击次数";
// MyItems[1].SetDataSource(dts[1], "Item", "Value");


// mychart.CreateMultiBar(" ", "", MyItems);


// String imageName = mychart.ExportPictuire();
// return imageName;

//}

//#endregion

#region

Expand Down
18 changes: 10 additions & 8 deletions Utility基础类大全/Chart图形/OWCChart11.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
using System;
/*
源码己托管:http://git.oschina.net/kuiyu/dotnetcodes
*/
using System;
using System.Data;
using System.Text;

namespace Utilities
using OWCChart;
namespace Common.Utility
{
/// <summary>
/// 利用OWC11进行作统计图的封装类。
/// 李天平 2005-8-31
/// 进行作统计图的封装类。
/// </summary>
public class OWCChart11
public class OWCChart
{

#region 属性
Expand Down Expand Up @@ -81,10 +83,10 @@ private string GetValueStr(DataTable dt)
#endregion


public OWCChart11()
public OWCChart()
{
}
public OWCChart11(string PhaysicalImagePath, string Title, string SeriesName)
public OWCChart(string PhaysicalImagePath, string Title, string SeriesName)
{
_phaysicalimagepath = PhaysicalImagePath;
_title = Title;
Expand Down
Loading

0 comments on commit 3125276

Please sign in to comment.