context: using System;
  using System.Diagnostics;
  using System.Drawing;
  using System.Collections;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.IO;
  using System.Net;
  using System.Text;
  using System.Threading;
  using System.Xml;
  using System.Windows.Forms;
  using OpenDentBusiness;
  
  namespace OpenDental{
  	/// <summary> </summary>
  	public class FormEClinicalWorks:System.Windows.Forms.Form {
  		private OpenDental.UI.Button butCancel;
  		private OpenDental.UI.Button butOK;
  		private System.Windows.Forms.CheckBox checkEnabled;
  		private IContainer components;
  		private System.Windows.Forms.Label label1;
  		private System.Windows.Forms.TextBox textProgName;
  		private System.Windows.Forms.Label label2;
  		private System.Windows.Forms.TextBox textProgDesc;// Required designer variable.
  		/// <summary>This Program link is new.</summary>
  		public bool IsNew;
  		public Program ProgramCur;
  		private List<ProgramProperty> PropertyList;
  		//private static Thread thread;
  		private TextBox textHL7FolderIn;
  		private TextBox textHL7FolderOut;
  		private Label labelHL7FolderOut;
  		private GroupBox groupBox1;
  		private Label label5;
  		private Label labelDefaultUserGroup;
  		private ComboBox comboDefaultUserGroup;
  		private CheckBox checkShowImages;
  		private RadioButton radioModeTight;
  		private RadioButton radioModeStandalone;
  		private CheckBox checkFeeSchedules;
  		private localhost.Service1 service11;
  		private Label labelHL7Warning;
  		private RadioButton radioModeFull;
  		private UI.Button butDiagnostic;
  		private TextBox textECWServer;
  		private Label label3;
  		private TextBox textODServer;
  		private Label label6;
  		private TextBox textHL7ServiceName;
  		private Label label4;
  		private TextBox textHL7Server;
  		private Label label7;
  		private Label label8;
  		private Label label9;
  		private Label labelDefEnabledWarning;
  		private Label label10;
  		private TextBox textMedPanelURL;
  		private Label label11;
  		private CheckBox checkQuadAsToothNum;
  		private CheckBox checkLBSessionId;
  		private Label label12;
  		private CheckBox checkHideButChartRx;
  		private Label labelHL7FolderIn;
  		private CheckBox checkProcRequireSignature;
  		private CheckBox checkProcNotesNoIncomplete;
  		private List<UserGroup> _listUserGroups;
  
  		///<summary></summary>
  		public FormEClinicalWorks() {
  			components=new System.ComponentModel.Container();
  			//
  			// Required for Windows Form Designer support
  			//
  			InitializeComponent();
  			Lan.F(this);
  		}
  
  		/// <summary>
  		/// Clean up any resources being used.
  		/// </summary>
  		protected override void Dispose( bool disposing )
  		{
  			if( disposing )
  			{
  				if(components != null)
  				{
  					components.Dispose();
  				}
  			}
  			base.Dispose( disposing );
  		}
  
  		#region Windows Form Designer generated code
  		/// <summary>
  		/// Required method for Designer support - do not modify
  		/// the contents of this method with the code editor.
  		/// </summary>
  		private void InitializeComponent()
  		{
  			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormEClinicalWorks));
  			this.butCancel = new OpenDental.UI.Button();
  			this.butOK = new OpenDental.UI.Button();
  			this.checkEnabled = new System.Windows.Forms.CheckBox();
  			this.label1 = new System.Windows.Forms.Label();
  			this.textProgName = new System.Windows.Forms.TextBox();
  			this.textProgDesc = new System.Windows.Forms.TextBox();
  			this.label2 = new System.Windows.Forms.Label();
  			this.textHL7FolderIn = new System.Windows.Forms.TextBox();
  			this.labelHL7FolderIn = new System.Windows.Forms.Label();
  			this.textHL7FolderOut = new System.Windows.Forms.TextBox();
  			this.labelHL7FolderOut = new System.Windows.Forms.Label();
  			this.groupBox1 = new System.Windows.Forms.GroupBox();
  			this.label5 = new System.Windows.Forms.Label();
  			this.labelDefaultUserGroup = new System.Windows.Forms.Label();
  			this.comboDefaultUserGroup = new System.Windows.Forms.ComboBox();
  			this.checkShowImages = new System.Windows.Forms.CheckBox();
  			this.radioModeTight = new System.Windows.Forms.RadioButton();
  			this.radioModeStandalone = new System.Windows.Forms.RadioButton();
  			this.checkFeeSchedules = new System.Windows.Forms.CheckBox();
  			this.labelHL7Warning = new System.Windows.Forms.Label();
  			this.radioModeFull = new System.Windows.Forms.RadioButton();
  			this.butDiagnostic = new OpenDental.UI.Button();
  			this.textECWServer = new System.Windows.Forms.TextBox();
  			this.label3 = new System.Windows.Forms.Label();
  			this.textODServer = new System.Windows.Forms.TextBox();
  			this.label6 = new System.Windows.Forms.Label();
  			this.textHL7ServiceName = new System.Windows.Forms.TextBox();
  			this.label4 = new System.Windows.Forms.Label();
  			this.textHL7Server = new System.Windows.Forms.TextBox();
  			this.label7 = new System.Windows.Forms.Label();
  			this.service11 = new OpenDental.localhost.Service1();
  			this.label8 = new System.Windows.Forms.Label();
  			this.label9 = new System.Windows.Forms.Label();
  			this.labelDefEnabledWarning = new System.Windows.Forms.Label();
  			this.label10 = new System.Windows.Forms.Label();
  			this.textMedPanelURL = new System.Windows.Forms.TextBox();
  			this.label11 = new System.Windows.Forms.Label();
  			this.checkQuadAsToothNum = new System.Windows.Forms.CheckBox();
  			this.checkLBSessionId = new System.Windows.Forms.CheckBox();
  			this.label12 = new System.Windows.Forms.Label();
  			this.checkHideButChartRx = new System.Windows.Forms.CheckBox();
  			this.checkProcRequireSignature = new System.Windows.Forms.CheckBox();
  			this.checkProcNotesNoIncomplete = new System.Windows.Forms.CheckBox();
  			this.groupBox1.SuspendLayout();
  			this.SuspendLayout();
  			// 
  			// butCancel
  			// 
  			this.butCancel.AdjustImageLocation = new System.Drawing.Point(0, 0);
  			this.butCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
  			this.butCancel.Autosize = true;
  			this.butCancel.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle;
  			this.butCancel.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver;
  			this.butCancel.CornerRadius = 4F;
  			this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  			this.butCancel.Location = new System.Drawing.Point(563, 592);
  			this.butCancel.Name = "butCancel";
  			this.butCancel.Size = new System.Drawing.Size(75, 24);
  			this.butCancel.TabIndex = 0;
  			this.butCancel.Text = "&Cancel";
  			this.butCancel.Click += new System.EventHandler(this.butCancel_Click);
  			// 
  			// butOK
  			// 
  			this.butOK.AdjustImageLocation = new System.Drawing.Point(0, 0);
  			this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
  			this.butOK.Autosize = true;
  			this.butOK.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle;
  			this.butOK.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver;
  			this.butOK.CornerRadius = 4F;
  			this.butOK.Location = new System.Drawing.Point(482, 592);
  			this.butOK.Name = "butOK";
  			this.butOK.Size = new System.Drawing.Size(75, 24);
  			this.butOK.TabIndex = 1;
  			this.butOK.Text = "&OK";
  			this.butOK.Click += new System.EventHandler(this.butOK_Click);
  			// 
  			// checkEnabled
  			// 
  			this.checkEnabled.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
  			this.checkEnabled.FlatStyle = System.Windows.Forms.FlatStyle.System;
  			this.checkEnabled.Location = new System.Drawing.Point(124, 60);
  			this.checkEnabled.Name = "checkEnabled";
  			this.checkEnabled.Size = new System.Drawing.Size(98, 18);
  			this.checkEnabled.TabIndex = 41;
  			this.checkEnabled.Text = "Enabled";
  			this.checkEnabled.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  			this.checkEnabled.Click += new System.EventHandler(this.checkEnabled_Click);
  			// 
  			// label1
  			// 
  			this.label1.Location = new System.Drawing.Point(21, 10);
  			this.label1.Name = "label1";
  			this.label1.Size = new System.Drawing.Size(187, 18);
  			this.label1.TabIndex = 44;
  			this.label1.Text = "Internal Name";
  			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  			// 
  			// textProgName
  			// 
  			this.textProgName.Location = new System.Drawing.Point(209, 9);
  			this.textProgName.Name = "textProgName";
  			this.textProgName.ReadOnly = true;
  			this.textProgName.Size = new System.Drawing.Size(275, 20);
  			this.textProgName.TabIndex = 45;
  			// 
  			// textProgDesc
  			// 
  			this.textProgDesc.Location = new System.Drawing.Point(209, 34);
  			this.textProgDesc.Name = "textProgDesc";
  			this.textProgDesc.Size = new System.Drawing.Size(275, 20);
  			this.textProgDesc.TabIndex = 47;
  			// 
  			// label2
  			// 
  			this.label2.Location = new System.Drawing.Point(20, 35);
  			this.label2.Name = "label2";
  			this.label2.Size = new System.Drawing.Size(187, 18);
  			this.label2.TabIndex = 46;
  			this.label2.Text = "Description";
  			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  			// 
  			// textHL7FolderIn
  			// 
  			this.textHL7FolderIn.Location = new System.Drawing.Point(197, 43);
  			this.textHL7FolderIn.Name = "textHL7FolderIn";
  
gt: 			this.textHL7FolderIn.Size = new System.Drawing.Size(275, 20);