Exemplo n.º 1
0
        public static DataBaseFile OpenFile(string filePath)
        {
            bool newFile = !System.IO.File.Exists(filePath);

            var dbFile = new DataBaseFile(filePath, newFile);

            return(dbFile);
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string filePath = textBox1.Text;

            if (!shouldCollect)
            {
                dbFile = DataBaseFile.OpenFile(filePath);

                shouldCollect = true;
                button2.Text  = "STOP RECORDING";

                notifyIcon1.ShowBalloonTip(2000, "Collecting Data", "Currently collecting spectra in database: " + filePath, ToolTipIcon.Info);
            }
            else
            {
                button2.Text  = "START RECORDING";
                shouldCollect = false;
            }
        }