por Vicitor2006 el Jue May 31, 2007 11:03 pm
Esto es lo principal del link de arriba, pa mi que en c#
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
public class class_apagado
{
string argumento = null;
DateTime tmp;
public class_apagado(string argumento, DateTime tmp)
{
this.argumento = argumento;
this.tmp = tmp;
}
public void Shut_Down()
{
try
{
while (true)
{
if(tmp.ToLongTimeString() == DateTime.Now.ToLongTimeString())
{
Process proceso = new Process();
proceso.StartInfo.UseShellExecute = false;
proceso.StartInfo.RedirectStandardOutput = true;
proceso.StartInfo.FileName = "shutdown.exe";
proceso.StartInfo.Arguments = this.argumento;
proceso.Start();
break;
}
}
}
catch
{
throw;
}
}
}
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Espacios de nombres usados en el código de este artículo:
using System.Collections;
using System.Threading;
using System.Diagnostics;
Es una muy buena ayuda.
Gracias por el aporte bestprogramado