initial commit
This commit is contained in:
40
Viewer/TrendViewer/UControl/TrendCtrlII/CChinfo.cs
Normal file
40
Viewer/TrendViewer/UControl/TrendCtrlII/CChinfo.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing;
|
||||
|
||||
namespace TrendCtrlII
|
||||
{
|
||||
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
|
||||
public partial class CChinfo
|
||||
{
|
||||
public Dictionary<UInt32,float> Value;
|
||||
|
||||
public String C1value { get; set; } = "";
|
||||
public String C2value { get; set; } = "";
|
||||
public UInt16 Idx { get; set; } //트렌드뷰에서표시되고있는 인덱스값
|
||||
public Boolean Show { get; set; }
|
||||
public Color Color { get; set; }
|
||||
public int CH { get; set; }
|
||||
public String TITLE { get; set; }
|
||||
public String GROUP { get; set; }
|
||||
|
||||
public CChinfo()
|
||||
{
|
||||
CH = 0;
|
||||
TITLE = "";
|
||||
GROUP = "";
|
||||
Value = new Dictionary<uint, float>();// List<Single>(0);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{(Show ? "[O]" : "[X]")} GRP:{GROUP},CH:{CH},{TITLE},{Value.Count}건";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
105
Viewer/TrendViewer/UControl/TrendCtrlII/CMouseinfo.cs
Normal file
105
Viewer/TrendViewer/UControl/TrendCtrlII/CMouseinfo.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing;
|
||||
|
||||
|
||||
namespace TrendCtrlII
|
||||
{
|
||||
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
|
||||
public partial class CMouseinfo
|
||||
{
|
||||
private Boolean hand;
|
||||
private Boolean cross;
|
||||
private Boolean move;
|
||||
private Boolean changepos;
|
||||
private Boolean drag;
|
||||
private EDRAGTYPE dragtype;
|
||||
//private PointF dragstart;
|
||||
private PointF position;
|
||||
private PointF position0;
|
||||
//private Single _time;
|
||||
private Single _volt;
|
||||
private Boolean _showinfo;
|
||||
private int _dragindex;
|
||||
|
||||
public CMouseinfo(PointF _pf)
|
||||
{
|
||||
position = _pf;
|
||||
position0 = _pf;
|
||||
_showinfo = false;
|
||||
_volt = 0;
|
||||
_dragindex = -1;
|
||||
}
|
||||
public int DragIndex
|
||||
{
|
||||
get { return this._dragindex; }
|
||||
set { this._dragindex = value; }
|
||||
|
||||
}
|
||||
public Boolean Showinfo
|
||||
{
|
||||
get { return this._showinfo; }
|
||||
set { this._showinfo = value; }
|
||||
}
|
||||
|
||||
public Int64 Time { get; set; }
|
||||
|
||||
public Single Volt
|
||||
{
|
||||
get { return this._volt; }
|
||||
set { this._volt = value; }
|
||||
}
|
||||
|
||||
public EDRAGTYPE DragType
|
||||
{
|
||||
get { return this.dragtype; }
|
||||
set { this.dragtype = value; }
|
||||
}
|
||||
|
||||
public PointF DragStart { get; set; }
|
||||
|
||||
public PointF Position
|
||||
{
|
||||
get { return this.position; }
|
||||
set {
|
||||
this.position0 = new PointF(this.position.X, this.position.Y);
|
||||
this.position = value;
|
||||
}
|
||||
}
|
||||
|
||||
public PointF Position0
|
||||
{
|
||||
get { return this.position0; }
|
||||
set { this.position0 = value; }
|
||||
}
|
||||
public Boolean Hand
|
||||
{
|
||||
get { return this.hand; }
|
||||
set { this.hand = value; }
|
||||
}
|
||||
public Boolean Cross
|
||||
{
|
||||
get { return this.cross; }
|
||||
set { this.cross = value; }
|
||||
}
|
||||
public Boolean ChangePos
|
||||
{
|
||||
get { return this.changepos; }
|
||||
set { this.changepos = value; }
|
||||
}
|
||||
public Boolean Move
|
||||
{
|
||||
get { return this.move; }
|
||||
set { this.move = value; }
|
||||
}
|
||||
public Boolean Drag
|
||||
{
|
||||
get { return this.drag; }
|
||||
set { this.drag = value; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
339
Viewer/TrendViewer/UControl/TrendCtrlII/CStyle.cs
Normal file
339
Viewer/TrendViewer/UControl/TrendCtrlII/CStyle.cs
Normal file
@@ -0,0 +1,339 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
|
||||
namespace TrendCtrlII
|
||||
{
|
||||
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
|
||||
public class ChartStyle
|
||||
{
|
||||
|
||||
//X축의 원본 값
|
||||
private Int64 _X1;
|
||||
private Int64 _X2;
|
||||
|
||||
//실제화면에 표시되는 데이터
|
||||
private Int64 _XV1;
|
||||
private Int64 _XV2;
|
||||
|
||||
//실제화면에 표시되는 데이터의 원본값
|
||||
public Int64 XV1o;
|
||||
public Int64 XV2o;
|
||||
|
||||
//Y축의 원본값
|
||||
private Single _Y1;
|
||||
private Single _Y2;
|
||||
|
||||
//실제화면에 표시되는 데이터
|
||||
private Single _YV1 = 1;
|
||||
private Single _YV2 = 3;
|
||||
|
||||
//실제화면에 표시되는 데이터의 원본값
|
||||
public Single YV1o = 1;
|
||||
public Single YV2o = 3;
|
||||
|
||||
//
|
||||
private Boolean _datapoint = false;
|
||||
|
||||
private Font _yfont = new Font("나눔고딕", 12, FontStyle.Bold);
|
||||
public int _ZoneMarginX = 50;
|
||||
public int _ZoneMarginY = 50;
|
||||
|
||||
//public Color design_backcolor = Color.White;
|
||||
public Color design_mouseinfocolor = Color.Black;
|
||||
|
||||
// public int _xterm = 1800;
|
||||
private Font _xfont = new Font("나눔고딕", 8, FontStyle.Bold);
|
||||
|
||||
public Font _mouseinfofont = new Font("나눔고딕", 12, FontStyle.Bold);
|
||||
private Boolean showdebug = false;
|
||||
// private short defaultviewhour = 3;
|
||||
|
||||
public event OnUpdateinfoHandler OnUpdateinfo; //UPDATE USER CURSOR
|
||||
public delegate void OnUpdateinfoHandler();
|
||||
|
||||
public Boolean UseZoomX { get; set; }
|
||||
public Boolean UseZoomY { get; set; }
|
||||
|
||||
public UInt16 MaxZoomX { get; set; }
|
||||
public Single MaxZoomY { get; set; }
|
||||
|
||||
public String UnitY { get; set; }
|
||||
public String UnitX { get; set; }
|
||||
|
||||
public ChartStyle()
|
||||
{
|
||||
MaxZoomX = 10;
|
||||
MaxZoomY = 0.01f;
|
||||
UseZoomX = true;
|
||||
UseZoomY = true;
|
||||
UnitY = "Volt";
|
||||
UnitX = "Sec";
|
||||
X표시범위 = 0; //기본전체표시모드로 전환
|
||||
XGap = 0; //기본 X축 표시간격은 자동으로
|
||||
YGap = 0; //기본 Y축 표시간격은 자동으로
|
||||
}
|
||||
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("X축(시간)"), Description("X축에 표시되는 시간의 표시간격 (0은 자동)")]
|
||||
public int XGap { get; set; }
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축"), Description("Y축에 표시되는 표시간격 (0은 자동)")]
|
||||
public Single YGap { get; set; }
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 표시간격을 입력하세요.")]
|
||||
public Font FontY
|
||||
{
|
||||
get { return _yfont; }
|
||||
set
|
||||
{
|
||||
_yfont = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("X축(시간)"), Description("가로축에 표시되는 글꼴을 선택하세요.")]
|
||||
public Font FontX
|
||||
{
|
||||
get { return _xfont; }
|
||||
set
|
||||
{
|
||||
_xfont = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
private Int32 _xterm = 0;
|
||||
|
||||
/// <summary>
|
||||
/// X축의 표시범위값(초) 지정된 시간(초)의 데이터만 화면에 표시됩니다. 이 값이 0일 경우 제한이 없음이 되며 만약 이 값이 설정되어있다면 실시간모드처럼 작동하게 됩니다.
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("조회"), Description("X축의 표시범위값(초) 지정된 시간(초)의 데이터만 화면에 표시됩니다. 이 값이 0일 경우 제한이 없음이 되며 만약 이 값이 설정되어있다면 실시간모드처럼 작동하게 됩니다.")]
|
||||
public Int32 X표시범위 {
|
||||
get { return _xterm; }
|
||||
set {
|
||||
_xterm = value;
|
||||
|
||||
//현재 영역을 확인하고 넘는다면 앞부분을 자른다.
|
||||
|
||||
if(value != 0 )
|
||||
{
|
||||
TimeSpan ts = DateTime.FromFileTime(X2) - DateTime.FromFileTime(X1);
|
||||
if (ts.TotalSeconds > value) {
|
||||
DateTime NewEd = DateTime.FromFileTime(X2);
|
||||
DateTime NewSd = NewEd.AddSeconds(-1 * value);
|
||||
|
||||
if (NewSd > DateTime.Now)
|
||||
{
|
||||
NewSd = DateTime.Now;
|
||||
NewEd = NewSd.AddSeconds(value);
|
||||
}
|
||||
X1 = NewSd.ToFileTime();
|
||||
X2 = NewEd.ToFileTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Category("기타"), Description("데이터포인터를 표시합니다.")]
|
||||
public Boolean Show_DataPoint {
|
||||
get { return _datapoint; }
|
||||
set { _datapoint = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Category("개발자정보"), Description("Debug Message")]
|
||||
public Boolean Show_DebugMsg
|
||||
{
|
||||
get { return this.showdebug; }
|
||||
set { this.showdebug = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Category("마우스정보"), Description("마우스정보를 표시하는 창의 글자색")]
|
||||
public Color 마우스글자색
|
||||
{
|
||||
get { return design_mouseinfocolor; }
|
||||
set { design_mouseinfocolor = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Category("마우스정보"), Description("마우스정보를 표시하는 창의 글꼴")]
|
||||
public Font 마우스글꼴
|
||||
{
|
||||
get { return _mouseinfofont; }
|
||||
set { _mouseinfofont = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Y축값을 표시영역을 최초의 값으로 변경합니다.
|
||||
/// </summary>
|
||||
public void ResetYxis()
|
||||
{
|
||||
YV1 = Y1;
|
||||
YV2 = Y2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// X축값의 표시영역을 최초의 값으로 변경합니다.
|
||||
/// </summary>
|
||||
public void ResetXxis()
|
||||
{
|
||||
XV1 = X1;
|
||||
XV2 = X2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 가로축의 종료값(현재 표시되는 값은 XV2를 참고하세요)
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최대값을 입력하세요.")]
|
||||
public Int64 X2
|
||||
{
|
||||
get { return _X2; }
|
||||
set
|
||||
{
|
||||
_X2 = value;
|
||||
_XV2 = value;
|
||||
XV2o = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 가로축의시작값(현재 표시되는 값은 XV1을 참고하세요)
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최소값을 입력하세요.")]
|
||||
public Int64 X1
|
||||
{
|
||||
get { return _X1; }
|
||||
set
|
||||
{
|
||||
_X1 = value;
|
||||
_XV1 = value;
|
||||
XV1o = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 현재 표시되는 가로축의 시작값입니다.
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최소값을 입력하세요.")]
|
||||
public Int64 XV1
|
||||
{
|
||||
get { return _XV1; }
|
||||
set
|
||||
{
|
||||
//뷰값의 한계치 체크
|
||||
if (value < X1) _XV1 = X1;
|
||||
else if (value >= XV2 && XV2 > 0) _XV1 = DateTime.FromFileTime(XV2).AddSeconds(-1).ToFileTime();
|
||||
else _XV1 = value;
|
||||
XV1o = _XV1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 현재 표시되는 가로축의 종료값입니다.
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최소값을 입력하세요.")]
|
||||
public Int64 XV2
|
||||
{
|
||||
get { return _XV2; }
|
||||
set
|
||||
{
|
||||
//뷰값의 한계치 체크
|
||||
if (value > X2) _XV2 = X2;
|
||||
else if (value <= XV1 && XV1 > 0) _XV2 = DateTime.FromFileTime(XV1).AddSeconds(1).ToFileTime();
|
||||
else _XV2 = value;
|
||||
XV2o = _XV2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 세로축의 종료값(현재 표시되는 값은 YV2를 참고하세요)
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최대값을 입력하세요.")]
|
||||
public Single Y2
|
||||
{
|
||||
get { return _Y2; }
|
||||
set {
|
||||
_Y2 = value;
|
||||
_YV2 = value;
|
||||
YV2o = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 현재표시되는 세로축의 종료값입니다.
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최대값을 입력하세요.")]
|
||||
public Single YV2
|
||||
{
|
||||
get { return _YV2; }
|
||||
set
|
||||
{
|
||||
_YV2 = value;
|
||||
YV2o = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 세로축의 시작값(현재 표시되는 값은 YV1을 참고하세요)
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최소값을 입력하세요.")]
|
||||
public Single Y1
|
||||
{
|
||||
get { return _Y1; }
|
||||
set {
|
||||
_Y1 = value;
|
||||
_YV1 = value;
|
||||
YV1o = value;
|
||||
if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 세로축의 시작값
|
||||
/// </summary>
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Browsable(false), Category("Y축(VOLT)"), Description("Y축에 표시되는 VOLT의 최소값을 입력하세요.")]
|
||||
public Single YV1
|
||||
{
|
||||
get { return _YV1; }
|
||||
set
|
||||
{
|
||||
_YV1 = value;
|
||||
YV1o = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Category("여백"), Description("차트가표시되는 영역의 상단 여백")]
|
||||
//public int 왼쪽여백
|
||||
//{
|
||||
// get { return _ZoneMarginX; }
|
||||
// set { _ZoneMarginX = value;
|
||||
// if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
// }
|
||||
//}
|
||||
|
||||
//[DesignerSerializationVisibility(DesignerSerializationVisibility.Content), Category("여백"), Description("차트가표시되는 영역의 하단 여백")]
|
||||
//public int 위쪽여백
|
||||
//{
|
||||
// get { return _ZoneMarginY; }
|
||||
// set { _ZoneMarginY = value;
|
||||
// if (OnUpdateinfo != null) OnUpdateinfo();
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
28
Viewer/TrendViewer/UControl/TrendCtrlII/CTimeinfo.cs
Normal file
28
Viewer/TrendViewer/UControl/TrendCtrlII/CTimeinfo.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace TrendCtrlII
|
||||
{
|
||||
public partial class CTimeinfo
|
||||
{
|
||||
|
||||
public Int64 Value { get; set; }
|
||||
public UInt32 idx { get; set; }
|
||||
|
||||
public CTimeinfo(UInt32 _idx, Int64 _val)
|
||||
{
|
||||
Value = _val;
|
||||
idx = _idx;
|
||||
}
|
||||
|
||||
public DateTime DateTimeData
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.FromFileTime(Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Viewer/TrendViewer/UControl/TrendCtrlII/CUserCursor.cs
Normal file
41
Viewer/TrendViewer/UControl/TrendCtrlII/CUserCursor.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TrendCtrlII
|
||||
{
|
||||
public partial class CUserCursor
|
||||
{
|
||||
private short _idx = 0;
|
||||
private Int64 _time = 0;
|
||||
private Single _value = 0;
|
||||
private Single _newx = 0;
|
||||
|
||||
public CUserCursor(short pidx, Int64 ptime, Single px)
|
||||
{
|
||||
_idx = pidx;
|
||||
_time = ptime;
|
||||
_newx = px;
|
||||
}
|
||||
public Int64 Time
|
||||
{
|
||||
get { return this._time; }
|
||||
set { this._time = value; }
|
||||
}
|
||||
public short Idx
|
||||
{
|
||||
get { return this._idx; }
|
||||
set { this._idx = value; }
|
||||
}
|
||||
public Single Value
|
||||
{
|
||||
get { return this._value; }
|
||||
set { this._value = value; }
|
||||
}
|
||||
public Single Newx
|
||||
{
|
||||
get { return this._newx; }
|
||||
set { this._newx = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Viewer/TrendViewer/UControl/TrendCtrlII/MethodExts.cs
Normal file
23
Viewer/TrendViewer/UControl/TrendCtrlII/MethodExts.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using AR;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
|
||||
|
||||
namespace TrendCtrlII
|
||||
{
|
||||
public static class MethodExts
|
||||
{
|
||||
public static void DrawRectangle(this System.Drawing.Graphics graphics, Pen pen, System.Drawing.RectangleF rect)
|
||||
{
|
||||
graphics.DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
1946
Viewer/TrendViewer/UControl/TrendCtrlII/TrendCtrlII.cs
Normal file
1946
Viewer/TrendViewer/UControl/TrendCtrlII/TrendCtrlII.cs
Normal file
File diff suppressed because it is too large
Load Diff
120
Viewer/TrendViewer/UControl/TrendCtrlII/TrendCtrlII.resx
Normal file
120
Viewer/TrendViewer/UControl/TrendCtrlII/TrendCtrlII.resx
Normal 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=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>
|
||||
Reference in New Issue
Block a user