Exemplo n.º 1
0
 public void InsertOffender(Offender offender)
 {
     using (var connection = new SQLiteConnection(_dbPath) { Trace = true })
     {
         connection.Insert(offender);
     }
 }
Exemplo n.º 2
0
 public Log(Offender offender, double noiseLevel)
 {
     Offender = offender;
     NoiseLevel = noiseLevel;
     TimeStamp = DateTime.Now;
 }
Exemplo n.º 3
0
        /* Event Handlers */
        private void MainForm_Load(object sender, EventArgs e)
        {
            Logger.OnExceptionLogged += Log_OnExceptionLogged;

            MMDeviceEnumerator enumerator = new MMDeviceEnumerator();
            var devices = enumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.Active);
            comboMicrophone.Items.AddRange(devices.ToArray());
            comboMicrophone.SelectedIndex = 0;

            _uiTimer = new System.Windows.Forms.Timer();
            _uiTimer.Interval = (250); // .25 sec
            _uiTimer.Tick += new EventHandler(uiTimer_Tick);
            _uiTimer.Start();

            Idle();

            Logger.Info("Scott's Barking Dog Insanity Logger started!");

            //TODO: FIX ME
            _currentOffender = new Offender();
            _currentOffender.Address = "6106 S. Arbor Ln.";
            _currentOffender.Name = "Scott Martin";
            _dataConnection
        }