initial commit

This commit is contained in:
Arin(asus)
2024-11-26 20:15:16 +09:00
commit 973524ee77
435 changed files with 103766 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

View File

@@ -0,0 +1,501 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
namespace CustomChartControl
{
public class TimeVoltageChart : Control
{
private List<PointF> dataPoints;
private float zoomFactorX = 1.0f; // X축 줌 팩터
private float zoomFactorY = 1.0f; // Y축 줌 팩터
private PointF panOffset = PointF.Empty;
private Point lastMousePosition;
private bool isDragging = false;
private DateTime[] _timeData;
private float[] _voltageData;
private bool _showDataPoints = false;
// 기존 필드 추가
private bool isSelecting = false; // 영역 선택 중 여부
private Point selectionStart; // 영역 선택 시작점
private Rectangle selectionRectangle; // 선택 영역
public TimeVoltageChart()
{
this.DoubleBuffered = true;
this.dataPoints = new List<PointF>();
this.MouseWheel += TimeVoltageChart_MouseWheel;
this.MouseDown += TimeVoltageChart_MouseDown;
this.MouseMove += TimeVoltageChart_MouseMove;
this.MouseUp += TimeVoltageChart_MouseUp;
}
public DateTime[] TimeData
{
get => _timeData;
set
{
_timeData = value;
UpdateDataPoints();
}
}
public float[] VoltageData
{
get => _voltageData;
set
{
_voltageData = value;
UpdateDataPoints();
}
}
public bool ShowDataPoints
{
get => _showDataPoints;
set
{
_showDataPoints = value;
Invalidate(); // 속성 변경 시 차트 다시 그리기
}
}
public void AdjustScaleX()
{
if (_timeData != null && _timeData.Length > 0)
{
// X축 자동 스케일링
float totalSeconds = (float)(_timeData[_timeData.Length - 1] - _timeData[0]).TotalSeconds;
zoomFactorX = Width / totalSeconds;
panOffset.X = 0; // 초기화
Invalidate(); // 변경 후 다시 그리기
}
}
public void AdjustScaleY()
{
if (_voltageData != null && _voltageData.Length > 0)
{
// Y축 자동 스케일링
float minY = float.MaxValue;
float maxY = float.MinValue;
foreach (var voltage in _voltageData)
{
if (voltage < minY) minY = voltage;
if (voltage > maxY) maxY = voltage;
}
float range = maxY - minY;
if (range == 0) range = 1;
zoomFactorY = Height / range;
panOffset.Y = -minY * zoomFactorY; // 초기화
Invalidate(); // 변경 후 다시 그리기
}
}
private void UpdateDataPoints()
{
dataPoints.Clear();
if (_timeData != null && _voltageData != null && _timeData.Length == _voltageData.Length)
{
DateTime startTime = _timeData[0];
for (int i = 0; i < _timeData.Length; i++)
{
float timeOffset = (float)(_timeData[i] - startTime).TotalSeconds;
dataPoints.Add(new PointF(timeOffset, _voltageData[i]));
}
Invalidate(); // 화면을 갱신하여 차트를 다시 그리도록 함
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
DrawGrid(e.Graphics);
DrawData(e.Graphics);
DrawBorder(e.Graphics);
DrawZoomLevel(e.Graphics);
if (isSelecting && selectionRectangle.Width > 0 && selectionRectangle.Height > 0)
{
using (var selectionPen = new Pen(Color.Gray, 1))
{
selectionPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
e.Graphics.DrawRectangle(selectionPen, selectionRectangle);
}
}
}
private void DrawZoomLevel(Graphics g)
{
string zoomLevelText = $"Zoom Level - X: {zoomFactorX:F2}, Y: {zoomFactorY:F2}";
Font zoomLevelFont = new Font("Arial", 10, FontStyle.Bold);
Brush zoomLevelBrush = new SolidBrush(Color.Black);
SizeF textSize = g.MeasureString(zoomLevelText, zoomLevelFont);
float x = Width - textSize.Width - 60; // 오른쪽 여백을 줄이기
float y = 10; // 상단 여백 10
g.DrawString(zoomLevelText, zoomLevelFont, zoomLevelBrush, x, y);
}
private void DrawBorder(Graphics g)
{
int leftMargin = 50; // 왼쪽 Y축 라벨을 위한 공간
int rightMargin = 50; // 오른쪽 여백
int bottomMargin = 30; // X축 라벨을 위한 공간
Pen borderPen = new Pen(Color.Black, 1); // 테두리 색상 및 두께
Rectangle borderRect = new Rectangle(leftMargin, 0, Width - leftMargin - rightMargin, Height - bottomMargin - 1); // 테두리 영역
g.DrawRectangle(borderPen, borderRect);
}
private void DrawGrid(Graphics g)
{
int gridSpacingX = 60; // X축 그리드 간격
int gridSpacingY = 20; // Y축 그리드 간격
int leftMargin = 50; // 왼쪽 Y축 라벨을 위한 공간
int rightMargin = 50; // 오른쪽 여백
int bottomMargin = 30; // X축 라벨을 위한 공간
Pen gridPen = new Pen(Color.LightGray);
Brush labelBrush = new SolidBrush(Color.Black);
Font labelFont = new Font("Arial", 8);
if (_timeData != null && _timeData.Length > 0)
{
DateTime minTime = _timeData[0];
DateTime maxTime = _timeData[_timeData.Length - 1]; // 마지막 요소
double totalSeconds = (maxTime - minTime).TotalSeconds;
float visibleStartTime = (0 - panOffset.X) / zoomFactorX;
float visibleEndTime = (Width - leftMargin - rightMargin - panOffset.X) / zoomFactorX;
for (int x = leftMargin; x < Width - rightMargin; x += gridSpacingX)
{
float timeOffset = (x - leftMargin - panOffset.X) / zoomFactorX;
if (timeOffset < visibleStartTime || timeOffset > visibleEndTime)
continue;
DateTime time = minTime.AddSeconds(timeOffset);
g.DrawLine(gridPen, x, 0, x, Height - bottomMargin); // 테두리 위에 맞추기
using (StringFormat sf = new StringFormat())
{
sf.LineAlignment = StringAlignment.Near;
sf.Alignment = StringAlignment.Center;
g.DrawString(time.ToString("yy-MM-dd\nHH:mm:ss"), labelFont, labelBrush, new PointF(x, Height - bottomMargin), sf);
}
}
}
if (_voltageData != null && _voltageData.Length > 0)
{
float minY = float.MaxValue;
float maxY = float.MinValue;
foreach (var voltage in _voltageData)
{
if (voltage < minY) minY = voltage;
if (voltage > maxY) maxY = voltage;
}
float range = maxY - minY;
if (range == 0) range = 1;
using (StringFormat sfY = new StringFormat())
{
sfY.LineAlignment = StringAlignment.Center;
sfY.Alignment = StringAlignment.Far; // Y축 라벨을 오른쪽 정렬
for (int y = 0; y < Height - bottomMargin; y += gridSpacingY) // 테두리 위에 맞추기
{
float voltageValue = minY + (Height - y - panOffset.Y) / zoomFactorY * range / (Height - bottomMargin);
// 모든 Y축 눈금 라벨을 표시
g.DrawLine(gridPen, leftMargin, y, Width - rightMargin, y); // 패딩 추가
g.DrawString(voltageValue.ToString("F2"), labelFont, labelBrush, new PointF(leftMargin - 10, y), sfY);
}
}
}
}
private void DrawData(Graphics g)
{
if (dataPoints.Count < 2) return;
int leftMargin = 50;
int rightMargin = 50;
int bottomMargin = 30;
int minPixelDistance = 3; // 최소 픽셀 거리 설정
Pen dataPen = new Pen(Color.Blue);
Brush pointBrush = new SolidBrush(Color.Red); // 데이터 포인트의 원 색상
float visibleStartTime = (0 - panOffset.X) / zoomFactorX;
float visibleEndTime = (Width - leftMargin - rightMargin - panOffset.X) / zoomFactorX;
PointF prevPoint = TransformPoint(dataPoints[0]);
PointF lastDrawnPoint = prevPoint;
bool skipNextPoint = false;
// 포인트 간 평균 간격 계산
float totalWidth = Width - leftMargin - rightMargin;
float avgPixelDistance = totalWidth / dataPoints.Count;
int pointRadius = Math.Max(1, (int)(avgPixelDistance / 4)); // 밀집도에 따른 포인트 반지름 조정
for (int i = 1; i < dataPoints.Count; i++)
{
float timeOffset = dataPoints[i].X;
if (timeOffset < visibleStartTime || timeOffset > visibleEndTime)
{
prevPoint = TransformPoint(dataPoints[i]);
continue;
}
PointF currPoint = TransformPoint(dataPoints[i]);
if (currPoint.X >= leftMargin && currPoint.X <= Width - rightMargin)
{
PointF clippedPrev = ClipToChartArea(prevPoint, leftMargin, Width - rightMargin, bottomMargin, Height);
PointF clippedCurr = ClipToChartArea(currPoint, leftMargin, Width - rightMargin, bottomMargin, Height);
// 선 연결을 유지하되, 포인트를 그리지 않을 때만 스킵
if (skipNextPoint || Math.Abs(clippedCurr.X - lastDrawnPoint.X) >= minPixelDistance)
{
g.DrawLine(dataPen, clippedPrev, clippedCurr);
lastDrawnPoint = clippedCurr;
skipNextPoint = false;
if (clippedCurr.X > leftMargin && clippedCurr.X < Width - rightMargin && clippedCurr.Y > 0 && clippedCurr.Y < Height - bottomMargin)
{
g.FillEllipse(pointBrush, clippedCurr.X - pointRadius, clippedCurr.Y - pointRadius, pointRadius * 2, pointRadius * 2);
}
}
else
{
skipNextPoint = true;
}
}
prevPoint = currPoint;
}
}
private PointF ClipToChartArea(PointF point, int leftMargin, int rightLimit, int bottomMargin, int topLimit)
{
// X축 클리핑
if (point.X < leftMargin) point.X = leftMargin;
if (point.X > rightLimit) point.X = rightLimit;
// Y축 클리핑
if (point.Y < 0) point.Y = 0;
if (point.Y > topLimit - bottomMargin) point.Y = topLimit - bottomMargin;
return point;
}
private PointF TransformPoint(PointF point)
{
int leftMargin = 50;
int bottomMargin = 30;
return new PointF(
(point.X * zoomFactorX + panOffset.X) + leftMargin,
Height - ((point.Y * zoomFactorY - panOffset.Y) + bottomMargin));
}
private void TimeVoltageChart_MouseWheel(object sender, MouseEventArgs e)
{
float zoomChange;
if (ModifierKeys.HasFlag(Keys.Control))
{
// Y축 줌 레벨 조정
zoomChange = e.Delta > 0 ? 1.1f : 0.9f;
float newZoomFactorY = zoomFactorY * zoomChange;
if (CanZoomY(newZoomFactorY))
{
AdjustPanOffsetY(newZoomFactorY, e.Delta > 0);
zoomFactorY = newZoomFactorY;
}
}
else
{
// X축 줌 레벨 조정
zoomChange = e.Delta > 0 ? 1.1f : 0.9f;
float newZoomFactorX = zoomFactorX * zoomChange;
if (CanZoomX(newZoomFactorX))
{
AdjustPanOffsetX(newZoomFactorX, e.Delta > 0);
zoomFactorX = newZoomFactorX;
}
}
Invalidate();
}
private void AdjustPanOffsetX(float newZoomFactorX, bool zoomingIn)
{
float totalDataTime = (float)(_timeData[_timeData.Length - 1] - _timeData[0]).TotalSeconds;
float currentVisibleStart = -panOffset.X / zoomFactorX;
float currentVisibleEnd = (Width - panOffset.X) / zoomFactorX;
float newVisibleStart, newVisibleEnd;
if (zoomingIn)
{
newVisibleStart = currentVisibleStart + (currentVisibleEnd - currentVisibleStart) * 0.1f;
newVisibleEnd = currentVisibleEnd - (currentVisibleEnd - currentVisibleStart) * 0.1f;
}
else
{
newVisibleStart = currentVisibleStart - (currentVisibleEnd - currentVisibleStart) * 0.1f;
newVisibleEnd = currentVisibleEnd + (currentVisibleEnd - currentVisibleStart) * 0.1f;
}
if (newVisibleStart < 0)
{
panOffset.X = 0;
}
else if (newVisibleEnd > totalDataTime)
{
panOffset.X = -(totalDataTime * newZoomFactorX - Width);
}
else
{
panOffset.X = -newVisibleStart * newZoomFactorX;
}
}
private void AdjustPanOffsetY(float newZoomFactorY, bool zoomingIn)
{
float minY = float.MaxValue;
float maxY = float.MinValue;
foreach (var voltage in _voltageData)
{
if (voltage < minY) minY = voltage;
if (voltage > maxY) maxY = voltage;
}
float dataRange = maxY - minY;
float visibleRange = (Height - 70) / newZoomFactorY; // 상하 여백 고려
float visibleStartY = -panOffset.Y / zoomFactorY;
float visibleEndY = visibleStartY + visibleRange;
// Ensure the visible range is within the data range
if (visibleStartY < minY)
{
visibleStartY = minY;
visibleEndY = visibleStartY + visibleRange;
}
if (visibleEndY > maxY)
{
visibleEndY = maxY;
visibleStartY = visibleEndY - visibleRange;
}
// Adjust panOffset.Y to ensure the data is visible within the screen bounds
panOffset.Y = -visibleStartY * newZoomFactorY;
}
private bool CanZoomX(float newZoomFactorX)
{
float totalDataTime = (float)(_timeData[_timeData.Length - 1] - _timeData[0]).TotalSeconds;
float visibleTime = (Width - 100) / newZoomFactorX; // 좌우 여백 고려
float marginFactor = 0.05f; // 5% 여백
float minVisibleTime = 1.0f; // 최소 가시 시간
return visibleTime < totalDataTime * (1 + marginFactor) && visibleTime > minVisibleTime;
}
private bool CanZoomY(float newZoomFactorY)
{
float minY = float.MaxValue;
float maxY = float.MinValue;
foreach (var voltage in _voltageData)
{
if (voltage < minY) minY = voltage;
if (voltage > maxY) maxY = voltage;
}
float dataRange = maxY - minY;
float visibleRange = (Height - 70) / newZoomFactorY; // 상하 여백 고려
float marginFactor = 0.05f; // 5% 여백
float minVisibleRange = 0.1f; // 최소 가시 범위
return visibleRange < dataRange * (1 + marginFactor) && visibleRange > minVisibleRange;
}
private void TimeVoltageChart_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDragging = true;
lastMousePosition = e.Location;
}
else if (e.Button == MouseButtons.Right)
{
isSelecting = true;
selectionStart = e.Location;
selectionRectangle = new Rectangle(e.Location, Size.Empty);
}
}
private void TimeVoltageChart_MouseMove(object sender, MouseEventArgs e)
{
if (isDragging)
{
panOffset.X += e.X - lastMousePosition.X;
panOffset.Y += e.Y - lastMousePosition.Y; // Y축 이동 방향 수정
lastMousePosition = e.Location;
Invalidate();
}
else if (isSelecting)
{
var endPoint = e.Location;
selectionRectangle = new Rectangle(
Math.Min(selectionStart.X, endPoint.X),
Math.Min(selectionStart.Y, endPoint.Y),
Math.Abs(selectionStart.X - endPoint.X),
Math.Abs(selectionStart.Y - endPoint.Y));
Invalidate();
}
}
private void TimeVoltageChart_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDragging = false;
}
else if (e.Button == MouseButtons.Right)
{
isSelecting = false;
// 선택한 영역만큼 확대
if (selectionRectangle.Width > 0 && selectionRectangle.Height > 0)
{
float newZoomFactorX = (Width - 100) / (float)selectionRectangle.Width; // 여백을 고려한 줌
float newZoomFactorY = (Height - 30) / (float)selectionRectangle.Height; // 여백을 고려한 줌
// 확대할 영역의 좌표를 차트 좌표로 변환
float selectedMinX = (selectionRectangle.Left - 50 - panOffset.X) / zoomFactorX;
float selectedMaxX = (selectionRectangle.Right - 50 - panOffset.X) / zoomFactorX;
float selectedMinY = (Height - selectionRectangle.Bottom - panOffset.Y) / zoomFactorY;
float selectedMaxY = (Height - selectionRectangle.Top - panOffset.Y) / zoomFactorY;
zoomFactorX = newZoomFactorX;
zoomFactorY = newZoomFactorY;
panOffset.X = -selectedMinX * zoomFactorX + 50;
panOffset.Y = -selectedMinY * zoomFactorY;
Invalidate();
}
}
}
}
}

