Parent Directory
|
Revision Log
|
Patch
--- trunk/TSAdminTool/frmClientProperties.cs 2012/07/12 18:17:31 63 +++ trunk/TSAdminTool/frmClientProperties.cs 2012/07/12 18:56:31 64 @@ -324,7 +324,13 @@ cboColorQuality.SelectedIndex = 1; break; default: - throw new Exception("Error: Unhandled color depth: 29901"); + string error = "Error: Unhandled color depth (29901)"; + using (log4net.NDC.Push(string.Format("ColorDepth={0}",currentConfig.ScreenColorDepth))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("ColorDepth={0}", currentConfig.ScreenColorDepth))); + break; } chkDigitalMonitor.Checked = currentConfig.DigitalMonitor; chkRedirectSound.Checked = currentConfig.RedirectSound; @@ -350,7 +356,15 @@ cboConnection.SelectedIndex = 2; } else - throw new Exception("Unhandled session type 65332"); + { + string error = "Unhandled session type (65332)"; + using (log4net.NDC.Push(string.Format("SessionType={0}", currentConfig.SessionType))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("SessionType={0}", currentConfig.SessionType))); + return; + } SessionTypeChanged(); // Enable and disable rdp and ica tabs @@ -376,22 +390,46 @@ else if (currentConfig.IcaAudioQuality == ATSImageRuntimeConfig.ATSIcaAudioQuality.High) tbrIcaAudioQuality.Value = 3; else - throw new Exception("Error: Unhandled audio quality (66432)"); + { + string error = "Error: Unhandled audio quality (66432)"; + using (log4net.NDC.Push(string.Format("IcaAudioQuality={0}", currentConfig.IcaAudioQuality))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("IcaAudioQuality={0}", currentConfig.IcaAudioQuality))); + return; + } if (currentConfig.ICAProtocol == ATSImageRuntimeConfig.ATSIcaProtocol.ATSUDP) radIcaProtocolUDP.Checked = true; else if (currentConfig.ICAProtocol == ATSImageRuntimeConfig.ATSIcaProtocol.ATSHTTPOnTCP) radIcaProtocolHTTP.Checked = true; else - throw new Exception("Error: Unhandlced ICA protocol (60032)"); + { + string error = "Error: Unhandlced ICA protocol (60032)"; + using (log4net.NDC.Push(string.Format("ICAProtocol={0}", currentConfig.ICAProtocol))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("ICAProtocol={0}", currentConfig.ICAProtocol))); + return; + } int i = cboIcaEncryption.FindStringExact(currentConfig.ICAEncryption); if (i != -1) // Check if the item was found in the combobox. { - cboIcaEncryption.SelectedIndex = i; + cboIcaEncryption.SelectedIndex = i; } else - throw new Exception("Error: Unhandlced ICA encryption(60033)"); + { + string error = "Error: Unhandlced ICA encryption(60033)"; + using (log4net.NDC.Push(string.Format("ICAEncryption={0}", currentConfig.ICAEncryption))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("ICAEncryption={0}", currentConfig.ICAEncryption))); + return; + } } @@ -691,8 +729,14 @@ case 1: currentConfig.ScreenColorDepth = ATSImageRuntimeConfig.ATSScreenColorDepth.ATS24Bit; break; - default: - throw new Exception("Error: Unhandled color depth (41255)."); + default: + string error = "rror: Unhandled color depth (41255)"; + using (log4net.NDC.Push(string.Format("ScreenColorDepth={0}", currentConfig.ScreenColorDepth))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("ScreenColorDepth={0}", currentConfig.ScreenColorDepth))); + return; } currentConfig.ServerName = txtServer.Text.Trim(); @@ -716,7 +760,15 @@ currentConfig.SessionType = ATSImageRuntimeConfig.ATSSessionType.ATSPNA; } else - throw new Exception("Error: Unhandled connection type(41283)."); + { + string error = "Error: Unhandled session type(41283)"; + using (log4net.NDC.Push(string.Format("SessionType={0}", currentConfig.SessionType))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("SessionType={0}", currentConfig.SessionType))); + return; + } currentConfig.ReconnectPrompt = !chkReconnect.Checked; currentConfig.AudioLevel = tbrVolume.Value; @@ -852,7 +904,13 @@ helpKeyword = "clientpropertiesmisc.htm"; break; default: - throw new Exception("Error: Invalid tab (63326): " + tabClientProperties.SelectedTab.Name); + string error = "Error:Invalid tab (63326)"; + using (log4net.NDC.Push(string.Format("tab={0}", tabClientProperties.SelectedTab.Name))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tab={0}", tabClientProperties.SelectedTab.Name))); + return; } } else if (dialogMode == ATSClientMode.EDIT_DEFAULT) @@ -878,7 +936,13 @@ helpKeyword = "defaultsettingsmisc.htm"; break; default: - throw new Exception("Error: Invalid tab (63327): " + tabClientProperties.SelectedTab.Name); + string error = "Error: Invalid tab (63327)"; + using (log4net.NDC.Push(string.Format("tab={0}", tabClientProperties.SelectedTab.Name))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tab={0}", tabClientProperties.SelectedTab.Name))); + return; } } Help.ShowHelp(this, ATSGlobals.strHelpFilePath, HelpNavigator.Topic, helpKeyword); @@ -916,7 +980,15 @@ pnlApplicationSet.Visible = false; } else - throw new Exception("Unhandled session type 95333"); + { + string error = "Error: Unhandled session type (95333)"; + using (log4net.NDC.Push(string.Format("SessionType={0}", currentConfig.SessionType))) + { + Logging.ATSAdminLog.Error(error); + } + MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("SessionType={0}", currentConfig.SessionType))); + return; + } } private void UpdateScreenResolutionControls(int x, int y)
ViewVC Help | |
Powered by ViewVC 1.1.22 |