void Svc() { List <AFPServ> al = new List <AFPServ>(); foreach (String a in als) { AFPServ afps = new AFPServ(); afps.CC.Setting = a; if (afps.CC.AutoStart) { afps.Start(); } al.Add(afps); } evExit.WaitOne(); foreach (AFPServ afps in al) { afps.Stop(); } }
void Svc() { List<AFPServ> al = new List<AFPServ>(); foreach (String a in als) { AFPServ afps = new AFPServ(); afps.CC.Setting = a; if (afps.CC.AutoStart) afps.Start(); al.Add(afps); } evExit.WaitOne(); foreach (AFPServ afps in al) { afps.Stop(); } }