static void Main(string[] args) { Progress progressWindow; PrepareThread prepareThread; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); progressWindow = new Progress(); prepareThread = new PrepareThread(args, progressWindow); Thread backgroundThread = new Thread(new ThreadStart(prepareThread.Run)); progressWindow.Show(); backgroundThread.Start(); Application.Run(progressWindow); }
static void Main(string[] args) { Progress progressWindow; PrepareThread prepareThread; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); TextWriterTraceListener tlog = new TimeDateTraceListener(Application.CommonAppDataPath + "\\Install.log", "Install"); Trace.Listeners.Add(tlog); Trace.AutoFlush = true; progressWindow = new Progress(); prepareThread = new PrepareThread(args, progressWindow); Thread backgroundThread = new Thread(new ThreadStart(prepareThread.Run)); progressWindow.Show(); backgroundThread.Start(); Application.Run(progressWindow); }