• 大小: 628KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-13
  • 语言: C#
  • 标签: 示波器  

资源简介

C#示波器完整【可多通道输入信号并显示出来】 C#示波器完整【可多通道输入信号并显示出来】 C#示波器完整【可多通道输入信号并显示出来】

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Globalization;

namespace Serial_Oscilloscope
{
    class CsvFileWriter
    {
        /// 
        /// File path of CSV file.
        /// 

        public string FilePath { get; private set; }

        /// 
        /// Internal flag used to disable writes during file close.
        /// 

        private bool writesEnabled;

        /// 
        /// Stream Writer to write to file.
        /// 

        private StreamWriter streamWriter;

        /// 
        /// Constructor.
        /// 

        /// 
        public CsvFileWriter(string filePath)
        {
            FilePath = filePath;
            writesEnabled = true;
            streamWriter = null;
        }

        /// 
        /// Close CSV file.
        /// 

        public void CloseFile()
        {
            List fileNames = new List();
            writesEnabled = false;
            streamWriter.Close();
        }

        /// 
        /// Write array of values as line of CSVs in file.
        /// 

        /// 
        public void WriteCSVline(float[] values)
        {
            if (writesEnabled)
            {
                // Open file
                if (streamWriter == null)
                {
                    streamWriter = new System.IO.StreamWriter(FilePath false);
                }

                // Write line
                string csvLine = ““;
                for(int i = 0; i                     csvLine += values[i].ToString(CultureInfo.InvariantCulture);
                    if (i < values.Length - 1)
                    {
                        csvLine += ““;
                    }
                }
                streamWriter.WriteLine(csvLine);
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......       483  2013-07-21 09:31  C#-示波器\.gitattributes

    .......      2039  2013-07-21 09:31  C#-示波器\.gitignore

    .......      2335  2013-07-21 09:31  C#-示波器\ArduinoPrintADC\ArduinoPrintADC.ino

    .......      2068  2013-07-21 09:31  C#-示波器\README.md

     文件       1274  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\bin\Debug\Oscilloscope\Oscilloscope_settings.ini

     文件     710144  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\bin\Debug\Oscilloscope\Osc_DLL.dll

     文件      38912  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\bin\Debug\Serial Oscilloscope.exe

     文件      85504  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\bin\Debug\Serial Oscilloscope.pdb

     文件      22712  2017-01-05 13:26  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\bin\Debug\Serial Oscilloscope.vshost.exe

     文件        490  2016-07-16 19:44  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\bin\Debug\Serial Oscilloscope.vshost.exe.manifest

    .......      2018  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\CsvFileWriter.cs

    .......      1423  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\FormGetValue.cs

    .......      3553  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\FormGetValue.Designer.cs

    .......      5698  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\FormGetValue.resx

     文件      18925  2017-01-05 13:36  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\FormTerminal.cs

     文件      19196  2017-01-05 13:36  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\FormTerminal.Designer.cs

     文件       6387  2017-01-05 13:36  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\FormTerminal.resx

     文件        791  2017-01-05 13:34  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7311  2017-01-05 13:26  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1741  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial Oscilloscope.csproj.FileListAbsolute.txt

     文件        919  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial Oscilloscope.csproj.GenerateResource.Cache

     文件       1759  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial Oscilloscope.csprojResolveAssemblyReference.cache

     文件      38912  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial Oscilloscope.exe

     文件      85504  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial Oscilloscope.pdb

     文件        180  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial_Oscilloscope.FormGetValue.resources

     文件        180  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial_Oscilloscope.FormTerminal.resources

     文件        180  2017-01-05 13:37  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\obj\x86\Debug\Serial_Oscilloscope.Properties.Resources.resources

    .......     65188  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\Oscilloscope\Oscilloscope.cs

    .......      1274  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\Oscilloscope\Oscilloscope_settings.ini

    .......    710144  2013-07-21 09:31  C#-示波器\Serial Oscilloscope\Serial Oscilloscope\Oscilloscope\Osc_DLL.dll

............此处省略28个文件信息

评论

共有 条评论