|
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using Win32;
namespace TimedStart
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void menuItemExitWithRestart_Click(object sender, EventArgs e)
{
int countDown = (int)startTimeOut.Value;
if (countDown > 0)
{
string target ;
Module[] m = this.GetType().Assembly.GetModules();
target = m[0].FullyQualifiedName;
Win32Helper.RunAppAtTime(target,new TimeSpan(0,0,0));
//Win32Helper.RunAppAtTime(@"\Windows\BubbleBreaker.exe",new TimeSpan(0,0,new TimeSpan(0,countDown,0)));
this.Close();
}
}
private void menuItemQuit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.