Parent Directory
|
Revision Log
|
Patch
--- trunk/TSAdminTool/frmClientProperties.cs 2012/07/12 17:12:08 60 +++ trunk/TSAdminTool/frmClientProperties.cs 2012/07/12 17:34:46 61 @@ -6,6 +6,7 @@ using System.Text; using System.Windows.Forms; using System.Data.SqlClient; +using System.Security.Permissions; namespace AnywhereTS { @@ -15,30 +16,6 @@ { InitializeComponent(); } - static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) - { - Exception ex = (e.ExceptionObject as Exception); - if (ex == null) - { - Logging.TSControlPanelLog.Error("Encountered unhandled Exception, but the exception was null"); - return; - } - if (ex.GetType() == typeof(SqlException)) - { - SqlException sql_ex = (ex as SqlException); - using (log4net.NDC.Push(string.Format("SqlException: ID={0} MESSAGE={1}{2}Diagnostics:{2}{3}", sql_ex.Number.ToString(), sql_ex.Message, System.Environment.NewLine, sql_ex.ToString()))) - { - Logging.TSControlPanelLog.Error("Encountered unhandled SqlException"); - } - } - else - { - using (log4net.NDC.Push(string.Format("Exception: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString()))) - { - Logging.TSControlPanelLog.Error("Encountered unhandled Exception"); - } - } - } public enum ATSClientMode //The modes that this form can be started in. { EDIT_CLIENT, // Normal mode edit a client (only admins) @@ -64,10 +41,9 @@ bool changedByUser = true; // Used on some checkbox controls to determine if state was changed by user or code. - + private void frmClientProperties_Load(object sender, EventArgs e) { - AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); //this.Cursor = Cursors.WaitCursor; changedByUser = false; // To prevent the some controls from triggering changed event.
ViewVC Help | |
Powered by ViewVC 1.1.22 |