repo time
Dependencies: mbed MAX14720 MAX30205 USBDevice
Diff: HspGuiSourceV301/GuiDLLs/FileLog/FileLogExample/Form1.cs
- Revision:
- 20:6d2af70c92ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HspGuiSourceV301/GuiDLLs/FileLog/FileLogExample/Form1.cs Tue Apr 06 06:41:40 2021 +0000 @@ -0,0 +1,49 @@ +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 Maxim.Utility; + +namespace FileLogExample +{ + public partial class Form1 : Form + { + FileLog fileLog = new FileLog(); + bool fileSelected = false; + int count = 0; + + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + try + { + fileSelected = fileLog.SelectCSVFile("fileLogExample"); + if (fileSelected) + MessageBox.Show("File Select successful"); + else + MessageBox.Show("File Select failed"); + } + catch(System.IO.IOException ex) + { + MessageBox.Show(ex.Message, "File Select Failed"); + } + } + + private void button2_Click(object sender, EventArgs e) + { + if (fileSelected == true) + { + fileLog.WriteLine("Writing Line " + count++); + } + } + } +}