Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                Application.Run(new FrmConfig());
            }
            catch (Exception ex)
            {
                FileStream fs = File.Create(GetCrashLogFilePath());
                StreamWriter sw = new StreamWriter(fs);
                sw.Write(ex.Message);
                sw.Write(ex.StackTrace.ToString());
                sw.Close();
                fs.Close();

                ErrorMessageBox msgBox = new ErrorMessageBox(ex.Message + Environment.NewLine + ex.StackTrace, "Unexpected Error", "Sorry, the tool encountered an error. Error log:");
                Application.Run(msgBox);
            }
        }
        public static void ShowBox(string txtMessage, string txtTitle, string header)
        {
            newMessageBox = new ErrorMessageBox(txtMessage, txtTitle, header);

            newMessageBox.ShowDialog();
        }
        public static void ShowBox(string txtMessage, string txtTitle, string header)
        {
            newMessageBox = new ErrorMessageBox(txtMessage, txtTitle, header);

            newMessageBox.ShowDialog();
        }