OSDN Git Service

CsvReaderのパーサ追加,プロトタイプ指定・型引数省略に対応
authorkimikage <kimikage_ceo@hotmail.com>
Sun, 12 Dec 2010 17:07:00 +0000 (02:07 +0900)
committerkimikage <kimikage_ceo@hotmail.com>
Sun, 12 Dec 2010 17:07:00 +0000 (02:07 +0900)
Karinto/CsvReader.cs
Karinto/Karinto.csproj
Karinto/Xml/Data.Designer.cs
Karinto/Xml/Data.xsd
Karinto/Xml/Data.xss
KarintoTest/CsvReaderTest.cs

index c8a131c..bc1b291 100755 (executable)
@@ -14,16 +14,28 @@ using System.Data;
 \r
 namespace Karinto\r
 {\r
+    public class CsvReader : CsvReader<DataTable>\r
+    {\r
+        private CsvReader()\r
+        { \r
+        }\r
+\r
+        public CsvReader(DataTable prototype)\r
+            : base(prototype)\r
+        {\r
+        }\r
+    }\r
+\r
     public class CsvReader<TDataTable> where TDataTable : DataTable, new()\r
     {\r
         #region private fields\r
 \r
         private string separator;\r
         private Regex sepPattern;\r
-        private TDataTable protoType;\r
+        private TDataTable prototype;\r
         private DataColumnCollection cols;\r
-        \r
-        private delegate bool Parser(ref string input, out object output);\r
+\r
+        public delegate bool Parser(ref string input, out object output);\r
         static private Dictionary<Type, Parser> parsers;\r
         private Parser[] lineParser;\r
 \r
@@ -31,24 +43,38 @@ namespace Karinto
 \r
         #region constructors\r
         static CsvReader()\r
-        { \r
+        {\r
             parsers = new Dictionary<Type, Parser>();\r
+            parsers[typeof(Boolean)] = ParseBoolean;\r
             parsers[typeof(Double)] = ParseDouble;\r
+            parsers[typeof(Single)] = ParseSingle;\r
+            parsers[typeof(Decimal)] = ParseDecimal;\r
+            parsers[typeof(Int32)] = ParseInt32;\r
+            parsers[typeof(Int64)] = ParseInt64;\r
         }\r
 \r
         public CsvReader()\r
+            : this(new TDataTable())\r
+        {\r
+        }\r
+\r
+        public CsvReader(TDataTable prototype)\r
         {\r
             Separator = @",";\r
-            protoType = new TDataTable();\r
-            cols = protoType.Columns;\r
+            this.prototype = (TDataTable)prototype.Clone();\r
+            cols = prototype.Columns;\r
             lineParser = new Parser[cols.Count];\r
-            for(int i = 0; i < cols.Count; ++i)\r
+            for (int i = 0; i < cols.Count; ++i)\r
             {\r
                 Type t = cols[i].DataType;\r
                 if (parsers[t] != null)\r
                 {\r
                     lineParser[i] = parsers[t];\r
                 }\r
+                else if (t == typeof(DateTime))\r
+                {\r
+                    lineParser[i] = ParseDateTime;\r
+                }\r
                 else\r
                 {\r
                     lineParser[i] = ParseString;\r
@@ -58,11 +84,11 @@ namespace Karinto
         #endregion\r
 \r
         #region properties\r
-        \r
+\r
         /// <summary>\r
         ///     区切り文字\r
         /// </summary>\r
-        public string Separator \r
+        public string Separator\r
         {\r
             get\r
             {\r
@@ -81,7 +107,7 @@ namespace Karinto
 \r
         public TDataTable Read(FilePath path)\r
         {\r
-            TDataTable table = new TDataTable();\r
+            TDataTable table = (TDataTable)prototype.Clone();\r
             try\r
             {\r
                 using (FileStream fs = new FileStream(\r
@@ -116,9 +142,52 @@ namespace Karinto
 \r
         public TDataTable ReadAll(FilePath path)\r
         {\r
+            throw new NotImplementedException();\r
             return null;\r
         }\r
 \r
+        public Parser GetParser(int column)\r
+        {\r
+            return lineParser[column];\r
+        }\r
+\r
+        public Parser GetParser(string column)\r
+        {\r
+            return lineParser[prototype.Columns.IndexOf(column)];\r
+        }\r
+\r
+        public Parser GetParser(DataColumn column)\r
+        {\r
+            return lineParser[prototype.Columns.IndexOf(column.ColumnName)];\r
+        }\r
+\r
+        static public Parser GetParser(Type type)\r
+        {\r
+            return parsers[type];\r
+        }\r
+\r
+        public void SetParser(int column, Parser parser)\r
+        {\r
+            lineParser[column] = parser;\r
+        }\r
+\r
+        public void SetParser(string column, Parser parser)\r
+        {\r
+            lineParser[prototype.Columns.IndexOf(column)] = parser;\r
+        }\r
+\r
+        public void SetParser(DataColumn column, Parser parser)\r
+        { \r
+            lineParser[prototype.Columns.IndexOf(column.ColumnName)] = parser;\r
+        }\r
+\r
+        static public void SetParser(Type type, Parser parser)\r
+        {\r
+            parsers[type] = parser;\r
+        }\r
+\r
+\r
+\r
         #endregion\r
 \r
         #region private methods\r
@@ -126,7 +195,7 @@ namespace Karinto
         private void SetRow(DataRow row, string line)\r
         {\r
             for (int i = 0; i < lineParser.Length; ++i)\r
-            { \r
+            {\r
                 object value;\r
                 if (lineParser[i](ref line, out value))\r
                 {\r
@@ -151,7 +220,7 @@ namespace Karinto
                 {\r
                     string name = value as string;\r
                     Match comment = Regex.Match(name, @"^#\s*");\r
-                    columns[i].ColumnName = name.Substring(comment.Length);\r
+                    columns[i].Caption = name.Substring(comment.Length);\r
                 }\r
                 else\r
                 {\r
@@ -162,6 +231,27 @@ namespace Karinto
             }\r
         }\r
 \r
+        #region parsers\r
+\r
+        static private bool ParseBoolean(ref string input, out object output)\r
+        {\r
+            Match m = Regex.Match(input, \r
+                        "^" + Boolean.TrueString, RegexOptions.IgnoreCase);\r
+            if (!m.Success)\r
+            {\r
+                m = Regex.Match(input, \r
+                        "^" + Boolean.FalseString, RegexOptions.IgnoreCase);\r
+                if (!m.Success)\r
+                {\r
+                    output = false;\r
+                    return false;\r
+                }\r
+            }\r
+            output = true;\r
+            input = input.Substring(m.Length);\r
+            return true;\r
+        }\r
+\r
         static private bool ParseDouble(ref string input, out object output)\r
         {\r
             Match m = RegexSet.DecimalFloat.Match(input);\r
@@ -175,6 +265,72 @@ namespace Karinto
             return true;\r
         }\r
 \r
+        static private bool ParseSingle(ref string input, out object output)\r
+        {\r
+            Match m = RegexSet.DecimalFloat.Match(input);\r
+            if (!m.Success)\r
+            {\r
+                output = 0;\r
+                return false;\r
+            }\r
+            output = Single.Parse(m.Groups[1].Value);\r
+            input = input.Substring(m.Length);\r
+            return true;\r
+        }\r
+\r
+        static private bool ParseDecimal(ref string input, out object output)\r
+        {\r
+            Match m = RegexSet.DecimalFloat.Match(input);\r
+            if (!m.Success)\r
+            {\r
+                output = 0;\r
+                return false;\r
+            }\r
+            output = Decimal.Parse(m.Groups[1].Value);\r
+            input = input.Substring(m.Length);\r
+            return true;\r
+        }\r
+\r
+        static private bool ParseInt32(ref string input, out object output)\r
+        {\r
+            Match m = RegexSet.DecimalFloat.Match(input);\r
+            if (!m.Success)\r
+            {\r
+                output = 0;\r
+                return false;\r
+            }\r
+            output = (Int32)Double.Parse(m.Groups[1].Value);\r
+            input = input.Substring(m.Length);\r
+            return true;\r
+        }\r
+\r
+        static private bool ParseInt64(ref string input, out object output)\r
+        {\r
+            Match m = RegexSet.DecimalFloat.Match(input);\r
+            if (!m.Success)\r
+            {\r
+                output = 0;\r
+                return false;\r
+            }\r
+            output = (Int64)Double.Parse(m.Groups[1].Value);\r
+            input = input.Substring(m.Length);\r
+            return true;\r
+        }\r
+\r
+        private bool ParseDateTime(ref string input, out object output)\r
+        {\r
+            object value;\r
+            ParseString(ref input, out value);\r
+            DateTime dt;\r
+            if (DateTime.TryParse(value as string, out dt))\r
+            {\r
+                output = dt;\r
+                return true;\r
+            }\r
+            output = DBNull.Value;\r
+            return false;\r
+        }\r
+\r
         private bool ParseString(ref string input, out object output)\r
         {\r
             Match quotedMatch = RegexSet.QuotedString.Match(input);\r
@@ -199,86 +355,8 @@ namespace Karinto
             }\r
             return true;\r
         }\r
+        #endregion\r
 \r
         #endregion\r
     }\r
-\r
-    /*\r
-    public class CsvReader<TDataSet> where TDataSet : IDataSet, new()\r
-    {\r
-        private string separator = ",";\r
-\r
-\r
-\r
-        /// <summary>\r
-        ///     CSVファイルを読み込む\r
-        /// </summary>\r
-        /// <param name="path">CSVファイルのパス</param>\r
-        /// <param name="proto">行の雛型</param>\r
-        /// <returns>指定した型のリスト</returns>\r
-        public List<TDataSet> Read(FilePath path)\r
-        {\r
-            return Read(path, new TDataSet());\r
-        }\r
-\r
-        /// <summary>\r
-        ///     雛型を指定してCSVファイルを読み込む\r
-        /// </summary>\r
-        /// <param name="path">CSVファイルのパス</param>\r
-        /// <param name="proto">行の雛型</param>\r
-        /// <returns>指定した型のリスト</returns>\r
-        public List<TDataSet> Read(FilePath path, TDataSet proto)\r
-        {\r
-            List<TDataSet> records = new List<TDataSet>();\r
-\r
-            string line = "";\r
-            // 数値にマッチする正規表現\r
-            //string regex = @"\s*" + RegexSet.DecimalFloat + @"\s*" + separator;\r
-            string regex = @"\s*" + @"(?<1>([-+]?(\d+([\.,]\d*)?|([\.,]\d+))([eE][-+]?\d+)?))" + @"\s*" + separator;\r
-            Regex rCsv = new Regex(regex, RegexOptions.Compiled);\r
-\r
-            try\r
-            {\r
-                using (FileStream fs = new FileStream(\r
-                    path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))\r
-                {\r
-                    using (StreamReader reader = new StreamReader(fs))\r
-                    {\r
-                        while (reader.Peek() >= 0)\r
-                        {\r
-                            line = reader.ReadLine() + separator;\r
-                            //Console.WriteLine("> " + line);\r
-                            MatchCollection mc = rCsv.Matches(line);\r
-\r
-                            // 現状ではNaNが含まれる行は受理しない\r
-                            if (!proto.Width.Includes(mc.Count)) continue;\r
-\r
-                            if (proto.KeyRange != null)\r
-                            {\r
-                                double key = Double.Parse(mc[0].Groups[1].Value);\r
-                                if (!proto.KeyRange.Includes(key)) continue;\r
-                            }\r
-\r
-                            TDataSet c = new TDataSet();\r
-                            foreach (Match m in mc)\r
-                            {\r
-                                c.Push(Double.Parse(m.Groups[1].Value));\r
-                            }\r
-                            records.Add(c);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            catch (Exception e)\r
-            {\r
-                Console.WriteLine("The file could not be read:");\r
-                Console.WriteLine("> " + path);\r
-                Console.WriteLine(e.Message);\r
-                throw e;\r
-            }\r
-\r
-            return records;\r
-        }\r
-     \r
-    }*/\r
 }\r
index 7c351e3..0c5aca4 100755 (executable)
@@ -55,7 +55,6 @@
     <Compile Include="Polynomial.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="Range.cs" />\r
-    <Compile Include="Resampler.cs" />\r
     <Compile Include="SerializableDictionary.cs" />\r
     <Compile Include="Spline.cs" />\r
     <Compile Include="Unit.cs" />\r
index 6324ea3..9769f88 100755 (executable)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------\r
 // <auto-generated>\r
 //     このコードはツールによって生成されました。\r
-//     ランタイム バージョン:2.0.50727.3615\r
+//     ランタイム バージョン:2.0.50727.4952\r
 //\r
 //     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、\r
 //     コードが再生成されるときに損失したりします。\r
@@ -31,6 +31,10 @@ namespace Karinto.Xml {
         \r
         private XY1ChDataTable tableXY1Ch;\r
         \r
+        private TimeFunction1ChDataTable tableTimeFunction1Ch;\r
+        \r
+        private TimeFunction2ChDataTable tableTimeFunction2Ch;\r
+        \r
         private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;\r
         \r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
@@ -66,6 +70,12 @@ namespace Karinto.Xml {
                 if ((ds.Tables["XY1Ch"] != null)) {\r
                     base.Tables.Add(new XY1ChDataTable(ds.Tables["XY1Ch"]));\r
                 }\r
+                if ((ds.Tables["TimeFunction1Ch"] != null)) {\r
+                    base.Tables.Add(new TimeFunction1ChDataTable(ds.Tables["TimeFunction1Ch"]));\r
+                }\r
+                if ((ds.Tables["TimeFunction2Ch"] != null)) {\r
+                    base.Tables.Add(new TimeFunction2ChDataTable(ds.Tables["TimeFunction2Ch"]));\r
+                }\r
                 this.DataSetName = ds.DataSetName;\r
                 this.Prefix = ds.Prefix;\r
                 this.Namespace = ds.Namespace;\r
@@ -112,6 +122,24 @@ namespace Karinto.Xml {
         }\r
         \r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.ComponentModel.Browsable(false)]\r
+        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]\r
+        public TimeFunction1ChDataTable TimeFunction1Ch {\r
+            get {\r
+                return this.tableTimeFunction1Ch;\r
+            }\r
+        }\r
+        \r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.ComponentModel.Browsable(false)]\r
+        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]\r
+        public TimeFunction2ChDataTable TimeFunction2Ch {\r
+            get {\r
+                return this.tableTimeFunction2Ch;\r
+            }\r
+        }\r
+        \r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
         [global::System.ComponentModel.BrowsableAttribute(true)]\r
         [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]\r
         public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {\r
@@ -179,6 +207,12 @@ namespace Karinto.Xml {
                 if ((ds.Tables["XY1Ch"] != null)) {\r
                     base.Tables.Add(new XY1ChDataTable(ds.Tables["XY1Ch"]));\r
                 }\r
+                if ((ds.Tables["TimeFunction1Ch"] != null)) {\r
+                    base.Tables.Add(new TimeFunction1ChDataTable(ds.Tables["TimeFunction1Ch"]));\r
+                }\r
+                if ((ds.Tables["TimeFunction2Ch"] != null)) {\r
+                    base.Tables.Add(new TimeFunction2ChDataTable(ds.Tables["TimeFunction2Ch"]));\r
+                }\r
                 this.DataSetName = ds.DataSetName;\r
                 this.Prefix = ds.Prefix;\r
                 this.Namespace = ds.Namespace;\r
@@ -227,6 +261,18 @@ namespace Karinto.Xml {
                     this.tableXY1Ch.InitVars();\r
                 }\r
             }\r
+            this.tableTimeFunction1Ch = ((TimeFunction1ChDataTable)(base.Tables["TimeFunction1Ch"]));\r
+            if ((initTable == true)) {\r
+                if ((this.tableTimeFunction1Ch != null)) {\r
+                    this.tableTimeFunction1Ch.InitVars();\r
+                }\r
+            }\r
+            this.tableTimeFunction2Ch = ((TimeFunction2ChDataTable)(base.Tables["TimeFunction2Ch"]));\r
+            if ((initTable == true)) {\r
+                if ((this.tableTimeFunction2Ch != null)) {\r
+                    this.tableTimeFunction2Ch.InitVars();\r
+                }\r
+            }\r
         }\r
         \r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
@@ -243,6 +289,10 @@ namespace Karinto.Xml {
             base.Tables.Add(this.tableXY2Ch);\r
             this.tableXY1Ch = new XY1ChDataTable();\r
             base.Tables.Add(this.tableXY1Ch);\r
+            this.tableTimeFunction1Ch = new TimeFunction1ChDataTable();\r
+            base.Tables.Add(this.tableTimeFunction1Ch);\r
+            this.tableTimeFunction2Ch = new TimeFunction2ChDataTable();\r
+            base.Tables.Add(this.tableTimeFunction2Ch);\r
         }\r
         \r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
@@ -261,6 +311,16 @@ namespace Karinto.Xml {
         }\r
         \r
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        private bool ShouldSerializeTimeFunction1Ch() {\r
+            return false;\r
+        }\r
+        \r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        private bool ShouldSerializeTimeFunction2Ch() {\r
+            return false;\r
+        }\r
+        \r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
         private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {\r
             if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {\r
                 this.InitVars();\r
@@ -319,6 +379,10 @@ namespace Karinto.Xml {
         \r
         public delegate void XY1ChRowChangeEventHandler(object sender, XY1ChRowChangeEvent e);\r
         \r
+        public delegate void TimeFunction1ChRowChangeEventHandler(object sender, TimeFunction1ChRowChangeEvent e);\r
+        \r
+        public delegate void TimeFunction2ChRowChangeEventHandler(object sender, TimeFunction2ChRowChangeEvent e);\r
+        \r
         /// <summary>\r
         ///Represents the strongly named DataTable class.\r
         ///</summary>\r
@@ -702,6 +766,12 @@ namespace Karinto.Xml {
                 base.Columns.Add(this.columnY1);\r
                 this.columnY2 = new global::System.Data.DataColumn("Y2", typeof(double), null, global::System.Data.MappingType.Element);\r
                 base.Columns.Add(this.columnY2);\r
+                this.columnX.AllowDBNull = false;\r
+                this.columnX.DefaultValue = ((double)(0));\r
+                this.columnY1.AllowDBNull = false;\r
+                this.columnY1.DefaultValue = ((double)(0));\r
+                this.columnY2.AllowDBNull = false;\r
+                this.columnY2.DefaultValue = ((double)(0));\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
@@ -943,6 +1013,10 @@ namespace Karinto.Xml {
                 base.Columns.Add(this.columnX);\r
                 this.columnY = new global::System.Data.DataColumn("Y", typeof(double), null, global::System.Data.MappingType.Element);\r
                 base.Columns.Add(this.columnY);\r
+                this.columnX.AllowDBNull = false;\r
+                this.columnX.DefaultValue = ((double)(0));\r
+                this.columnY.AllowDBNull = false;\r
+                this.columnY.DefaultValue = ((double)(0));\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
@@ -1061,275 +1135,845 @@ namespace Karinto.Xml {
         }\r
         \r
         /// <summary>\r
-        ///Represents strongly named DataRow class.\r
+        ///Represents the strongly named DataTable class.\r
         ///</summary>\r
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
-        public partial class PointListRow : global::System.Data.DataRow {\r
+        [global::System.Serializable()]\r
+        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]\r
+        public partial class TimeFunction1ChDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {\r
             \r
-            private PointListDataTable tablePointList;\r
+            private global::System.Data.DataColumn columnTime;\r
             \r
-            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            internal PointListRow(global::System.Data.DataRowBuilder rb) : \r
-                    base(rb) {\r
-                this.tablePointList = ((PointListDataTable)(this.Table));\r
-            }\r
+            private global::System.Data.DataColumn columnY;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double X {\r
-                get {\r
-                    return ((double)(this[this.tablePointList.XColumn]));\r
-                }\r
-                set {\r
-                    this[this.tablePointList.XColumn] = value;\r
-                }\r
+            public TimeFunction1ChDataTable() {\r
+                this.TableName = "TimeFunction1Ch";\r
+                this.BeginInit();\r
+                this.InitClass();\r
+                this.EndInit();\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double Y {\r
-                get {\r
-                    return ((double)(this[this.tablePointList.YColumn]));\r
+            internal TimeFunction1ChDataTable(global::System.Data.DataTable table) {\r
+                this.TableName = table.TableName;\r
+                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {\r
+                    this.CaseSensitive = table.CaseSensitive;\r
                 }\r
-                set {\r
-                    this[this.tablePointList.YColumn] = value;\r
+                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {\r
+                    this.Locale = table.Locale;\r
+                }\r
+                if ((table.Namespace != table.DataSet.Namespace)) {\r
+                    this.Namespace = table.Namespace;\r
                 }\r
+                this.Prefix = table.Prefix;\r
+                this.MinimumCapacity = table.MinimumCapacity;\r
             }\r
-        }\r
-        \r
-        /// <summary>\r
-        ///Represents strongly named DataRow class.\r
-        ///</summary>\r
-        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
-        public partial class XY2ChRow : global::System.Data.DataRow {\r
-            \r
-            private XY2ChDataTable tableXY2Ch;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            internal XY2ChRow(global::System.Data.DataRowBuilder rb) : \r
-                    base(rb) {\r
-                this.tableXY2Ch = ((XY2ChDataTable)(this.Table));\r
+            protected TimeFunction1ChDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : \r
+                    base(info, context) {\r
+                this.InitVars();\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double X {\r
+            public global::System.Data.DataColumn TimeColumn {\r
                 get {\r
-                    try {\r
-                        return ((double)(this[this.tableXY2Ch.XColumn]));\r
-                    }\r
-                    catch (global::System.InvalidCastException e) {\r
-                        throw new global::System.Data.StrongTypingException("テーブル \'XY2Ch\' にある列 \'X\' の値は DBNull です。", e);\r
-                    }\r
-                }\r
-                set {\r
-                    this[this.tableXY2Ch.XColumn] = value;\r
+                    return this.columnTime;\r
                 }\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double Y1 {\r
+            public global::System.Data.DataColumn YColumn {\r
                 get {\r
-                    try {\r
-                        return ((double)(this[this.tableXY2Ch.Y1Column]));\r
-                    }\r
-                    catch (global::System.InvalidCastException e) {\r
-                        throw new global::System.Data.StrongTypingException("テーブル \'XY2Ch\' にある列 \'Y1\' の値は DBNull です。", e);\r
-                    }\r
-                }\r
-                set {\r
-                    this[this.tableXY2Ch.Y1Column] = value;\r
+                    return this.columnY;\r
                 }\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double Y2 {\r
+            [global::System.ComponentModel.Browsable(false)]\r
+            public int Count {\r
                 get {\r
-                    try {\r
-                        return ((double)(this[this.tableXY2Ch.Y2Column]));\r
-                    }\r
-                    catch (global::System.InvalidCastException e) {\r
-                        throw new global::System.Data.StrongTypingException("テーブル \'XY2Ch\' にある列 \'Y2\' の値は DBNull です。", e);\r
-                    }\r
-                }\r
-                set {\r
-                    this[this.tableXY2Ch.Y2Column] = value;\r
+                    return this.Rows.Count;\r
                 }\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public bool IsXNull() {\r
-                return this.IsNull(this.tableXY2Ch.XColumn);\r
+            public TimeFunction1ChRow this[int index] {\r
+                get {\r
+                    return ((TimeFunction1ChRow)(this.Rows[index]));\r
+                }\r
             }\r
             \r
-            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public void SetXNull() {\r
-                this[this.tableXY2Ch.XColumn] = global::System.Convert.DBNull;\r
-            }\r
+            public event TimeFunction1ChRowChangeEventHandler TimeFunction1ChRowChanging;\r
             \r
-            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public bool IsY1Null() {\r
-                return this.IsNull(this.tableXY2Ch.Y1Column);\r
-            }\r
+            public event TimeFunction1ChRowChangeEventHandler TimeFunction1ChRowChanged;\r
             \r
-            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public void SetY1Null() {\r
-                this[this.tableXY2Ch.Y1Column] = global::System.Convert.DBNull;\r
-            }\r
+            public event TimeFunction1ChRowChangeEventHandler TimeFunction1ChRowDeleting;\r
             \r
-            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public bool IsY2Null() {\r
-                return this.IsNull(this.tableXY2Ch.Y2Column);\r
-            }\r
+            public event TimeFunction1ChRowChangeEventHandler TimeFunction1ChRowDeleted;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public void SetY2Null() {\r
-                this[this.tableXY2Ch.Y2Column] = global::System.Convert.DBNull;\r
+            public void AddTimeFunction1ChRow(TimeFunction1ChRow row) {\r
+                this.Rows.Add(row);\r
             }\r
-        }\r
-        \r
-        /// <summary>\r
-        ///Represents strongly named DataRow class.\r
-        ///</summary>\r
-        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
-        public partial class XY1ChRow : global::System.Data.DataRow {\r
-            \r
-            private XY1ChDataTable tableXY1Ch;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            internal XY1ChRow(global::System.Data.DataRowBuilder rb) : \r
-                    base(rb) {\r
-                this.tableXY1Ch = ((XY1ChDataTable)(this.Table));\r
+            public TimeFunction1ChRow AddTimeFunction1ChRow(System.DateTime Time, double Y) {\r
+                TimeFunction1ChRow rowTimeFunction1ChRow = ((TimeFunction1ChRow)(this.NewRow()));\r
+                object[] columnValuesArray = new object[] {\r
+                        Time,\r
+                        Y};\r
+                rowTimeFunction1ChRow.ItemArray = columnValuesArray;\r
+                this.Rows.Add(rowTimeFunction1ChRow);\r
+                return rowTimeFunction1ChRow;\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double X {\r
-                get {\r
-                    try {\r
-                        return ((double)(this[this.tableXY1Ch.XColumn]));\r
-                    }\r
-                    catch (global::System.InvalidCastException e) {\r
-                        throw new global::System.Data.StrongTypingException("テーブル \'XY1Ch\' にある列 \'X\' の値は DBNull です。", e);\r
-                    }\r
-                }\r
-                set {\r
-                    this[this.tableXY1Ch.XColumn] = value;\r
-                }\r
+            public virtual global::System.Collections.IEnumerator GetEnumerator() {\r
+                return this.Rows.GetEnumerator();\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public double Y {\r
-                get {\r
-                    try {\r
-                        return ((double)(this[this.tableXY1Ch.YColumn]));\r
-                    }\r
-                    catch (global::System.InvalidCastException e) {\r
-                        throw new global::System.Data.StrongTypingException("テーブル \'XY1Ch\' にある列 \'Y\' の値は DBNull です。", e);\r
-                    }\r
-                }\r
-                set {\r
-                    this[this.tableXY1Ch.YColumn] = value;\r
-                }\r
+            public override global::System.Data.DataTable Clone() {\r
+                TimeFunction1ChDataTable cln = ((TimeFunction1ChDataTable)(base.Clone()));\r
+                cln.InitVars();\r
+                return cln;\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public bool IsXNull() {\r
-                return this.IsNull(this.tableXY1Ch.XColumn);\r
+            protected override global::System.Data.DataTable CreateInstance() {\r
+                return new TimeFunction1ChDataTable();\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public void SetXNull() {\r
-                this[this.tableXY1Ch.XColumn] = global::System.Convert.DBNull;\r
+            internal void InitVars() {\r
+                this.columnTime = base.Columns["Time"];\r
+                this.columnY = base.Columns["Y"];\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public bool IsYNull() {\r
-                return this.IsNull(this.tableXY1Ch.YColumn);\r
+            private void InitClass() {\r
+                this.columnTime = new global::System.Data.DataColumn("Time", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);\r
+                base.Columns.Add(this.columnTime);\r
+                this.columnY = new global::System.Data.DataColumn("Y", typeof(double), null, global::System.Data.MappingType.Element);\r
+                base.Columns.Add(this.columnY);\r
+                this.columnTime.AllowDBNull = false;\r
+                this.columnY.AllowDBNull = false;\r
+                this.columnY.DefaultValue = ((double)(0));\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public void SetYNull() {\r
-                this[this.tableXY1Ch.YColumn] = global::System.Convert.DBNull;\r
+            public TimeFunction1ChRow NewTimeFunction1ChRow() {\r
+                return ((TimeFunction1ChRow)(this.NewRow()));\r
             }\r
-        }\r
-        \r
-        /// <summary>\r
-        ///Row event argument class\r
-        ///</summary>\r
-        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
-        public class PointListRowChangeEvent : global::System.EventArgs {\r
-            \r
-            private PointListRow eventRow;\r
-            \r
-            private global::System.Data.DataRowAction eventAction;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public PointListRowChangeEvent(PointListRow row, global::System.Data.DataRowAction action) {\r
-                this.eventRow = row;\r
-                this.eventAction = action;\r
+            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {\r
+                return new TimeFunction1ChRow(builder);\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public PointListRow Row {\r
-                get {\r
-                    return this.eventRow;\r
-                }\r
+            protected override global::System.Type GetRowType() {\r
+                return typeof(TimeFunction1ChRow);\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public global::System.Data.DataRowAction Action {\r
-                get {\r
-                    return this.eventAction;\r
+            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowChanged(e);\r
+                if ((this.TimeFunction1ChRowChanged != null)) {\r
+                    this.TimeFunction1ChRowChanged(this, new TimeFunction1ChRowChangeEvent(((TimeFunction1ChRow)(e.Row)), e.Action));\r
                 }\r
             }\r
-        }\r
-        \r
-        /// <summary>\r
-        ///Row event argument class\r
-        ///</summary>\r
-        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
-        public class XY2ChRowChangeEvent : global::System.EventArgs {\r
-            \r
-            private XY2ChRow eventRow;\r
-            \r
-            private global::System.Data.DataRowAction eventAction;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public XY2ChRowChangeEvent(XY2ChRow row, global::System.Data.DataRowAction action) {\r
-                this.eventRow = row;\r
-                this.eventAction = action;\r
+            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowChanging(e);\r
+                if ((this.TimeFunction1ChRowChanging != null)) {\r
+                    this.TimeFunction1ChRowChanging(this, new TimeFunction1ChRowChangeEvent(((TimeFunction1ChRow)(e.Row)), e.Action));\r
+                }\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public XY2ChRow Row {\r
-                get {\r
-                    return this.eventRow;\r
+            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowDeleted(e);\r
+                if ((this.TimeFunction1ChRowDeleted != null)) {\r
+                    this.TimeFunction1ChRowDeleted(this, new TimeFunction1ChRowChangeEvent(((TimeFunction1ChRow)(e.Row)), e.Action));\r
                 }\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public global::System.Data.DataRowAction Action {\r
-                get {\r
-                    return this.eventAction;\r
+            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowDeleting(e);\r
+                if ((this.TimeFunction1ChRowDeleting != null)) {\r
+                    this.TimeFunction1ChRowDeleting(this, new TimeFunction1ChRowChangeEvent(((TimeFunction1ChRow)(e.Row)), e.Action));\r
                 }\r
             }\r
-        }\r
-        \r
-        /// <summary>\r
-        ///Row event argument class\r
-        ///</summary>\r
-        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
-        public class XY1ChRowChangeEvent : global::System.EventArgs {\r
-            \r
-            private XY1ChRow eventRow;\r
-            \r
-            private global::System.Data.DataRowAction eventAction;\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public XY1ChRowChangeEvent(XY1ChRow row, global::System.Data.DataRowAction action) {\r
-                this.eventRow = row;\r
-                this.eventAction = action;\r
+            public void RemoveTimeFunction1ChRow(TimeFunction1ChRow row) {\r
+                this.Rows.Remove(row);\r
             }\r
             \r
             [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
-            public XY1ChRow Row {\r
+            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {\r
+                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();\r
+                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();\r
+                Data ds = new Data();\r
+                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();\r
+                any1.Namespace = "http://www.w3.org/2001/XMLSchema";\r
+                any1.MinOccurs = new decimal(0);\r
+                any1.MaxOccurs = decimal.MaxValue;\r
+                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;\r
+                sequence.Items.Add(any1);\r
+                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();\r
+                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";\r
+                any2.MinOccurs = new decimal(1);\r
+                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;\r
+                sequence.Items.Add(any2);\r
+                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();\r
+                attribute1.Name = "namespace";\r
+                attribute1.FixedValue = ds.Namespace;\r
+                type.Attributes.Add(attribute1);\r
+                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();\r
+                attribute2.Name = "tableTypeName";\r
+                attribute2.FixedValue = "TimeFunction1ChDataTable";\r
+                type.Attributes.Add(attribute2);\r
+                type.Particle = sequence;\r
+                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();\r
+                if (xs.Contains(dsSchema.TargetNamespace)) {\r
+                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();\r
+                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();\r
+                    try {\r
+                        global::System.Xml.Schema.XmlSchema schema = null;\r
+                        dsSchema.Write(s1);\r
+                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {\r
+                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));\r
+                            s2.SetLength(0);\r
+                            schema.Write(s2);\r
+                            if ((s1.Length == s2.Length)) {\r
+                                s1.Position = 0;\r
+                                s2.Position = 0;\r
+                                for (; ((s1.Position != s1.Length) \r
+                                            && (s1.ReadByte() == s2.ReadByte())); ) {\r
+                                    ;\r
+                                }\r
+                                if ((s1.Position == s1.Length)) {\r
+                                    return type;\r
+                                }\r
+                            }\r
+                        }\r
+                    }\r
+                    finally {\r
+                        if ((s1 != null)) {\r
+                            s1.Close();\r
+                        }\r
+                        if ((s2 != null)) {\r
+                            s2.Close();\r
+                        }\r
+                    }\r
+                }\r
+                xs.Add(dsSchema);\r
+                return type;\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Represents the strongly named DataTable class.\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        [global::System.Serializable()]\r
+        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]\r
+        public partial class TimeFunction2ChDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {\r
+            \r
+            private global::System.Data.DataColumn columnTime;\r
+            \r
+            private global::System.Data.DataColumn columnY1;\r
+            \r
+            private global::System.Data.DataColumn columnY2;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction2ChDataTable() {\r
+                this.TableName = "TimeFunction2Ch";\r
+                this.BeginInit();\r
+                this.InitClass();\r
+                this.EndInit();\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal TimeFunction2ChDataTable(global::System.Data.DataTable table) {\r
+                this.TableName = table.TableName;\r
+                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {\r
+                    this.CaseSensitive = table.CaseSensitive;\r
+                }\r
+                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {\r
+                    this.Locale = table.Locale;\r
+                }\r
+                if ((table.Namespace != table.DataSet.Namespace)) {\r
+                    this.Namespace = table.Namespace;\r
+                }\r
+                this.Prefix = table.Prefix;\r
+                this.MinimumCapacity = table.MinimumCapacity;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected TimeFunction2ChDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : \r
+                    base(info, context) {\r
+                this.InitVars();\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataColumn TimeColumn {\r
+                get {\r
+                    return this.columnTime;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataColumn Y1Column {\r
+                get {\r
+                    return this.columnY1;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataColumn Y2Column {\r
+                get {\r
+                    return this.columnY2;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            [global::System.ComponentModel.Browsable(false)]\r
+            public int Count {\r
+                get {\r
+                    return this.Rows.Count;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction2ChRow this[int index] {\r
+                get {\r
+                    return ((TimeFunction2ChRow)(this.Rows[index]));\r
+                }\r
+            }\r
+            \r
+            public event TimeFunction2ChRowChangeEventHandler TimeFunction2ChRowChanging;\r
+            \r
+            public event TimeFunction2ChRowChangeEventHandler TimeFunction2ChRowChanged;\r
+            \r
+            public event TimeFunction2ChRowChangeEventHandler TimeFunction2ChRowDeleting;\r
+            \r
+            public event TimeFunction2ChRowChangeEventHandler TimeFunction2ChRowDeleted;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public void AddTimeFunction2ChRow(TimeFunction2ChRow row) {\r
+                this.Rows.Add(row);\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction2ChRow AddTimeFunction2ChRow(System.DateTime Time, double Y1, double Y2) {\r
+                TimeFunction2ChRow rowTimeFunction2ChRow = ((TimeFunction2ChRow)(this.NewRow()));\r
+                object[] columnValuesArray = new object[] {\r
+                        Time,\r
+                        Y1,\r
+                        Y2};\r
+                rowTimeFunction2ChRow.ItemArray = columnValuesArray;\r
+                this.Rows.Add(rowTimeFunction2ChRow);\r
+                return rowTimeFunction2ChRow;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public virtual global::System.Collections.IEnumerator GetEnumerator() {\r
+                return this.Rows.GetEnumerator();\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public override global::System.Data.DataTable Clone() {\r
+                TimeFunction2ChDataTable cln = ((TimeFunction2ChDataTable)(base.Clone()));\r
+                cln.InitVars();\r
+                return cln;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override global::System.Data.DataTable CreateInstance() {\r
+                return new TimeFunction2ChDataTable();\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal void InitVars() {\r
+                this.columnTime = base.Columns["Time"];\r
+                this.columnY1 = base.Columns["Y1"];\r
+                this.columnY2 = base.Columns["Y2"];\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            private void InitClass() {\r
+                this.columnTime = new global::System.Data.DataColumn("Time", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);\r
+                base.Columns.Add(this.columnTime);\r
+                this.columnY1 = new global::System.Data.DataColumn("Y1", typeof(double), null, global::System.Data.MappingType.Element);\r
+                base.Columns.Add(this.columnY1);\r
+                this.columnY2 = new global::System.Data.DataColumn("Y2", typeof(double), null, global::System.Data.MappingType.Element);\r
+                base.Columns.Add(this.columnY2);\r
+                this.columnTime.AllowDBNull = false;\r
+                this.columnY1.AllowDBNull = false;\r
+                this.columnY1.DefaultValue = ((double)(0));\r
+                this.columnY2.AllowDBNull = false;\r
+                this.columnY2.DefaultValue = ((double)(0));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction2ChRow NewTimeFunction2ChRow() {\r
+                return ((TimeFunction2ChRow)(this.NewRow()));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {\r
+                return new TimeFunction2ChRow(builder);\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override global::System.Type GetRowType() {\r
+                return typeof(TimeFunction2ChRow);\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowChanged(e);\r
+                if ((this.TimeFunction2ChRowChanged != null)) {\r
+                    this.TimeFunction2ChRowChanged(this, new TimeFunction2ChRowChangeEvent(((TimeFunction2ChRow)(e.Row)), e.Action));\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowChanging(e);\r
+                if ((this.TimeFunction2ChRowChanging != null)) {\r
+                    this.TimeFunction2ChRowChanging(this, new TimeFunction2ChRowChangeEvent(((TimeFunction2ChRow)(e.Row)), e.Action));\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowDeleted(e);\r
+                if ((this.TimeFunction2ChRowDeleted != null)) {\r
+                    this.TimeFunction2ChRowDeleted(this, new TimeFunction2ChRowChangeEvent(((TimeFunction2ChRow)(e.Row)), e.Action));\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {\r
+                base.OnRowDeleting(e);\r
+                if ((this.TimeFunction2ChRowDeleting != null)) {\r
+                    this.TimeFunction2ChRowDeleting(this, new TimeFunction2ChRowChangeEvent(((TimeFunction2ChRow)(e.Row)), e.Action));\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public void RemoveTimeFunction2ChRow(TimeFunction2ChRow row) {\r
+                this.Rows.Remove(row);\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {\r
+                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();\r
+                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();\r
+                Data ds = new Data();\r
+                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();\r
+                any1.Namespace = "http://www.w3.org/2001/XMLSchema";\r
+                any1.MinOccurs = new decimal(0);\r
+                any1.MaxOccurs = decimal.MaxValue;\r
+                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;\r
+                sequence.Items.Add(any1);\r
+                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();\r
+                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";\r
+                any2.MinOccurs = new decimal(1);\r
+                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;\r
+                sequence.Items.Add(any2);\r
+                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();\r
+                attribute1.Name = "namespace";\r
+                attribute1.FixedValue = ds.Namespace;\r
+                type.Attributes.Add(attribute1);\r
+                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();\r
+                attribute2.Name = "tableTypeName";\r
+                attribute2.FixedValue = "TimeFunction2ChDataTable";\r
+                type.Attributes.Add(attribute2);\r
+                type.Particle = sequence;\r
+                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();\r
+                if (xs.Contains(dsSchema.TargetNamespace)) {\r
+                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();\r
+                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();\r
+                    try {\r
+                        global::System.Xml.Schema.XmlSchema schema = null;\r
+                        dsSchema.Write(s1);\r
+                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {\r
+                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));\r
+                            s2.SetLength(0);\r
+                            schema.Write(s2);\r
+                            if ((s1.Length == s2.Length)) {\r
+                                s1.Position = 0;\r
+                                s2.Position = 0;\r
+                                for (; ((s1.Position != s1.Length) \r
+                                            && (s1.ReadByte() == s2.ReadByte())); ) {\r
+                                    ;\r
+                                }\r
+                                if ((s1.Position == s1.Length)) {\r
+                                    return type;\r
+                                }\r
+                            }\r
+                        }\r
+                    }\r
+                    finally {\r
+                        if ((s1 != null)) {\r
+                            s1.Close();\r
+                        }\r
+                        if ((s2 != null)) {\r
+                            s2.Close();\r
+                        }\r
+                    }\r
+                }\r
+                xs.Add(dsSchema);\r
+                return type;\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Represents strongly named DataRow class.\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public partial class PointListRow : global::System.Data.DataRow {\r
+            \r
+            private PointListDataTable tablePointList;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal PointListRow(global::System.Data.DataRowBuilder rb) : \r
+                    base(rb) {\r
+                this.tablePointList = ((PointListDataTable)(this.Table));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double X {\r
+                get {\r
+                    return ((double)(this[this.tablePointList.XColumn]));\r
+                }\r
+                set {\r
+                    this[this.tablePointList.XColumn] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y {\r
+                get {\r
+                    return ((double)(this[this.tablePointList.YColumn]));\r
+                }\r
+                set {\r
+                    this[this.tablePointList.YColumn] = value;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Represents strongly named DataRow class.\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public partial class XY2ChRow : global::System.Data.DataRow {\r
+            \r
+            private XY2ChDataTable tableXY2Ch;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal XY2ChRow(global::System.Data.DataRowBuilder rb) : \r
+                    base(rb) {\r
+                this.tableXY2Ch = ((XY2ChDataTable)(this.Table));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double X {\r
+                get {\r
+                    return ((double)(this[this.tableXY2Ch.XColumn]));\r
+                }\r
+                set {\r
+                    this[this.tableXY2Ch.XColumn] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y1 {\r
+                get {\r
+                    return ((double)(this[this.tableXY2Ch.Y1Column]));\r
+                }\r
+                set {\r
+                    this[this.tableXY2Ch.Y1Column] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y2 {\r
+                get {\r
+                    return ((double)(this[this.tableXY2Ch.Y2Column]));\r
+                }\r
+                set {\r
+                    this[this.tableXY2Ch.Y2Column] = value;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Represents strongly named DataRow class.\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public partial class XY1ChRow : global::System.Data.DataRow {\r
+            \r
+            private XY1ChDataTable tableXY1Ch;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal XY1ChRow(global::System.Data.DataRowBuilder rb) : \r
+                    base(rb) {\r
+                this.tableXY1Ch = ((XY1ChDataTable)(this.Table));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double X {\r
+                get {\r
+                    return ((double)(this[this.tableXY1Ch.XColumn]));\r
+                }\r
+                set {\r
+                    this[this.tableXY1Ch.XColumn] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y {\r
+                get {\r
+                    return ((double)(this[this.tableXY1Ch.YColumn]));\r
+                }\r
+                set {\r
+                    this[this.tableXY1Ch.YColumn] = value;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Represents strongly named DataRow class.\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public partial class TimeFunction1ChRow : global::System.Data.DataRow {\r
+            \r
+            private TimeFunction1ChDataTable tableTimeFunction1Ch;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal TimeFunction1ChRow(global::System.Data.DataRowBuilder rb) : \r
+                    base(rb) {\r
+                this.tableTimeFunction1Ch = ((TimeFunction1ChDataTable)(this.Table));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public System.DateTime Time {\r
+                get {\r
+                    return ((global::System.DateTime)(this[this.tableTimeFunction1Ch.TimeColumn]));\r
+                }\r
+                set {\r
+                    this[this.tableTimeFunction1Ch.TimeColumn] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y {\r
+                get {\r
+                    return ((double)(this[this.tableTimeFunction1Ch.YColumn]));\r
+                }\r
+                set {\r
+                    this[this.tableTimeFunction1Ch.YColumn] = value;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Represents strongly named DataRow class.\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public partial class TimeFunction2ChRow : global::System.Data.DataRow {\r
+            \r
+            private TimeFunction2ChDataTable tableTimeFunction2Ch;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            internal TimeFunction2ChRow(global::System.Data.DataRowBuilder rb) : \r
+                    base(rb) {\r
+                this.tableTimeFunction2Ch = ((TimeFunction2ChDataTable)(this.Table));\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public System.DateTime Time {\r
+                get {\r
+                    return ((global::System.DateTime)(this[this.tableTimeFunction2Ch.TimeColumn]));\r
+                }\r
+                set {\r
+                    this[this.tableTimeFunction2Ch.TimeColumn] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y1 {\r
+                get {\r
+                    return ((double)(this[this.tableTimeFunction2Ch.Y1Column]));\r
+                }\r
+                set {\r
+                    this[this.tableTimeFunction2Ch.Y1Column] = value;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public double Y2 {\r
+                get {\r
+                    return ((double)(this[this.tableTimeFunction2Ch.Y2Column]));\r
+                }\r
+                set {\r
+                    this[this.tableTimeFunction2Ch.Y2Column] = value;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Row event argument class\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public class PointListRowChangeEvent : global::System.EventArgs {\r
+            \r
+            private PointListRow eventRow;\r
+            \r
+            private global::System.Data.DataRowAction eventAction;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public PointListRowChangeEvent(PointListRow row, global::System.Data.DataRowAction action) {\r
+                this.eventRow = row;\r
+                this.eventAction = action;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public PointListRow Row {\r
+                get {\r
+                    return this.eventRow;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataRowAction Action {\r
+                get {\r
+                    return this.eventAction;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Row event argument class\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public class XY2ChRowChangeEvent : global::System.EventArgs {\r
+            \r
+            private XY2ChRow eventRow;\r
+            \r
+            private global::System.Data.DataRowAction eventAction;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public XY2ChRowChangeEvent(XY2ChRow row, global::System.Data.DataRowAction action) {\r
+                this.eventRow = row;\r
+                this.eventAction = action;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public XY2ChRow Row {\r
+                get {\r
+                    return this.eventRow;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataRowAction Action {\r
+                get {\r
+                    return this.eventAction;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Row event argument class\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public class XY1ChRowChangeEvent : global::System.EventArgs {\r
+            \r
+            private XY1ChRow eventRow;\r
+            \r
+            private global::System.Data.DataRowAction eventAction;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public XY1ChRowChangeEvent(XY1ChRow row, global::System.Data.DataRowAction action) {\r
+                this.eventRow = row;\r
+                this.eventAction = action;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public XY1ChRow Row {\r
+                get {\r
+                    return this.eventRow;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataRowAction Action {\r
+                get {\r
+                    return this.eventAction;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Row event argument class\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public class TimeFunction1ChRowChangeEvent : global::System.EventArgs {\r
+            \r
+            private TimeFunction1ChRow eventRow;\r
+            \r
+            private global::System.Data.DataRowAction eventAction;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction1ChRowChangeEvent(TimeFunction1ChRow row, global::System.Data.DataRowAction action) {\r
+                this.eventRow = row;\r
+                this.eventAction = action;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction1ChRow Row {\r
+                get {\r
+                    return this.eventRow;\r
+                }\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public global::System.Data.DataRowAction Action {\r
+                get {\r
+                    return this.eventAction;\r
+                }\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///Row event argument class\r
+        ///</summary>\r
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]\r
+        public class TimeFunction2ChRowChangeEvent : global::System.EventArgs {\r
+            \r
+            private TimeFunction2ChRow eventRow;\r
+            \r
+            private global::System.Data.DataRowAction eventAction;\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction2ChRowChangeEvent(TimeFunction2ChRow row, global::System.Data.DataRowAction action) {\r
+                this.eventRow = row;\r
+                this.eventAction = action;\r
+            }\r
+            \r
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+            public TimeFunction2ChRow Row {\r
                 get {\r
                     return this.eventRow;\r
                 }\r
index d841892..7a63559 100755 (executable)
         <xs:element name="PointList" msdata:Locale="" msprop:Generator_UserTableName="PointList" msprop:Generator_RowDeletedName="PointListRowDeleted" msprop:Generator_RowChangedName="PointListRowChanged" msprop:Generator_RowClassName="PointListRow" msprop:Generator_RowChangingName="PointListRowChanging" msprop:Generator_RowEvArgName="PointListRowChangeEvent" msprop:Generator_RowEvHandlerName="PointListRowChangeEventHandler" msprop:Generator_TableClassName="PointListDataTable" msprop:Generator_TableVarName="tablePointList" msprop:Generator_RowDeletingName="PointListRowDeleting" msprop:Generator_TablePropName="PointList">\r
           <xs:complexType>\r
             <xs:sequence>\r
-              <xs:element name="X" msprop:Generator_UserColumnName="X" msprop:Generator_ColumnPropNameInRow="X" msprop:Generator_ColumnVarNameInTable="columnX" msprop:Generator_ColumnPropNameInTable="XColumn" type="xs:double" default="0" />\r
-              <xs:element name="Y" msprop:Generator_UserColumnName="Y" msprop:Generator_ColumnPropNameInRow="Y" msprop:Generator_ColumnVarNameInTable="columnY" msprop:Generator_ColumnPropNameInTable="YColumn" type="xs:double" default="0" />\r
+              <xs:element name="X" msprop:Generator_UserColumnName="X" msprop:Generator_ColumnVarNameInTable="columnX" msprop:Generator_ColumnPropNameInRow="X" msprop:Generator_ColumnPropNameInTable="XColumn" type="xs:double" default="0" />\r
+              <xs:element name="Y" msprop:Generator_UserColumnName="Y" msprop:Generator_ColumnVarNameInTable="columnY" msprop:Generator_ColumnPropNameInRow="Y" msprop:Generator_ColumnPropNameInTable="YColumn" type="xs:double" default="0" />\r
             </xs:sequence>\r
           </xs:complexType>\r
         </xs:element>\r
         <xs:element name="XY2Ch" msprop:Generator_UserTableName="XY2Ch" msprop:Generator_RowDeletedName="XY2ChRowDeleted" msprop:Generator_RowChangedName="XY2ChRowChanged" msprop:Generator_RowClassName="XY2ChRow" msprop:Generator_RowChangingName="XY2ChRowChanging" msprop:Generator_RowEvArgName="XY2ChRowChangeEvent" msprop:Generator_RowEvHandlerName="XY2ChRowChangeEventHandler" msprop:Generator_TableClassName="XY2ChDataTable" msprop:Generator_TableVarName="tableXY2Ch" msprop:Generator_RowDeletingName="XY2ChRowDeleting" msprop:Generator_TablePropName="XY2Ch">\r
           <xs:complexType>\r
             <xs:sequence>\r
-              <xs:element name="X" msprop:Generator_UserColumnName="X" msprop:Generator_ColumnVarNameInTable="columnX" msprop:Generator_ColumnPropNameInRow="X" msprop:Generator_ColumnPropNameInTable="XColumn" type="xs:double" minOccurs="0" />\r
-              <xs:element name="Y1" msprop:Generator_UserColumnName="Y1" msprop:Generator_ColumnVarNameInTable="columnY1" msprop:Generator_ColumnPropNameInRow="Y1" msprop:Generator_ColumnPropNameInTable="Y1Column" type="xs:double" minOccurs="0" />\r
-              <xs:element name="Y2" msprop:Generator_UserColumnName="Y2" msprop:Generator_ColumnVarNameInTable="columnY2" msprop:Generator_ColumnPropNameInRow="Y2" msprop:Generator_ColumnPropNameInTable="Y2Column" type="xs:double" minOccurs="0" />\r
+              <xs:element name="X" msprop:Generator_UserColumnName="X" msprop:Generator_ColumnPropNameInRow="X" msprop:Generator_ColumnVarNameInTable="columnX" msprop:Generator_ColumnPropNameInTable="XColumn" type="xs:double" default="0" />\r
+              <xs:element name="Y1" msprop:Generator_UserColumnName="Y1" msprop:Generator_ColumnPropNameInRow="Y1" msprop:Generator_ColumnVarNameInTable="columnY1" msprop:Generator_ColumnPropNameInTable="Y1Column" type="xs:double" default="0" />\r
+              <xs:element name="Y2" msprop:Generator_UserColumnName="Y2" msprop:Generator_ColumnPropNameInRow="Y2" msprop:Generator_ColumnVarNameInTable="columnY2" msprop:Generator_ColumnPropNameInTable="Y2Column" type="xs:double" default="0" />\r
             </xs:sequence>\r
           </xs:complexType>\r
         </xs:element>\r
         <xs:element name="XY1Ch" msprop:Generator_UserTableName="XY1Ch" msprop:Generator_RowDeletedName="XY1ChRowDeleted" msprop:Generator_RowChangedName="XY1ChRowChanged" msprop:Generator_RowClassName="XY1ChRow" msprop:Generator_RowChangingName="XY1ChRowChanging" msprop:Generator_RowEvArgName="XY1ChRowChangeEvent" msprop:Generator_RowEvHandlerName="XY1ChRowChangeEventHandler" msprop:Generator_TableClassName="XY1ChDataTable" msprop:Generator_TableVarName="tableXY1Ch" msprop:Generator_RowDeletingName="XY1ChRowDeleting" msprop:Generator_TablePropName="XY1Ch">\r
           <xs:complexType>\r
             <xs:sequence>\r
-              <xs:element name="X" msprop:Generator_UserColumnName="X" msprop:Generator_ColumnVarNameInTable="columnX" msprop:Generator_ColumnPropNameInRow="X" msprop:Generator_ColumnPropNameInTable="XColumn" type="xs:double" minOccurs="0" />\r
-              <xs:element name="Y" msprop:Generator_UserColumnName="Y" msprop:Generator_ColumnVarNameInTable="columnY" msprop:Generator_ColumnPropNameInRow="Y" msprop:Generator_ColumnPropNameInTable="YColumn" type="xs:double" minOccurs="0" />\r
+              <xs:element name="X" msprop:Generator_UserColumnName="X" msprop:Generator_ColumnPropNameInRow="X" msprop:Generator_ColumnVarNameInTable="columnX" msprop:Generator_ColumnPropNameInTable="XColumn" type="xs:double" default="0" />\r
+              <xs:element name="Y" msprop:Generator_UserColumnName="Y" msprop:Generator_ColumnPropNameInRow="Y" msprop:Generator_ColumnVarNameInTable="columnY" msprop:Generator_ColumnPropNameInTable="YColumn" type="xs:double" default="0" />\r
+            </xs:sequence>\r
+          </xs:complexType>\r
+        </xs:element>\r
+        <xs:element name="TimeFunction1Ch" msprop:Generator_UserTableName="TimeFunction1Ch" msprop:Generator_RowDeletedName="TimeFunction1ChRowDeleted" msprop:Generator_TableClassName="TimeFunction1ChDataTable" msprop:Generator_RowChangedName="TimeFunction1ChRowChanged" msprop:Generator_RowClassName="TimeFunction1ChRow" msprop:Generator_RowChangingName="TimeFunction1ChRowChanging" msprop:Generator_RowEvArgName="TimeFunction1ChRowChangeEvent" msprop:Generator_RowEvHandlerName="TimeFunction1ChRowChangeEventHandler" msprop:Generator_TablePropName="TimeFunction1Ch" msprop:Generator_TableVarName="tableTimeFunction1Ch" msprop:Generator_RowDeletingName="TimeFunction1ChRowDeleting">\r
+          <xs:complexType>\r
+            <xs:sequence>\r
+              <xs:element name="Time" msprop:Generator_UserColumnName="Time" msprop:Generator_ColumnPropNameInRow="Time" msprop:Generator_ColumnVarNameInTable="columnTime" msprop:Generator_ColumnPropNameInTable="TimeColumn" type="xs:dateTime" />\r
+              <xs:element name="Y" msprop:Generator_UserColumnName="Y" msprop:Generator_ColumnPropNameInRow="Y" msprop:Generator_ColumnVarNameInTable="columnY" msprop:Generator_ColumnPropNameInTable="YColumn" type="xs:double" default="0" />\r
+            </xs:sequence>\r
+          </xs:complexType>\r
+        </xs:element>\r
+        <xs:element name="TimeFunction2Ch" msprop:Generator_UserTableName="TimeFunction2Ch" msprop:Generator_RowDeletedName="TimeFunction2ChRowDeleted" msprop:Generator_TableClassName="TimeFunction2ChDataTable" msprop:Generator_RowChangedName="TimeFunction2ChRowChanged" msprop:Generator_RowClassName="TimeFunction2ChRow" msprop:Generator_RowChangingName="TimeFunction2ChRowChanging" msprop:Generator_RowEvArgName="TimeFunction2ChRowChangeEvent" msprop:Generator_RowEvHandlerName="TimeFunction2ChRowChangeEventHandler" msprop:Generator_TablePropName="TimeFunction2Ch" msprop:Generator_TableVarName="tableTimeFunction2Ch" msprop:Generator_RowDeletingName="TimeFunction2ChRowDeleting">\r
+          <xs:complexType>\r
+            <xs:sequence>\r
+              <xs:element name="Time" msprop:Generator_UserColumnName="Time" msprop:Generator_ColumnPropNameInRow="Time" msprop:Generator_ColumnVarNameInTable="columnTime" msprop:Generator_ColumnPropNameInTable="TimeColumn" type="xs:dateTime" />\r
+              <xs:element name="Y1" msprop:Generator_UserColumnName="Y1" msprop:Generator_ColumnPropNameInRow="Y1" msprop:Generator_ColumnVarNameInTable="columnY1" msprop:Generator_ColumnPropNameInTable="Y1Column" type="xs:double" default="0" />\r
+              <xs:element name="Y2" msprop:Generator_UserColumnName="Y2" msprop:Generator_ColumnPropNameInRow="Y2" msprop:Generator_ColumnVarNameInTable="columnY2" msprop:Generator_ColumnPropNameInTable="Y2Column" type="xs:double" default="0" />\r
             </xs:sequence>\r
           </xs:complexType>\r
         </xs:element>\r
index 3791ac9..3fadd7d 100755 (executable)
@@ -4,11 +4,13 @@
      Changes to this file may cause incorrect behavior and will be lost if\r
      the code is regenerated.\r
 </autogenerated>-->\r
-<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">\r
+<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="3" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">\r
   <Shapes>\r
-    <Shape ID="DesignTable:PointList" ZOrder="3" X="278" Y="41" Height="82" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="78" />\r
-    <Shape ID="DesignTable:XY2Ch" ZOrder="2" X="357" Y="174" Height="70" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="66" />\r
-    <Shape ID="DesignTable:XY1Ch" ZOrder="1" X="359" Y="261" Height="55" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="51" />\r
+    <Shape ID="DesignTable:PointList" ZOrder="5" X="30" Y="27" Height="82" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="78" />\r
+    <Shape ID="DesignTable:XY2Ch" ZOrder="4" X="355" Y="31" Height="131" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="127" />\r
+    <Shape ID="DesignTable:XY1Ch" ZOrder="3" X="193" Y="30" Height="131" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="127" />\r
+    <Shape ID="DesignTable:TimeFunction1Ch" ZOrder="2" X="182" Y="187" Height="82" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="78" />\r
+    <Shape ID="DesignTable:TimeFunction2Ch" ZOrder="1" X="395" Y="188" Height="106" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />\r
   </Shapes>\r
   <Connectors />\r
 </DiagramLayout>
\ No newline at end of file
index 989e3b4..e6ca2c7 100755 (executable)
@@ -9,6 +9,7 @@ using System;
 using System.Collections.Generic;\r
 using System.Text;\r
 using System.Diagnostics;\r
+using System.Data;\r
 using Karinto;\r
 using Karinto.Xml;\r
 using NUnit.Framework;\r
@@ -26,10 +27,6 @@ namespace KarintoTest
                                         new CsvReader<Data.XY2ChDataTable>();\r
             Data.XY2ChDataTable table = reader.Read("Resources/d_d_d.csv");\r
 \r
-            Assert.AreEqual("Header1", table.XColumn.ColumnName);\r
-            Assert.AreEqual("Header2", table.Y1Column.ColumnName);\r
-            Assert.AreEqual("Header3", table.Y2Column.ColumnName);\r
-\r
             Assert.AreEqual("Header1", table.XColumn.Caption);\r
             Assert.AreEqual("Header2", table.Y1Column.Caption);\r
             Assert.AreEqual("Header3", table.Y2Column.Caption);\r
@@ -54,9 +51,6 @@ namespace KarintoTest
                                         new CsvReader<Data.XY1ChDataTable>();\r
             Data.XY1ChDataTable table = reader.Read("Resources/d_d_d.csv");\r
 \r
-            Assert.AreEqual("Header1", table.XColumn.ColumnName);\r
-            Assert.AreEqual("Header2", table.YColumn.ColumnName);\r
-\r
             Assert.AreEqual("Header1", table.XColumn.Caption);\r
             Assert.AreEqual("Header2", table.YColumn.Caption);\r
 \r
@@ -68,5 +62,35 @@ namespace KarintoTest
             Assert.AreEqual(0.0, table[50].Y);\r
             Assert.AreEqual(0.0, table[100].Y);\r
         }\r
+\r
+        [Test]\r
+        public void Prototype()\r
+        {\r
+            DataTable prototype = new DataTable();\r
+            prototype.Columns.Add("X", typeof(decimal));\r
+            prototype.Columns.Add("Y1", typeof(float));\r
+            prototype.Columns.Add("Y2", typeof(int));\r
+\r
+            CsvReader reader = new CsvReader(prototype);\r
+            prototype = null;\r
+\r
+            DataTable table = reader.Read("Resources/d_d_d.csv");\r
+\r
+            Assert.AreEqual("Header1", table.Columns["X"].Caption);\r
+            Assert.AreEqual("Header2", table.Columns["Y1"].Caption);\r
+            Assert.AreEqual("Header3", table.Columns["Y2"].Caption);\r
+\r
+            Assert.AreEqual(0.0m, table.Rows[0]["X"]);\r
+            Assert.AreEqual(5.0m, table.Rows[50]["X"]);\r
+            Assert.AreEqual(10.0m, table.Rows[100]["X"]);\r
+\r
+            Assert.AreEqual(0.0f, table.Rows[0]["Y1"]);\r
+            Assert.AreEqual(0.0f, table.Rows[50]["Y1"]);\r
+            Assert.AreEqual(0.0f, table.Rows[100]["Y1"]);\r
+\r
+            Assert.AreEqual(0, table.Rows[0]["Y2"]);\r
+            Assert.AreEqual(1, table.Rows[50]["Y2"]);\r
+            Assert.AreEqual(0, table.Rows[100]["Y2"]);\r
+        }\r
     }\r
 }\r