74
TEST/chart_new/Form1.Designer.cs generated Normal file
View File

@@ -0,0 +1,74 @@
namespace chart_new
{
partial class Form1
{
/// <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 Windows Form
/// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
/// </summary>
private void InitializeComponent()
{
this.chart = new CustomChartControl.TimeVoltageChart();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// timeVoltageChart1
//
this.chart.Location = new System.Drawing.Point(76, 36);
this.chart.Name = "timeVoltageChart1";
this.chart.Size = new System.Drawing.Size(631, 353);
this.chart.TabIndex = 0;
this.chart.Text = "timeVoltageChart1";
this.chart.TimeData = null;
this.chart.VoltageData = null;
//
// button1
//
this.button1.Location = new System.Drawing.Point(67, 416);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(163, 40);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 498);
this.Controls.Add(this.button1);
this.Controls.Add(this.chart);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private CustomChartControl.TimeVoltageChart chart;
private System.Windows.Forms.Button button1;
}
}

51
TEST/chart_new/Form1.cs Normal file
View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace chart_new
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
LoadTestData();
chart.AdjustScaleX();
chart.AdjustScaleY();
this.chart.Refresh();
}
private void LoadTestData()
{
int dataCount = 100000;
DateTime[] timeData = new DateTime[dataCount];
float[] voltageData = new float[dataCount];
DateTime startTime = DateTime.Now;
Random random = new Random();
for (int i = 0; i < dataCount; i++)
{
timeData[i] = startTime.AddSeconds(i+i*2); // 1초 간격으로 시간 데이터 생성
//if(i > 500)
//voltageData[i] = (float)(random.NextDouble() * 100); // 0부터 10 사이의 임의 전압 데이터 생성
//else
voltageData[i] = (float)(random.NextDouble() * 10); // 0부터 10 사이의 임의 전압 데이터 생성
}
chart.TimeData = timeData;
chart.VoltageData = voltageData;
}
}
}

120
TEST/chart_new/Form1.resx Normal file
View File

@@ -0,0 +1,120 @@
<?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>
</root>

22
TEST/chart_new/Program.cs Normal file
View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace chart_new
{
internal static class Program
{
/// <summary>
/// 해당 애플리케이션의 주 진입점입니다.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("chart_new")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("UserWork")]
[assembly: AssemblyProduct("chart_new")]
[assembly: AssemblyCopyright("Copyright © UserWork 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("5e7b97bf-d740-4997-bd6f-02a84b2d566f")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 도구를 사용하여 생성되었습니다.
// 런타임 버전:4.0.30319.42000
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace chart_new.Properties
{
/// <summary>
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
/// </summary>
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
// 클래스에서 자동으로 생성되었습니다.
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여
// ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("chart_new.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
/// 재정의합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace chart_new.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,86 @@
<?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>{5E7B97BF-D740-4997-BD6F-02A84B2D566F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>chart_new</RootNamespace>
<AssemblyName>chart_new</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CustomChartControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>