• 大小: 4.57MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-09
  • 语言: C#
  • 标签: STM32  上位机  绘图  C#  

资源简介

采用NTC热敏电阻,十路STM32F1ADC采样,文件包括PCB、下位机程序、上位机程序,上位机采用C#编写。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.IO.Ports;
using System.IO;
using System.Text.Regularexpressions;
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public delegate void TextCallback(System.Windows.Forms.TextBox TexBoxName string text);
        public delegate void SetLabelCallback(System.Windows.Forms.Label LabelName string text);
        public delegate string TexCallback(System.Windows.Forms.Label LabelNamet);
        public delegate void ChartPointAddXYCallback(double XValue double YValue int SeriesName);
        public delegate void SetAxisXCallback(double AxisXMinimum double AxisXMaximum);
        public delegate void SetAxisYCallback(double AxisXMinimum double AxisXMaximum);
        public delegate void SeriesEnabledCallback(int SeiresNamebool Enabled);
        public delegate void SwitchSerialPortCallback(bool Switch);
        public delegate void RemovePointsCallback(double AxisXMin int SeriesName);
        
        public Form1()
        {
            InitializeComponent();
            UesrInit();
        }
        string filename;
        public void UesrInit()
        {
            filename = DateTime.Now.ToString(“yy-MM-dd-HH-mm-ss“);
            DataSaveFlag = 0;
            CheckBox[] CheckBoxName = new CheckBox[10] { checkBox1 checkBox2
                        checkBox3 checkBox4 checkBox5 checkBox6 checkBox7 checkBox8 checkBox9 checkBox10 };
            TextBox[] TextBoxName = new TextBox[13] { textBox3 textBox4 textBox5 textBox6 textBox7 textBox8 textBox9 
                        textBox10 textBox11 textBox12 textBox13 textBox14 textBox15 };
            try
            {
                string data = System.IO.File.ReadAllText(@“data“ System.Text.Encoding.Default);
                byte[] datebytes = System.Text.Encoding.Default.GetBytes(data);
                int[] dataposit = new int[30];
                for (int i = 0 j = 0; i < datebytes.Length; i++ j++)
                {
                    if (datebytes[i] == 44)
                    {
                        dataposit[0]++;
                        dataposit[dataposit[0]] = j;

                    }
                    else if (datebytes[i] > 127) i++;
                }
                if (dataposit[0] == 24)
                {
                    string datatemp;

                    for (int i = 0; i < 10;i++ )
                    {
                        datatemp = data.Remove(dataposit[i+1]);
                        if(i>0)datatemp = datatemp.Remove(0 dataposit[i] + 1);
                        if (datatemp == “True“) CheckBoxName[i].Checked = true;
                        else CheckBoxName[i].Checked = false;
             

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-27 15:47  Tem-X V0.1\
     文件       43520  2018-07-30 09:07  Tem-X V0.1\103_1%_ 3950K_1%.xls
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1PCB\
     文件     1009476  2018-07-27 08:57  Tem-X V0.1\Tem-X V0.1PCB\Tem-X V0.1.PcbDoc
     文件       31626  2018-07-27 08:57  Tem-X V0.1\Tem-X V0.1PCB\Tem-X V0.1.PrjPCB
     文件      281600  2018-07-27 08:57  Tem-X V0.1\Tem-X V0.1PCB\Tem-X V0.1.SchDoc
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1PCB\__Previews\
     文件        4511  2018-07-30 09:50  Tem-X V0.1\Tem-X V0.1PCB\__Previews\Tem-X V0.1.PcbDocPreview
     文件       10796  2018-07-30 09:50  Tem-X V0.1\Tem-X V0.1PCB\__Previews\Tem-X V0.1.SchDocPreview
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1上位机\
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\
     文件         187  2018-08-10 14:09  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\App.config
     文件       63696  2018-08-11 16:57  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Form1.Designer.cs
     文件       34024  2018-08-16 10:49  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Form1.cs
     文件      108549  2018-08-13 15:02  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Form1.resx
     文件         536  2018-08-10 14:09  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Program.cs
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Properties\
     文件        1505  2018-08-11 16:41  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Properties\AssemblyInfo.cs
     文件        2848  2018-08-11 16:37  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Properties\Resources.Designer.cs
     文件        5612  2018-08-10 14:09  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Properties\Resources.resx
     文件        1104  2018-08-11 16:37  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Properties\Settings.Designer.cs
     文件         249  2018-08-10 14:09  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Properties\Settings.settings
     文件        4052  2018-08-11 16:38  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Tem-X V0.1.csproj
     文件         988  2018-08-11 16:42  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Tem-X V0.1.sln
     文件       36864  2018-08-16 11:00  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Tem-X V0.1.v12.suo
     文件       67646  2018-08-03 16:46  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\Tem.ico
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\bin\
     目录           0  2018-08-27 15:47  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\bin\Debug\
     文件      180224  2018-08-16 10:50  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\bin\Debug\Tem-X V0.1.exe
     文件         187  2018-08-10 14:09  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\bin\Debug\Tem-X V0.1.exe.config
     文件       54784  2018-08-16 10:50  Tem-X V0.1\Tem-X V0.1上位机\Tem-X V0.1\bin\Debug\Tem-X V0.1.pdb
............此处省略275个文件信息

评论

共有 条评论