From b0159737b33eb0e527c98532e901744a656897a6 Mon Sep 17 00:00:00 2001
From: jimmy hu <60071jimmy@gmail.com>
Date: Sun, 12 May 2019 22:01:17 +0800
Subject: [PATCH] Add OpenGLTest
Add OpenGLTest
---
.../OpenGLTest/UartOscilloscope.sln | 28 +
.../OpenGLTest/UartOscilloscope/App.config | 6 +
.../CSharpFiles/CommandClass.cs | 73 ++
.../CSharpFiles/CommandDatabase.cs | 102 ++
.../CSharpFiles/CommandParser.cs | 22 +
.../CSharpFiles/ComportList.cs | 69 ++
.../CSharpFiles/DataProcessing.cs | 18 +
.../UartOscilloscope/CSharpFiles/DataQueue.cs | 132 +++
.../UartOscilloscope/CSharpFiles/Debug.cs | 46 +
.../CSharpFiles/DebugVariables.cs | 184 +++
.../CSharpFiles/ErrorCodeMessage.cs | 90 ++
.../UartOscilloscope/CSharpFiles/FileIO.cs | 71 ++
.../CSharpFiles/OpenGLExtension.cs | 13 +
.../OscilloscopeFunctionVariable.cs | 47 +
.../CSharpFiles/QueueDataGraphic.cs | 123 ++
.../CSharpFiles/TestingType.cs | 66 ++
.../CSharpFiles/TimingControl.cs | 16 +
.../CSharpFiles/UARTConnection.cs | 193 ++++
.../CSharpFiles/UARTConnectionConstVal.cs | 34 +
.../CSharpFiles/VersionInfo.cs | 26 +
.../CSharpFiles/WaveDataStructure.cs | 69 ++
.../CSharpFiles/WorkingMode.cs | 31 +
.../UartOscilloscope/ClassDiagram1.cd | 2 +
.../UartOscilloscope/Form1.Designer.cs | 287 +++++
.../OpenGLTest/UartOscilloscope/Form1.cs | 1025 +++++++++++++++++
.../OpenGLTest/UartOscilloscope/Form1.resx | 126 ++
.../UartOscilloscope/Form2.Designer.cs | 135 +++
.../OpenGLTest/UartOscilloscope/Form2.cs | 39 +
.../OpenGLTest/UartOscilloscope/Form2.resx | 120 ++
.../UartOscilloscope/Form3.Designer.cs | 120 ++
.../OpenGLTest/UartOscilloscope/Form3.cs | 34 +
.../OpenGLTest/UartOscilloscope/Form3.resx | 123 ++
.../UartOscilloscope/Form4.Designer.cs | 126 ++
.../OpenGLTest/UartOscilloscope/Form4.cs | 106 ++
.../OpenGLTest/UartOscilloscope/Form4.resx | 120 ++
.../UartOscilloscope/Form5.Designer.cs | 536 +++++++++
.../OpenGLTest/UartOscilloscope/Form5.cs | 69 ++
.../OpenGLTest/UartOscilloscope/Form5.resx | 123 ++
.../OpenGLTest/UartOscilloscope/Program.cs | 22 +
.../Properties/AssemblyInfo.cs | 36 +
.../Properties/Resources.Designer.cs | 63 +
.../Properties/Resources.resx | 117 ++
.../Properties/Settings.Designer.cs | 26 +
.../Properties/Settings.settings | 7 +
.../OpenGLTest/UartOscilloscope/README.md | 22 +
.../UartOscilloscope/UartOscilloscope.csproj | 159 +++
.../UartOscilloscope/VersionInfo.md | 31 +
.../OpenGLTest/UartOscilloscope/WaveGraph.cs | 12 +
.../CSharpFiles/DataProcessingTests.cs | 46 +
.../UARTConnectionConstValTests.cs | 41 +
.../CSharpFiles/WaveDataStructureTests.cs | 120 ++
.../Properties/AssemblyInfo.cs | 36 +
.../UartOscilloscopeTests.csproj | 91 ++
53 files changed, 5379 insertions(+)
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope.sln
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/App.config
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandClass.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandDatabase.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandParser.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/ComportList.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataProcessing.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataQueue.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/Debug.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DebugVariables.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/ErrorCodeMessage.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/FileIO.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/OpenGLExtension.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/OscilloscopeFunctionVariable.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/QueueDataGraphic.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/TestingType.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/TimingControl.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/UARTConnection.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/UARTConnectionConstVal.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/VersionInfo.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/WaveDataStructure.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/WorkingMode.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/ClassDiagram1.cd
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form1.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form1.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form1.resx
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form2.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form2.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form2.resx
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form3.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form3.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form3.resx
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form4.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form4.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form4.resx
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form5.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form5.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Form5.resx
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Program.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Properties/AssemblyInfo.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Properties/Resources.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Properties/Resources.resx
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Properties/Settings.Designer.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/Properties/Settings.settings
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/README.md
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/UartOscilloscope.csproj
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/VersionInfo.md
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscope/WaveGraph.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscopeTests/CSharpFiles/DataProcessingTests.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscopeTests/CSharpFiles/UARTConnectionConstValTests.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscopeTests/CSharpFiles/WaveDataStructureTests.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscopeTests/Properties/AssemblyInfo.cs
create mode 100644 VisualStudioProjects/OpenGLTest/UartOscilloscopeTests/UartOscilloscopeTests.csproj
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope.sln b/VisualStudioProjects/OpenGLTest/UartOscilloscope.sln
new file mode 100644
index 0000000..801cf7d
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UartOscilloscope", "UartOscilloscope\UartOscilloscope.csproj", "{8D89102B-2B1F-43D5-83C2-DA86889BA3D7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UartOscilloscopeTests", "UartOscilloscopeTests\UartOscilloscopeTests.csproj", "{7EC5AE58-596E-4960-8DFC-BBBE353B1F7D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8D89102B-2B1F-43D5-83C2-DA86889BA3D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8D89102B-2B1F-43D5-83C2-DA86889BA3D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8D89102B-2B1F-43D5-83C2-DA86889BA3D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8D89102B-2B1F-43D5-83C2-DA86889BA3D7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7EC5AE58-596E-4960-8DFC-BBBE353B1F7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7EC5AE58-596E-4960-8DFC-BBBE353B1F7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7EC5AE58-596E-4960-8DFC-BBBE353B1F7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7EC5AE58-596E-4960-8DFC-BBBE353B1F7D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/App.config b/VisualStudioProjects/OpenGLTest/UartOscilloscope/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandClass.cs b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandClass.cs
new file mode 100644
index 0000000..d1b9a0c
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandClass.cs
@@ -0,0 +1,73 @@
+/********************************************************************
+ * Develop by Jimmy Hu *
+ * This program is licensed under the Apache License 2.0. *
+ * CommandClass.cs *
+ * 本檔案建立程式指令模式下指令單元物件 *
+ ********************************************************************
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace UartOscilloscope // UartOscilloscope命名空間
+{ // 進入UartOscilloscope命名空間
+ class CommandClass // CommandClass指令類別
+ { // 進入CommandClass指令類別
+ private int CommandID; // 宣告指令編號
+ private string CommandName; // 宣告指令名稱
+ private string ChineseDescription; // 宣告指令中文描述
+ private string EnglishDescription; // 宣告指令英文描述
+ private Task task; // 宣告指令工作
+ ///
+ /// CommandClass建構子
+ ///
+ /// 為指令編號
+ /// 為指令名稱
+ /// 為指令中文敘述
+ /// 為指令英文敘述
+ /// 為指令工作
+ public CommandClass(int CommandID, string CommandName, string ChineseDescription, string EnglishDescription, Task task)
+ // CommandClass constructor, CommandClass建構子
+ { // CommandClass constructor start, 進入CommandClass建構子
+
+ } // CommandClass constructor end, 結束CommandClass建構子
+
+ ///
+ /// CommandClass建構子
+ ///
+ /// 為指令編號
+ /// 為指令名稱
+ /// 為指令中文敘述
+ /// 為指令工作
+ public CommandClass(int CommandID, string CommandName, string ChineseDescription, Task task)
+ // CommandClass建構子
+ { // 進入CommandClass建構子
+ this.CommandID = CommandID; // 初始化指令編號
+ this.CommandName = CommandName; // 初始化指令名稱
+ this.ChineseDescription = ChineseDescription; // 初始化指令中文描述
+ this.EnglishDescription = ""; // 初始化指令英文描述
+ this.task = task; // 初始化指令工作
+ } // 結束CommandClass建構子
+
+ public CommandClass(int CommandID, string CommandName, Task task)
+ // CommandClass建構子
+ { // 進入CommandClass建構子
+ this.CommandID = CommandID; // 初始化指令編號
+ this.CommandName = CommandName; // 初始化指令名稱
+ this.ChineseDescription = ""; // 初始化指令中文描述
+ this.EnglishDescription = ""; // 初始化指令英文描述
+ this.task = task; // 初始化指令工作
+ } // 結束CommandClass建構子
+ ///
+ /// 覆寫ToString方法可回傳指令名稱
+ ///
+ /// 回傳值為指令名稱
+ public override string ToString() // 覆寫ToString方法
+ { // 進入覆寫ToString方法
+ return CommandName; // 回傳指令名稱
+ } // 結束覆寫ToString方法
+ } // 結束CommandClass指令類別
+} // 結束UartOscilloscope命名空間
\ No newline at end of file
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandDatabase.cs b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandDatabase.cs
new file mode 100644
index 0000000..5dd8145
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandDatabase.cs
@@ -0,0 +1,102 @@
+using System; // 使用System函式庫
+using System.Collections.Generic; // 使用System.Collections.Generic函式庫
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace UartOscilloscope // UartOscilloscope命名空間
+{ // 進入UartOscilloscope命名空間
+ class CommandDatabase // CommandDatabase類別
+ { // 進入CommandDatabase類別
+ public readonly static CommandDatabase Instance = new CommandDatabase();// 設計CommandDatabase存取介面
+ private List CommandSet = new List(); // 宣告CommandSet
+ ///
+ /// CommandDatabase類別
+ ///
+ public CommandDatabase() // CommandDatabase建構子
+ { // 進入CommandDatabase建構子
+ CreateCommandSet(); // 呼叫CreateCommandSet方法
+ } // 結束CommandDatabase建構子
+
+ ///
+ /// CreateCommandSet方法用於建立命令集合
+ ///
+ public void CreateCommandSet()
+ {
+ CommandSet.Add(new CommandClass( // Add command, 新增指令
+ 1, // 指令編號
+ "connect", // 指令名稱
+ new System.Threading.Tasks.Task(() => // 建立指令工作
+ { // 進入指令工作內容
+
+ }))); // 結束指令工作內容
+ CommandSet.Add(new CommandClass( // 新增指令
+ 2, // 指令編號
+ "help", // 指令名稱
+ new System.Threading.Tasks.Task(() => // 建立指令工作
+ { // 進入指令工作內容
+
+ }))); // 結束指令工作內容
+ CommandSet.Add(new CommandClass( // 新增指令
+ 3, // 指令編號
+ "lscom", // 指令名稱
+ new System.Threading.Tasks.Task(() => // 建立指令工作
+ { // 進入指令工作內容
+ UARTConnection UARTConnection1; // 宣告UARTConnection1物件
+ UARTConnection1 = new UARTConnection(0, false);
+ Console.WriteLine(UARTConnection1.GetComportList().ToString());
+ }))); // 結束指令工作內容
+ CommandSet.Add(new CommandClass( // 新增指令
+ 3, // 指令編號
+ "version", // 指令名稱
+ new System.Threading.Tasks.Task(() => // 建立指令工作
+ { // 進入指令工作內容
+ Console.WriteLine(VersionInfo.Instance.GetProgramVersion());
+ }))); // 結束指令工作內容
+ }
+ ///
+ /// 顯示CommandSet指令列表
+ ///
+ ///
+ public override string ToString() // 覆寫ToString方法
+ { // 進入覆寫ToString方法
+ string OutputStr = ""; // 宣告輸出字串
+ foreach (CommandClass Item in this.CommandSet) // 以foreach迴圈依序取出指令物件
+ { // 進入foreach敘述
+ OutputStr = OutputStr + Item.ToString() + '\t'; // 生成輸出字串
+ } // 結束foreach敘述
+ return OutputStr; // 回傳輸出字串
+ } // 結束覆寫ToString方法
+ ///
+ /// GetCommandSet方法用於取得命令集合中指令列表
+ ///
+ ///
+ public string[] GetCommandSet() // GetCommandSet方法
+ { // 進入GetCommandSet方法
+ string[] OutputStrArray; // 宣告輸出字串陣列
+ OutputStrArray = new string[] { }; // 初始化字串陣列
+ int OutputStrArraySize = CommandSet.Count; // 宣告OutputStrArraySize,用於記錄輸出陣列大小
+ Array.Resize(ref OutputStrArray, OutputStrArraySize); // 調整字串陣列大小
+ int Index = 0; // 宣告索引值用於存取陣列元素
+ foreach(CommandClass Item in this.CommandSet) // 取出命令集合中指令
+ { // 進入foreach敘述
+ OutputStrArray[Index] = Item.ToString(); // 填入資料至輸出陣列
+ Index = Index + 1; // 遞增索引值
+ } // 結束foreach敘述
+ return OutputStrArray; // 回傳字串陣列
+ } // 結束GetCommandSet方法
+ ///
+ /// GetCommandSetCount方法用於取得命令集合指令數量
+ ///
+ ///
+ private int GetCommandSetCount() // GetCommandSetCount方法
+ { // 進入GetCommandSetCount方法
+ return this.CommandSet.Count; // 回傳命令集合指令數量
+ } // 結束GetCommandSetCount方法
+ private string GetCommandHelp() // GetCommandHelp方法
+ { // 進入GetCommandHelp方法
+ string OutputStr = "";
+ return OutputStr;
+ } // 結束GetCommandHelp方法
+ } // 結束CommandDatabase類別
+} // 結束UartOscilloscope命名空間
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandParser.cs b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandParser.cs
new file mode 100644
index 0000000..2211d6d
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/CommandParser.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace UartOscilloscope // UartOscilloscope命名空間
+{ // 進入UartOscilloscope命名空間
+ ///
+ /// CommandParser類別用於建立指令語法分析器
+ ///
+ class CommandParser // CommandParser類別
+ { // 進入CommandParser類別
+
+ ///
+ /// CommandParser建構子
+ ///
+ public CommandParser() // CommandParser建構子
+ { // 進入CommandParser建構子
+
+ } // 結束CommandParser建構子
+ } // 結束CommandParser類別
+} // 結束UartOscilloscope命名空間
\ No newline at end of file
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/ComportList.cs b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/ComportList.cs
new file mode 100644
index 0000000..0430805
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/ComportList.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace UartOscilloscope // UartOscilloscope命名空間
+{ // 進入UartOscilloscope命名空間
+ ///
+ /// ComportList類別單純為一字串陣列容器,可透過UpdateComportList方法新增Comport名稱
+ ///
+ public class ComportList // ComportList類別
+ { // 進入ComportList類別
+ private string[] Name; // 宣告Name字串陣列
+ ///
+ /// ComportList建構子
+ ///
+ ///
+ public ComportList(string[] Name) // ComportList建構子
+ { // 進入ComportList建構子
+ this.Name = Name; // 初始化內部物件
+ } // 結束ComportList建構子
+ ///
+ /// GetComportList方法用於取得Comport列表
+ ///
+ ///
+ public string[] GetComportList() // GetComportList方法
+ { // 進入GetComportList方法
+ return Name; // 回傳Name
+ } // 結束GetComportList方法
+ ///
+ /// UpdateComportList用於更新ComportList內部物件資料
+ ///
+ ///
+ public void UpdateComportList(string[] ComportList) // UpdateComportList方法
+ { // 進入UpdateComportList方法
+ Name = ComportList; // 填入資料
+ } // 結束UpdateComportList方法
+ ///
+ /// 複寫ToString方法,以foreach依序列出comport
+ ///
+ ///
+ public override string ToString() // 覆寫ToString方法
+ { // 進入覆寫ToString方法
+ string OutputString = ""; // 宣告OutputString(輸出字串結果)
+ foreach (string item in Name) // 以foreach依序列出Name內容
+ { // 進入foreach敘述
+ OutputString = OutputString + item + '\n'; // 填入內容至輸出字串
+ } // 結束foreach敘述
+ return OutputString; // 回傳OutputString
+ } // 結束覆寫ToString方法
+
+ ///
+ /// IsComportListNull方法用於檢測ComportList是否為空
+ ///
+ /// 若未偵測到Comport回傳true,否則回傳false
+ public bool IsComportListNull() // IsComportListNull方法
+ { // 進入IsComportListNull方法
+ if(Name.Length == 0) // 若未偵測到Comport
+ { // 進入if敘述
+ return true; // 回傳true
+ } // 結束if敘述
+ else // 若偵測到Comport
+ { // 進入else敘述
+ return false; // 回傳false
+ } // 結束else敘述
+ } // 結束IsComportListNull方法
+ } // 結束ComportList類別
+} // 結束UartOscilloscope命名空間
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataProcessing.cs b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataProcessing.cs
new file mode 100644
index 0000000..1c184c1
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataProcessing.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms; // 使用System.Windows.Forms函式庫
+
+namespace UartOscilloscope // UartOscilloscope命名空間
+{ // 進入命名空間
+ public class DataProcessing // DataProcessing類別
+ { // 進入DataProcessing類別
+ public char[] String2CharArray(string InputData) // String2CharArray方法
+ { // 進入String2CharArray方法
+ char[] OutputData = InputData.ToCharArray(); // 宣告OutputData
+ return OutputData; // 回傳轉換結果
+ } // 結束String2CharArray方法
+ } // 結束DataProcessing類別
+} // 結束命名空間
diff --git a/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataQueue.cs b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataQueue.cs
new file mode 100644
index 0000000..d122482
--- /dev/null
+++ b/VisualStudioProjects/OpenGLTest/UartOscilloscope/CSharpFiles/DataQueue.cs
@@ -0,0 +1,132 @@
+/********************************************************************
+ * Develop by Jimmy Hu *
+ * This program is licensed under the Apache License 2.0. *
+ * DataQueue.cs *
+ * 本檔案建立繪圖資料佇列單元物件 *
+ ********************************************************************
+ */
+
+using System; // Using System library
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace QueueDataGraphic.CSharpFiles
+{ // namespace start, 進入命名空間
+ class DataQueue // DataQueue class, DataQueue類別
+ { // DataQueue class start, 進入DataQueue類別
+ ///
+ /// GraphicData is the queue for storing the graphic data.
+ /// GraphicData佇列用於儲存繪圖資料
+ ///
+ private Queue