Produced by Araxis Merge on 7/10/2017 1:01:47 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\VixInstallerSolution2013.root\VixInstallerSolution2013\VixInstaller | ConfigureCvixSitePage.cs | Thu Jun 29 17:22:30 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\VixInstallerSolution2013.root\VixInstallerSolution2013\VixInstaller | ConfigureCvixSitePage.cs | Mon Jul 10 17:07:53 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 512 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | using Syst em; | |
| 2 | using Syst em.Collect ions.Gener ic; | |
| 3 | using Syst em.Compone ntModel; | |
| 4 | using Syst em.Data; | |
| 5 | using Syst em.Drawing ; | |
| 6 | using Syst em.Text; | |
| 7 | using Syst em.Windows .Forms; | |
| 8 | using Syst em.Diagnos tics; | |
| 9 | using gov. va.med.ima ging.excha nge.VixIns taller.bus iness; | |
| 10 | using Syst em.Net; | |
| 11 | using Syst em.IO; | |
| 12 | using Syst em.Xml; | |
| 13 | ||
| 14 | namespace gov.va.med .imaging.e xchange.Vi xInstaller .ui | |
| 15 | { | |
| 16 | public partial c lass Confi gureCvixSi tePage : g ov.va.med. imaging.ex change.Vix Installer. ui.Interio rWizardPag e | |
| 17 | { | |
| 18 | pr ivate stat ic bool fi rstTime = true; | |
| 19 | pr ivate Site sFileDialo g sitesFil eDialog = new SitesF ileDialog( ); | |
| 20 | ||
| 21 | pu blic Confi gureCvixSi tePage() | |
| 22 | { | |
| 23 | Initiali zeComponen t(); | |
| 24 | } | |
| 25 | ||
| 26 | pu blic Confi gureCvixSi tePage(IWi zardForm w izForm, in t pageInde x) | |
| 27 | : base(w izForm, pa geIndex) | |
| 28 | { | |
| 29 | Initiali zeComponen t(); | |
| 30 | } | |
| 31 | ||
| 32 | #r egion IWiz ardPage Me mbers | |
| 33 | pu blic overr ide void I nitialize( ) | |
| 34 | { | |
| 35 | this.Ini tializeBus inessFacad eDelegates (); | |
| 36 | IVixConf igurationP arameters config = t his.Wizard Form.GetVi xConfigura tionParame ters(); | |
| 37 | ||
| 38 | this.Int eriorPageH eader = "S pecify the CVIX site and site service in formation. "; | |
| 39 | this.Int eriorPageS ubHeader = "Specify the locati on of vhas ites.xml t he click t he Lookup Server Add resses but ton."; | |
| 40 | ||
| 41 | if (firs tTime) | |
| 42 | { | |
| 43 | if ( config.Sit eServiceUr i != null) | |
| 44 | { | |
| 45 | this.textB oxSiteServ iceUrl.Tex t = config .SiteServi ceUri; | |
| 46 | } | |
| 47 | if ( config.Sit eNumber != null) | |
| 48 | { | |
| 49 | this.textB oxSiteNumb er.Text = config.Sit eNumber; | |
| 50 | } | |
| 51 | else | |
| 52 | { | |
| 53 | this.textB oxSiteNumb er.Text = "2001"; | |
| 54 | } | |
| 55 | ||
| 56 | if ( config.Sit esFile != null) | |
| 57 | { | |
| 58 | this.textB oxSitesFil e.Text = c onfig.Site sFile; | |
| 59 | } | |
| 60 | ||
| 61 | firs tTime = fa lse; | |
| 62 | } | |
| 63 | ||
| 64 | if (this .WizardFor m.IsDevelo perMode()) | |
| 65 | { | |
| 66 | this .groupBoxS iteService Uri.Visibl e = true; | |
| 67 | } | |
| 68 | else | |
| 69 | { | |
| 70 | this .groupBoxS iteService Uri.Visibl e = false; | |
| 71 | } | |
| 72 | ||
| 73 | // set w izard form button st ate | |
| 74 | if (this .IsComplet e()) | |
| 75 | { | |
| 76 | this .WizardFor m.EnableNe xtButton(t rue); | |
| 77 | } | |
| 78 | else | |
| 79 | { | |
| 80 | this .WizardFor m.EnableNe xtButton(f alse); | |
| 81 | } | |
| 82 | this.Wiz ardForm.En ableBackBu tton(true) ; | |
| 83 | this.Wiz ardForm.En ableCancel Button(tru e); | |
| 84 | //this.b uttonLooku p.Enabled = true; | |
| 85 | this.Ena bleDisable Lookup(); | |
| 86 | this.tex tBoxSiteNu mber.ReadO nly = fals e; | |
| 87 | this.tex tBoxSiteNu mber.Focus (); | |
| 88 | } | |
| 89 | ||
| 90 | pu blic overr ide bool I sComplete( ) | |
| 91 | { | |
| 92 | bool isC omplete = false; | |
| 93 | IVixConf igurationP arameters config = t his.Wizard Form.GetVi xConfigura tionParame ters(); | |
| 94 | if (conf ig.VistaSe rverName ! = null && config.Vis taServerPo rt != null && config .SiteServi ceUri != n ull && con fig.SiteNu mber != nu ll && | |
| 95 | conf ig.SiteAbb reviation != null && config.Si teName != null) | |
| 96 | { | |
| 97 | isCo mplete = t rue; | |
| 98 | } | |
| 99 | return i sComplete; | |
| 100 | } | |
| 101 | #e ndregion | |
| 102 | ||
| 103 | #r egion even ts | |
| 104 | pr ivate void buttonLoo kup_Click( object sen der, Event Args e) | |
| 105 | { | |
| 106 | IVixConf igurationP arameters config = t his.Wizard Form.GetVi xConfigura tionParame ters(); | |
| 107 | errorPro vider.Clea r(); | |
| 108 | textBoxV istaServer Name.Text = ""; | |
| 109 | textBoxV istaServer Port.Text = ""; | |
| 110 | config.V istaServer Name = nul l; | |
| 111 | config.V istaServer Port = nul l; | |
| 112 | config.S iteService Uri = null ; | |
| 113 | config.S iteNumber = null; | |
| 114 | config.S iteAbbrevi ation = nu ll; | |
| 115 | config.S iteName = null; | |
| 116 | WizardFo rm.EnableB ackButton( false); | |
| 117 | WizardFo rm.EnableC ancelButto n(false); | |
| 118 | buttonLo okup.Enabl ed = false ; | |
| 119 | textBoxS iteNumber. Text = tex tBoxSiteNu mber.Text. Trim(); | |
| 120 | textBoxS iteNumber. ReadOnly = true; | |
| 121 | try | |
| 122 | { | |
| 123 | Curs or.Current = Cursors .WaitCurso r; | |
| 124 | Imag ingExchang eSiteTO si te = GetSi teInfoFrom File(textB oxSitesFil e.Text, te xtBoxSiteN umber.Text ); | |
| 125 | ||
| 126 | if ( site == nu ll) | |
| 127 | { | |
| 128 | errorProvi der.SetErr or(this.te xtBoxSiteN umber, "Si te number not found. "); | |
| 129 | } | |
| 130 | else | |
| 131 | { | |
| 132 | textBoxVis taServerNa me.Text = site.vista Server; | |
| 133 | textBoxVis taServerPo rt.Text = site.vista Port.ToStr ing(); | |
| 134 | textBoxVix ServerName .Text = si te.acceler atorServer ; | |
| 135 | textBoxVix ServerPort .Text = si te.acceler atorPort.T oString(); | |
| 136 | textBoxSit eServiceUr l.Text = " http://loc alhost:" + site.acce leratorPor t.ToString () + | |
| 137 | "/Vist aWebSvcs/I magingExch angeSiteSe rvice.asmx "; | |
| 138 | config.Sit eName = si te.siteNam e; | |
| 139 | config.Sit eAbbreviat ion = site .siteAbbr; | |
| 140 | config.Vis taServerNa me = textB oxVistaSer verName.Te xt; | |
| 141 | config.Vis taServerPo rt = textB oxVistaSer verPort.Te xt; | |
| 142 | config.Sit eServiceUr i = textBo xSiteServi ceUrl.Text ; | |
| 143 | config.Sit eNumber = textBoxSit eNumber.Te xt.Trim(); | |
| 144 | config.Sit esFile = t extBoxSite sFile.Text ; | |
| 145 | Logger().I nfo("Confi guring VIX for site number " + config.Si teNumber + " (" + co nfig.SiteN ame + ")") ; | |
| 146 | Logger().I nfo("VistA server is " + confi g.VistaSer verName + ":" + conf ig.VistaSe rverPort); | |
| 147 | Logger().I nfo("Using site serv ice at " + config.Si teServiceU ri); | |
| 148 | } | |
| 149 | } | |
| 150 | catch (W ebExceptio n ex) | |
| 151 | { | |
| 152 | erro rProvider. SetError(t his.textBo xSiteNumbe r, ex.Mess age); | |
| 153 | } | |
| 154 | finally | |
| 155 | { | |
| 156 | Curs or.Current = Cursors .Default; | |
| 157 | Init ialize(); | |
| 158 | } | |
| 159 | } | |
| 160 | ||
| 161 | pr ivate void textBoxSi teNumber_T extChanged (object se nder, Even tArgs e) | |
| 162 | { | |
| 163 | this.Ena bleDisable Lookup(); | |
| 164 | } | |
| 165 | ||
| 166 | pr ivate void buttonSel ectSitesFi le_Click(o bject send er, EventA rgs e) | |
| 167 | { | |
| 168 | if (this .sitesFile Dialog.Sho wDialog() == DialogR esult.OK) | |
| 169 | { | |
| 170 | text BoxSitesFi le.Text = sitesFileD ialog.Site sFile; | |
| 171 | Init ialize(); | |
| 172 | } | |
| 173 | } | |
| 174 | #e ndregion | |
| 175 | ||
| 176 | #r egion priv ate method s | |
| 177 | ||
| 178 | Im agingExcha ngeSiteTO GetSiteInf oFromFile( string fil espec, str ing siteNu mber) | |
| 179 | { | |
| 180 | ImagingE xchangeSit eTO site = null; | |
| 181 | XmlDocum ent sites = new XmlD ocument(); | |
| 182 | XmlNames paceManage r namespac eManager = new XmlNa mespaceMan ager(sites .NameTable ); | |
| 183 | namespaceM anager.Add Namespace( "ss", "htt p:// URL /vistaweb/ sitesTable "); | |
| 184 | sites.Lo ad(filespe c); | |
| 185 | string x path = "// ss:VhaSite [@ID='" + siteNumber + "']"; | |
| 186 | XmlNode xmlSite = sites.Sele ctSingleNo de(xpath, namespaceM anager); | |
| 187 | if (xmlS ite != nul l) | |
| 188 | { | |
| 189 | site = new Ima gingExchan geSiteTO() ; | |
| 190 | site .siteNumbe r = siteNu mber; | |
| 191 | site .siteName = xmlSite. Attributes ["name"].V alue.Trim( ); | |
| 192 | site .siteAbbr = xmlSite. Attributes ["moniker" ].Value.Tr im(); | |
| 193 | site .regionID = xmlSite. ParentNode .Attribute s["ID"].Va lue.Trim() ; | |
| 194 | // V istA serve r and port | |
| 195 | XmlN ode xmlVis ta = xmlSi te.SelectS ingleNode( "./ss:Data Source[@pr otocol='VI STA' or @p rotocol='F HIE']", na mespaceMan ager); | |
| 196 | Debu g.Assert(x mlVista != null); | |
| 197 | site .vistaServ er = xmlVi sta.Attrib utes["sour ce"].Value .Trim(); | |
| 198 | XmlA ttribute a ttrib = xm lVista.Att ributes["p ort"]; | |
| 199 | if ( attrib != null) | |
| 200 | { | |
| 201 | string por t = attrib .Value.Tri m(); | |
| 202 | Int32 tryi t; | |
| 203 | if (Int32. TryParse(p ort, out t ryit)) | |
| 204 | { | |
| 205 | site.v istaPort = tryit; | |
| 206 | } | |
| 207 | else | |
| 208 | { | |
| 209 | throw new Except ion("VistA port for site " + s iteNumber + " is non -numeric: " + port); | |
| 210 | } | |
| 211 | } | |
| 212 | else | |
| 213 | { | |
| 214 | site.vista Port = PORT ; | |
| 215 | } | |
| 216 | // V IX server and port | |
| 217 | XmlN ode xmlVix = xmlSite .SelectSin gleNode(". /ss:DataSo urce[@prot ocol='VIX' ]", namesp aceManager ); | |
| 218 | if ( xmlVix != null) | |
| 219 | { | |
| 220 | site.accel eratorServ er = xmlVi x.Attribut es["source "].Value.T rim(); | |
| 221 | attrib = x mlVix.Attr ibutes["po rt"]; | |
| 222 | if (attrib != null) | |
| 223 | { | |
| 224 | string port = at trib.Value .Trim(); | |
| 225 | Int32 tryit; | |
| 226 | if (In t32.TryPar se(port, o ut tryit)) | |
| 227 | { | |
| 228 | si te.acceler atorPort = tryit; | |
| 229 | } | |
| 230 | else | |
| 231 | { | |
| 232 | th row new Ex ception("V IX port fo r site " + siteNumbe r + " is n on-numeric : " + port ); | |
| 233 | } | |
| 234 | } | |
| 235 | else | |
| 236 | { | |
| 237 | throw new Except ion("VIX p ort for si te " + sit eNumber + " is missi ng"); | |
| 238 | } | |
| 239 | } | |
| 240 | } | |
| 241 | return s ite; | |
| 242 | } | |
| 243 | ||
| 244 | pr ivate void EnableDis ableLookup () | |
| 245 | { | |
| 246 | if (this .textBoxSi teNumber.T ext.Trim() .Length >= 3 && File .Exists(te xtBoxSites File.Text) ) | |
| 247 | { | |
| 248 | this .buttonLoo kup.Enable d = true; | |
| 249 | } | |
| 250 | else | |
| 251 | { | |
| 252 | this .buttonLoo kup.Enable d = false; | |
| 253 | } | |
| 254 | } | |
| 255 | #e ndregion | |
| 256 | } | |
| 257 | } | |
| 258 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.