示例#1
0
        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;
                    }
                }
            }
        }
示例#2
0
        private void btnIgnore_Click(object sender, EventArgs e)
        {
            String programName = lstUnconfirmed.SelectedItem.ToString();

            Cprograms.hide(programName);
            fillList();
        }
示例#3
0
        private void btnUntrack_Click(object sender, EventArgs e)
        {
            String programName = lstTracked.SelectedItem.ToString();

            Cprograms.hide(programName);
            fillList();
        }