private void closeInactiveSessions() { Cstatus status = new Cstatus(); List <String> systemPrograms = status.GetProcesses(); //tüm takip edilenleri bul DataTable dbPrograms = Cprograms.getAllTracked(); foreach (DataRow dbProgram in dbPrograms.Rows) { //eğer çalışmıyorsa if (!systemPrograms.Contains((String)dbProgram["exe"])) { //açık session(ları) ı kapat Csessions.close((int)dbProgram["programid"]); if (!(bool)dbProgram["is_confirmed"]) { iTimer.Enabled = false; DialogResult result = MessageBox.Show(Strings.Tracking + " " + (String)dbProgram["exe"], (String)dbProgram["exe"], MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { Cprograms.track((String)dbProgram["exe"]); } else if (result == DialogResult.No) { Cprograms.hide((String)dbProgram["exe"]); } iTimer.Enabled = true; } } } }
private void btnIgnore_Click(object sender, EventArgs e) { String programName = lstUnconfirmed.SelectedItem.ToString(); Cprograms.hide(programName); fillList(); }
private void btnUntrack_Click(object sender, EventArgs e) { String programName = lstTracked.SelectedItem.ToString(); Cprograms.hide(programName); fillList(); }