1、添加2个自定义控件:chartTC、TreeViewTc; 2、修复了一些bug,完善了功能;3、更新了gitignore,将bin等目录忽略;

This commit is contained in:
tangchao0503
2022-06-16 13:26:55 +08:00
parent b43227dc58
commit f36c5eaa39
50 changed files with 13043 additions and 3770 deletions

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("chartTC")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("chartTC")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("79fb5f64-9da8-42bf-b1e5-749aea345c7e")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

98
chartTC/chartTC.Designer.cs generated Normal file
View File

@ -0,0 +1,98 @@
namespace chartTC
{
partial class chartTC
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.clearAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// chart1
//
chartArea1.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea1);
this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
legend1.Name = "Legend1";
this.chart1.Legends.Add(legend1);
this.chart1.Location = new System.Drawing.Point(0, 0);
this.chart1.Name = "chart1";
series1.ChartArea = "ChartArea1";
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series1.Legend = "Legend1";
series1.Name = "Series1";
this.chart1.Series.Add(series1);
this.chart1.Size = new System.Drawing.Size(800, 450);
this.chart1.TabIndex = 0;
this.chart1.Text = "chart1";
this.chart1.Click += new System.EventHandler(this.chart1_Click);
this.chart1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseClick);
this.chart1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseDoubleClick);
this.chart1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseMove);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearAllToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(121, 26);
//
// clearAllToolStripMenuItem
//
this.clearAllToolStripMenuItem.Name = "clearAllToolStripMenuItem";
this.clearAllToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
this.clearAllToolStripMenuItem.Text = "ClearAll";
this.clearAllToolStripMenuItem.Click += new System.EventHandler(this.clearAllToolStripMenuItem_Click);
//
// chartTC
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.chart1);
this.Name = "chartTC";
this.Size = new System.Drawing.Size(800, 450);
this.Load += new System.EventHandler(this.chartTC_Load);
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
public System.Windows.Forms.DataVisualization.Charting.Chart chart1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem clearAllToolStripMenuItem;
}
}

450
chartTC/chartTC.cs Normal file
View File

