示例#1
0
 /*
  * When called, will update the statistics to this app
  */
 private void setStatusWindowByApp(MonitoredApp app)
 {
     if (app != null)
     {
         label3.Text          = app.Name;
         label5.Text          = app.TimeOpened.ToString();
         numericUpDown1.Value = app.MaxTime.Hours;
         numericUpDown2.Value = app.MaxTime.Minutes;
         numericUpDown3.Value = app.MaxTime.Seconds;
     }
 }
示例#2
0
        /*
         * Adds a MonitoredApp to the monitoredApps list
         */
        public void monitor(MonitoredApp app)
        {
            bool foundMatch = false;

            foreach (MonitoredApp a in monitoredApps)
            {
                if (app.Name.Equals(a.Name))
                {
                    foundMatch = true;
                }
            }
            if (!foundMatch)
            {
                monitoredApps.Add(app);
            }
        }