private void GenerateDscCtl_Click(object sender, RoutedEventArgs e)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                CodeGenerator.Options options = GetCodeGenOptions();

                CodeGenerator sm = new CodeGenerator();

                ResultsCtl.Text = sm.GenerateConfig(options);
            }
            catch (UnauthorizedAccessException)
            {
                ShowErrorMessage("Error: you don't have admin rights or UAC is enabled.  Please re-run as an administrator. (UnauthorizedAccessException)");
            }

            catch (System.IO.DirectoryNotFoundException ex)
            {
                ShowErrorMessage("Is IIS installed?\n\n A DirectoryNotFoundException occurred: " + ex.Message);
            }

            catch (Exception ex)
            {
                ShowErrorMessage(ex.Message + " (" + ex.GetType().Name + ")");
            }
            finally
            {
                Mouse.OverrideCursor = null;
            }
        }
		private void GenerateDscCtl_Click(object sender, RoutedEventArgs e)
		{
			Mouse.OverrideCursor = Cursors.Wait;
			try
			{
				CodeGenerator.Options options = GetCodeGenOptions();

				CodeGenerator sm = new CodeGenerator();

				ResultsCtl.Text = sm.GenerateConfig(options);
			}
			catch (UnauthorizedAccessException ex)
			{
				MessageBox.Show("Error: you don't have admin rights or UAC is enabled.  Please re-run as admin. (UnauthorizedAccessException)");
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
			finally
			{
				Mouse.OverrideCursor = null;
			}
		}