├── .vs └── 串口调试助手 │ └── v14 │ └── .suo ├── Interop.Excel.dll ├── Jun.mdb ├── README.md ├── setting.xml ├── 串口调试助手.sln ├── 串口调试助手 ├── App.config ├── Control │ ├── ContentResize.cs │ ├── DrawLine.cs │ ├── ExcelEdit.cs │ ├── MD5.cs │ ├── RSA.cs │ └── Regedit.cs ├── Image │ ├── Serial_Tasks_128px_1190973_easyicon.net.ico │ └── bitbug_favicon (1).ico ├── Model │ ├── Access.cs │ ├── JunDataSet.Designer.cs │ ├── JunDataSet.xsc │ ├── JunDataSet.xsd │ └── JunDataSet.xss ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── View │ ├── AboutForm.Designer.cs │ ├── AboutForm.cs │ ├── AboutForm.resx │ ├── CRCForm.Designer.cs │ ├── CRCForm.cs │ ├── CRCForm.resx │ ├── ChangePWDForm.Designer.cs │ ├── ChangePWDForm.cs │ ├── ChangePWDForm.resx │ ├── DeleteUserForm.Designer.cs │ ├── DeleteUserForm.cs │ ├── DeleteUserForm.resx │ ├── LoginForm.Designer.cs │ ├── LoginForm.cs │ ├── LoginForm.resx │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── PictureForm.Designer.cs │ ├── PictureForm.cs │ ├── PictureForm.resx │ ├── ReadForm.Designer.cs │ ├── ReadForm.cs │ ├── ReadForm.resx │ ├── RegisterForm.Designer.cs │ ├── RegisterForm.cs │ ├── RegisterForm.resx │ ├── searchDataBaseForm.Designer.cs │ ├── searchDataBaseForm.cs │ └── searchDataBaseForm.resx ├── bin │ └── Debug │ │ ├── log.log │ │ ├── school.jpg │ │ ├── 串口调试助手.exe │ │ ├── 串口调试助手.exe.config │ │ ├── 串口调试助手.pdb │ │ ├── 串口调试助手.vshost.exe │ │ └── 串口调试助手.vshost.exe.config ├── obj │ ├── Debug │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── Interop.ADOX.dll │ │ ├── TempPE │ │ │ ├── Control.JunDataSet.Designer.cs.dll │ │ │ ├── JunDataSet.Designer.cs.dll │ │ │ └── Model.JunDataSet.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── 串口调试助手.AboutForm.resources │ │ ├── 串口调试助手.CRCForm.resources │ │ ├── 串口调试助手.ChangePWDForm.resources │ │ ├── 串口调试助手.DeleteUserForm.resources │ │ ├── 串口调试助手.LoginForm.resources │ │ ├── 串口调试助手.MainForm.resources │ │ ├── 串口调试助手.PictureForm.resources │ │ ├── 串口调试助手.Properties.Resources.resources │ │ ├── 串口调试助手.ReadForm.resources │ │ ├── 串口调试助手.RegisterForm.resources │ │ ├── 串口调试助手.csproj.FileListAbsolute.txt │ │ ├── 串口调试助手.csproj.GenerateResource.Cache │ │ ├── 串口调试助手.csproj.ResolveComReference.cache │ │ ├── 串口调试助手.csprojResolveAssemblyReference.cache │ │ ├── 串口调试助手.exe │ │ ├── 串口调试助手.pdb │ │ └── 串口调试助手.searchDataBaseForm.resources │ └── x86 │ │ └── Debug │ │ ├── Interop.ADOX.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── build.force │ │ ├── 串口调试助手.csproj.FileListAbsolute.txt │ │ └── 串口调试助手.csproj.ResolveComReference.cache ├── 串口调试助手.csproj └── 串口调试助手.csproj.user ├── 温度折线图 ├── 20171211123910.jpg ├── 20171211124026.jpg ├── 20171211124033.jpg ├── 20171211124116.jpg ├── 20171211124120.jpg ├── 20171211124129.jpg ├── 20171211124339.jpg ├── 20171211124351.jpg ├── 20171211124355.jpg ├── 20171211124440.jpg ├── 20171211124455.jpg ├── 20171211124550.jpg ├── 20171211124559.jpg ├── 2017121112466.jpg ├── 20171211125314.jpg ├── 20171211125349.jpg ├── 20171211125432.jpg ├── 20171211125524.jpg ├── 20171211125544.jpg ├── 20171211125958.jpg ├── 2017121113031.jpg ├── 2017121113036.jpg ├── 201712111306.jpg ├── 2017121113343.jpg ├── 2017121113428.jpg ├── 2017121113544.jpg ├── 201712111357.jpg ├── 2017121113630.jpg ├── 2017121113637.jpg ├── 2017121113742.jpg ├── 2017121113750.jpg ├── 2017121113754.jpg ├── 201712111381.jpg ├── 2017121113820.jpg ├── 2017121113824.jpg ├── 2017121113829.jpg ├── 2017121113834.jpg └── 201712111393.jpg └── 温度记录文件 ├── 20171211.txt ├── 2018111.txt └── 2018114.txt /.vs/串口调试助手/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/.vs/串口调试助手/v14/.suo -------------------------------------------------------------------------------- /Interop.Excel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/Interop.Excel.dll -------------------------------------------------------------------------------- /Jun.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/Jun.mdb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 软件名称:C-Jun温度监控软件 2 | 3 | 功能: 4 | 5 | 6 | 1、基于微软的.Net技术与串口设备进行通讯,可计算RS485温度传感器的实时温度值。 7 | 8 | 2、可进行用户切换,用户类型有两种,一个“管理员”,一个“一般用户”。 9 | 10 | 3、具有相应窗体,可进行CRC校验。 11 | 12 | 4、有Windows注册表的注册操作,注册表中的密码运用RSA加密算法。 13 | 14 | 5、具有IO文件流的读取和写入操作,最后保存数据为.txt文件。 15 | 16 | 6、利用GDI+技术,制作简易的验证码和类似Excel报表中的温度折线图。     17 | 18 | 7、能够在Access数据库保存用户信息和温度信息,且有温度折线图插入到Access数据库方式。 19 | 20 | 8、用户保存在数据库的密码采用MD5算法。 21 | 22 | 9、能够查询保存在Access数据库的温度信息并且支持保存为Excel文件。 23 | 24 | 10、具有报表格式的基本用法,给用户一种良好查看报表体验。 25 |   26 | 27 | 28 | 版本号:1.0 29 | 30 | -------------------------------------------------------------------------------- /setting.xml: -------------------------------------------------------------------------------- 1 |  2 | <窗口设置> 3 | <端口>COM3 4 | <波特率>9600 5 | <数据位>8 6 | <停止位>1 7 | <接收设置>hex 8 | <发送设置>hex 9 | <自动发送>Y 10 | <自动发送间距>1000 11 | -------------------------------------------------------------------------------- /串口调试助手.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "串口调试助手", "串口调试助手\串口调试助手.csproj", "{B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x86 = Debug|x86 12 | Release|Any CPU = Release|Any CPU 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Debug|x86.ActiveCfg = Debug|x86 19 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Debug|x86.Build.0 = Debug|x86 20 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Release|x86.ActiveCfg = Release|x86 23 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220}.Release|x86.Build.0 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /串口调试助手/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /串口调试助手/Control/ContentResize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Forms; 8 | 9 | namespace 串口调试助手 10 | { 11 | class ContentResize 12 | { 13 | 14 | /// 15 | /// 两个groupBox的居中 16 | /// 17 | /// 子groupBox 18 | /// 父groupBox 19 | public void GroupBoxReSize(GroupBox kidBox, GroupBox FatherBox) 20 | { 21 | kidBox.Left = (FatherBox.Left - kidBox.Left) / 2; 22 | int x = (int)(FatherBox.Width - kidBox.Width) / 2; 23 | int y = kidBox.Location.Y; 24 | kidBox.Location = new Point(x, y); 25 | 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /串口调试助手/Control/DrawLine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Forms; 8 | using System.Drawing.Drawing2D; 9 | 10 | namespace 串口调试助手 11 | { 12 | class DrawLine 13 | { 14 | 15 | public void DrawXY(Graphics panelGraphics,Panel pan, float move ) 16 | { 17 | // float move = 30f; 18 | float newX = pan.Width - move; 19 | float newY = pan.Height - move; 20 | 21 | //画x轴 22 | PointF px1 = new PointF(move, newY); 23 | PointF px2 = new PointF(newX, newY); 24 | panelGraphics.DrawLine(new Pen(Brushes.Black, 2), px1, px2); 25 | 26 | //画y轴 27 | PointF py1 = new PointF(move, move); 28 | PointF py2 = new PointF(move, newY); 29 | panelGraphics.DrawLine(new Pen(Brushes.Black, 2), py1, py2); 30 | 31 | } 32 | /// 33 | /// 画出X轴上的分值线,从零开始 34 | /// 35 | /// 36 | /// 最大的x值 37 | /// 要分成多少段 38 | /// 刻度名 39 | #region 画出X轴上的分值线,从零开始 40 | public void DrawXLine(Graphics panelGraphics, Panel pan, float maxX, int len, float move) 41 | { 42 | //float move = 30f; 43 | 44 | float LenX = pan.Width - 2 * move; 45 | 46 | 47 | for (int i = 1; i <= len; i++) 48 | { 49 | PointF py1 = new PointF(LenX * i / len + move, pan.Height - move - 4); 50 | PointF py2 = new PointF(LenX * i / len + move, pan.Height - move); 51 | string sy = (maxX * i / len).ToString(); 52 | panelGraphics.DrawLine(new Pen(Brushes.Black, 2), py1, py2); 53 | panelGraphics.DrawString(sy, new Font("宋体", 8f), Brushes.Black, new PointF(LenX * i / len + move, pan.Height - move / 1.1f)); 54 | } 55 | 56 | panelGraphics.DrawString("时间/次", new Font("宋体 ", 8f), Brushes.Red, new PointF(pan.Width - move*1.5f, pan.Height - move / 1.5f)); 57 | } 58 | #endregion 59 | 60 | /// 61 | /// 画出Y轴上的分值线,从零开始 62 | /// 63 | /// 64 | /// 65 | /// 66 | #region 画出Y轴上的分值线,从零开始 67 | public void DrawYLine(Graphics panelGraphics, Panel pan, float maxY, int len, float move) 68 | { 69 | // float move = 30f; 70 | float LenY = pan.Height - 2 * move; 71 | for (int i = 0; i <= len; i++) //len等份Y轴 72 | { 73 | PointF px1 = new PointF(move, LenY * i / len + move); 74 | PointF px2 = new PointF(move + 4, LenY * i / len + move); 75 | string sx = (maxY - maxY * i / len).ToString(); 76 | panelGraphics.DrawLine(new Pen(Brushes.Black, 2), px1, px2); 77 | StringFormat drawFormat = new StringFormat(); 78 | drawFormat.Alignment = StringAlignment.Far; 79 | drawFormat.LineAlignment = StringAlignment.Center; 80 | panelGraphics.DrawString(sx, new Font("宋体", 8f), Brushes.Black, new PointF(move / 1.2f, LenY * i / len + move * 1.1f), drawFormat); 81 | } 82 | panelGraphics.DrawString("温度", new Font("宋体 ", 8f), Brushes.Red, new PointF(move / 3, move / 3f)); 83 | } 84 | #endregion 85 | 86 | 87 | /// 88 | /// 画出Y轴上的分值线,从任意值开始 89 | /// 90 | /// 91 | /// 92 | /// 93 | /// 94 | #region 画出Y轴上的分值线,从任意值开始 95 | public void DrawYLine(Graphics panelGraphics, Panel pan, float minY, float maxY, int len , float move) 96 | { 97 | //float move = 30f; 98 | float LenY = pan.Height - 2 * move; 99 | for (int i = 0; i <= len; i++) //len等份Y轴 100 | { 101 | PointF px1 = new PointF(move, LenY * i / len + move); 102 | PointF px2 = new PointF(move + 4, LenY * i / len + move); 103 | string sx = (maxY - (maxY - minY) * i / len).ToString(); 104 | panelGraphics.DrawLine(new Pen(Brushes.Black, 2), px1, px2); 105 | StringFormat drawFormat = new StringFormat(); 106 | drawFormat.Alignment = StringAlignment.Far; 107 | drawFormat.LineAlignment = StringAlignment.Center; 108 | panelGraphics.DrawString(sx, new Font("宋体", 8f), Brushes.Black, new PointF(move / 1.2f, LenY * i / len + move * 1.1f), drawFormat); 109 | } 110 | Pen pen = new Pen(Color.Black, 1); 111 | panelGraphics.DrawString("温度/℃", new Font("宋体 ", 8f), Brushes.Red, new PointF(move / 3, move / 3f)); 112 | } 113 | #endregion 114 | 115 | 116 | /// 117 | /// 两点画线,有警报温度 118 | /// 119 | /// 120 | /// 121 | /// 122 | /// 123 | /// 124 | public void Drawline(Graphics panelGraphics, PointF pointF1, PointF pointF2 , Pen pen, float alarmY) 125 | { 126 | 127 | Pen pen2 = new Pen(Brushes.Red, 2); 128 | 129 | if (pointF2.Y < alarmY) 130 | panelGraphics.DrawLine(pen2, pointF1, pointF2); 131 | else 132 | panelGraphics.DrawLine(pen, pointF1, pointF2); 133 | 134 | } 135 | 136 | /// 137 | /// 两点画线,无警报温度 138 | /// 139 | /// 140 | /// 141 | /// 142 | /// 143 | public void Drawline(Graphics panelGraphics, PointF pointF1, PointF pointF2, Pen pen) 144 | { 145 | panelGraphics.DrawLine(pen, pointF1, pointF2); 146 | } 147 | 148 | public void DrawFillEllipse(Graphics panelGraphics, PointF pointF) 149 | { 150 | Pen pen = new Pen(Brushes.Red); 151 | panelGraphics.FillEllipse(Brushes.Red, new RectangleF(pointF.X - 4, pointF.Y - 1, 6, 6)); 152 | 153 | } 154 | 155 | public void DrawTextBox(Graphics panelGraphics, string text, PointF pointF) 156 | { 157 | TextBox textBox = new TextBox(); 158 | textBox.Text = text; 159 | textBox.Visible = true; 160 | panelGraphics.DrawString(text, new Font("微软雅黑", 8), Brushes.Black, pointF); 161 | } 162 | 163 | 164 | public void DrawPath(Graphics panelGraphics, PointF pointF1, PointF pointF2) 165 | { 166 | Pen pen = new Pen(Brushes.Red); 167 | GraphicsPath path = new GraphicsPath(); 168 | path.AddLine(pointF1,pointF2); 169 | panelGraphics.DrawPath(pen, path); 170 | } 171 | 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /串口调试助手/Control/ExcelEdit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Reflection; 7 | using Microsoft.Office.Interop.Excel; 8 | using Excel = Microsoft.Office.Interop.Excel; 9 | using System.ComponentModel; 10 | 11 | namespace 串口调试助手 12 | { 13 | class ExcelEdit 14 | { 15 | public string fileName; 16 | private Excel.Application app; 17 | private Excel.Workbooks wbooks; 18 | private Excel.Workbook wbook; 19 | private Excel._Worksheet wsheet; 20 | 21 | private Excel.Range range; 22 | 23 | private int rowCount; 24 | private int colCount; 25 | 26 | public ExcelEdit( string fileRoad) 27 | { 28 | app = new Excel.Application(); 29 | 30 | app.Visible = false; 31 | 32 | wbook = app.Workbooks.Add(1); 33 | wsheet = (Excel.Worksheet)wbook.Sheets[1]; 34 | wsheet.Cells.Select(); 35 | wsheet.Cells.Columns.AutoFit(); 36 | 37 | 38 | wbook.SaveAs(fileRoad, Excel.XlSaveAsAccessMode.xlNoChange); 39 | 40 | // wbook = app.Workbooks.Open(fileRoad); 41 | 42 | // wbook = app.Workbooks.Open(fileRoad, 0, false, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", true, false, 0, true, 1, 0); 43 | 44 | range = wsheet.UsedRange; 45 | rowCount = range.Rows.Count; 46 | colCount = range.Columns.Count; 47 | 48 | 49 | } 50 | 51 | 52 | /// 53 | /// 查询excel表格数据 54 | /// 55 | //public void SearchExcel() 56 | // { 57 | //for (int i = 1; i <= rowCount; i++) 58 | //{ 59 | // for (int j = 1; j <= colCount; j++) 60 | // { 61 | // if (j == 1) 62 | // Console.Write("\r\n"); 63 | // if (range.Cells[i, j] != null && range.Cells[i, j].Value2 != null) 64 | // { 65 | // Console.Write(range.Cells[i, j].Value2.ToString() + '\t'); 66 | // } 67 | // } 68 | //} 69 | 70 | //GC.Collect(); 71 | //GC.WaitForPendingFinalizers(); 72 | 73 | // } 74 | 75 | 76 | /// 77 | /// 添加excel表格数据 78 | /// 79 | public void AddData(string[] data) 80 | { 81 | int count = data.Length; 82 | // rowCount += 1; 83 | 84 | for (int i = 1; i <= count; i++) 85 | { 86 | wsheet.Cells[rowCount, i] = data[i - 1]; 87 | } 88 | wbook.Save(); 89 | rowCount += 1; 90 | colCount = count; 91 | } 92 | 93 | 94 | /// 95 | /// 在某一列加上按照列来加上数据 96 | /// 97 | /// 98 | /// 99 | public void AddData2(string[] data) 100 | { 101 | colCount++; 102 | 103 | int count = data.Length; 104 | 105 | for (int i = 1; i <= count; i++) 106 | { 107 | wsheet.Cells[ i,colCount] = data[i - 1]; 108 | } 109 | wbook.Save(); 110 | } 111 | 112 | /// 113 | /// 单元表格的格式 114 | /// 115 | public void Format() 116 | { 117 | 118 | int count = colCount; 119 | //range.ColumnWidth = 100; 120 | 121 | Excel.Range range1 = (Range)wsheet.get_Range("A1","E1"); 122 | range1.ColumnWidth = 20; 123 | 124 | //Excel.Range range2 = (Range)wsheet.get_Range("A1","E16"); 125 | Excel.Range range2 = (Range)app.Range[wsheet.Cells[1, 1], wsheet.Cells[rowCount, colCount]]; 126 | range2.ColumnWidth = 20; 127 | range2.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter; //垂直居中 128 | range2.VerticalAlignment = Excel.XlHAlign.xlHAlignCenter; //水平居中 129 | } 130 | 131 | 132 | public void Creat() 133 | { 134 | app = new Excel.Application(); 135 | wbooks = app.Workbooks; 136 | wbook = wbooks.Add(true); 137 | } 138 | 139 | /// 140 | /// 打开一个Excel文件 141 | /// 142 | /// excel文件名,包括文件路径 143 | public void Open(string FileName) 144 | { 145 | object missing = System.Reflection.Missing.Value; 146 | app = new Application(); 147 | wbooks = app.Workbooks; 148 | wbook = wbooks.Add(FileName); 149 | wbook = wbooks.Open(FileName, missing, true, missing, missing, missing, missing, missing, missing, true, missing, missing, missing, missing, missing); 150 | fileName = FileName; 151 | } 152 | 153 | /// 154 | /// 获取一个工作表 155 | /// 156 | /// 工作表名称 157 | /// 158 | public Worksheet GetSheet(string SheetName) 159 | { 160 | Worksheet s = (Worksheet)wbook.Worksheets[SheetName]; 161 | return s; 162 | } 163 | 164 | /// 165 | /// 添加一个工作表 166 | /// 167 | /// 工作表名称 168 | /// 169 | public Worksheet AddSheet(string SheetName) 170 | { 171 | Worksheet s = (Worksheet)wbook.Worksheets.Add(Type.Missing, Type.Missing, Type.Missing, Type.Missing); 172 | s.Name = SheetName; 173 | return s; 174 | } 175 | 176 | /// 177 | /// 设置单元格的值 178 | /// 179 | /// 工作表 180 | /// 行标 181 | /// 列标 182 | /// 数据 183 | public void SetCellValue(Worksheet ws, int x, int y, object value) 184 | { 185 | ws.Cells[x, y] = value; 186 | } 187 | 188 | /// 189 | /// 设置单元格的值 190 | /// 191 | /// 工作表名称 192 | /// 行标 193 | /// 列标 194 | /// 数据 195 | public void SetCellValue(string ws, int x, int y, object value) 196 | { 197 | GetSheet(ws).Cells[x, y] = value; 198 | } 199 | 200 | 201 | /// 202 | /// 将内存中数据表格插入到Excel指定工作表的指定位置 203 | /// 204 | /// 数据表 205 | /// 工作表名称 206 | /// 起始行标 207 | /// 起始列标 208 | public void InsertTable(System.Data.DataTable dt, Worksheet ws, int startX, int startY) 209 | { 210 | for (int i = 0; i <= dt.Rows.Count - 1; i++) 211 | { 212 | for (int j = 0; j <= dt.Columns.Count - 1; j++) 213 | { 214 | ws.Cells[startX + i, j + startY] = dt.Rows[i][j]; 215 | } 216 | } 217 | } 218 | 219 | /// 220 | /// 保存文档 221 | /// 222 | /// 223 | //public bool Save() 224 | //{ 225 | // if (fileName == "") 226 | // { 227 | // return false; 228 | // } 229 | // else 230 | // { 231 | // try 232 | // { 233 | // wbook.Save(); 234 | // return true; 235 | // } 236 | // catch (Exception ex) 237 | // { 238 | // Console.WriteLine("error from Save: "+ex); 239 | // return false; 240 | // } 241 | // } 242 | //} 243 | 244 | /// 245 | /// 文档另存为 246 | /// 247 | /// 文件名(包含路径) 248 | /// 249 | public bool SaveAs(object FileName) 250 | { 251 | try 252 | { 253 | wbook.SaveAs(FileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); 254 | return true; 255 | } 256 | catch (Exception ex) 257 | { 258 | Console.WriteLine("error from SaveAs: " + ex); 259 | return false; 260 | } 261 | } 262 | 263 | /// 264 | /// 关闭一个Excel对象,销毁对象 265 | /// 266 | public void Close() 267 | { 268 | //wbook.Close(Type.Missing, Type.Missing, Type.Missing); 269 | wbook.Close(true); 270 | app.Quit(); 271 | wbook = null; 272 | 273 | app = null; 274 | GC.Collect(); 275 | } 276 | 277 | /// 278 | /// 析构函数 279 | /// 280 | ~ExcelEdit() 281 | { 282 | GC.Collect(); 283 | Console.WriteLine("ExcelEdit 析构函数被调用!"); 284 | } 285 | } 286 | 287 | } 288 | -------------------------------------------------------------------------------- /串口调试助手/Control/MD5.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Security.Cryptography; //MD5需要的引用 7 | 8 | namespace 串口调试助手 9 | { 10 | class Md5 11 | { 12 | private MD5 md5; 13 | 14 | public Md5() 15 | { 16 | md5 = new MD5CryptoServiceProvider(); 17 | 18 | } 19 | 20 | /// 21 | /// MD5不可逆的加密 22 | /// 23 | /// 24 | /// 25 | public string MD5Encryption(string input) 26 | { 27 | string output = null; 28 | byte[] inputByte = Encoding.Default.GetBytes(input); 29 | byte[] outputByte = md5.ComputeHash(inputByte); 30 | 31 | for(int i=0;i 16 | /// 使用”RSA“加密 17 | /// 18 | /// 19 | /// 20 | public string Encryption(string express) 21 | { 22 | CspParameters param = new CspParameters(); //CspParameters: 包含传递给执行加密计算的加密服务提供程序(CSP) 的参数 23 | param.KeyContainerName = "JunKey"; //密钥容器的名称,保持加密解密一致才能解密成功 24 | using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(param)) 25 | { 26 | byte[] plainData = Encoding.Default.GetBytes(express); //将要加密的字符串转换为字节数组 27 | byte[] encryptData = rsa.Encrypt(plainData, false);//将加密后的字节数据转换为新的加密字节数组 28 | return Convert.ToBase64String(encryptData); //将加密后的字节数组转换为字符串 29 | } 30 | } 31 | 32 | /// 33 | /// 34 | /// 35 | public string Decrypt(string ciphertext) 36 | { 37 | /// 使用”RSA“解密 38 | /// 39 | CspParameters param = new CspParameters(); 40 | param.KeyContainerName = "JunKey"; //密钥容器的名称,保持加密解密一致才能解密成功 41 | using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(param)) 42 | { 43 | byte[] encrytData = Convert.FromBase64String(ciphertext); 44 | byte[] decryptData = rsa.Decrypt(encrytData, false); 45 | return Encoding.Default.GetString(decryptData); 46 | } 47 | } 48 | 49 | 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /串口调试助手/Control/Regedit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Win32; 7 | using System.Windows.Forms; 8 | 9 | namespace 串口调试助手 10 | { 11 | public class Regedit 12 | { 13 | private RegistryKey softWare;//注册表类型变量 14 | private string[] sValueNameColl; //键值表项 15 | private string[] sKeyNameColl; //注册表项 16 | 17 | private RSA ras = new RSA(); // 这是我整合的 RSA 常用的方法的一个类 18 | 19 | /// 20 | /// 构造函数 21 | /// 22 | /// 判断哪里添加注册表 23 | /// 注册表的软件名称 24 | public Regedit(RegistryKey registry, string subKey) 25 | { 26 | this.softWare = registry.CreateSubKey(subKey); //创建一个新子项或打开一个现有子项以进行写访问。 27 | // this.softWare = registry.OpenSubKey(subKey,true); //需要加上true才能对键值进行写操作,否则默认是读操作 28 | 29 | sKeyNameColl = softWare.GetValueNames(); 30 | sValueNameColl = softWare.GetValueNames(); //获取JUN-SerialPort所有子项 31 | } 32 | 33 | /// 34 | /// 判断注册表是否存在 35 | /// 36 | /// 37 | /// 38 | public bool isRegistryKeyExit(string sKeyName) 39 | { 40 | foreach (string sName in sKeyNameColl) 41 | { 42 | if (sName == sKeyName) 43 | { 44 | return true; 45 | } 46 | } 47 | return false; 48 | } 49 | 50 | /// 51 | /// 判断键值是否存在 52 | /// 53 | /// 注册表名 54 | /// 返回键值的值 55 | /// 56 | public bool isRegistryValueNameExist(string sValueName, ref string value) 57 | { 58 | foreach (string sName in sValueNameColl) 59 | { 60 | if (sName == sValueName) //如果键匹配了 61 | { 62 | value = ras.Decrypt(Convert.ToString(softWare.GetValue(sName)));//那就将该键的值,即密码,进行RSA解密 63 | return true; 64 | } 65 | } 66 | return false; 67 | } 68 | 69 | /// 70 | /// 判断键值是否存在 71 | /// 72 | /// 注册表名 73 | /// 74 | public bool isRegistryValueNameExist(string sValueName) 75 | { 76 | foreach (string sName in sValueNameColl) 77 | { 78 | if (sName == sValueName) 79 | { 80 | return true; 81 | } 82 | } 83 | return false; 84 | } 85 | 86 | 87 | /// 88 | /// 在注册表里添加键值 89 | /// 90 | /// 91 | /// 92 | /// 93 | public void SetValue(string name,string value, Microsoft.Win32.RegistryValueKind valueKind) 94 | { 95 | try 96 | { 97 | softWare.SetValue(name, value, valueKind); 98 | } 99 | catch(Exception ex) 100 | { 101 | MessageBox.Show("出现异常:"+ex); 102 | } 103 | } 104 | 105 | /// 106 | /// 返回所有键值 107 | /// 108 | /// 109 | public string[] GetKeyNames() 110 | { 111 | return sValueNameColl; 112 | } 113 | 114 | 115 | /// 116 | /// 删除注册表键值 117 | /// 118 | /// 键值 119 | /// 120 | public bool DeleteKey(string keyName) 121 | { 122 | if (sValueNameColl.Length > 0) 123 | { 124 | softWare.DeleteValue(keyName); //只需要删除其中的键,那么键和值都会被删除 125 | return true; 126 | } 127 | else 128 | return false; 129 | } 130 | 131 | /// 132 | /// 注册表关闭 133 | /// 134 | ~Regedit() 135 | { 136 | softWare.Close(); 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /串口调试助手/Image/Serial_Tasks_128px_1190973_easyicon.net.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/Image/Serial_Tasks_128px_1190973_easyicon.net.ico -------------------------------------------------------------------------------- /串口调试助手/Image/bitbug_favicon (1).ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/Image/bitbug_favicon (1).ico -------------------------------------------------------------------------------- /串口调试助手/Model/JunDataSet.xsc: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /串口调试助手/Model/JunDataSet.xss: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /串口调试助手/Program.cs: -------------------------------------------------------------------------------- 1 |  using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace 串口调试助手 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// 应用程序的主入口点。 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /串口调试助手/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("串口调试助手")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("串口调试助手")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | //将 ComVisible 设置为 false 将使此程序集中的类型 18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("b625acbc-fc3b-4bfb-b0f8-9e74175ab220")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /串口调试助手/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace 串口调试助手.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("串口调试助手.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 覆盖当前线程的 CurrentUICulture 属性 56 | /// 使用此强类型的资源类的资源查找。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /串口调试助手/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /串口调试助手/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace 串口调试助手.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] 29 | [global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\Jun.mdb")] 30 | public string JunConnectionString { 31 | get { 32 | return ((string)(this["JunConnectionString"])); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /串口调试助手/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Jun.mdb</ConnectionString> 9 | <ProviderName>System.Data.OleDb</ProviderName> 10 | </SerializableConnectionString> 11 | Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Jun.mdb 12 | 13 | 14 | -------------------------------------------------------------------------------- /串口调试助手/View/AboutForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class AboutForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.linkLabel1 = new System.Windows.Forms.LinkLabel(); 35 | this.SuspendLayout(); 36 | // 37 | // label1 38 | // 39 | this.label1.AutoSize = true; 40 | this.label1.Location = new System.Drawing.Point(115, 100); 41 | this.label1.Name = "label1"; 42 | this.label1.Size = new System.Drawing.Size(0, 15); 43 | this.label1.TabIndex = 0; 44 | this.label1.UseMnemonic = false; 45 | // 46 | // label2 47 | // 48 | this.label2.AutoSize = true; 49 | this.label2.BackColor = System.Drawing.Color.Transparent; 50 | this.label2.Font = new System.Drawing.Font("幼圆", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 51 | this.label2.ForeColor = System.Drawing.Color.White; 52 | this.label2.Location = new System.Drawing.Point(12, 9); 53 | this.label2.Name = "label2"; 54 | this.label2.Size = new System.Drawing.Size(859, 323); 55 | this.label2.TabIndex = 3; 56 | this.label2.Text = resources.GetString("label2.Text"); 57 | this.label2.Click += new System.EventHandler(this.label2_Click); 58 | // 59 | // linkLabel1 60 | // 61 | this.linkLabel1.AutoSize = true; 62 | this.linkLabel1.LinkColor = System.Drawing.Color.White; 63 | this.linkLabel1.Location = new System.Drawing.Point(143, 317); 64 | this.linkLabel1.Name = "linkLabel1"; 65 | this.linkLabel1.Size = new System.Drawing.Size(423, 15); 66 | this.linkLabel1.TabIndex = 4; 67 | this.linkLabel1.TabStop = true; 68 | this.linkLabel1.Text = "https://github.com/JunStitch/SerialPort_experience10"; 69 | this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); 70 | // 71 | // AboutForm 72 | // 73 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 74 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 75 | this.ClientSize = new System.Drawing.Size(885, 571); 76 | this.Controls.Add(this.linkLabel1); 77 | this.Controls.Add(this.label2); 78 | this.Controls.Add(this.label1); 79 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 80 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 81 | this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 82 | this.MaximizeBox = false; 83 | this.MinimizeBox = false; 84 | this.Name = "AboutForm"; 85 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 86 | this.Text = "关于"; 87 | this.Paint += new System.Windows.Forms.PaintEventHandler(this.AboutForm_Paint); 88 | this.ResumeLayout(false); 89 | this.PerformLayout(); 90 | 91 | } 92 | 93 | #endregion 94 | 95 | private System.Windows.Forms.Label label1; 96 | private System.Windows.Forms.Label label2; 97 | private System.Windows.Forms.LinkLabel linkLabel1; 98 | } 99 | } -------------------------------------------------------------------------------- /串口调试助手/View/AboutForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace 串口调试助手 12 | { 13 | public partial class AboutForm : Form 14 | { 15 | public AboutForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | /// 21 | /// “关于”窗体,加载背景图片 22 | /// 23 | /// 24 | /// 25 | private void AboutForm_Paint(object sender, PaintEventArgs e) 26 | { 27 | //Image img = Image.FromFile(@"C:\Users\陈俊杰\Desktop\串口调试助手1\school.jpg"); 28 | //Bitmap bitmap = new Bitmap(img); 29 | //int height = bitmap.Height; 30 | //int width = bitmap.Width; 31 | 32 | //Bitmap tempb = new Bitmap(bitmap, width / 1.5, height / 1.5); //目标图 33 | //tempb.Save(@"C:\Users\陈俊杰\Desktop\串口调试助手1\temp.jpg"); 34 | 35 | Image shcoolImg = Image.FromFile("school.jpg"); 36 | 37 | Graphics g = e.Graphics; 38 | g.DrawImage(shcoolImg, new Point(0, 0));//point: System.Drawing.Point 结构,它表示所绘制图像的左上角的位置。 39 | g.Dispose(); 40 | 41 | 42 | } 43 | 44 | private void label2_Click(object sender, EventArgs e) 45 | { 46 | 47 | } 48 | 49 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 50 | { 51 | System.Diagnostics.Process.Start(linkLabel1.Text); //在控件LinkClicked事件中编写如下代码实现内容中的网址单击后可以访问网址 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /串口调试助手/View/CRCForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class CRCForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CRCForm)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.textBox2 = new System.Windows.Forms.TextBox(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.button1 = new System.Windows.Forms.Button(); 36 | this.textBox1 = new System.Windows.Forms.TextBox(); 37 | this.label1 = new System.Windows.Forms.Label(); 38 | this.groupBox1.SuspendLayout(); 39 | this.SuspendLayout(); 40 | // 41 | // groupBox1 42 | // 43 | this.groupBox1.Controls.Add(this.textBox2); 44 | this.groupBox1.Controls.Add(this.label2); 45 | this.groupBox1.Controls.Add(this.button1); 46 | this.groupBox1.Controls.Add(this.textBox1); 47 | this.groupBox1.Controls.Add(this.label1); 48 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; 49 | this.groupBox1.Location = new System.Drawing.Point(0, 0); 50 | this.groupBox1.Name = "groupBox1"; 51 | this.groupBox1.Size = new System.Drawing.Size(413, 274); 52 | this.groupBox1.TabIndex = 10; 53 | this.groupBox1.TabStop = false; 54 | // 55 | // textBox2 56 | // 57 | this.textBox2.Location = new System.Drawing.Point(151, 110); 58 | this.textBox2.Name = "textBox2"; 59 | this.textBox2.Size = new System.Drawing.Size(206, 25); 60 | this.textBox2.TabIndex = 14; 61 | // 62 | // label2 63 | // 64 | this.label2.AutoSize = true; 65 | this.label2.Location = new System.Drawing.Point(71, 113); 66 | this.label2.Name = "label2"; 67 | this.label2.Size = new System.Drawing.Size(76, 15); 68 | this.label2.TabIndex = 13; 69 | this.label2.Text = "CRC校验码"; 70 | // 71 | // button1 72 | // 73 | this.button1.Location = new System.Drawing.Point(151, 159); 74 | this.button1.Name = "button1"; 75 | this.button1.Size = new System.Drawing.Size(114, 41); 76 | this.button1.TabIndex = 12; 77 | this.button1.Text = "点击校验"; 78 | this.button1.UseVisualStyleBackColor = true; 79 | this.button1.Click += new System.EventHandler(this.button1_Click); 80 | // 81 | // textBox1 82 | // 83 | this.textBox1.Location = new System.Drawing.Point(151, 64); 84 | this.textBox1.Name = "textBox1"; 85 | this.textBox1.Size = new System.Drawing.Size(206, 25); 86 | this.textBox1.TabIndex = 11; 87 | // 88 | // label1 89 | // 90 | this.label1.AutoSize = true; 91 | this.label1.Location = new System.Drawing.Point(71, 74); 92 | this.label1.Name = "label1"; 93 | this.label1.Size = new System.Drawing.Size(37, 15); 94 | this.label1.TabIndex = 10; 95 | this.label1.Text = "指令"; 96 | // 97 | // CRCForm 98 | // 99 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 100 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 101 | this.ClientSize = new System.Drawing.Size(413, 274); 102 | this.Controls.Add(this.groupBox1); 103 | this.ForeColor = System.Drawing.SystemColors.ControlText; 104 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 105 | this.MaximizeBox = false; 106 | this.MinimizeBox = false; 107 | this.Name = "CRCForm"; 108 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 109 | this.Text = " CRC校验"; 110 | this.groupBox1.ResumeLayout(false); 111 | this.groupBox1.PerformLayout(); 112 | this.ResumeLayout(false); 113 | 114 | } 115 | 116 | #endregion 117 | 118 | private System.Windows.Forms.GroupBox groupBox1; 119 | private System.Windows.Forms.TextBox textBox2; 120 | private System.Windows.Forms.Label label2; 121 | private System.Windows.Forms.Button button1; 122 | private System.Windows.Forms.TextBox textBox1; 123 | private System.Windows.Forms.Label label1; 124 | } 125 | } -------------------------------------------------------------------------------- /串口调试助手/View/CRCForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace 串口调试助手 12 | { 13 | public partial class CRCForm : Form 14 | { 15 | public CRCForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void button1_Click(object sender, EventArgs e) 21 | { 22 | string expression = this.textBox1.Text.Trim(); 23 | this.textBox2.Text = this.CRCCalc(expression).ToString(); 24 | } 25 | 26 | public string CRCCalc(string data) //CRC检验算法 27 | { 28 | string[] datas = data.Split(' '); 29 | List bytedata = new List(); 30 | 31 | foreach (string str in datas) 32 | { 33 | bytedata.Add(byte.Parse(str, System.Globalization.NumberStyles.AllowHexSpecifier)); 34 | } 35 | byte[] crcbuf = bytedata.ToArray(); 36 | //计算并填写CRC校验码 37 | int crc = 0xffff; 38 | int len = crcbuf.Length; 39 | for (int n = 0; n < len; n++) 40 | { 41 | byte i; 42 | crc = crc ^ crcbuf[n]; 43 | for (i = 0; i < 8; i++) 44 | { 45 | int TT; 46 | TT = crc & 1; 47 | crc = crc >> 1; 48 | crc = crc & 0x7fff; 49 | if (TT == 1) 50 | { 51 | crc = crc ^ 0xa001; 52 | } 53 | crc = crc & 0xffff; 54 | } 55 | } 56 | string[] redata = new string[2]; 57 | redata[1] = Convert.ToString((byte)((crc >> 8) & 0xff), 16); 58 | redata[0] = Convert.ToString((byte)((crc & 0xff)), 16); 59 | if (redata[1].Length < 2) 60 | redata[1] = "0" + redata[1]; 61 | if (redata[0].Length < 2) 62 | redata[0] = "0" + redata[0]; 63 | 64 | return redata[0] + " " + redata[1]; 65 | } 66 | 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /串口调试助手/View/ChangePWDForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class ChangePWDForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangePWDForm)); 32 | this.oldPWDTextbox = new System.Windows.Forms.TextBox(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.newPWDTextBox = new System.Windows.Forms.TextBox(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.newPWDTextBox2 = new System.Windows.Forms.TextBox(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.changeButton = new System.Windows.Forms.Button(); 39 | this.cancelButton = new System.Windows.Forms.Button(); 40 | this.label4 = new System.Windows.Forms.Label(); 41 | this.userNameTextbox = new System.Windows.Forms.TextBox(); 42 | this.SuspendLayout(); 43 | // 44 | // oldPWDTextbox 45 | // 46 | this.oldPWDTextbox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 47 | this.oldPWDTextbox.Location = new System.Drawing.Point(202, 89); 48 | this.oldPWDTextbox.Multiline = true; 49 | this.oldPWDTextbox.Name = "oldPWDTextbox"; 50 | this.oldPWDTextbox.PasswordChar = '*'; 51 | this.oldPWDTextbox.Size = new System.Drawing.Size(143, 34); 52 | this.oldPWDTextbox.TabIndex = 4; 53 | // 54 | // label1 55 | // 56 | this.label1.AutoSize = true; 57 | this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 58 | this.label1.Location = new System.Drawing.Point(114, 94); 59 | this.label1.Name = "label1"; 60 | this.label1.Size = new System.Drawing.Size(89, 20); 61 | this.label1.TabIndex = 3; 62 | this.label1.Text = "原密码:"; 63 | // 64 | // newPWDTextBox 65 | // 66 | this.newPWDTextBox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 67 | this.newPWDTextBox.Location = new System.Drawing.Point(202, 161); 68 | this.newPWDTextBox.Multiline = true; 69 | this.newPWDTextBox.Name = "newPWDTextBox"; 70 | this.newPWDTextBox.PasswordChar = '*'; 71 | this.newPWDTextBox.Size = new System.Drawing.Size(143, 34); 72 | this.newPWDTextBox.TabIndex = 6; 73 | // 74 | // label2 75 | // 76 | this.label2.AutoSize = true; 77 | this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 78 | this.label2.Location = new System.Drawing.Point(114, 166); 79 | this.label2.Name = "label2"; 80 | this.label2.Size = new System.Drawing.Size(89, 20); 81 | this.label2.TabIndex = 5; 82 | this.label2.Text = "新密码:"; 83 | // 84 | // newPWDTextBox2 85 | // 86 | this.newPWDTextBox2.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 87 | this.newPWDTextBox2.Location = new System.Drawing.Point(202, 235); 88 | this.newPWDTextBox2.Multiline = true; 89 | this.newPWDTextBox2.Name = "newPWDTextBox2"; 90 | this.newPWDTextBox2.PasswordChar = '*'; 91 | this.newPWDTextBox2.Size = new System.Drawing.Size(143, 34); 92 | this.newPWDTextBox2.TabIndex = 8; 93 | // 94 | // label3 95 | // 96 | this.label3.AutoSize = true; 97 | this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 98 | this.label3.Location = new System.Drawing.Point(94, 238); 99 | this.label3.Name = "label3"; 100 | this.label3.Size = new System.Drawing.Size(109, 20); 101 | this.label3.TabIndex = 7; 102 | this.label3.Text = "确认密码:"; 103 | // 104 | // changeButton 105 | // 106 | this.changeButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 107 | this.changeButton.Location = new System.Drawing.Point(110, 327); 108 | this.changeButton.Name = "changeButton"; 109 | this.changeButton.Size = new System.Drawing.Size(85, 44); 110 | this.changeButton.TabIndex = 10; 111 | this.changeButton.Text = "修改"; 112 | this.changeButton.UseVisualStyleBackColor = true; 113 | this.changeButton.Click += new System.EventHandler(this.changeButton_Click); 114 | // 115 | // cancelButton 116 | // 117 | this.cancelButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 118 | this.cancelButton.Location = new System.Drawing.Point(260, 327); 119 | this.cancelButton.Name = "cancelButton"; 120 | this.cancelButton.Size = new System.Drawing.Size(85, 44); 121 | this.cancelButton.TabIndex = 11; 122 | this.cancelButton.Text = "取消"; 123 | this.cancelButton.UseVisualStyleBackColor = true; 124 | this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); 125 | // 126 | // label4 127 | // 128 | this.label4.AutoSize = true; 129 | this.label4.Font = new System.Drawing.Font("幼圆", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 130 | this.label4.Location = new System.Drawing.Point(12, 9); 131 | this.label4.Name = "label4"; 132 | this.label4.Size = new System.Drawing.Size(89, 20); 133 | this.label4.TabIndex = 12; 134 | this.label4.Text = "密码修改"; 135 | // 136 | // userNameTextbox 137 | // 138 | this.userNameTextbox.BorderStyle = System.Windows.Forms.BorderStyle.None; 139 | this.userNameTextbox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 140 | this.userNameTextbox.ForeColor = System.Drawing.SystemColors.MenuHighlight; 141 | this.userNameTextbox.Location = new System.Drawing.Point(29, 41); 142 | this.userNameTextbox.Name = "userNameTextbox"; 143 | this.userNameTextbox.ReadOnly = true; 144 | this.userNameTextbox.Size = new System.Drawing.Size(100, 20); 145 | this.userNameTextbox.TabIndex = 13; 146 | this.userNameTextbox.Text = "userName"; 147 | // 148 | // ChangePWDForm 149 | // 150 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 151 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 152 | this.ClientSize = new System.Drawing.Size(470, 413); 153 | this.Controls.Add(this.userNameTextbox); 154 | this.Controls.Add(this.label4); 155 | this.Controls.Add(this.cancelButton); 156 | this.Controls.Add(this.changeButton); 157 | this.Controls.Add(this.newPWDTextBox2); 158 | this.Controls.Add(this.label3); 159 | this.Controls.Add(this.newPWDTextBox); 160 | this.Controls.Add(this.label2); 161 | this.Controls.Add(this.oldPWDTextbox); 162 | this.Controls.Add(this.label1); 163 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 164 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 165 | this.MaximizeBox = false; 166 | this.MinimizeBox = false; 167 | this.Name = "ChangePWDForm"; 168 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 169 | this.Text = " 修改密码窗体"; 170 | this.Load += new System.EventHandler(this.ChangePWDForm_Load); 171 | this.ResumeLayout(false); 172 | this.PerformLayout(); 173 | 174 | } 175 | 176 | #endregion 177 | 178 | public System.Windows.Forms.TextBox oldPWDTextbox; 179 | private System.Windows.Forms.Label label1; 180 | public System.Windows.Forms.TextBox newPWDTextBox; 181 | private System.Windows.Forms.Label label2; 182 | public System.Windows.Forms.TextBox newPWDTextBox2; 183 | private System.Windows.Forms.Label label3; 184 | private System.Windows.Forms.Button changeButton; 185 | private System.Windows.Forms.Button cancelButton; 186 | private System.Windows.Forms.Label label4; 187 | private System.Windows.Forms.TextBox userNameTextbox; 188 | } 189 | } -------------------------------------------------------------------------------- /串口调试助手/View/ChangePWDForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using Microsoft.Win32; //这个命名空间包含了注册表相关的类,registry类、registryKey 11 | using System.Security; 12 | using System.Security.Cryptography; 13 | 14 | namespace 串口调试助手 15 | { 16 | public partial class ChangePWDForm : Form 17 | { 18 | private RSA ras; 19 | private Regedit registry; 20 | private Regedit adminRegistry; 21 | private Regedit userRegistry; 22 | 23 | private Md5 md5 = new Md5(); 24 | 25 | 26 | public ChangePWDForm() 27 | { 28 | InitializeComponent(); 29 | 30 | } 31 | 32 | /// 33 | /// “修改密码”窗体加载 34 | /// 35 | /// 36 | /// 37 | private void ChangePWDForm_Load(object sender, EventArgs e) 38 | { 39 | registry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort"); //定义一个注册表 40 | adminRegistry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\admin"); //定义管理员注册表 41 | userRegistry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\user"); //定义用户注册表 42 | 43 | ras = new RSA(); //定义一个RAS用于加解密 44 | 45 | userNameTextbox.Text = "欢迎:"+LoginForm.userName; 46 | } 47 | 48 | /// 49 | /// "确认修改"按钮事件 50 | /// 51 | /// 52 | /// 53 | private void changeButton_Click(object sender, EventArgs e) 54 | { 55 | string oldPwd = null; 56 | string accessOldPwd = null; //数据库中的旧密码 57 | 58 | if (LoginForm.userType == "管理员") 59 | { 60 | adminRegistry.isRegistryValueNameExist(LoginForm.userName, ref oldPwd); 61 | accessOldPwd = LoginForm.access.searchUser("管理员", LoginForm.userName); 62 | } 63 | 64 | else //用户类型是 “一般用户” 65 | { 66 | userRegistry.isRegistryValueNameExist(LoginForm.userName, ref oldPwd); 67 | accessOldPwd = LoginForm.access.searchUser("一般用户", LoginForm.userName); 68 | } 69 | 70 | if (oldPWDTextbox.Text == oldPwd && md5.MD5Encryption(oldPWDTextbox.Text) == accessOldPwd) //如果旧密码输入正确才能修改密码 71 | { 72 | if (newPWDTextBox.Text.Trim() != String.Empty) 73 | { 74 | 75 | if (newPWDTextBox.Text.Trim() == newPWDTextBox2.Text.Trim()) 76 | { 77 | if (LoginForm.userType == "管理员") //“管理员修改密码” 78 | { 79 | //下面要对密码进行加密再储存在注册表里面 80 | adminRegistry.SetValue(LoginForm.userName, ras.Encryption(newPWDTextBox.Text.Trim()), RegistryValueKind.String); 81 | LoginForm.access.updatePassword("管理员", LoginForm.userName, md5.MD5Encryption(oldPWDTextbox.Text), md5.MD5Encryption(newPWDTextBox.Text.Trim())); 82 | } 83 | else //“一般用户修改密码” 84 | { 85 | userRegistry.SetValue(LoginForm.userName, ras.Encryption(newPWDTextBox.Text.Trim()), RegistryValueKind.String); 86 | LoginForm.access.updatePassword("一般用户", LoginForm.userName, md5.MD5Encryption(oldPWDTextbox.Text), md5.MD5Encryption(newPWDTextBox.Text.Trim())); 87 | } 88 | MessageBox.Show("修改成功!"); 89 | MainForm.logWriter.WriteLine(DateTime.Now.ToString() + ": \t" + LoginForm.userType + '\t' + LoginForm.userName + "\t 成功修改密码"); 90 | } 91 | else 92 | MessageBox.Show("两次密码输入不一致"); 93 | } 94 | else 95 | MessageBox.Show("输入密码不能为空"); 96 | } 97 | else 98 | { 99 | MessageBox.Show("原密码输入错误"); 100 | } 101 | 102 | 103 | } 104 | 105 | /// 106 | /// “取消”按钮事件 107 | /// 108 | /// 109 | /// 110 | private void cancelButton_Click(object sender, EventArgs e) 111 | { 112 | this.Close(); 113 | } 114 | 115 | 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /串口调试助手/View/DeleteUserForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class DeleteUserForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeleteUserForm)); 32 | this.sureButton = new System.Windows.Forms.Button(); 33 | this.cancelButton = new System.Windows.Forms.Button(); 34 | this.label1 = new System.Windows.Forms.Label(); 35 | this.userComboBox = new System.Windows.Forms.ComboBox(); 36 | this.SuspendLayout(); 37 | // 38 | // sureButton 39 | // 40 | this.sureButton.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 41 | this.sureButton.Location = new System.Drawing.Point(140, 223); 42 | this.sureButton.Name = "sureButton"; 43 | this.sureButton.Size = new System.Drawing.Size(97, 46); 44 | this.sureButton.TabIndex = 0; 45 | this.sureButton.Text = "确认"; 46 | this.sureButton.UseVisualStyleBackColor = true; 47 | this.sureButton.Click += new System.EventHandler(this.sureButton_Click); 48 | // 49 | // cancelButton 50 | // 51 | this.cancelButton.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 52 | this.cancelButton.Location = new System.Drawing.Point(380, 223); 53 | this.cancelButton.Name = "cancelButton"; 54 | this.cancelButton.Size = new System.Drawing.Size(97, 46); 55 | this.cancelButton.TabIndex = 2; 56 | this.cancelButton.Text = "取消"; 57 | this.cancelButton.UseVisualStyleBackColor = true; 58 | this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); 59 | // 60 | // label1 61 | // 62 | this.label1.AutoSize = true; 63 | this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 64 | this.label1.Location = new System.Drawing.Point(59, 102); 65 | this.label1.Name = "label1"; 66 | this.label1.Size = new System.Drawing.Size(212, 27); 67 | this.label1.TabIndex = 3; 68 | this.label1.Text = "选择你要删除的用户:"; 69 | // 70 | // userComboBox 71 | // 72 | this.userComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 73 | this.userComboBox.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 74 | this.userComboBox.FormattingEnabled = true; 75 | this.userComboBox.Location = new System.Drawing.Point(277, 102); 76 | this.userComboBox.Name = "userComboBox"; 77 | this.userComboBox.Size = new System.Drawing.Size(253, 35); 78 | this.userComboBox.TabIndex = 4; 79 | // 80 | // DeleteUserForm 81 | // 82 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 83 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 84 | this.ClientSize = new System.Drawing.Size(613, 326); 85 | this.Controls.Add(this.userComboBox); 86 | this.Controls.Add(this.label1); 87 | this.Controls.Add(this.cancelButton); 88 | this.Controls.Add(this.sureButton); 89 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 90 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 91 | this.MaximizeBox = false; 92 | this.MinimizeBox = false; 93 | this.Name = "DeleteUserForm"; 94 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 95 | this.Text = " 删除用户窗体"; 96 | this.Load += new System.EventHandler(this.DeleteUser_Load); 97 | this.ResumeLayout(false); 98 | this.PerformLayout(); 99 | 100 | } 101 | 102 | #endregion 103 | 104 | private System.Windows.Forms.Button sureButton; 105 | private System.Windows.Forms.Button cancelButton; 106 | private System.Windows.Forms.Label label1; 107 | private System.Windows.Forms.ComboBox userComboBox; 108 | } 109 | } -------------------------------------------------------------------------------- /串口调试助手/View/DeleteUserForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using Microsoft.Win32; //这个命名空间包含了注册表相关的类,registry类、registryKey 11 | 12 | 13 | namespace 串口调试助手 14 | { 15 | public partial class DeleteUserForm : Form 16 | { 17 | private Regedit regedit; //实例化一个注册表实例 18 | private string[] keyNames; //返回所有键值 19 | 20 | 21 | public DeleteUserForm() 22 | { 23 | InitializeComponent(); 24 | 25 | } 26 | 27 | 28 | /// 29 | /// 加载“注册表”的用户 30 | /// 31 | /// 32 | /// 33 | private void DeleteUser_Load(object sender, EventArgs e) 34 | { 35 | regedit = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\user"); 36 | keyNames = regedit.GetKeyNames(); 37 | 38 | foreach (string name in keyNames) 39 | userComboBox.Items.Add(name); 40 | if (keyNames.Length > 0) 41 | { 42 | userComboBox.Text = userComboBox.Items[0].ToString(); 43 | } 44 | 45 | } 46 | 47 | 48 | private void sureButton_Click(object sender, EventArgs e) 49 | { 50 | if (keyNames.Length == 0) 51 | MessageBox.Show("对不起,用户为空,没有用户可以删除!"); 52 | 53 | else //键值不为空 54 | { 55 | if (userComboBox.Items.Count == 1) 56 | userComboBox.Text = userComboBox.Items[0].ToString(); 57 | else 58 | userComboBox.Text = userComboBox.Items[userComboBox.SelectedIndex].ToString(); 59 | if (MessageBox.Show("你将要删除用户 “" + userComboBox.Text + "” 吗?", "删除用户", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) 60 | { 61 | if (regedit.DeleteKey(userComboBox.Text) && LoginForm.access.deleteUser("一般用户", userComboBox.Text)) //在数据库和注册表内一起删除 62 | { 63 | MessageBox.Show("删除成功!"); 64 | userComboBox.Items.Clear(); //先将Combobox清空 65 | DeleteUser_Load(sender, e); //再重新加载 66 | } 67 | else 68 | MessageBox.Show("删除失败!"); 69 | } 70 | } 71 | } 72 | 73 | 74 | /// 75 | /// "取消" 按钮,返回主界面 76 | /// 77 | /// 78 | /// 79 | private void cancelButton_Click(object sender, EventArgs e) 80 | { 81 | this.Close(); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /串口调试助手/View/LoginForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class LoginForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.userNameTextbox = new System.Windows.Forms.TextBox(); 35 | this.passwordTextBox = new System.Windows.Forms.TextBox(); 36 | this.loginButton = new System.Windows.Forms.Button(); 37 | this.registerButton = new System.Windows.Forms.Button(); 38 | this.label3 = new System.Windows.Forms.Label(); 39 | this.userCombobox = new System.Windows.Forms.ComboBox(); 40 | this.label4 = new System.Windows.Forms.Label(); 41 | this.recaptchaTextBox = new System.Windows.Forms.TextBox(); 42 | this.label5 = new System.Windows.Forms.Label(); 43 | this.recaptchaPictureBox = new System.Windows.Forms.PictureBox(); 44 | this.label6 = new System.Windows.Forms.Label(); 45 | ((System.ComponentModel.ISupportInitialize)(this.recaptchaPictureBox)).BeginInit(); 46 | this.SuspendLayout(); 47 | // 48 | // label1 49 | // 50 | this.label1.AutoSize = true; 51 | this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 52 | this.label1.Location = new System.Drawing.Point(115, 96); 53 | this.label1.Name = "label1"; 54 | this.label1.Size = new System.Drawing.Size(89, 20); 55 | this.label1.TabIndex = 0; 56 | this.label1.Text = "用户名:"; 57 | // 58 | // label2 59 | // 60 | this.label2.AutoSize = true; 61 | this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 62 | this.label2.Location = new System.Drawing.Point(115, 165); 63 | this.label2.Name = "label2"; 64 | this.label2.Size = new System.Drawing.Size(89, 20); 65 | this.label2.TabIndex = 1; 66 | this.label2.Text = "密 码:"; 67 | // 68 | // userNameTextbox 69 | // 70 | this.userNameTextbox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 71 | this.userNameTextbox.Location = new System.Drawing.Point(203, 91); 72 | this.userNameTextbox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 73 | this.userNameTextbox.Multiline = true; 74 | this.userNameTextbox.Name = "userNameTextbox"; 75 | this.userNameTextbox.Size = new System.Drawing.Size(143, 34); 76 | this.userNameTextbox.TabIndex = 2; 77 | this.userNameTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.userNameTextbox_KeyDown); 78 | // 79 | // passwordTextBox 80 | // 81 | this.passwordTextBox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 82 | this.passwordTextBox.Location = new System.Drawing.Point(203, 165); 83 | this.passwordTextBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 84 | this.passwordTextBox.Multiline = true; 85 | this.passwordTextBox.Name = "passwordTextBox"; 86 | this.passwordTextBox.PasswordChar = '*'; 87 | this.passwordTextBox.Size = new System.Drawing.Size(143, 34); 88 | this.passwordTextBox.TabIndex = 3; 89 | // 90 | // loginButton 91 | // 92 | this.loginButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 93 | this.loginButton.Location = new System.Drawing.Point(261, 452); 94 | this.loginButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 95 | this.loginButton.Name = "loginButton"; 96 | this.loginButton.Size = new System.Drawing.Size(84, 44); 97 | this.loginButton.TabIndex = 4; 98 | this.loginButton.Text = "登录"; 99 | this.loginButton.UseVisualStyleBackColor = true; 100 | this.loginButton.Click += new System.EventHandler(this.loginButton_Click); 101 | // 102 | // registerButton 103 | // 104 | this.registerButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 105 | this.registerButton.Location = new System.Drawing.Point(117, 452); 106 | this.registerButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 107 | this.registerButton.Name = "registerButton"; 108 | this.registerButton.Size = new System.Drawing.Size(85, 44); 109 | this.registerButton.TabIndex = 5; 110 | this.registerButton.Text = "注册"; 111 | this.registerButton.UseVisualStyleBackColor = true; 112 | this.registerButton.Click += new System.EventHandler(this.registerButton_Click); 113 | // 114 | // label3 115 | // 116 | this.label3.AutoSize = true; 117 | this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 118 | this.label3.Location = new System.Drawing.Point(93, 235); 119 | this.label3.Name = "label3"; 120 | this.label3.Size = new System.Drawing.Size(109, 20); 121 | this.label3.TabIndex = 6; 122 | this.label3.Text = "用户类型:"; 123 | // 124 | // userCombobox 125 | // 126 | this.userCombobox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 127 | this.userCombobox.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 128 | this.userCombobox.FormattingEnabled = true; 129 | this.userCombobox.Location = new System.Drawing.Point(203, 232); 130 | this.userCombobox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 131 | this.userCombobox.Name = "userCombobox"; 132 | this.userCombobox.RightToLeft = System.Windows.Forms.RightToLeft.No; 133 | this.userCombobox.Size = new System.Drawing.Size(143, 28); 134 | this.userCombobox.TabIndex = 7; 135 | // 136 | // label4 137 | // 138 | this.label4.AutoSize = true; 139 | this.label4.Font = new System.Drawing.Font("幼圆", 16.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 140 | this.label4.ForeColor = System.Drawing.SystemColors.ControlDarkDark; 141 | this.label4.Location = new System.Drawing.Point(44, 22); 142 | this.label4.Name = "label4"; 143 | this.label4.Size = new System.Drawing.Size(422, 28); 144 | this.label4.TabIndex = 8; 145 | this.label4.Text = "欢迎使用C-Jun\'s 温度监控系统"; 146 | // 147 | // recaptchaTextBox 148 | // 149 | this.recaptchaTextBox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 150 | this.recaptchaTextBox.Location = new System.Drawing.Point(203, 292); 151 | this.recaptchaTextBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 152 | this.recaptchaTextBox.Multiline = true; 153 | this.recaptchaTextBox.Name = "recaptchaTextBox"; 154 | this.recaptchaTextBox.Size = new System.Drawing.Size(143, 34); 155 | this.recaptchaTextBox.TabIndex = 10; 156 | // 157 | // label5 158 | // 159 | this.label5.AutoSize = true; 160 | this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 161 | this.label5.Location = new System.Drawing.Point(115, 295); 162 | this.label5.Name = "label5"; 163 | this.label5.Size = new System.Drawing.Size(89, 20); 164 | this.label5.TabIndex = 9; 165 | this.label5.Text = "验证码:"; 166 | // 167 | // recaptchaPictureBox 168 | // 169 | this.recaptchaPictureBox.Location = new System.Drawing.Point(173, 352); 170 | this.recaptchaPictureBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 171 | this.recaptchaPictureBox.Name = "recaptchaPictureBox"; 172 | this.recaptchaPictureBox.Size = new System.Drawing.Size(179, 59); 173 | this.recaptchaPictureBox.TabIndex = 11; 174 | this.recaptchaPictureBox.TabStop = false; 175 | this.recaptchaPictureBox.Click += new System.EventHandler(this.recaptchaPictureBox_Click); 176 | // 177 | // label6 178 | // 179 | this.label6.AutoSize = true; 180 | this.label6.Font = new System.Drawing.Font("楷体", 10.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 181 | this.label6.ForeColor = System.Drawing.Color.MediumBlue; 182 | this.label6.Location = new System.Drawing.Point(56, 365); 183 | this.label6.Name = "label6"; 184 | this.label6.Size = new System.Drawing.Size(109, 38); 185 | this.label6.TabIndex = 12; 186 | this.label6.Text = "点击图片,\r\n更换下一张"; 187 | // 188 | // LoginForm 189 | // 190 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 191 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 192 | this.ClientSize = new System.Drawing.Size(508, 548); 193 | this.Controls.Add(this.label6); 194 | this.Controls.Add(this.recaptchaPictureBox); 195 | this.Controls.Add(this.recaptchaTextBox); 196 | this.Controls.Add(this.label5); 197 | this.Controls.Add(this.label4); 198 | this.Controls.Add(this.userCombobox); 199 | this.Controls.Add(this.label3); 200 | this.Controls.Add(this.registerButton); 201 | this.Controls.Add(this.loginButton); 202 | this.Controls.Add(this.passwordTextBox); 203 | this.Controls.Add(this.userNameTextbox); 204 | this.Controls.Add(this.label2); 205 | this.Controls.Add(this.label1); 206 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 207 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 208 | this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 209 | this.MaximizeBox = false; 210 | this.MinimizeBox = false; 211 | this.Name = "LoginForm"; 212 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 213 | this.Text = " C-Jun\'s 温度监控登录窗体"; 214 | this.Load += new System.EventHandler(this.LoginForm_Load); 215 | ((System.ComponentModel.ISupportInitialize)(this.recaptchaPictureBox)).EndInit(); 216 | this.ResumeLayout(false); 217 | this.PerformLayout(); 218 | 219 | } 220 | 221 | #endregion 222 | 223 | private System.Windows.Forms.Label label1; 224 | private System.Windows.Forms.Label label2; 225 | private System.Windows.Forms.TextBox passwordTextBox; 226 | private System.Windows.Forms.Button loginButton; 227 | public System.Windows.Forms.TextBox userNameTextbox; 228 | private System.Windows.Forms.Button registerButton; 229 | private System.Windows.Forms.Label label3; 230 | private System.Windows.Forms.ComboBox userCombobox; 231 | private System.Windows.Forms.Label label4; 232 | private System.Windows.Forms.TextBox recaptchaTextBox; 233 | private System.Windows.Forms.Label label5; 234 | private System.Windows.Forms.PictureBox recaptchaPictureBox; 235 | private System.Windows.Forms.Label label6; 236 | } 237 | } -------------------------------------------------------------------------------- /串口调试助手/View/LoginForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Threading; 11 | using Microsoft.Win32; //这个命名空间包含了注册表相关的类,registry类、registryKey 12 | 13 | 14 | namespace 串口调试助手 15 | { 16 | public partial class LoginForm : Form 17 | { 18 | private RSA ras; 19 | private Regedit registry; 20 | private Regedit adminRegistry; 21 | private Regedit userRegistry; 22 | 23 | public static Access access; //数据库 24 | private string accessFileRoad = @"..\..\..\Jun.mdb"; 25 | private Md5 md5 = new Md5(); //MD5加密 26 | 27 | private string recaptcha = null; //验证码 28 | 29 | public static string userName; //userName:全局变量,用于用户名的判断 30 | public static string userType; //userType:全局变量,用于用户类型的判断 31 | 32 | public LoginForm() 33 | { 34 | InitializeComponent(); 35 | //primaryKey = Registry.CurrentUser; //注册在当前用户里,如果使用管理员运行该软件才能注册在LocalMachine里。 36 | //softWare = primaryKey.CreateSubKey(@"SOFTWARE\JUN-SerialPort"); 37 | } 38 | 39 | private void LoginForm_Load(object sender, EventArgs e) 40 | { 41 | userCombobox.Items.Add("管理员"); 42 | userCombobox.Items.Add("一般用户"); 43 | userCombobox.Text = userCombobox.Items[0].ToString(); 44 | registry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort"); //定义一个注册表 45 | adminRegistry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\admin"); //定义管理员注册表 46 | userRegistry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\user"); //定义用户注册表 47 | ras = new RSA(); //定义一个RAS用于加解密 48 | recaptcha = reCaptcha(); 49 | recaptchaTextBox.Text = recaptcha; 50 | 51 | access = new Access(accessFileRoad); //数据库加载 52 | 53 | } 54 | 55 | /// 56 | /// ”登录“按钮事件,基于注册表和数据库的操作 57 | /// 58 | /// 59 | /// 60 | private void loginButton_Click(object sender, EventArgs e) 61 | { 62 | userName = userNameTextbox.Text.Trim(); 63 | userType = userCombobox.Text; 64 | string captchaText = recaptchaTextBox.Text.Trim().ToUpper(); //输入的字母全部大写化 65 | string accessPassword = null; //数据库的 MD5 加密后的密码 66 | string password = null; //注册表 RSA 加密后的密码 67 | 68 | if (userName.Length >0) 69 | { 70 | if (userType == "管理员") 71 | { 72 | accessPassword = access.searchUser("管理员", userName); //返回一个password 73 | if (adminRegistry.isRegistryValueNameExist(userName, ref password) && accessPassword != null) //先判断该管理员是否在数据库和注册表内 74 | { 75 | if (string.Equals(passwordTextBox.Text.Trim(), password) && string.Equals(md5.MD5Encryption(passwordTextBox.Text.Trim()), accessPassword)) //密码匹配正确,先将输入框密码MD5加密,再和数据库的加密后的密码比较 76 | { 77 | if (captchaText == recaptcha) //验证码匹配正确 78 | { 79 | this.DialogResult = DialogResult.Yes; //返回ok ,进入主窗体 80 | } 81 | else 82 | MessageBox.Show("验证码输入错误!"); 83 | 84 | } 85 | else 86 | MessageBox.Show("密码错误!"); 87 | } 88 | else 89 | MessageBox.Show("该管理员不存在!"); 90 | } 91 | else //一般用户 92 | { 93 | accessPassword = access.searchUser("一般用户", userName); //返回一个password 94 | if (userRegistry.isRegistryValueNameExist(userName, ref password) && accessPassword != null) //再判断判断用户是否在注册表和数据库内 95 | { 96 | 97 | if (string.Equals(passwordTextBox.Text, password) && string.Equals(md5.MD5Encryption(passwordTextBox.Text.Trim()), accessPassword)) //密码匹配正确 98 | { 99 | if (captchaText == recaptcha) //验证码匹配正确 100 | { 101 | this.DialogResult = DialogResult.Yes; //返回ok ,进入主窗体 102 | } 103 | else 104 | MessageBox.Show("验证码输入错误!"); 105 | } 106 | 107 | else 108 | MessageBox.Show("密码错误!"); 109 | } 110 | 111 | else 112 | MessageBox.Show("该用户不存在!"); 113 | } 114 | } 115 | 116 | else 117 | { 118 | MessageBox.Show("用户名不能为空!"); 119 | } 120 | } 121 | 122 | 123 | private void userNameTextbox_KeyDown(object sender, KeyEventArgs e) 124 | { 125 | if (e.Control && e.KeyCode == Keys.A) 126 | { 127 | ((TextBox)sender).SelectAll(); 128 | e.Handled = true; 129 | } 130 | } 131 | 132 | 133 | /// 134 | /// "注册"按钮事件 135 | /// 136 | /// 137 | /// 138 | private void registerButton_Click(object sender, EventArgs e) 139 | { 140 | RegisterForm registerForm = new RegisterForm(); 141 | DialogResult result = registerForm.ShowDialog(); 142 | 143 | if (result == DialogResult.Yes) 144 | { 145 | userCombobox.Items.Clear(); //先将Combobox清空 146 | LoginForm_Load(sender, e); //重新加载一次,就像是重新加载了数据库 147 | } 148 | 149 | } 150 | 151 | 152 | /// 153 | /// 点击"更换验证码"事件 154 | /// 155 | /// 156 | /// 157 | private void recaptchaPictureBox_Click(object sender, EventArgs e) 158 | { 159 | recaptcha = reCaptcha(); 160 | 161 | } 162 | 163 | 164 | /// 165 | /// 验证码生成函数 166 | /// 167 | private string reCaptcha() 168 | { 169 | Random rd = new Random(); //随机数生成器 170 | string str = null; 171 | 172 | char[] Pattern = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 173 | 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; 174 | 175 | 176 | for (int i = 0; i < 5; i++) 177 | { 178 | int num = rd.Next(0, Pattern.Length); //在上的数组随机生成5个字符 179 | str += Pattern[num]; 180 | } 181 | Bitmap bmp = new Bitmap(150, 40); //new 一个宽:150像素,高:40像素的位图 182 | Graphics g = Graphics.FromImage(bmp); //将位图bmp 放在画布上 183 | 184 | for (int i = 0; i < 5; i++) 185 | { 186 | Point p = new Point(i * 25, 0); 187 | string font = "微软雅黑"; 188 | Color[] colors = { Color.Red, Color.Black, Color.Blue, Color.Gray, Color.Green }; //随机了几种颜色 189 | g.DrawString(str[i].ToString(), new Font(font, 20, FontStyle.Bold), new SolidBrush(colors[rd.Next(0, 5)]), p); //将5个字符画在画布上 190 | } 191 | 192 | for (int i = 0; i < 20; i++) //随机了20条无规则线条 193 | { 194 | Point p1 = new Point(rd.Next(0, bmp.Width), rd.Next(0, bmp.Height)); 195 | Point p2 = new Point(rd.Next(0, bmp.Width), rd.Next(0, bmp.Height)); 196 | g.DrawLine(new Pen(Brushes.Green), p1, p2); 197 | } 198 | 199 | for (int i = 0; i < 500; i++) //随机分布了500个像素点 200 | { 201 | Point p = new Point(rd.Next(0, bmp.Width), rd.Next(0, bmp.Height)); 202 | bmp.SetPixel(p.X, p.Y, Color.Black); //位图中指定像素的颜色,会自动匹配到画布 203 | } 204 | 205 | recaptchaPictureBox.Image = bmp; 206 | 207 | return str; //输出验证码 208 | } 209 | 210 | 211 | } 212 | 213 | } 214 | -------------------------------------------------------------------------------- /串口调试助手/View/PictureForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class PictureForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PictureForm)); 32 | this.pictureBox = new System.Windows.Forms.PictureBox(); 33 | this.picturComboBox = new System.Windows.Forms.ComboBox(); 34 | this.pictureButton = new System.Windows.Forms.Button(); 35 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 36 | this.SuspendLayout(); 37 | // 38 | // pictureBox 39 | // 40 | this.pictureBox.Location = new System.Drawing.Point(14, 10); 41 | this.pictureBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 42 | this.pictureBox.Name = "pictureBox"; 43 | this.pictureBox.Size = new System.Drawing.Size(570, 570); 44 | this.pictureBox.TabIndex = 3; 45 | this.pictureBox.TabStop = false; 46 | // 47 | // picturComboBox 48 | // 49 | this.picturComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 50 | this.picturComboBox.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 51 | this.picturComboBox.FormattingEnabled = true; 52 | this.picturComboBox.Location = new System.Drawing.Point(177, 601); 53 | this.picturComboBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 54 | this.picturComboBox.Name = "picturComboBox"; 55 | this.picturComboBox.Size = new System.Drawing.Size(350, 29); 56 | this.picturComboBox.TabIndex = 5; 57 | // 58 | // pictureButton 59 | // 60 | this.pictureButton.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 61 | this.pictureButton.Location = new System.Drawing.Point(54, 596); 62 | this.pictureButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 63 | this.pictureButton.Name = "pictureButton"; 64 | this.pictureButton.Size = new System.Drawing.Size(78, 41); 65 | this.pictureButton.TabIndex = 4; 66 | this.pictureButton.Text = "选择图片"; 67 | this.pictureButton.UseVisualStyleBackColor = true; 68 | this.pictureButton.Click += new System.EventHandler(this.pictureButton_Click); 69 | // 70 | // PictureForm 71 | // 72 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 73 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 74 | this.ClientSize = new System.Drawing.Size(593, 657); 75 | this.Controls.Add(this.picturComboBox); 76 | this.Controls.Add(this.pictureButton); 77 | this.Controls.Add(this.pictureBox); 78 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 79 | this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 80 | this.MaximizeBox = false; 81 | this.MinimizeBox = false; 82 | this.MinimumSize = new System.Drawing.Size(480, 572); 83 | this.Name = "PictureForm"; 84 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 85 | this.Text = " 温度图查看窗体"; 86 | this.Load += new System.EventHandler(this.PictureForm_Load); 87 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 88 | this.ResumeLayout(false); 89 | 90 | } 91 | 92 | #endregion 93 | 94 | private System.Windows.Forms.PictureBox pictureBox; 95 | private System.Windows.Forms.ComboBox picturComboBox; 96 | private System.Windows.Forms.Button pictureButton; 97 | } 98 | } -------------------------------------------------------------------------------- /串口调试助手/View/PictureForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace 串口调试助手 13 | { 14 | public partial class PictureForm : Form 15 | { 16 | private static string[][] pictureConfig = null; 17 | 18 | 19 | public PictureForm() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | private void PictureForm_Load(object sender, EventArgs e) 25 | { 26 | 27 | List listName = null; 28 | 29 | if (LoginForm.userType == "管理员") //如果是管理员,即可以查询所有的表 30 | listName = LoginForm.access.searchPictureName("温度折线图"); 31 | else 32 | listName = LoginForm.access.searchPictureName("温度折线图",LoginForm.userType, LoginForm.userName); 33 | 34 | pictureConfig = new string[listName.Count][]; 35 | for (int i = 0; i < listName.Count; i++) 36 | { 37 | pictureConfig[i] = listName[i].Split('~'); 38 | } 39 | 40 | foreach (string[] name in pictureConfig) 41 | { 42 | picturComboBox.Items.Add(" " +name[0] + "—" + name[1] + "—" + name[2]); 43 | } 44 | 45 | if (pictureConfig.Length > 0) 46 | { 47 | picturComboBox.Text = picturComboBox.Items[0].ToString(); 48 | } 49 | } 50 | 51 | /// 52 | /// 选择数据库图片 53 | /// 54 | /// 55 | /// 56 | private void pictureButton_Click(object sender, EventArgs e) 57 | { 58 | if (pictureConfig != null) 59 | { 60 | this.Refresh(); 61 | 62 | string s = picturComboBox.Text; 63 | s = s.Trim(); 64 | 65 | string[] config = s.Split('—'); 66 | 67 | byte[] pictureByte = LoginForm.access.getPicture("温度折线图", config[0],config[1],config[2]); 68 | 69 | MemoryStream memstream = new MemoryStream(pictureByte); 70 | 71 | Image image = Image.FromStream(memstream); 72 | 73 | pictureBox.Image = image; 74 | 75 | //image.Save(@"C:\Users\Public\Documents\wendu.jpg"); 76 | 77 | // Console.WriteLine("输出图片信息:" + pictureByte); 78 | } 79 | 80 | else 81 | MessageBox.Show("没有该图片"); 82 | 83 | } 84 | 85 | 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /串口调试助手/View/ReadForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class ReadForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReadForm)); 32 | this.readTextBox = new System.Windows.Forms.RichTextBox(); 33 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 34 | this.groupBox3 = new System.Windows.Forms.GroupBox(); 35 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 36 | this.fileButton = new System.Windows.Forms.Button(); 37 | this.groupBox1.SuspendLayout(); 38 | this.groupBox3.SuspendLayout(); 39 | this.groupBox2.SuspendLayout(); 40 | this.SuspendLayout(); 41 | // 42 | // readTextBox 43 | // 44 | this.readTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 45 | this.readTextBox.Location = new System.Drawing.Point(3, 21); 46 | this.readTextBox.Name = "readTextBox"; 47 | this.readTextBox.ReadOnly = true; 48 | this.readTextBox.Size = new System.Drawing.Size(554, 433); 49 | this.readTextBox.TabIndex = 1; 50 | this.readTextBox.Text = ""; 51 | // 52 | // groupBox1 53 | // 54 | this.groupBox1.Controls.Add(this.readTextBox); 55 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.groupBox1.Location = new System.Drawing.Point(0, 0); 57 | this.groupBox1.Name = "groupBox1"; 58 | this.groupBox1.Size = new System.Drawing.Size(560, 457); 59 | this.groupBox1.TabIndex = 2; 60 | this.groupBox1.TabStop = false; 61 | // 62 | // groupBox3 63 | // 64 | this.groupBox3.Controls.Add(this.groupBox2); 65 | this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; 66 | this.groupBox3.Location = new System.Drawing.Point(0, 365); 67 | this.groupBox3.Name = "groupBox3"; 68 | this.groupBox3.Size = new System.Drawing.Size(560, 92); 69 | this.groupBox3.TabIndex = 4; 70 | this.groupBox3.TabStop = false; 71 | this.groupBox3.Resize += new System.EventHandler(this.groupBox3_Resize); 72 | // 73 | // groupBox2 74 | // 75 | this.groupBox2.Controls.Add(this.fileButton); 76 | this.groupBox2.Location = new System.Drawing.Point(170, 18); 77 | this.groupBox2.Name = "groupBox2"; 78 | this.groupBox2.Size = new System.Drawing.Size(200, 62); 79 | this.groupBox2.TabIndex = 4; 80 | this.groupBox2.TabStop = false; 81 | this.groupBox2.Text = "groupBox2"; 82 | this.groupBox2.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox2_Paint); 83 | // 84 | // fileButton 85 | // 86 | this.fileButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 87 | this.fileButton.Location = new System.Drawing.Point(43, 13); 88 | this.fileButton.Name = "fileButton"; 89 | this.fileButton.Size = new System.Drawing.Size(114, 49); 90 | this.fileButton.TabIndex = 0; 91 | this.fileButton.Text = "打开文件"; 92 | this.fileButton.UseVisualStyleBackColor = true; 93 | this.fileButton.Click += new System.EventHandler(this.fileButton_Click); 94 | // 95 | // ReadForm 96 | // 97 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 98 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 99 | this.ClientSize = new System.Drawing.Size(560, 457); 100 | this.Controls.Add(this.groupBox3); 101 | this.Controls.Add(this.groupBox1); 102 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 103 | this.Name = "ReadForm"; 104 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 105 | this.Text = " 浏览文件"; 106 | this.Load += new System.EventHandler(this.readForm_Load); 107 | this.groupBox1.ResumeLayout(false); 108 | this.groupBox3.ResumeLayout(false); 109 | this.groupBox2.ResumeLayout(false); 110 | this.ResumeLayout(false); 111 | 112 | } 113 | 114 | #endregion 115 | private System.Windows.Forms.RichTextBox readTextBox; 116 | private System.Windows.Forms.GroupBox groupBox1; 117 | private System.Windows.Forms.GroupBox groupBox3; 118 | private System.Windows.Forms.GroupBox groupBox2; 119 | private System.Windows.Forms.Button fileButton; 120 | } 121 | } -------------------------------------------------------------------------------- /串口调试助手/View/ReadForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.IO; 11 | 12 | namespace 串口调试助手 13 | { 14 | public partial class ReadForm : Form 15 | { 16 | 17 | private ContentResize groupBoxResize = new ContentResize(); 18 | 19 | public ReadForm() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | private void readForm_Load(object sender, EventArgs e) 30 | { 31 | groupBoxResize.GroupBoxReSize(groupBox2, groupBox3); 32 | } 33 | 34 | /// 35 | /// 打开文件选择导入 36 | /// 37 | /// 38 | /// 39 | private void fileButton_Click(object sender, EventArgs e) 40 | { 41 | OpenFileDialog file = new OpenFileDialog(); 42 | file.Filter = "文本文件(*.txt) | *.txt"; //文本文件(*.txt) | *.txt | 所有文件(*.*) | *.* 43 | //file.ShowDialog(); 44 | //string name = file.FileName; //返回路径名和文件名 45 | //System.Diagnostics.Debug.Write(name); 46 | 47 | DialogResult result = file.ShowDialog(); 48 | if (result == DialogResult.OK) 49 | ReadTextFile(@file.FileName); 50 | 51 | } 52 | 53 | /// 54 | /// 读取txt文件的数据 55 | /// 56 | /// 57 | private void ReadTextFile(string fileName) 58 | { 59 | MainForm.fileWriter.Close(); 60 | MainForm.file.Close(); 61 | 62 | readTextBox.Text = null; 63 | string[] lines = File.ReadAllLines(fileName,System.Text.Encoding.Default); 64 | foreach(string line in lines) 65 | { 66 | readTextBox.AppendText(line+Environment.NewLine); 67 | } 68 | 69 | MainForm.file = new FileStream(MainForm.temperatureFile + '\\' + MainForm.fileName, FileMode.Append); 70 | 71 | MainForm.fileWriter = new StreamWriter(MainForm.file, System.Text.Encoding.Default); 72 | } 73 | 74 | private void groupBox2_Paint(object sender, PaintEventArgs e) 75 | { 76 | e.Graphics.Clear(this.BackColor); 77 | } 78 | 79 | private void groupBox3_Resize(object sender, EventArgs e) 80 | { 81 | groupBoxResize.GroupBoxReSize(groupBox2, groupBox3); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /串口调试助手/View/RegisterForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class RegisterForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegisterForm)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.label3 = new System.Windows.Forms.Label(); 35 | this.okButton = new System.Windows.Forms.Button(); 36 | this.userNameTextBox = new System.Windows.Forms.TextBox(); 37 | this.passwordTextBox = new System.Windows.Forms.TextBox(); 38 | this.passwordTextBox2 = new System.Windows.Forms.TextBox(); 39 | this.cancelButton = new System.Windows.Forms.Button(); 40 | this.userCombobox = new System.Windows.Forms.ComboBox(); 41 | this.label4 = new System.Windows.Forms.Label(); 42 | this.SuspendLayout(); 43 | // 44 | // label1 45 | // 46 | this.label1.AutoSize = true; 47 | this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 48 | this.label1.Location = new System.Drawing.Point(117, 36); 49 | this.label1.Name = "label1"; 50 | this.label1.Size = new System.Drawing.Size(89, 20); 51 | this.label1.TabIndex = 0; 52 | this.label1.Text = "用户名:"; 53 | // 54 | // label2 55 | // 56 | this.label2.AutoSize = true; 57 | this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 58 | this.label2.Location = new System.Drawing.Point(95, 232); 59 | this.label2.Name = "label2"; 60 | this.label2.Size = new System.Drawing.Size(109, 20); 61 | this.label2.TabIndex = 1; 62 | this.label2.Text = "确认密码:"; 63 | // 64 | // label3 65 | // 66 | this.label3.AutoSize = true; 67 | this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 68 | this.label3.Location = new System.Drawing.Point(117, 165); 69 | this.label3.Name = "label3"; 70 | this.label3.Size = new System.Drawing.Size(89, 20); 71 | this.label3.TabIndex = 2; 72 | this.label3.Text = "密 码:"; 73 | // 74 | // okButton 75 | // 76 | this.okButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 77 | this.okButton.Location = new System.Drawing.Point(129, 315); 78 | this.okButton.Name = "okButton"; 79 | this.okButton.Size = new System.Drawing.Size(75, 43); 80 | this.okButton.TabIndex = 3; 81 | this.okButton.Text = "确认"; 82 | this.okButton.UseVisualStyleBackColor = true; 83 | this.okButton.Click += new System.EventHandler(this.okButton_Click); 84 | // 85 | // userNameTextBox 86 | // 87 | this.userNameTextBox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 88 | this.userNameTextBox.Location = new System.Drawing.Point(202, 33); 89 | this.userNameTextBox.Name = "userNameTextBox"; 90 | this.userNameTextBox.Size = new System.Drawing.Size(145, 30); 91 | this.userNameTextBox.TabIndex = 4; 92 | // 93 | // passwordTextBox 94 | // 95 | this.passwordTextBox.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 96 | this.passwordTextBox.Location = new System.Drawing.Point(202, 162); 97 | this.passwordTextBox.Name = "passwordTextBox"; 98 | this.passwordTextBox.PasswordChar = '*'; 99 | this.passwordTextBox.Size = new System.Drawing.Size(145, 30); 100 | this.passwordTextBox.TabIndex = 5; 101 | // 102 | // passwordTextBox2 103 | // 104 | this.passwordTextBox2.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 105 | this.passwordTextBox2.Location = new System.Drawing.Point(200, 229); 106 | this.passwordTextBox2.Name = "passwordTextBox2"; 107 | this.passwordTextBox2.PasswordChar = '*'; 108 | this.passwordTextBox2.Size = new System.Drawing.Size(145, 30); 109 | this.passwordTextBox2.TabIndex = 6; 110 | // 111 | // cancelButton 112 | // 113 | this.cancelButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 114 | this.cancelButton.Location = new System.Drawing.Point(270, 315); 115 | this.cancelButton.Name = "cancelButton"; 116 | this.cancelButton.Size = new System.Drawing.Size(75, 43); 117 | this.cancelButton.TabIndex = 7; 118 | this.cancelButton.Text = "取消"; 119 | this.cancelButton.UseVisualStyleBackColor = true; 120 | this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); 121 | // 122 | // userCombobox 123 | // 124 | this.userCombobox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 125 | this.userCombobox.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 126 | this.userCombobox.FormattingEnabled = true; 127 | this.userCombobox.Location = new System.Drawing.Point(204, 99); 128 | this.userCombobox.Name = "userCombobox"; 129 | this.userCombobox.RightToLeft = System.Windows.Forms.RightToLeft.No; 130 | this.userCombobox.Size = new System.Drawing.Size(143, 28); 131 | this.userCombobox.TabIndex = 9; 132 | // 133 | // label4 134 | // 135 | this.label4.AutoSize = true; 136 | this.label4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 137 | this.label4.Location = new System.Drawing.Point(98, 102); 138 | this.label4.Name = "label4"; 139 | this.label4.Size = new System.Drawing.Size(109, 20); 140 | this.label4.TabIndex = 8; 141 | this.label4.Text = "用户类型:"; 142 | // 143 | // RegisterForm 144 | // 145 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 146 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 147 | this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; 148 | this.ClientSize = new System.Drawing.Size(486, 398); 149 | this.Controls.Add(this.userCombobox); 150 | this.Controls.Add(this.label4); 151 | this.Controls.Add(this.cancelButton); 152 | this.Controls.Add(this.passwordTextBox2); 153 | this.Controls.Add(this.passwordTextBox); 154 | this.Controls.Add(this.userNameTextBox); 155 | this.Controls.Add(this.okButton); 156 | this.Controls.Add(this.label3); 157 | this.Controls.Add(this.label2); 158 | this.Controls.Add(this.label1); 159 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 160 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 161 | this.MaximizeBox = false; 162 | this.MinimizeBox = false; 163 | this.Name = "RegisterForm"; 164 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 165 | this.Text = "注册窗体"; 166 | this.Load += new System.EventHandler(this.RegisterForm_Load); 167 | this.ResumeLayout(false); 168 | this.PerformLayout(); 169 | 170 | } 171 | 172 | #endregion 173 | 174 | private System.Windows.Forms.Label label1; 175 | private System.Windows.Forms.Label label2; 176 | private System.Windows.Forms.Label label3; 177 | private System.Windows.Forms.Button okButton; 178 | private System.Windows.Forms.TextBox userNameTextBox; 179 | private System.Windows.Forms.TextBox passwordTextBox; 180 | private System.Windows.Forms.TextBox passwordTextBox2; 181 | private System.Windows.Forms.Button cancelButton; 182 | private System.Windows.Forms.ComboBox userCombobox; 183 | private System.Windows.Forms.Label label4; 184 | } 185 | } -------------------------------------------------------------------------------- /串口调试助手/View/RegisterForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using Microsoft.Win32; //这个命名空间包含了注册表相关的类,registry类、registryKey 11 | using System.Security; 12 | using System.Security.Cryptography; 13 | 14 | namespace 串口调试助手 15 | { 16 | public partial class RegisterForm : Form 17 | { 18 | private RSA ras; 19 | private Regedit registry; 20 | private Regedit adminRegistry; 21 | private Regedit userRegistry; 22 | 23 | private Md5 md5 = new Md5(); 24 | 25 | public RegisterForm() 26 | { 27 | InitializeComponent(); 28 | } 29 | 30 | /// 31 | /// 实现“注册表”的注册 32 | /// 33 | /// 34 | /// 35 | private void RegisterForm_Load(object sender, EventArgs e) 36 | { 37 | // primaryKey = Registry.CurrentUser; //注册在当前用户里,如果使用管理员运行该软件才能注册在LocalMachine里。 38 | //softWare= primaryKey.CreateSubKey(@"SOFTWARE\JUN-SerialPort"); 39 | 40 | userCombobox.Items.Add("管理员"); 41 | userCombobox.Items.Add("一般用户"); 42 | userCombobox.Text = userCombobox.Items[0].ToString(); 43 | 44 | registry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort"); //定义一个注册表 45 | adminRegistry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\admin"); //定义管理员注册表 46 | userRegistry = new Regedit(Registry.CurrentUser, @"SOFTWARE\JUN-SerialPort\user"); //定义用户注册表 47 | ras = new RSA(); //定义一个RAS对象,用于加密和解密 48 | 49 | LoginForm.access.creatDataDB(); //创建数据库 50 | LoginForm.access.createUserTable("管理员"); //在数据库创建管理员和一般用户 51 | LoginForm.access.createUserTable("一般用户"); 52 | } 53 | 54 | /// 55 | /// "确定"按钮事件 56 | /// 57 | /// 58 | /// 59 | private void okButton_Click(object sender, EventArgs e) 60 | { 61 | string userName = userNameTextBox.Text.Trim(); //去除字符串前后面的空格 62 | string password = passwordTextBox.Text.Trim(); 63 | 64 | //if (String.IsNullOrEmpty(userNameTextBox.Text)) 65 | if (userName != String.Empty ) 66 | { 67 | if (password != String.Empty) 68 | { 69 | 70 | if (String.Equals(password, passwordTextBox2.Text.Trim())) //两次密码相同 71 | { 72 | if (userCombobox.Text == "管理员") 73 | { 74 | //数据库和注册表同时操作 75 | if (adminRegistry.isRegistryValueNameExist(userName) && LoginForm.access.searchUser("管理员",userName)!= null) 76 | { 77 | MessageBox.Show("该管理员已存在!"); 78 | } 79 | else 80 | { 81 | //下面要对密码进行加密再储存在注册表里面,还有数据库 82 | adminRegistry.SetValue(userName, ras.Encryption(password), RegistryValueKind.String); 83 | LoginForm.access.insertUser("管理员",userName,md5.MD5Encryption(password)); 84 | 85 | MessageBox.Show("恭喜管理员 “" + userName + "” 注册成功"); 86 | this.DialogResult = DialogResult.Yes; 87 | //this.Close(); 88 | } 89 | } 90 | else 91 | { 92 | if (userRegistry.isRegistryValueNameExist(userName) && LoginForm.access.searchUser("一般用户", userName) != null) 93 | { 94 | MessageBox.Show("该用户已存在!"); 95 | } 96 | else 97 | { 98 | //下面要对密码进行加密再储存在注册表里面 99 | userRegistry.SetValue(userName, ras.Encryption(password), RegistryValueKind.String); 100 | LoginForm.access.insertUser("一般用户", userName, md5.MD5Encryption(password)); 101 | 102 | MessageBox.Show("恭喜用户 “" + userName + "” 注册成功"); 103 | this.DialogResult = DialogResult.Yes; 104 | //this.Close(); 105 | } 106 | } 107 | } 108 | else 109 | MessageBox.Show("两次输入密码不一致"); 110 | } 111 | else 112 | MessageBox.Show("输入密码不能为空"); 113 | } 114 | else 115 | MessageBox.Show("用户名不能为空"); 116 | } 117 | 118 | private void cancelButton_Click(object sender, EventArgs e) 119 | { 120 | this.Close(); 121 | } 122 | } 123 | 124 | } 125 | -------------------------------------------------------------------------------- /串口调试助手/View/searchDataBaseForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace 串口调试助手 2 | { 3 | partial class searchDataBaseForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); 32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); 33 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(searchDataBaseForm)); 34 | this.dataGridView = new System.Windows.Forms.DataGridView(); 35 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 36 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 37 | this.groupBox5 = new System.Windows.Forms.GroupBox(); 38 | this.dateTimePickerFrom = new System.Windows.Forms.DateTimePicker(); 39 | this.placeTextBox = new System.Windows.Forms.TextBox(); 40 | this.label3 = new System.Windows.Forms.Label(); 41 | this.label1 = new System.Windows.Forms.Label(); 42 | this.dateTimePickerTo = new System.Windows.Forms.DateTimePicker(); 43 | this.label2 = new System.Windows.Forms.Label(); 44 | this.groupBox4 = new System.Windows.Forms.GroupBox(); 45 | this.standardTextBox = new System.Windows.Forms.TextBox(); 46 | this.maxValueTextbox = new System.Windows.Forms.TextBox(); 47 | this.minValuetextBox = new System.Windows.Forms.TextBox(); 48 | this.averageTextBox = new System.Windows.Forms.TextBox(); 49 | this.wholeLines = new System.Windows.Forms.TextBox(); 50 | this.standardLabel = new System.Windows.Forms.Label(); 51 | this.averageLabel = new System.Windows.Forms.Label(); 52 | this.maxLabel = new System.Windows.Forms.Label(); 53 | this.minLabel = new System.Windows.Forms.Label(); 54 | this.wholeLabel = new System.Windows.Forms.Label(); 55 | this.groupBox3 = new System.Windows.Forms.GroupBox(); 56 | this.updateButton = new System.Windows.Forms.Button(); 57 | this.saveExcelButton = new System.Windows.Forms.Button(); 58 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); 59 | this.groupBox2.SuspendLayout(); 60 | this.groupBox1.SuspendLayout(); 61 | this.groupBox5.SuspendLayout(); 62 | this.groupBox4.SuspendLayout(); 63 | this.groupBox3.SuspendLayout(); 64 | this.SuspendLayout(); 65 | // 66 | // dataGridView 67 | // 68 | this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 69 | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 70 | dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; 71 | dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 72 | dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; 73 | dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; 74 | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; 75 | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; 76 | this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; 77 | this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 78 | this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill; 79 | this.dataGridView.Location = new System.Drawing.Point(2, 16); 80 | this.dataGridView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 81 | this.dataGridView.Name = "dataGridView"; 82 | dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 83 | dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; 84 | dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 85 | dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; 86 | dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; 87 | dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; 88 | dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; 89 | this.dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle2; 90 | this.dataGridView.RowTemplate.Height = 27; 91 | this.dataGridView.Size = new System.Drawing.Size(931, 250); 92 | this.dataGridView.TabIndex = 0; 93 | // 94 | // groupBox2 95 | // 96 | this.groupBox2.Controls.Add(this.dataGridView); 97 | this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; 98 | this.groupBox2.Location = new System.Drawing.Point(0, 0); 99 | this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 100 | this.groupBox2.Name = "groupBox2"; 101 | this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); 102 | this.groupBox2.Size = new System.Drawing.Size(935, 268); 103 | this.groupBox2.TabIndex = 12; 104 | this.groupBox2.TabStop = false; 105 | // 106 | // groupBox1 107 | // 108 | this.groupBox1.BackColor = System.Drawing.SystemColors.Control; 109 | this.groupBox1.Controls.Add(this.groupBox5); 110 | this.groupBox1.Controls.Add(this.groupBox4); 111 | this.groupBox1.Controls.Add(this.groupBox3); 112 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom; 113 | this.groupBox1.Location = new System.Drawing.Point(0, 268); 114 | this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 115 | this.groupBox1.Name = "groupBox1"; 116 | this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); 117 | this.groupBox1.Size = new System.Drawing.Size(935, 206); 118 | this.groupBox1.TabIndex = 11; 119 | this.groupBox1.TabStop = false; 120 | this.groupBox1.Resize += new System.EventHandler(this.groupBox1_Resize); 121 | // 122 | // groupBox5 123 | // 124 | this.groupBox5.AutoSize = true; 125 | this.groupBox5.Controls.Add(this.dateTimePickerFrom); 126 | this.groupBox5.Controls.Add(this.placeTextBox); 127 | this.groupBox5.Controls.Add(this.label3); 128 | this.groupBox5.Controls.Add(this.label1); 129 | this.groupBox5.Controls.Add(this.dateTimePickerTo); 130 | this.groupBox5.Controls.Add(this.label2); 131 | this.groupBox5.Location = new System.Drawing.Point(64, 57); 132 | this.groupBox5.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 133 | this.groupBox5.Name = "groupBox5"; 134 | this.groupBox5.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); 135 | this.groupBox5.Size = new System.Drawing.Size(508, 91); 136 | this.groupBox5.TabIndex = 1; 137 | this.groupBox5.TabStop = false; 138 | this.groupBox5.Text = "groupBox5"; 139 | this.groupBox5.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox5_Paint); 140 | // 141 | // dateTimePickerFrom 142 | // 143 | this.dateTimePickerFrom.CustomFormat = "yyyy/MM/dd HH:mm:ss"; 144 | this.dateTimePickerFrom.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 145 | this.dateTimePickerFrom.Location = new System.Drawing.Point(110, 19); 146 | this.dateTimePickerFrom.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 147 | this.dateTimePickerFrom.Name = "dateTimePickerFrom"; 148 | this.dateTimePickerFrom.Size = new System.Drawing.Size(151, 21); 149 | this.dateTimePickerFrom.TabIndex = 12; 150 | // 151 | // placeTextBox 152 | // 153 | this.placeTextBox.Location = new System.Drawing.Point(240, 52); 154 | this.placeTextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 155 | this.placeTextBox.Name = "placeTextBox"; 156 | this.placeTextBox.Size = new System.Drawing.Size(76, 21); 157 | this.placeTextBox.TabIndex = 16; 158 | // 159 | // label3 160 | // 161 | this.label3.AutoSize = true; 162 | this.label3.Location = new System.Drawing.Point(183, 54); 163 | this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 164 | this.label3.Name = "label3"; 165 | this.label3.Size = new System.Drawing.Size(65, 12); 166 | this.label3.TabIndex = 15; 167 | this.label3.Text = "采样地点:"; 168 | // 169 | // label1 170 | // 171 | this.label1.AutoSize = true; 172 | this.label1.Location = new System.Drawing.Point(55, 25); 173 | this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 174 | this.label1.Name = "label1"; 175 | this.label1.Size = new System.Drawing.Size(53, 12); 176 | this.label1.TabIndex = 11; 177 | this.label1.Text = "时间段:"; 178 | // 179 | // dateTimePickerTo 180 | // 181 | this.dateTimePickerTo.CustomFormat = "yyyy/MM/dd HH:mm:ss"; 182 | this.dateTimePickerTo.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 183 | this.dateTimePickerTo.Location = new System.Drawing.Point(279, 19); 184 | this.dateTimePickerTo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 185 | this.dateTimePickerTo.Name = "dateTimePickerTo"; 186 | this.dateTimePickerTo.Size = new System.Drawing.Size(151, 21); 187 | this.dateTimePickerTo.TabIndex = 13; 188 | // 189 | // label2 190 | // 191 | this.label2.AutoSize = true; 192 | this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 193 | this.label2.Location = new System.Drawing.Point(263, 25); 194 | this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 195 | this.label2.Name = "label2"; 196 | this.label2.Size = new System.Drawing.Size(16, 16); 197 | this.label2.TabIndex = 14; 198 | this.label2.Text = "~"; 199 | // 200 | // groupBox4 201 | // 202 | this.groupBox4.AutoSize = true; 203 | this.groupBox4.Controls.Add(this.standardTextBox); 204 | this.groupBox4.Controls.Add(this.maxValueTextbox); 205 | this.groupBox4.Controls.Add(this.minValuetextBox); 206 | this.groupBox4.Controls.Add(this.averageTextBox); 207 | this.groupBox4.Controls.Add(this.wholeLines); 208 | this.groupBox4.Controls.Add(this.standardLabel); 209 | this.groupBox4.Controls.Add(this.averageLabel); 210 | this.groupBox4.Controls.Add(this.maxLabel); 211 | this.groupBox4.Controls.Add(this.minLabel); 212 | this.groupBox4.Controls.Add(this.wholeLabel); 213 | this.groupBox4.Location = new System.Drawing.Point(4, 1); 214 | this.groupBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 215 | this.groupBox4.Name = "groupBox4"; 216 | this.groupBox4.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); 217 | this.groupBox4.Size = new System.Drawing.Size(613, 60); 218 | this.groupBox4.TabIndex = 1; 219 | this.groupBox4.TabStop = false; 220 | this.groupBox4.Text = "groupBox4"; 221 | this.groupBox4.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox4_Paint); 222 | // 223 | // standardTextBox 224 | // 225 | this.standardTextBox.Location = new System.Drawing.Point(528, 21); 226 | this.standardTextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 227 | this.standardTextBox.Name = "standardTextBox"; 228 | this.standardTextBox.ReadOnly = true; 229 | this.standardTextBox.Size = new System.Drawing.Size(66, 21); 230 | this.standardTextBox.TabIndex = 30; 231 | this.standardTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 232 | // 233 | // maxValueTextbox 234 | // 235 | this.maxValueTextbox.Location = new System.Drawing.Point(191, 21); 236 | this.maxValueTextbox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 237 | this.maxValueTextbox.Name = "maxValueTextbox"; 238 | this.maxValueTextbox.ReadOnly = true; 239 | this.maxValueTextbox.Size = new System.Drawing.Size(55, 21); 240 | this.maxValueTextbox.TabIndex = 29; 241 | this.maxValueTextbox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 242 | // 243 | // minValuetextBox 244 | // 245 | this.minValuetextBox.Location = new System.Drawing.Point(299, 21); 246 | this.minValuetextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 247 | this.minValuetextBox.Name = "minValuetextBox"; 248 | this.minValuetextBox.ReadOnly = true; 249 | this.minValuetextBox.Size = new System.Drawing.Size(57, 21); 250 | this.minValuetextBox.TabIndex = 28; 251 | this.minValuetextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 252 | // 253 | // averageTextBox 254 | // 255 | this.averageTextBox.Location = new System.Drawing.Point(407, 21); 256 | this.averageTextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 257 | this.averageTextBox.Name = "averageTextBox"; 258 | this.averageTextBox.ReadOnly = true; 259 | this.averageTextBox.Size = new System.Drawing.Size(70, 21); 260 | this.averageTextBox.TabIndex = 27; 261 | this.averageTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 262 | // 263 | // wholeLines 264 | // 265 | this.wholeLines.Location = new System.Drawing.Point(90, 21); 266 | this.wholeLines.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 267 | this.wholeLines.Name = "wholeLines"; 268 | this.wholeLines.ReadOnly = true; 269 | this.wholeLines.Size = new System.Drawing.Size(52, 21); 270 | this.wholeLines.TabIndex = 26; 271 | this.wholeLines.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 272 | // 273 | // standardLabel 274 | // 275 | this.standardLabel.AutoSize = true; 276 | this.standardLabel.Location = new System.Drawing.Point(482, 25); 277 | this.standardLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 278 | this.standardLabel.Name = "standardLabel"; 279 | this.standardLabel.Size = new System.Drawing.Size(53, 12); 280 | this.standardLabel.TabIndex = 25; 281 | this.standardLabel.Text = "标准差:"; 282 | // 283 | // averageLabel 284 | // 285 | this.averageLabel.AutoSize = true; 286 | this.averageLabel.Location = new System.Drawing.Point(362, 25); 287 | this.averageLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 288 | this.averageLabel.Name = "averageLabel"; 289 | this.averageLabel.Size = new System.Drawing.Size(53, 12); 290 | this.averageLabel.TabIndex = 24; 291 | this.averageLabel.Text = "平均值:"; 292 | // 293 | // maxLabel 294 | // 295 | this.maxLabel.AutoSize = true; 296 | this.maxLabel.Location = new System.Drawing.Point(147, 25); 297 | this.maxLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 298 | this.maxLabel.Name = "maxLabel"; 299 | this.maxLabel.Size = new System.Drawing.Size(53, 12); 300 | this.maxLabel.TabIndex = 23; 301 | this.maxLabel.Text = "最大值:"; 302 | // 303 | // minLabel 304 | // 305 | this.minLabel.AutoSize = true; 306 | this.minLabel.Location = new System.Drawing.Point(254, 25); 307 | this.minLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 308 | this.minLabel.Name = "minLabel"; 309 | this.minLabel.Size = new System.Drawing.Size(53, 12); 310 | this.minLabel.TabIndex = 22; 311 | this.minLabel.Text = "最小值:"; 312 | // 313 | // wholeLabel 314 | // 315 | this.wholeLabel.AutoSize = true; 316 | this.wholeLabel.Location = new System.Drawing.Point(44, 25); 317 | this.wholeLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 318 | this.wholeLabel.Name = "wholeLabel"; 319 | this.wholeLabel.Size = new System.Drawing.Size(53, 12); 320 | this.wholeLabel.TabIndex = 21; 321 | this.wholeLabel.Text = "总行数:"; 322 | // 323 | // groupBox3 324 | // 325 | this.groupBox3.Controls.Add(this.updateButton); 326 | this.groupBox3.Controls.Add(this.saveExcelButton); 327 | this.groupBox3.Location = new System.Drawing.Point(194, 142); 328 | this.groupBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 329 | this.groupBox3.Name = "groupBox3"; 330 | this.groupBox3.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); 331 | this.groupBox3.Size = new System.Drawing.Size(268, 49); 332 | this.groupBox3.TabIndex = 21; 333 | this.groupBox3.TabStop = false; 334 | this.groupBox3.Text = "groupBox3"; 335 | this.groupBox3.Paint += new System.Windows.Forms.PaintEventHandler(this.groupBox3_Paint); 336 | // 337 | // updateButton 338 | // 339 | this.updateButton.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 340 | this.updateButton.Location = new System.Drawing.Point(24, 17); 341 | this.updateButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 342 | this.updateButton.Name = "updateButton"; 343 | this.updateButton.Size = new System.Drawing.Size(56, 30); 344 | this.updateButton.TabIndex = 9; 345 | this.updateButton.Text = "更新"; 346 | this.updateButton.UseVisualStyleBackColor = true; 347 | this.updateButton.Click += new System.EventHandler(this.updateButton_Click); 348 | // 349 | // saveExcelButton 350 | // 351 | this.saveExcelButton.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 352 | this.saveExcelButton.Location = new System.Drawing.Point(169, 18); 353 | this.saveExcelButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 354 | this.saveExcelButton.Name = "saveExcelButton"; 355 | this.saveExcelButton.Size = new System.Drawing.Size(56, 30); 356 | this.saveExcelButton.TabIndex = 10; 357 | this.saveExcelButton.Text = "保存"; 358 | this.saveExcelButton.UseVisualStyleBackColor = true; 359 | this.saveExcelButton.Click += new System.EventHandler(this.saveExcelButton_Click); 360 | // 361 | // searchDataBaseForm 362 | // 363 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 364 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 365 | this.ClientSize = new System.Drawing.Size(935, 474); 366 | this.Controls.Add(this.groupBox2); 367 | this.Controls.Add(this.groupBox1); 368 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 369 | this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 370 | this.MinimumSize = new System.Drawing.Size(662, 462); 371 | this.Name = "searchDataBaseForm"; 372 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 373 | this.Text = " 查询温度界面"; 374 | this.Load += new System.EventHandler(this.searchDataBase_Load); 375 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); 376 | this.groupBox2.ResumeLayout(false); 377 | this.groupBox1.ResumeLayout(false); 378 | this.groupBox1.PerformLayout(); 379 | this.groupBox5.ResumeLayout(false); 380 | this.groupBox5.PerformLayout(); 381 | this.groupBox4.ResumeLayout(false); 382 | this.groupBox4.PerformLayout(); 383 | this.groupBox3.ResumeLayout(false); 384 | this.ResumeLayout(false); 385 | 386 | } 387 | 388 | #endregion 389 | 390 | private System.Windows.Forms.DataGridView dataGridView; 391 | private System.Windows.Forms.GroupBox groupBox2; 392 | private System.Windows.Forms.GroupBox groupBox1; 393 | private System.Windows.Forms.GroupBox groupBox3; 394 | private System.Windows.Forms.Button updateButton; 395 | private System.Windows.Forms.Button saveExcelButton; 396 | private System.Windows.Forms.GroupBox groupBox5; 397 | private System.Windows.Forms.DateTimePicker dateTimePickerFrom; 398 | private System.Windows.Forms.TextBox placeTextBox; 399 | private System.Windows.Forms.Label label3; 400 | private System.Windows.Forms.Label label1; 401 | private System.Windows.Forms.DateTimePicker dateTimePickerTo; 402 | private System.Windows.Forms.Label label2; 403 | private System.Windows.Forms.GroupBox groupBox4; 404 | private System.Windows.Forms.TextBox standardTextBox; 405 | private System.Windows.Forms.TextBox maxValueTextbox; 406 | private System.Windows.Forms.TextBox minValuetextBox; 407 | private System.Windows.Forms.TextBox averageTextBox; 408 | private System.Windows.Forms.TextBox wholeLines; 409 | private System.Windows.Forms.Label standardLabel; 410 | private System.Windows.Forms.Label averageLabel; 411 | private System.Windows.Forms.Label maxLabel; 412 | private System.Windows.Forms.Label minLabel; 413 | private System.Windows.Forms.Label wholeLabel; 414 | } 415 | } -------------------------------------------------------------------------------- /串口调试助手/View/searchDataBaseForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.IO; 11 | using System.Reflection; 12 | using Microsoft.Office.Interop.Excel; 13 | using Excel = Microsoft.Office.Interop.Excel; 14 | 15 | namespace 串口调试助手 16 | { 17 | public partial class searchDataBaseForm : Form 18 | { 19 | public static string fileName = DateTime.Now.Year + "" + DateTime.Now.Month + "" + DateTime.Now.Day + ".txt"; 20 | 21 | //public static string roadName = @"C:\Users\陈俊杰\Desktop\串口调试助手1"; //路径名 22 | 23 | public static string temperatureFile = @"..\..\..\温度记录文件"; //路径名 24 | 25 | private ContentResize groupBoxResize = new ContentResize(); 26 | 27 | private ExcelEdit excelEdit; 28 | 29 | public searchDataBaseForm() 30 | { 31 | InitializeComponent(); 32 | } 33 | 34 | private void searchDataBase_Load(object sender, EventArgs e) 35 | { 36 | groupBoxResize.GroupBoxReSize(groupBox3, groupBox1); 37 | groupBoxResize.GroupBoxReSize(groupBox4, groupBox1); 38 | groupBoxResize.GroupBoxReSize(groupBox5, groupBox1); 39 | 40 | dataGridView.Columns.Add("id", "id"); 41 | dataGridView.Columns.Add("type", "用户类型"); 42 | dataGridView.Columns.Add("user", "用户名"); 43 | dataGridView.Columns.Add("time", "时间"); 44 | dataGridView.Columns.Add("temperature", "温度"); 45 | dataGridView.Columns.Add("place", "采样地点"); 46 | dataGridView.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; //单元列内容居中显示 47 | dataGridView.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; 48 | dataGridView.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; 49 | dataGridView.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; 50 | dataGridView.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; 51 | dataGridView.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; 52 | 53 | // dateTimePickerFrom.CustomFormat = "yyyy/MM/dd HH:mm"; 54 | // dateTimePickerFrom.Value = DateTime.ParseExact("00:01","HH;mm",null); 55 | 56 | List ListTable = LoginForm.access.searchTable("温度表"); 57 | string[][] temperature = new string[ListTable.Count][]; 58 | for (int i = 0; i < ListTable.Count; i++) 59 | { 60 | temperature[i] = ListTable[i].Split('~'); 61 | Console.WriteLine(ListTable[i]); 62 | } 63 | 64 | int num = 0; 65 | double[] temperatureValue = new double[ListTable.Count]; 66 | 67 | foreach (string[] rowTemperature in temperature) //遍历二维数组 68 | { 69 | DataGridViewRow row = new DataGridViewRow(); 70 | int index = dataGridView.Rows.Add(row); 71 | 72 | 73 | dataGridView.Rows[index].Cells[0].Value = rowTemperature[0]; 74 | dataGridView.Rows[index].Cells[1].Value = rowTemperature[1]; 75 | dataGridView.Rows[index].Cells[2].Value = rowTemperature[2]; 76 | dataGridView.Rows[index].Cells[3].Value = rowTemperature[3]; 77 | dataGridView.Rows[index].Cells[4].Value = rowTemperature[4]; 78 | dataGridView.Rows[index].Cells[5].Value = rowTemperature[5]; 79 | 80 | temperatureValue[num] = Convert.ToDouble(rowTemperature[4].Replace("℃", "")); 81 | num++; 82 | 83 | } 84 | 85 | wholeLines.Text = ListTable.Count.ToString(); 86 | 87 | if (ListTable.Count > 0) 88 | { 89 | maxValueTextbox.Text = temperatureValue.Max() + "℃"; 90 | minValuetextBox.Text = temperatureValue.Min() + "℃"; 91 | 92 | double average = temperatureValue.Average(); //求平均值 93 | double standard = 0; 94 | 95 | for (int i = 0; i < ListTable.Count; i++) 96 | { 97 | standard += Math.Pow(temperatureValue[i] - average, 2); 98 | } 99 | 100 | averageTextBox.Text = average.ToString("f5") + "℃"; 101 | standardTextBox.Text = Math.Sqrt(standard / ListTable.Count).ToString("f5"); //格式化,只有五个小数 102 | } 103 | 104 | } 105 | 106 | 107 | /// 108 | /// "更新"按钮操作 109 | /// 110 | /// 111 | /// 112 | private void updateButton_Click(object sender, EventArgs e) 113 | { 114 | dataGridView.Rows.Clear(); 115 | dataGridView.Refresh(); 116 | maxValueTextbox.Text = null; 117 | minValuetextBox.Text = null; 118 | averageTextBox.Text = null; 119 | standardTextBox.Text = null; 120 | wholeLines.Text = null; 121 | 122 | 123 | DateTime timeFrom = new DateTime(); 124 | DateTime timeTo = new DateTime(); 125 | string placeName = placeTextBox.Text.Trim(); //获取地址名 126 | 127 | timeFrom = dateTimePickerFrom.Value; 128 | timeTo = dateTimePickerTo.Value; 129 | 130 | Console.WriteLine("From time : " + timeFrom.ToString()); 131 | Console.WriteLine("To time : " + timeTo.ToString()); 132 | 133 | 134 | 135 | if (DateTime.Compare(timeFrom, timeTo) > 0) 136 | MessageBox.Show("时间段格式不符合实际!"); 137 | else 138 | { 139 | 140 | // DateTime d = Convert.ToDateTime("2017/12/4 13:52:47"); 141 | List ListTemperature = null; 142 | 143 | if(LoginForm.userType == "管理员") 144 | ListTemperature = LoginForm.access.searchTemperature("温度表", placeName, timeFrom, timeTo); 145 | else 146 | ListTemperature = LoginForm.access.searchTemperature("温度表", LoginForm.userType, LoginForm.userName ,placeName, timeFrom, timeTo); 147 | 148 | string[][] temperature = new string[ListTemperature.Count][]; 149 | for (int i = 0; i < ListTemperature.Count; i++) 150 | { 151 | temperature[i] = ListTemperature[i].Split('~'); 152 | Console.WriteLine(ListTemperature[i]); 153 | } 154 | 155 | int num = 0; 156 | double[] temperatureValue = new double[ListTemperature.Count]; 157 | 158 | foreach (string[] rowTemperature in temperature) //遍历二维数组 159 | { 160 | DataGridViewRow row = new DataGridViewRow(); 161 | int index = dataGridView.Rows.Add(row); 162 | 163 | 164 | dataGridView.Rows[index].Cells[0].Value = rowTemperature[0]; 165 | dataGridView.Rows[index].Cells[1].Value = rowTemperature[1]; 166 | dataGridView.Rows[index].Cells[2].Value = rowTemperature[2]; 167 | dataGridView.Rows[index].Cells[3].Value = rowTemperature[3]; 168 | dataGridView.Rows[index].Cells[4].Value = rowTemperature[4]; 169 | dataGridView.Rows[index].Cells[5].Value = rowTemperature[5]; 170 | 171 | temperatureValue[num] = Convert.ToDouble(rowTemperature[4].Replace("℃", "")); 172 | num++; 173 | 174 | } 175 | 176 | wholeLines.Text = ListTemperature.Count.ToString(); 177 | 178 | if (ListTemperature.Count > 0) 179 | { 180 | maxValueTextbox.Text = temperatureValue.Max() + "℃"; 181 | minValuetextBox.Text = temperatureValue.Min() + "℃"; 182 | 183 | double average = temperatureValue.Average(); //求平均值 184 | double standard = 0; 185 | 186 | for (int i = 0; i < ListTemperature.Count; i++) 187 | { 188 | standard += Math.Pow(temperatureValue[i] - average, 2); 189 | } 190 | 191 | averageTextBox.Text = average.ToString("f5") + "℃"; 192 | standardTextBox.Text = Math.Sqrt(standard / ListTemperature.Count).ToString("f5"); //格式化,只有五个小数 193 | } 194 | 195 | } 196 | 197 | } 198 | 199 | /// 200 | /// "保存excel文件"按钮 201 | /// 202 | /// 203 | /// 204 | private void saveExcelButton_Click(object sender, EventArgs e) 205 | { 206 | string excelRoad = DateTime.Now.Year + "" + DateTime.Now.Month + "" + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xls"; 207 | // bitmap.Save(temperatureFile + '\\' + excelRoad); 208 | 209 | SaveFileDialog excelFile = new SaveFileDialog(); 210 | excelFile.Filter = "Excel files (*.xls)|* .xls"; 211 | excelFile.FilterIndex = 0; 212 | excelFile.RestoreDirectory = true; 213 | excelFile.CreatePrompt = true; 214 | excelFile.Title = "保存为Excel文件"; 215 | 216 | if (excelFile.ShowDialog() == DialogResult.OK) 217 | { 218 | 219 | #region excel的文件流操作 220 | //Stream excelStream; 221 | //excelStream = excelFile.OpenFile(); //输出文件 222 | 223 | //StreamWriter writer = new StreamWriter(excelStream, Encoding.GetEncoding(0)); 224 | //string columnTitle = ""; 225 | 226 | 227 | // try 228 | // { 229 | // //写入列标题 230 | // for(int i=0;i< dataGridView.ColumnCount;i++ ) 231 | // { 232 | // if (i > 0) 233 | // columnTitle += '\t'; 234 | // columnTitle += dataGridView.Columns[i].HeaderText; 235 | // } 236 | 237 | // writer.WriteLine(columnTitle); 238 | 239 | 240 | // //写入行内容 241 | // for (int i = 0; i < dataGridView.Rows.Count; i++) 242 | // { 243 | // string content = null; 244 | // for (int j = 0; j < dataGridView.Columns.Count; j++) 245 | // { 246 | // if (j > 0) 247 | // { 248 | // content += '\t'; 249 | // } 250 | 251 | // content += dataGridView.Rows[i].Cells[j].Value.ToString(); 252 | // } 253 | // writer.WriteLine(content); 254 | // } 255 | 256 | // writer.Close(); 257 | // excelStream.Close(); 258 | // } 259 | // catch(Exception ex) 260 | // { 261 | // Console.WriteLine("error from 保存excel:"+ex); 262 | // } 263 | // finally 264 | // { 265 | // writer.Close(); 266 | // excelStream.Close(); 267 | // } 268 | #endregion 269 | 270 | 271 | #region excel的workBook和Worksheet操作 272 | 273 | try 274 | { 275 | string fileRoad = excelFile.FileName.ToString(); //获取文件路径 276 | excelEdit = new ExcelEdit(fileRoad); 277 | 278 | string[] header = new string[dataGridView.ColumnCount]; 279 | //写入列标题 280 | for (int i = 0; i < dataGridView.ColumnCount; i++) 281 | { 282 | 283 | header[i] = dataGridView.Columns[i].HeaderText; 284 | } 285 | 286 | excelEdit.AddData(header); 287 | 288 | 289 | int row = dataGridView.Rows.Count - 1; // 一般会计算多一条空白行 290 | int col = dataGridView.Columns.Count; 291 | 292 | //写入行内容 293 | for (int i = 0; i < row; i++) 294 | { 295 | string[] content = new string[dataGridView.ColumnCount]; 296 | for (int j = 0; j < col; j++) 297 | { 298 | content[j] = dataGridView.Rows[i].Cells[j].Value.ToString(); 299 | } 300 | excelEdit.AddData(content); 301 | 302 | } 303 | 304 | string[][] str = new string[5][]; 305 | str[0] = new string[] { wholeLabel.Text, wholeLines.Text }; 306 | str[1] = new string[] { maxLabel.Text, maxValueTextbox.Text }; 307 | str[2] = new string[] { minLabel.Text, minValuetextBox.Text }; 308 | str[3] = new string[] { averageLabel.Text, averageTextBox.Text }; 309 | str[4] = new string[] { standardLabel.Text, standardTextBox.Text }; 310 | 311 | int q = 1; 312 | foreach (string[] s in str) 313 | { 314 | excelEdit.AddData2(s); 315 | } 316 | 317 | 318 | excelEdit.Format(); 319 | excelEdit.Close(); 320 | MessageBox.Show("保存文件成功!"); 321 | 322 | } 323 | catch (Exception ex) 324 | { 325 | Console.WriteLine("error from Excel的Workbook 和 workSheet 操作 " + ex); 326 | } 327 | //finally 328 | //{ 329 | // GC.Collect(); 330 | // this.Close(); 331 | //} 332 | 333 | #endregion 334 | 335 | 336 | } 337 | 338 | } 339 | 340 | 341 | 342 | 343 | /// 344 | /// 主要是父GroupBox,调整边框大小,主要是三个子groupBox居中 345 | /// 346 | /// 347 | /// 348 | private void groupBox1_Resize(object sender, EventArgs e) 349 | { 350 | groupBoxResize.GroupBoxReSize(groupBox3, groupBox1); 351 | groupBoxResize.GroupBoxReSize(groupBox4, groupBox1); 352 | groupBoxResize.GroupBoxReSize(groupBox5, groupBox1); 353 | } 354 | 355 | 356 | /// 357 | /// 下面三个都是groupbox的重绘,目的是将去掉groupBox的边框 358 | /// 359 | /// 360 | /// 361 | private void groupBox3_Paint(object sender, PaintEventArgs e) 362 | { 363 | e.Graphics.Clear(this.BackColor); 364 | } 365 | 366 | private void groupBox5_Paint(object sender, PaintEventArgs e) 367 | { 368 | e.Graphics.Clear(this.BackColor); 369 | } 370 | 371 | private void groupBox4_Paint(object sender, PaintEventArgs e) 372 | { 373 | e.Graphics.Clear(this.BackColor); 374 | } 375 | } 376 | } 377 | -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/log.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/bin/Debug/log.log -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/school.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/bin/Debug/school.jpg -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/串口调试助手.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/bin/Debug/串口调试助手.exe -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/串口调试助手.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/串口调试助手.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/bin/Debug/串口调试助手.pdb -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/串口调试助手.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/bin/Debug/串口调试助手.vshost.exe -------------------------------------------------------------------------------- /串口调试助手/bin/Debug/串口调试助手.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/Interop.ADOX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/Interop.ADOX.dll -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/TempPE/Control.JunDataSet.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/TempPE/Control.JunDataSet.Designer.cs.dll -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/TempPE/JunDataSet.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/TempPE/JunDataSet.Designer.cs.dll -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/TempPE/Model.JunDataSet.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/TempPE/Model.JunDataSet.Designer.cs.dll -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.AboutForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.AboutForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.CRCForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.CRCForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.ChangePWDForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.ChangePWDForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.DeleteUserForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.DeleteUserForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.LoginForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.LoginForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.MainForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.PictureForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.PictureForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.Properties.Resources.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.ReadForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.ReadForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.RegisterForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.RegisterForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe.config 2 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe 3 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\bin\Debug\串口调试助手.pdb 4 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 5 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 6 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 7 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.exe 8 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.pdb 9 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 10 | D:\AI VS 2010\源程序\串口调试助手\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 11 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe.config 12 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.exe 13 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.pdb 14 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe 15 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\bin\Debug\串口调试助手.pdb 16 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 17 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 18 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 19 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 20 | E:\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe.config 21 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.exe 22 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.pdb 23 | E:\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe 24 | E:\串口调试助手\串口调试助手\bin\Debug\串口调试助手.pdb 25 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 26 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 27 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 28 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 29 | E:\串口调试助手\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 30 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 31 | C:\Users\陈俊杰\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 32 | C:\Users\Jun\Desktop\串口调试助手\串口调试助手\bin\Debug\串口调试助手.exe.config 33 | C:\Users\Jun\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.exe 34 | C:\Users\Jun\Desktop\串口调试助手\串口调试助手\obj\Debug\串口调试助手.pdb 35 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.exe.config 36 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.exe 37 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.pdb 38 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.exe 39 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.pdb 40 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 41 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 42 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 43 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 44 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 45 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 46 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.exe.config 47 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.exe 48 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.pdb 49 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.exe 50 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.pdb 51 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 52 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 53 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 54 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 55 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 56 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 57 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 58 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 59 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 60 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 61 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 62 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 63 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 64 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 65 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 66 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 67 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 68 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 69 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.DrawForm.resources 70 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.DrawForm.resources 71 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\Interop.ADOX.dll 72 | C:\Users\陈俊杰\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 73 | D:\AI VS 2010\源程序\串口调试助手1\串口调试助手\bin\Debug\串口调试助手.exe.config 74 | D:\AI VS 2010\源程序\串口调试助手1\串口调试助手\obj\Debug\Interop.ADOX.dll 75 | D:\AI VS 2010\源程序\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 76 | D:\AI VS 2010\源程序\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.exe 77 | D:\AI VS 2010\源程序\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.pdb 78 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\Interop.ADOX.dll 79 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 80 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\bin\Debug\串口调试助手.exe.config 81 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\Interop.ADOX.dll 82 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 83 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.exe 84 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.pdb 85 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\bin\Debug\串口调试助手.exe 86 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\bin\Debug\串口调试助手.pdb 87 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 88 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.DrawForm.resources 89 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 90 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 91 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 92 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 93 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 94 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 95 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 96 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 97 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 98 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 99 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 100 | C:\Users\Jun\Desktop\实验10\串口调试助手\bin\Debug\串口调试助手.exe.config 101 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\Interop.ADOX.dll 102 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 103 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.exe 104 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.pdb 105 | C:\Users\Jun\Desktop\实验10\串口调试助手\bin\Debug\串口调试助手.exe 106 | C:\Users\Jun\Desktop\实验10\串口调试助手\bin\Debug\串口调试助手.pdb 107 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 108 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.DrawForm.resources 109 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 110 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 111 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 112 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 113 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 114 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 115 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 116 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 117 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 118 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 119 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 120 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.searchDataBaseForm.resources 121 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.searchDataBaseForm.resources 122 | C:\Users\陈俊杰\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.PictureForm.resources 123 | C:\Users\Jun\Desktop\实验10\串口调试助手\obj\Debug\串口调试助手.PictureForm.resources 124 | C:\Users\陈俊杰\Desktop\虚拟机\实验10\串口调试助手\bin\Debug\串口调试助手.exe.config 125 | C:\Users\陈俊杰\Desktop\虚拟机\实验10\串口调试助手\obj\Debug\Interop.ADOX.dll 126 | C:\Users\陈俊杰\Desktop\虚拟机\实验10\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 127 | C:\Users\陈俊杰\Desktop\虚拟机\实验10\串口调试助手\obj\Debug\串口调试助手.exe 128 | C:\Users\陈俊杰\Desktop\虚拟机\实验10\串口调试助手\obj\Debug\串口调试助手.pdb 129 | C:\Users\陈俊杰\Desktop\虚拟机\实验10 - 副本\串口调试助手\bin\Debug\串口调试助手.exe.config 130 | C:\Users\陈俊杰\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\Interop.ADOX.dll 131 | C:\Users\陈俊杰\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 132 | C:\Users\陈俊杰\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.exe 133 | C:\Users\陈俊杰\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.pdb 134 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\bin\Debug\串口调试助手.exe.config 135 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\Interop.ADOX.dll 136 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 137 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.exe 138 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.pdb 139 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\bin\Debug\串口调试助手.exe 140 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\bin\Debug\串口调试助手.pdb 141 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 142 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.PictureForm.resources 143 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.searchDataBaseForm.resources 144 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 145 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 146 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 147 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 148 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 149 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 150 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 151 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 152 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 153 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 154 | C:\Users\Administrator\Desktop\虚拟机\实验10 - 副本\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 155 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.exe.config 156 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\Interop.ADOX.dll 157 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 158 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.exe 159 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.pdb 160 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.exe 161 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.pdb 162 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 163 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.PictureForm.resources 164 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.searchDataBaseForm.resources 165 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 166 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 167 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 168 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 169 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 170 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 171 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 172 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 173 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 174 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 175 | C:\Users\Administrator\Desktop\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 176 | F:\C#上机\虚拟机\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.exe.config 177 | F:\C#上机\虚拟机\C#期末答辩\串口调试助手\obj\Debug\Interop.ADOX.dll 178 | F:\C#上机\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 179 | F:\C#上机\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.exe 180 | F:\C#上机\虚拟机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.pdb 181 | F:\C#上机\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.exe.config 182 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\Interop.ADOX.dll 183 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 184 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.exe 185 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.pdb 186 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 187 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.PictureForm.resources 188 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.searchDataBaseForm.resources 189 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 190 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 191 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 192 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 193 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 194 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 195 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.View.HelpForm.resources 196 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 197 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 198 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 199 | F:\C#上机\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 200 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.exe.config 201 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\Interop.ADOX.dll 202 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.ResolveComReference.cache 203 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.exe 204 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.pdb 205 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csprojResolveAssemblyReference.cache 206 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.PictureForm.resources 207 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.searchDataBaseForm.resources 208 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.DeleteUserForm.resources 209 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.ReadForm.resources 210 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.ChangePWDForm.resources 211 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.RegisterForm.resources 212 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.AboutForm.resources 213 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.CRCForm.resources 214 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.LoginForm.resources 215 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.MainForm.resources 216 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.Properties.Resources.resources 217 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\obj\Debug\串口调试助手.csproj.GenerateResource.Cache 218 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.exe 219 | C:\Users\陈俊杰\Desktop\C#期末答辩\串口调试助手\bin\Debug\串口调试助手.pdb 220 | -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.csproj.ResolveComReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.csproj.ResolveComReference.cache -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.exe -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.pdb -------------------------------------------------------------------------------- /串口调试助手/obj/Debug/串口调试助手.searchDataBaseForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/Debug/串口调试助手.searchDataBaseForm.resources -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/Interop.ADOX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/x86/Debug/Interop.ADOX.dll -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/build.force: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/x86/Debug/build.force -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/串口调试助手.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Jun\Desktop\串口调试助手1\串口调试助手\obj\x86\Debug\Interop.ADOX.dll 2 | -------------------------------------------------------------------------------- /串口调试助手/obj/x86/Debug/串口调试助手.csproj.ResolveComReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/串口调试助手/obj/x86/Debug/串口调试助手.csproj.ResolveComReference.cache -------------------------------------------------------------------------------- /串口调试助手/串口调试助手.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B625ACBC-FC3B-4BFB-B0F8-9E74175AB220} 8 | WinExe 9 | Properties 10 | 串口调试助手 11 | 串口调试助手 12 | v4.5.2 13 | 512 14 | true 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 0 26 | 1.0.0.%2a 27 | false 28 | false 29 | true 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | 41 | 42 | AnyCPU 43 | pdbonly 44 | true 45 | bin\Release\ 46 | TRACE 47 | prompt 48 | 4 49 | 50 | 51 | Image\bitbug_favicon %281%29.ico 52 | 53 | 54 | true 55 | bin\x86\Debug\ 56 | DEBUG;TRACE 57 | full 58 | x86 59 | prompt 60 | MinimumRecommendedRules.ruleset 61 | true 62 | 63 | 64 | bin\x86\Release\ 65 | TRACE 66 | true 67 | pdbonly 68 | x86 69 | prompt 70 | MinimumRecommendedRules.ruleset 71 | true 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | True 94 | True 95 | JunDataSet.xsd 96 | 97 | 98 | 99 | Form 100 | 101 | 102 | PictureForm.cs 103 | 104 | 105 | Form 106 | 107 | 108 | searchDataBaseForm.cs 109 | 110 | 111 | Form 112 | 113 | 114 | DeleteUserForm.cs 115 | 116 | 117 | Form 118 | 119 | 120 | ReadForm.cs 121 | 122 | 123 | 124 | Form 125 | 126 | 127 | ChangePWDForm.cs 128 | 129 | 130 | 131 | Form 132 | 133 | 134 | RegisterForm.cs 135 | 136 | 137 | Form 138 | 139 | 140 | AboutForm.cs 141 | 142 | 143 | Form 144 | 145 | 146 | CRCForm.cs 147 | 148 | 149 | Form 150 | 151 | 152 | LoginForm.cs 153 | 154 | 155 | Form 156 | 157 | 158 | MainForm.cs 159 | 160 | 161 | 162 | 163 | PictureForm.cs 164 | 165 | 166 | searchDataBaseForm.cs 167 | 168 | 169 | DeleteUserForm.cs 170 | 171 | 172 | ReadForm.cs 173 | 174 | 175 | ChangePWDForm.cs 176 | 177 | 178 | RegisterForm.cs 179 | 180 | 181 | AboutForm.cs 182 | 183 | 184 | CRCForm.cs 185 | 186 | 187 | LoginForm.cs 188 | 189 | 190 | MainForm.cs 191 | 192 | 193 | ResXFileCodeGenerator 194 | Resources.Designer.cs 195 | Designer 196 | 197 | 198 | True 199 | Resources.resx 200 | 201 | 202 | JunDataSet.xsd 203 | 204 | 205 | MSDataSetGenerator 206 | JunDataSet.Designer.cs 207 | Designer 208 | 209 | 210 | JunDataSet.xsd 211 | 212 | 213 | SettingsSingleFileGenerator 214 | Settings.Designer.cs 215 | 216 | 217 | True 218 | Settings.settings 219 | True 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | False 232 | Microsoft .NET Framework 4.5.2 %28x86 和 x64%29 233 | true 234 | 235 | 236 | False 237 | .NET Framework 3.5 SP1 238 | false 239 | 240 | 241 | 242 | 243 | {00000600-0000-0010-8000-00AA006D2EA4} 244 | 2 245 | 8 246 | 0 247 | tlbimp 248 | False 249 | True 250 | 251 | 252 | {00020813-0000-0000-C000-000000000046} 253 | 1 254 | 9 255 | 0 256 | primary 257 | False 258 | True 259 | 260 | 261 | {0002E157-0000-0000-C000-000000000046} 262 | 5 263 | 3 264 | 0 265 | primary 266 | False 267 | True 268 | 269 | 270 | 271 | 272 | 273 | 274 | 281 | -------------------------------------------------------------------------------- /串口调试助手/串口调试助手.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | zh-CN 11 | false 12 | 13 | -------------------------------------------------------------------------------- /温度折线图/20171211123910.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211123910.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124026.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124026.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124033.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124033.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124116.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124116.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124120.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124120.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124129.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124129.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124339.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124339.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124351.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124351.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124355.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124355.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124440.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124440.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124455.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124455.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124550.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124550.jpg -------------------------------------------------------------------------------- /温度折线图/20171211124559.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211124559.jpg -------------------------------------------------------------------------------- /温度折线图/2017121112466.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121112466.jpg -------------------------------------------------------------------------------- /温度折线图/20171211125314.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211125314.jpg -------------------------------------------------------------------------------- /温度折线图/20171211125349.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211125349.jpg -------------------------------------------------------------------------------- /温度折线图/20171211125432.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211125432.jpg -------------------------------------------------------------------------------- /温度折线图/20171211125524.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211125524.jpg -------------------------------------------------------------------------------- /温度折线图/20171211125544.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211125544.jpg -------------------------------------------------------------------------------- /温度折线图/20171211125958.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/20171211125958.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113031.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113031.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113036.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113036.jpg -------------------------------------------------------------------------------- /温度折线图/201712111306.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/201712111306.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113343.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113343.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113428.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113428.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113544.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113544.jpg -------------------------------------------------------------------------------- /温度折线图/201712111357.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/201712111357.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113630.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113630.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113637.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113637.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113742.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113742.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113750.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113750.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113754.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113754.jpg -------------------------------------------------------------------------------- /温度折线图/201712111381.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/201712111381.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113820.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113820.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113824.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113824.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113829.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113829.jpg -------------------------------------------------------------------------------- /温度折线图/2017121113834.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/2017121113834.jpg -------------------------------------------------------------------------------- /温度折线图/201712111393.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度折线图/201712111393.jpg -------------------------------------------------------------------------------- /温度记录文件/20171211.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度记录文件/20171211.txt -------------------------------------------------------------------------------- /温度记录文件/2018111.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度记录文件/2018111.txt -------------------------------------------------------------------------------- /温度记录文件/2018114.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/J-JunChen/SerialPort_experience10/5c818ae2b084d84eb466d2710c681f30249948a9/温度记录文件/2018114.txt --------------------------------------------------------------------------------