@ -0,0 +1,450 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using System.Collections;
namespace chartTC
{
public delegate void clickEventHandler(Stack name, Stack x, Stack y);
public partial class chartTC: UserControl
{
public chartTC()
{
InitializeComponent();
}
private void chart1_Click(object sender, EventArgs e)
{
}
private void chartTC_Load(object sender, EventArgs e)
{
chart1.Series.Clear();
//ChartHelper.AddSeries(chart1, "曲线图", SeriesChartType.Line, Color.Red, Color.Red);
//ChartHelper.SetTitle(chart1, "sif", new Font("微软雅黑", 12), Docking.Bottom, Color.White);
ChartHelper.SetStyle(chart1, Color.Transparent, Color.White);
//ChartHelper.SetLegend(chart1, Docking.Top, StringAlignment.Center, Color.Transparent, Color.White);
//ChartHelper.SetXY(chart1, "波长", "值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None/*AxisArrowStyle.SharpTriangle*/, 10, 5);
ChartHelper.SetMajorGrid(chart1, Color.Gray, 20, 2);
//chart1.GetToolTipText += new EventHandler<ToolTipEventArgs>(chart_GetToolTipText);//https://bbs.csdn.net/topics/390754014
chart1.ChartAreas[0].CursorX.Interval = 0;
chart1.ChartAreas[0].CursorX.IsUserEnabled = true;
chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
}
void chart_GetToolTipText(object sender, ToolTipEventArgs e)
{
if (e.HitTestResult.ChartElementType == ChartElementType.DataPoint)
{
int i = e.HitTestResult.PointIndex;
DataPoint dp = e.HitTestResult.Series.Points[i];
e.Text = string.Format("{1:F3}", dp.XValue, dp.YValues[0]);
}
}
Point? prevPosition = null;
ToolTip tooltip = new ToolTip();
void chart1_MouseMove(object sender, MouseEventArgs e)
{
var pos = e.Location;
if (prevPosition.HasValue && pos == prevPosition.Value)
return;
tooltip.RemoveAll();
prevPosition = pos;
var results = chart1.HitTest(pos.X, pos.Y, false, ChartElementType.DataPoint);
//double XVuale = chart1.ChartAreas[0].AxisX.PixelPositionToValue(e.X);
//chart1.Series[0].
//tooltip.Show("X=" + prop.AxisLabel + ", Y=" + prop.YValues[0], this.chart1, pos.X, pos.Y - 15);
foreach (var result in results)
{
if (result.ChartElementType == ChartElementType.DataPoint)
{
var prop = result.Object as DataPoint;
if (prop != null)
{
var pointXPixel = result.ChartArea.AxisX.ValueToPixelPosition(prop.XValue);
var pointYPixel = result.ChartArea.AxisY.ValueToPixelPosition(prop.YValues[0]);
// check if the cursor is really close to the point (2 pixels around the point)
//if (Math.Abs(pos.X - pointXPixel) < 2 &&
// Math.Abs(pos.Y - pointYPixel) < 2)
//{
// tooltip.Show("X=" + prop.XValue + ", Y=" + prop.YValues[0], this.chart1,
// pos.X, pos.Y - 15);
//}
tooltip.Show("X=" + prop.AxisLabel + ", Y=" + prop.YValues[0], this.chart1, pos.X, pos.Y - 15);
}
}
}
}
private void chart_MouseMove(object sender, MouseEventArgs e)
{
//labX.Text = e.X.ToString();
//labY.Text = e.Y.ToString();
//if (e.HitTestResult.ChartElementType == ChartElementType.DataPoint)
//{
// int i = e.HitTestResult.PointIndex;
// DataPoint dp = e.HitTestResult.Series.Points[i];
// e.Text = string.Format("{1:F3}", dp.XValue, dp.YValues[0]);
//}
//ChartHitInfo hitInfo = chartControl4.CalcHitInfo(e.Location);
//if (hitInfo.SeriesPoint != null)
//{
// MessageBox.Show(hitInfo.SeriesPoint.Values[0].ToString());
//}
}
private void chart_Wave1_MouseMove(object sender, MouseEventArgs e)
{
HitTestResult myTestResult = chart1.HitTest(e.X, e.Y);
if (myTestResult.ChartElementType == ChartElementType.DataPoint)
{
this.Cursor = Cursors.Cross;
int i = myTestResult.PointIndex;
DataPoint dp = myTestResult.Series.Points[i];
double doubleXValue = (dp.XValue);
double doubleYValue = dp.YValues[0];
//自我实现值的显示
MessageBox.Show(doubleYValue.ToString());
}
else
{
this.Cursor = Cursors.Default;
}
}
public event clickEventHandler clickPointEvent;
private void chart1_MouseClick(object sender, MouseEventArgs e)
{
if (chart1.Series.Count == 0)
return;
if (e.Button == MouseButtons.Left)
{
//var collection = chart1.Series.Select(series => series.Points.Where(point => point.XValue == 0).ToList()).ToList();//????????????????????????????????????????????????????????
//chart1.Series.ElementAt
////方式1遍历x坐标处的所有y坐标
//var pos = e.Location;
//var yAxis = chart1.ChartAreas[0].AxisY;
//int yMin = (int)yAxis.ValueToPixelPosition(yAxis.Maximum) - 1;
//int yMax = (int)yAxis.ValueToPixelPosition(yAxis.Minimum);
//for (int i = yMin; i < yMax + 1; i++)
//{
// var results = chart1.HitTest(pos.X, pos.Y, true, ChartElementType.DataPoint);
// foreach (var result in results)
// {
// if (result.ChartElementType == ChartElementType.DataPoint)
// {
// var prop = result.Object as DataPoint;
// if (prop != null)
// {
// var pointXPixel = result.ChartArea.AxisX.ValueToPixelPosition(prop.XValue);
// var pointYPixel = result.ChartArea.AxisY.ValueToPixelPosition(prop.YValues[0]);
// int b = 1;
// }
// }
// }
//}
//方式2
double cursorPos = chart1.ChartAreas[0].CursorX.Position;
var xAxis = chart1.ChartAreas[0].AxisX;
double XVuale1 = chart1.ChartAreas[0].AxisX.ValueToPixelPosition(e.X);
double XVuale2 = chart1.ChartAreas[0].AxisX.GetPosition(e.X);
double XVuale3 = Math.Round(chart1.ChartAreas[0].AxisX.PixelPositionToValue(e.X));
if (XVuale3-1 < xAxis.Minimum)//XVuale3-1因为在chart上绘制的曲线的第一个点的x坐标为1而不是0
XVuale3 = 1;
else if (chart1.Series[0].Points.Count - 1 < XVuale3 - 1)
XVuale3= chart1.Series[0].Points.Count;
chart1.ChartAreas[0].CursorX.Position = XVuale3;
Stack name = new Stack();
Stack x = new Stack();
Stack y = new Stack();
for (int i = 0; i < chart1.Series.Count; i++)
{
DataPoint p1 = chart1.Series[i].Points.ElementAt((int)XVuale3 - 1);
name.Push(chart1.Series[i].Name);
x.Push(p1.AxisLabel);
y.Push(p1.YValues[0]);
}
if(clickPointEvent != null)
clickPointEvent(name, x, y);
}
else if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(chart1, e.X, e.Y);
}
}
private double calcCursorGraphX(int clientX)
{
var xAxis = chart1.ChartAreas[0].AxisX;
int xRight = (int)xAxis.ValueToPixelPosition(xAxis.Maximum) - 1;
int xLeft = (int)xAxis.ValueToPixelPosition(xAxis.Minimum);
if (clientX > xRight)
{
return xAxis.Maximum;
}
else if (clientX < xLeft)
{
return xAxis.Minimum;
}
else
{
return xAxis.PixelPositionToValue(clientX);
}
}
//private int nearestPreceedingValue(double x)
//{
// var bpData = chart1.Series[0].Points;
// int bpIndex = bpData.BinarySearch(x, (xVal, point) => Math.Sign(x - point.XValue));
// if (bpIndex < 0)
// {
// bpIndex = ~bpIndex; // BinarySearch() returns the index of the next element LARGER than the target.
// bpIndex = Math.Max(0, bpIndex - 1); // We want the value of the previous element, so we must decrement the returned index.
// } // If this is before the start of the graph, use the first valid data point.
// return bpIndex;
//}
private void clearAllToolStripMenuItem_Click(object sender, EventArgs e)
{
chart1.Series.Clear();
}
public void clearAll()
{
chart1.Series.Clear();
}
private Color ss()
{
int iSeed = 10;
Random ro = new Random(10);
long tick = DateTime.Now.Ticks;
Random ran = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
int R = ran.Next(255);
int G = ran.Next(255);
int B = ran.Next(255);
B = (R + G > 400) ? R + G - 400 : B;//0 : 380 - R - G;
B = (B > 255) ? 255 : B;
return Color.FromArgb(R, G, B);
//return or.FromArgb(random.Next(255), random.Next(255), random.Next(255));
}
public Color GetRandomColor()
{
Random RandomNum_First = new Random((int)DateTime.Now.Ticks);
// 对于C#的随机数,没什么好说的
System.Threading.Thread.Sleep(RandomNum_First.Next(50));
Random RandomNum_Sencond = new Random((int)DateTime.Now.Ticks);
// 为了在白色背景上显示,尽量生成深色
int int_Red = RandomNum_First.Next(256);
int int_Green = RandomNum_Sencond.Next(256);
int int_Blue = (int_Red + int_Green > 400) ? 0 : 400 - int_Red - int_Green;
int_Blue = (int_Blue > 255) ? 255 : int_Blue;
return Color.FromArgb(int_Red, int_Green, int_Blue);
}
public void addSeries(string[] x, double[] y,string name)
{
int count = chart1.Series.Count;
//ChartHelper.AddSeries(chart1, name, SeriesChartType.Line, Color.Green, Color.Red, false);
//ChartHelper.AddSeries(chart1, name, SeriesChartType.Line, ss(), ss(), false);
ChartHelper.AddSeries(chart1, name, SeriesChartType.Line, GetRandomColor(), GetRandomColor(), false);
chart1.Series[count].Points.DataBindXY(x, y);
//chart1.Series[count].Points.DataBindY(y);
}
private void chart1_MouseDoubleClick(object sender, MouseEventArgs e)
{
//Chart chart1 = sender as Chart;
//右键恢复事件
if (e.Button == MouseButtons.Left)
{
chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset(0);
}
}
}
//https://blog.csdn.net/boxuming/article/details/89678159?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.pc_relevant_default&utm_relevant_index=9
public class ChartHelper
{
/// <summary>
/// Name添加序列
/// Authorby boxuming 2019-04-28 13:59
/// </summary>
/// <param name="chart">图表对象</param>
/// <param name="seriesName">序列名称</param>
/// <param name="chartType">图表类型</param>
/// <param name="color">颜色</param>
/// <param name="markColor">标记点颜色</param>
/// <param name="showValue">是否显示数值</param>
public static void AddSeries(Chart chart, string seriesName, SeriesChartType chartType, Color color, Color markColor, bool showValue = false)
{
chart.Series.Add(seriesName);
chart.Series[seriesName].ChartType = chartType;
chart.Series[seriesName].Color = color;
if (showValue)
{
chart.Series[seriesName].IsValueShownAsLabel = true;
chart.Series[seriesName].MarkerStyle = MarkerStyle.Circle;
chart.Series[seriesName].MarkerColor = markColor;
chart.Series[seriesName].LabelForeColor = color;
chart.Series[seriesName].LabelAngle = -90;
}
}
/// <summary>
/// Name设置标题
/// Authorby boxuming 2019-04-28 14:25
/// </summary>
/// <param name="chart">图表对象</param>
/// <param name="chartName">图表名称</param>
public static void SetTitle(Chart chart, string chartName, Font font, Docking docking, Color foreColor)
{
chart.Titles.Add(chartName);
chart.Titles[0].Font = font;
chart.Titles[0].Docking = docking;
chart.Titles[0].ForeColor = foreColor;
}
/// <summary>
/// Name设置样式
/// Authorby boxuming 2019-04-23 14:04
/// </summary>
/// <param name="chart">图表对象</param>
/// <param name="backColor">背景颜色</param>
/// <param name="foreColor">字体颜色</param>
public static void SetStyle(Chart chart, Color backColor, Color foreColor)
{
chart.BackColor = backColor;
chart.ChartAreas[0].BackColor = backColor;
chart.ForeColor = Color.Red;
}
/// <summary>
/// Name设置图例
/// Authorby boxuming 2019-04-23 14:30
/// </summary>
/// <param name="chart">图表对象</param>
/// <param name="docking">停靠位置</param>
/// <param name="align">对齐方式</param>
/// <param name="backColor">背景颜色</param>
/// <param name="foreColor">字体颜色</param>
public static void SetLegend(Chart chart, Docking docking, StringAlignment align, Color backColor, Color foreColor)
{
chart.Legends[0].Docking = docking;
chart.Legends[0].Alignment = align;
chart.Legends[0].BackColor = backColor;
chart.Legends[0].ForeColor = foreColor;
}
/// <summary>
/// Name设置XY轴
/// Authorby boxuming 2019-04-23 14:35
/// </summary>
/// <param name="chart">图表对象</param>
/// <param name="xTitle">X轴标题</param>
/// <param name="yTitle">Y轴标题</param>
/// <param name="align">坐标轴标题对齐方式</param>
/// <param name="foreColor">坐标轴字体颜色</param>
/// <param name="lineColor">坐标轴颜色</param>
/// <param name="arrowStyle">坐标轴箭头样式</param>
/// <param name="xInterval">X轴的间距</param>
/// <param name="yInterval">Y轴的间距</param>
public static void SetXY(Chart chart, string xTitle, string yTitle, StringAlignment align, Color foreColor, Color lineColor, AxisArrowStyle arrowStyle, double xInterval, double yInterval)
{
chart.ChartAreas[0].AxisX.Title = xTitle;
chart.ChartAreas[0].AxisY.Title = yTitle;
chart.ChartAreas[0].AxisX.TitleAlignment = align;
chart.ChartAreas[0].AxisY.TitleAlignment = align;
chart.ChartAreas[0].AxisX.TitleForeColor = foreColor;
chart.ChartAreas[0].AxisY.TitleForeColor = foreColor;
chart.ChartAreas[0].AxisX.LabelStyle = new LabelStyle() { ForeColor = foreColor };
chart.ChartAreas[0].AxisY.LabelStyle = new LabelStyle() { ForeColor = foreColor };
chart.ChartAreas[0].AxisX.LineColor = lineColor;
chart.ChartAreas[0].AxisY.LineColor = lineColor;
chart.ChartAreas[0].AxisX.ArrowStyle = arrowStyle;
chart.ChartAreas[0].AxisY.ArrowStyle = arrowStyle;
//chart.ChartAreas[0].AxisX.Interval = xInterval;
//chart.ChartAreas[0].AxisY.Interval = yInterval;
chart.ChartAreas[0].AxisY.IsStartedFromZero = false;
}
/// <summary>
/// Name设置网格
/// Authorby boxuming 2019-04-23 14:55
/// </summary>
/// <param name="chart">图表对象</param>
/// <param name="lineColor">网格线颜色</param>
/// <param name="xInterval">X轴网格的间距</param>
/// <param name="yInterval">Y轴网格的间距</param>
public static void SetMajorGrid(Chart chart, Color lineColor, double xInterval, double yInterval)
{
chart.ChartAreas[0].AxisX.MajorGrid.LineColor = lineColor;
chart.ChartAreas[0].AxisY.MajorGrid.LineColor = lineColor;
chart.ChartAreas[0].AxisX.MajorGrid.Interval = xInterval;
chart.ChartAreas[0].AxisY.MajorGrid.Interval = yInterval;
}
}
}

61
chartTC/chartTC.csproj Normal file
View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{79FB5F64-9DA8-42BF-B1E5-749AEA345C7E}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>chartTC</RootNamespace>
<AssemblyName>chartTC</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="chartTC.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="chartTC.Designer.cs">
<DependentUpon>chartTC.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="chartTC.resx">
<DependentUpon>chartTC.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

123
chartTC/chartTC.resx Normal file
View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>