Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override OnStartUp()
- {
- if(condition == true)
- {
- ProcessStartInfo p = new ProcessStartInfo("filePath");
- p.Start(); // This should wait for like say 5 seconds and then start.
- return; // This will exit the current program.
- }
- }
- public class MyThread
- {
- public static void DoIt()
- {
- Thread.Sleep(100);
- // DO what you need here
- }
- }
- override OnStartUp()
- {
- if(condition == true)
- {
- ThreadStart myThread = new MyThread(wt.DoIt);
- Thread myThread = new Thread(myThread);
- myThread.Start();
- }
- }
Add Comment
Please, Sign In to add comment