Produced by Araxis Merge on 10/18/2018 2:02:15 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 | VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\DotNet\VixInstallerSolution2013.root\VixInstallerSolution2013\VixInstaller | Form1.cs | Thu Oct 11 13:30:10 2018 UTC |
2 | VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\DotNet\VixInstallerSolution2013.root\VixInstallerSolution2013\VixInstaller | Form1.cs | Wed Oct 17 17:34:27 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 1314 |
Changed | 2 | 6 |
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.Service Process; | |
9 | using gov. va.med.ima ging.excha nge.VixIns taller.bus iness; | |
10 | using Syst em.Securit y; | |
11 | using Syst em.Securit y.Principa l; | |
12 | using Syst em.Diagnos tics; | |
13 | using Syst em.Threadi ng; | |
14 | using Micr osoft.Win3 2; | |
15 | using Syst em.Configu ration; | |
16 | using Syst em.Securit y.Cryptogr aphy; | |
17 | using Syst em.Net.Soc kets; | |
18 | using Syst em.IO; | |
19 | using Syst em.Timers; | |
20 | ||
21 | namespace gov.va.med .imaging.e xchange.Vi xInstaller .ui | |
22 | { | |
23 | public partial c lass Form1 : Form | |
24 | { | |
25 | pr ivate Syst em.Diagnos tics.Proce ss p; | |
26 | pr ivate VixM anifest ma nifest = n ull; | |
27 | pr ivate VixC onfigurati onParamete rs config = null; | |
28 | // private st ring paylo adPath = n ull; | |
29 | ||
30 | pr ivate void ClearInfo () | |
31 | { | |
32 | this.tex tBoxInfo.C lear(); | |
33 | } | |
34 | ||
35 | pr otected St ring Info( String inf oMessage) | |
36 | { | |
37 | this.tex tBoxInfo.A ppendText( infoMessag e + Enviro nment.NewL ine); | |
38 | return i nfoMessage ; | |
39 | } | |
40 | ||
41 | pu blic Form1 () | |
42 | { | |
43 | Initiali zeComponen t(); | |
44 | } | |
45 | ||
46 | pr ivate void Form1_Loa d(object s ender, Eve ntArgs e) | |
47 | { | |
48 | this.con fig = new VixConfigu rationPara meters(); | |
49 | this.con fig.Produc tVersion = Applicati on.Product Version; | |
50 | //this.c onfig.Prev iousProduc tVersion i s null | |
51 | this.con fig.Config Dir = @"C: \VixConfig "; | |
52 | this.con fig.SiteSe rviceUri = "http://l ocalhost/V istaWebSvc s/ImagingE xchangeSit eService.a smx"; | |
53 | this.con fig.SiteNu mber = "66 0"; | |
54 | this.confi g.BiaUsern ame = " AI "; | |
55 | this.confi g.BiaPassw ord = " AI "; | |
56 | this.con fig.SiteAb breviation = "SLC"; | |
57 | this.con fig.SiteNa me = "Salt Lake City , UT"; | |
58 | this.con fig.VistaS erverName = "localho st"; | |
59 | this.confi g.VistaSer verPort = " PORT "; | |
60 | this.con fig.LocalC acheDir = @"C:\VixCa che"; | |
61 | this.con fig.Federa tionKeysto rePassword = Configu rationMana ger.AppSet tings["Fed erationKey storePassw ord"]; | |
62 | this.con fig.Federa tionTrusts torePasswo rd = Confi gurationMa nager.AppS ettings["F ederationT ruststoreP assword"]; | |
63 | // confi g is missi ng all the wormhole and deploy ment infor mation | |
64 | this.man ifest = ne w VixManif est(Applic ation.Star tupPath); | |
65 | VixFacad e.Manifest = this.ma nifest; | |
66 | VixFacad e.InfoDele gate = thi s.Info; | |
67 | TomcatFa cade.Manif est = this .manifest; | |
68 | JavaFaca de.InfoDel egate = th is.Info; | |
69 | JavaFaca de.Manifes t = this.m anifest; | |
70 | LaurelBr idgeFacade .Manifest = this.man ifest; | |
71 | LaurelBr idgeFacade .InfoDeleg ate = this .Info; | |
72 | Business Facade.Man ifest = th is.manifes t; | |
73 | Business Facade.Inf oDelegate = this.Inf o; | |
74 | ||
75 | try | |
76 | { | |
77 | Wind owsIdentit y wi = Win dowsIdenti ty.GetCurr ent(); | |
78 | Debu g.Assert(w i != null) ; | |
79 | Wind owsPrincip al princip al = new W indowsPrin cipal(wi); | |
80 | this .Text += " - " + wi. Name + " ( " + (princ ipal.IsInR ole(Window sBuiltInRo le.Adminis trator) ? "Administr ator" : "N ot Adminis trator") + ")"; | |
81 | } | |
82 | catch (S ecurityExc eption ex) | |
83 | { | |
84 | // d o better f or error r eporting | |
85 | this .Info("Sec urity exce ption gett ing window identity: " + ex.In nerExcepti on.Message ); | |
86 | // e xit the ap plication | |
87 | } | |
88 | catch (A rgumentNul lException ex) | |
89 | { | |
90 | // d o better f or error r eporting | |
91 | this .Info("Can not determ ine curren t logged i n windows user: " + ex.InnerEx ception.Me ssage); | |
92 | // e xit the ap plication | |
93 | } | |
94 | ||
95 | } | |
96 | ||
97 | pr ivate void buttonCre ateService Account_Cl ick(object sender, E ventArgs e ) | |
98 | { | |
99 | //Window sUserUtili ties.Creat eServiceAc count(Tomc atFacade.S erviceAcco untUsernam e, "R00tbe er", "VIX service ac count"); | |
100 | } | |
101 | ||
102 | pr ivate void buttonSet ServiceAcc ountRights _Click(obj ect sender , EventArg s e) | |
103 | { | |
104 | LsaUtili ties.SetSe rviceAccou ntPrivlege s(TomcatFa cade.Servi ceAccountU sername); | |
105 | } | |
106 | ||
107 | pr ivate void buttonTom catStatus_ Click(obje ct sender, EventArgs e) | |
108 | { | |
109 | try | |
110 | { | |
111 | Serv iceControl lerStatus status = S erviceUtil ities.GetL ocalServic eStatus("T omcat5"); | |
112 | this .Info("Tom cat Status : " + stat us.ToStrin g()); | |
113 | } | |
114 | catch (E xception e x) | |
115 | { | |
116 | this .Info("Exc eption: " + ex.Messa ge); | |
117 | } | |
118 | } | |
119 | ||
120 | pr ivate void buttonSto pTomcatSer vice_Click (object se nder, Even tArgs e) | |
121 | { | |
122 | try | |
123 | { | |
124 | Serv iceUtiliti es.StopLoc alService( "Tomcat5") ; | |
125 | } | |
126 | catch (E xception e x) | |
127 | { | |
128 | this .Info("Exc eption: " + ex.Messa ge); | |
129 | } | |
130 | } | |
131 | ||
132 | pr ivate void buttonSta rtTomcatSe rvice_Clic k(object s ender, Eve ntArgs e) | |
133 | { | |
134 | try | |
135 | { | |
136 | Serv iceUtiliti es.StartLo calService ("Tomcat5" ); | |
137 | } | |
138 | catch (E xception e x) | |
139 | { | |
140 | this .Info("Exc eption: " + ex.Messa ge); | |
141 | } | |
142 | } | |
143 | ||
144 | pr ivate void buttonCle ar_Click(o bject send er, EventA rgs e) | |
145 | { | |
146 | this.Cle arInfo(); | |
147 | } | |
148 | ||
149 | pr ivate void buttonGet Env_Click( object sen der, Event Args e) | |
150 | { | |
151 | String f oo = Envir onment.Get Environmen tVariable( "foo", Env ironmentVa riableTarg et.Machine ); | |
152 | ||
153 | this.Inf o("foo=" + (foo == n ull ? "nul l" : foo)) ; | |
154 | } | |
155 | ||
156 | pr ivate void buttonSer Env_Click( object sen der, Event Args e) | |
157 | { | |
158 | String f oo = null; | |
159 | Environm ent.SetEnv ironmentVa riable("fo o", "foo t ext create ", Environ mentVariab leTarget.M achine); | |
160 | foo = En vironment. GetEnviron mentVariab le("foo", Environmen tVariableT arget.Mach ine); | |
161 | this.Inf o("foo=" + (foo == n ull ? "nul l" : foo)) ; | |
162 | Environm ent.SetEnv ironmentVa riable("fo o", "foo t ext replac e", Enviro nmentVaria bleTarget. Machine); | |
163 | foo = En vironment. GetEnviron mentVariab le("foo", Environmen tVariableT arget.Mach ine); | |
164 | this.Inf o("foo=" + (foo == n ull ? "nul l" : foo)) ; | |
165 | Environm ent.SetEnv ironmentVa riable("fo o", null, Environmen tVariableT arget.Mach ine); | |
166 | foo = En vironment. GetEnviron mentVariab le("foo", Environmen tVariableT arget.Mach ine); | |
167 | this.Inf o("foo=" + (foo == n ull ? "nul l" : foo)) ; | |
168 | } | |
169 | ||
170 | ||
171 | pr ivate void buttonDcf Permission s_Click(ob ject sende r, EventAr gs e) | |
172 | { | |
173 | AccessCo ntolUtilit ies.SetDcf DirectoryA ccessContr ol(TomcatF acade.Serv iceAccount Username, @"c:\DCF") ; | |
174 | } | |
175 | ||
176 | pr ivate void buttonRoo tPermissio ns_Click(o bject send er, EventA rgs e) | |
177 | { | |
178 | //Access ContolUtil ities.SetR ootDirecto ryAccessCo ntrol(Busi nessFacade .GetTomcat ServiceAcc ount(), @" c:\"); | |
179 | } | |
180 | ||
181 | pr ivate void buttonVix Permission s_Click(ob ject sende r, EventAr gs e) | |
182 | { | |
183 | AccessCo ntolUtilit ies.SetFul lDirectory AccessCont rol(Tomcat Facade.Ser viceAccoun tUsername, @"c:\VIX" ); | |
184 | } | |
185 | ||
186 | pr ivate void buttonJav aPermissio ns_Click(o bject send er, EventA rgs e) | |
187 | { | |
188 | //Access ContolUtil ities.SetJ avaDirecto ryAccessCo ntrol(Busi nessFacade .GetTomcat ServiceAcc ount(), @" C:\Program Files\Jav a\jdk1.5.0 _07\jre"); | |
189 | } | |
190 | ||
191 | pr ivate void buttonTom catPermiss ions_Click (object se nder, Even tArgs e) | |
192 | { | |
193 | AccessCo ntolUtilit ies.SetTom catAccessC ontrol(Tom catFacade. ServiceAcc ountUserna me, @"C:\P rogram Fil es\Apache Software F oundation\ Tomcat 5.5 "); | |
194 | } | |
195 | ||
196 | pr ivate void buttonUnz ip_Click(o bject send er, EventA rgs e) | |
197 | { | |
198 | ZipUtili ties.UnZip (@"C:\Inst all\VIX\VI X Server I nstall.zip ", @"c:\Zi ptest"); | |
199 | } | |
200 | ||
201 | pr ivate void buttonSta rtProcess_ Click(obje ct sender, EventArgs e) | |
202 | { | |
203 | //Proces s process = Process. Start("Not epad.exe") ; | |
204 | //this.I nfo("Proce ss started "); | |
205 | //do | |
206 | //{ | |
207 | // th is.Info("w aiting..." ); | |
208 | // Th read.Sleep (1000); | |
209 | // Ap plication. DoEvents() ; | |
210 | // pr ocess.Refr esh(); | |
211 | //} whil e (!proces s.HasExite d); | |
212 | //this.I nfo("Proce ss done"); | |
213 | ||
214 | p = new System.Dia gnostics.P rocess(); | |
215 | // Handl e the Exit ed event t hat the Pr ocess clas s fires. | |
216 | this.p.E xited += n ew System. EventHandl er(this.p_ Exited); | |
217 | p.Enable RaisingEve nts = true ; | |
218 | p.Synchr onizingObj ect = this ; | |
219 | p.StartI nfo.FileNa me = "note pad.exe"; | |
220 | p.Start( ); | |
221 | this.Inf o("Process started") ; | |
222 | } | |
223 | ||
224 | pr ivate void p_Exited( object sen der, Syste m.EventArg s e) | |
225 | { | |
226 | Process process = sender as Process; | |
227 | this.Inf o("Process done at " + process .ExitTime. ToString() ); | |
228 | } | |
229 | ||
230 | pr ivate void buttonSer viceAccoun t_Click(ob ject sende r, EventAr gs e) | |
231 | { | |
232 | try | |
233 | { | |
234 | //Se rviceUtili ties.SetSe rviceCrede ntials("To mcat5", To mcatFacade .ServiceAc countUsern ame, "R00t beer"); | |
235 | } | |
236 | catch (E xception e x) | |
237 | { | |
238 | this .Info("Exc eption: " + ex.Messa ge); | |
239 | } | |
240 | } | |
241 | ||
242 | pr ivate void buttonSer viceFailur eActions_C lick(objec t sender, EventArgs e) | |
243 | { | |
244 | try | |
245 | { | |
246 | Serv iceUtiliti es.SetServ iceFailure Actions("T omcat5"); | |
247 | } | |
248 | catch (E xception e x) | |
249 | { | |
250 | this .Info("Exc eption: " + ex.Messa ge); | |
251 | } | |
252 | } | |
253 | ||
254 | pr ivate void buttonGet VixConfigD ir_Click(o bject send er, EventA rgs e) | |
255 | { | |
256 | this.Inf o("VIX con figuration directory is: " + V ixFacade.G etVixConfi gurationDi rectory()) ; | |
257 | } | |
258 | ||
259 | pr ivate void buttonGet VixCacheDi r_Click(ob ject sende r, EventAr gs e) | |
260 | { | |
261 | this.Inf o("VIX cac he directo ry is: " + VixFacade .GetLocalV ixCacheDir ectory()); | |
262 | } | |
263 | ||
264 | pr ivate void textBoxTe xtChanged_ TextChange d(object s ender, Eve ntArgs e) | |
265 | { | |
266 | this.Inf o("Text ha s changed in TextBox "); | |
267 | } | |
268 | ||
269 | pr ivate void buttonRew riteCacheP rop_Click( object sen der, Event Args e) | |
270 | { | |
271 | //VixFac ade.Rewrit eCacheProp ertiesFile (this.conf ig); i5 is dead | |
272 | } | |
273 | ||
274 | pr ivate void buttonMan ifestVixJa vaProperti es_Click(o bject send er, EventA rgs e) | |
275 | { | |
276 | this.Cle arInfo(); | |
277 | // will cause erro r is i6 ma nifest and Tomcat 5. 5 installe d | |
278 | VixFacad e.ApplyVix JavaProper tiesFromMa nifest(thi s.config, false); | |
279 | } | |
280 | ||
281 | pr ivate void buttonGet VixJavaPro pertiesFro mManifest_ Click(obje ct sender, EventArgs e) | |
282 | { | |
283 | this.Cle arInfo(); | |
284 | this.Inf o("VixMani fest prope rties:"); | |
285 | VixJavaP roperty[] vixJavaPro perties = this.manif est.GetMan ifestVixJa vaProperti es(config. ConfigDir) ; | |
286 | foreach (VixJavaPr operty vix JavaProper ty in vixJ avaPropert ies) | |
287 | { | |
288 | this .Info(vixJ avaPropert y.ToString ()); | |
289 | } | |
290 | } | |
291 | ||
292 | pr ivate void buttonWri teViXConfi gFile_Clic k(object s ender, Eve ntArgs e) | |
293 | { | |
294 | //VixFac ade.WriteV iXConfigur ationFiles (this.conf ig, @"C:\I nstall\ViX i6", true) ; // devel oper mode argument d oesnt do a nything | |
295 | } | |
296 | ||
297 | pr ivate void buttonCop yManifestD ependencyF iles_Click (object se nder, Even tArgs e) | |
298 | { | |
299 | //VixFac ade.CopyVi xDistribut ionToTomca t(this.con fig, this. payloadPat h); | |
300 | //VixFac ade.CopyMa nifestFile sToTomcat( this.confi g, this.pa yloadPath, false); / / commit = false | |
301 | } | |
302 | ||
303 | pr ivate void DisplayCo nfigInfo(V ixConfigur ationParam eters vixC onfig, int vixIterat ion) | |
304 | { | |
305 | this.Cle arInfo(); | |
306 | this.Inf o("Iterati on " + vix Iteration. ToString() ); | |
307 | this.Inf o("ConfigD ir: " + vi xConfig.Co nfigDir); | |
308 | this.Inf o("LocalCa cheDir: " + vixConfi g.LocalCac heDir); | |
309 | this.Inf o("SiteNum ber: " + v ixConfig.S iteNumber) ; | |
310 | this.Inf o("Previou sProductVe rsion: " + vixConfig .PreviousP roductVers ion); | |
311 | this.Inf o("BiaUser name: " + vixConfig. BiaUsernam e); | |
312 | this.Inf o("BiaPass word: " + vixConfig. BiaPasswor d); | |
313 | this.Inf o("SiteSer viceUri: " + vixConf ig.SiteSer viceUri); | |
314 | } | |
315 | ||
316 | pr ivate void buttonTom catFacadeP roperties_ Click(obje ct sender, EventArgs e) | |
317 | { | |
318 | this.Cle arInfo(); | |
319 | this.Inf o("TomcatI nstallatio nFolder: " + TomcatF acade.Tomc atInstalla tionFolder ); | |
320 | this.Inf o("WebAppl icationFol der: " + T omcatFacad e.TomcatWe bApplicati onFolder); | |
321 | this.Inf o("TomcatS erviceName : " + Tomc atFacade.T omcatServi ceName); | |
322 | this.Inf o("Executa bleFolder: " + Tomca tFacade.To mcatExecut ableFolder ); | |
323 | this.Inf o("Configu rationFold er: " + To mcatFacade .TomcatCon figuration Folder); | |
324 | this.Inf o("TomcatI nstallerFi lespec: " + TomcatFa cade.Insta llerFilesp ec); | |
325 | this.Inf o("TomcatI nstalledVe rsion: " + TomcatFac ade.Instal ledTomcatV ersion); | |
326 | this.Inf o("TomcatR equiredVer sion: " + TomcatFaca de.ActiveT omcatVersi on); | |
327 | this.Inf o("Tomcat Installed? " + Tomca tFacade.Is TomcatInst alled()); | |
328 | this.Inf o("Require d Tomcat V ersion Ins talled? " + TomcatFa cade.IsAct iveTomcatV ersionInst alled()); | |
329 | } | |
330 | ||
331 | pr ivate void buttonWri teServerXm l_Click(ob ject sende r, EventAr gs e) | |
332 | { | |
333 | VixFacad e.AddWebAp pContextEl ements(@"C :\VixConfi gTest\serv er.xml", t his.config ); | |
334 | } | |
335 | ||
336 | pr ivate void buttonCon figureTomc atService_ Click(obje ct sender, EventArgs e) | |
337 | { | |
338 | TomcatFa cade.Confi gureTomcat Service(co nfig); | |
339 | } | |
340 | ||
341 | pr ivate void buttonGet JavaJrePat h_Click(ob ject sende r, EventAr gs e) | |
342 | { | |
343 | this.Cle arInfo(); | |
344 | this.Inf o("Java JR E Path: ") ; | |
345 | this.Inf o(JavaFaca de.GetActi veJavaPath (true)); | |
346 | this.Inf o("Java JD K Path: ") ; | |
347 | this.Inf o(JavaFaca de.GetActi veJavaPath (false)); | |
348 | } | |
349 | ||
350 | pr ivate void buttonJav aVersion_C lick(objec t sender, EventArgs e) | |
351 | { | |
352 | this.Inf o("Java Ve rsion: "); | |
353 | this.Inf o(JavaFaca de.ActiveJ avaVersion ); | |
354 | } | |
355 | ||
356 | pr ivate void buttonIns tallJre_Cl ick(object sender, E ventArgs e ) | |
357 | { | |
358 | System.D iagnostics .Process e xternalPro cess = new System.Di agnostics. Process(); | |
359 | // Handl e the Exit ed event t hat the Pr ocess clas s fires. | |
360 | external Process.En ableRaisin gEvents = true; | |
361 | external Process.Sy nchronizin gObject = this; | |
362 | external Process.St artInfo.Fi leName = @ "C:\Instal l\Java\j2s e6\jre-6u1 7-windows- i586.exe"; | |
363 | external Process.St artInfo.Ar guments = "/s /v \"/ qn REBOOT= Suppress J AVAUPDATE= 0 INSTALLD IR=\\\"" + JavaFacad e.GetActiv eJavaPath( true) + "\ \\""; | |
364 | external Process.St art(); | |
365 | this.Inf o("Process started") ; | |
366 | do | |
367 | { | |
368 | this .Info("wai ting..."); | |
369 | Thre ad.Sleep(1 000); | |
370 | Appl ication.Do Events(); | |
371 | exte rnalProces s.Refresh( ); | |
372 | } while (!external Process.Ha sExited); | |
373 | this.Inf o("Process done"); | |
374 | } | |
375 | ||
376 | pr ivate void buttonUni nstallJre_ Click(obje ct sender, EventArgs e) | |
377 | { | |
378 | System.D iagnostics .Process e xternalPro cess = new System.Di agnostics. Process(); | |
379 | // Handl e the Exit ed event t hat the Pr ocess clas s fires. | |
380 | external Process.En ableRaisin gEvents = true; | |
381 | external Process.Sy nchronizin gObject = this; | |
382 | external Process.St artInfo.Fi leName = @ "msiexec.e xe"; | |
383 | external Process.St artInfo.Ar guments = @"/qn /x { 26A24AE4-0 39D-4CA4-8 7B4-2F8321 6017FF}"; | |
384 | external Process.St art(); | |
385 | this.Inf o("Process started") ; | |
386 | do | |
387 | { | |
388 | this .Info("wai ting..."); | |
389 | Thre ad.Sleep(1 000); | |
390 | Appl ication.Do Events(); | |
391 | exte rnalProces s.Refresh( ); | |
392 | } while (!external Process.Ha sExited); | |
393 | this.Inf o("Process done"); | |
394 | } | |
395 | ||
396 | pr ivate void buttonJav aInstaller Filespec_C lick(objec t sender, EventArgs e) | |
397 | { | |
398 | String f ilespec = JavaFacade .GetInstal lerFilespe c(); | |
399 | this.Inf o("Java In staller Fi lespec: " + filespec ); | |
400 | } | |
401 | ||
402 | pr ivate void buttonVra dFedServic esHack_Cli ck(object sender, Ev entArgs e) | |
403 | { | |
404 | //VixFac ade.Remove dFederatio nVistaRadS upportHack (); | |
405 | } | |
406 | ||
407 | pr ivate void buttonGet InstalledS ervices_Cl ick(object sender, E ventArgs e ) | |
408 | { | |
409 | string[] services = ServiceU tilities.G etNonDrive rServiceNa mes(); | |
410 | foreach (string se rvice in s ervices) | |
411 | { | |
412 | this .Info(serv ice); | |
413 | } | |
414 | } | |
415 | ||
416 | pr ivate void buttonIsD eprecatedT omcatServi ceInstalle d_Click(ob ject sende r, EventAr gs e) | |
417 | { | |
418 | if (Tomc atFacade.I sDeprecate dTomcatSer viceInstal led()) | |
419 | { | |
420 | this .Info("Dep recated To mcat Servi ce is inst alled."); | |
421 | } | |
422 | else | |
423 | { | |
424 | this .Info("Dep recated To mcat Servi ce is not installed. "); | |
425 | } | |
426 | } | |
427 | ||
428 | pr ivate void buttonCry pto_Click( object sen der, Event Args e) | |
429 | { | |
430 | TripleDE SCryptoSer viceProvid er algValu e = new Tr ipleDESCry ptoService Provider() ; | |
431 | byte[] i v = algVal ue.IV; | |
432 | byte[] k ey = algVa lue.Key; | |
433 | int keyS ize = algV alue.KeySi ze; | |
434 | StringBu ilder sb = new Strin gBuilder() ; | |
435 | sb.Appen d("byte[] key = {"); | |
436 | for (int i = 0 ; i < key.Len gth ; i++) | |
437 | { | |
438 | sb.A ppend(key[ i].ToStrin g()); | |
439 | if ( i < key.Le ngth - 1) sb.Append( ", "); | |
440 | } | |
441 | sb.Appen dLine("};" ); | |
442 | sb.Appen d("byte[] iv = {"); | |
443 | for (int i = 0; i < iv.Lengt h; i++) | |
444 | { | |
445 | sb.A ppend(iv[i ].ToString ()); | |
446 | if ( i < iv.Len gth - 1) s b.Append(" , "); | |
447 | } | |
448 | sb.Appen dLine("};" ); | |
449 | this.Inf o(sb.ToStr ing()); | |
450 | } | |
451 | ||
452 | pr ivate void buttonCor rectJavaDi r_Click(ob ject sende r, EventAr gs e) | |
453 | { | |
454 | bool isW rongDir = JavaFacade .IsJavaIns talledInWr ongDirecto ry(true); | |
455 | this.Inf o("JavaFac ade.IsJava InstalledI nWrongDire ctory(true ) returned " + isWro ngDir.ToSt ring()); | |
456 | isWrongD ir = JavaF acade.IsJa vaInstalle dInWrongDi rectory(fa lse); | |
457 | this.Inf o("JavaFac ade.IsJava InstalledI nWrongDire ctory(fals e) returne d " + isWr ongDir.ToS tring()); | |
458 | } | |
459 | ||
460 | pr ivate void buttonLBV ersion_Cli ck(object sender, Ev entArgs e) | |
461 | { | |
462 | string v ersion = L aurelBridg eFacade.Ge tInstalled LaurelBrid geVersion( ); | |
463 | this.Inf o("LaurelB ridgeFacad e.GetInsta lledLaurel BridgeVers ion() retu rned " + v ersion); | |
464 | ||
465 | } | |
466 | ||
467 | pr ivate void buttonIsD eprecatedD CFInstalle d_Click(ob ject sende r, EventAr gs e) | |
468 | { | |
469 | bool isD eprecated = LaurelBr idgeFacade .IsDepreca tedLaurelB ridgeInsta lled(); | |
470 | this.Inf o("LaurelB ridgeFacad e.IsDeprec atedLaurel BridgeInst alled() re turned " + isDepreca ted.ToStri ng()); | |
471 | } | |
472 | ||
473 | pr ivate void buttonGet DcfRootDir ectory_Cli ck(object sender, Ev entArgs e) | |
474 | { | |
475 | string d cfDir = La urelBridge Facade.Get InstalledL aurelBridg eRootDirec tory(); | |
476 | this.Inf o("LaurelB ridgeFacad e.GetInsta lledLaurel BridgeRoot Directory( ) returned " + dcfDi r); | |
477 | } | |
478 | ||
479 | pr ivate void buttonAct iveDcfLice nseType_Cl ick(object sender, E ventArgs e ) | |
480 | { | |
481 | DcfLicen seType lic enseType = LaurelBri dgeFacade. GetActiveD cfLicenseT ype(); | |
482 | this.Inf o("LaurelB ridgeFacad e.GetActiv eDcfLicens eType() re turned " + licenseTy pe.ToStrin g()); | |
483 | } | |
484 | ||
485 | pr ivate void buttonIsV S2005CPlus PlusRuntim eInstalled _Click(obj ect sender , EventArg s e) | |
486 | { | |
487 | //bool i sInstalled = Busines sFacade.Is VCPlusPlus 2005x86Red istributab leInstalle d(); | |
488 | bool isI nstalled = LaurelBri dgeFacade. CanRunDcfI nfo(); | |
489 | this.Inf o("LaurelB ridgeFacad e.IsVS2005 CPlusPlusR edistribut ableInstal led() retu rned " + i sInstalled .ToString( )); | |
490 | } | |
491 | ||
492 | pr ivate void buttonIns tallVS2005 CPlusPlusR untimeInst alled_Clic k(object s ender, Eve ntArgs e) | |
493 | { | |
494 | bool isI nstalled = BusinessF acade.Inst allVCPlusP lusRedistr ibutableFo rLaurelBri dge(@"C:\D CF_Runtime "); | |
495 | this.Inf o("LaurelB ridgeFacad e.InstallV S2005CPlus PlusRedist ributable( ) returned " + isIns talled.ToS tring()); | |
496 | } | |
497 | ||
498 | pr ivate void buttonIns tallDcfToo lkit_Click (object se nder, Even tArgs e) | |
499 | { | |
500 | string e rrorMessag e = ""; | |
501 | if (Laur elBridgeFa cade.Insta llLaurelBr idgeDcfToo lkit(@"C:\ DCF_RunTim e", ref er rorMessage ) == false ) | |
502 | { | |
503 | Info ("LaurelBr idgeFacade .InstallLa urelBridge DcfToolkit reported the follow ing error message: " + errorMe ssage); | |
504 | } | |
505 | } | |
506 | ||
507 | pr ivate void buttonRem oveDcfTool kit_Click( object sen der, Event Args e) | |
508 | { | |
509 | LaurelBr idgeFacade .RemoveLau relBridgeI nstallatio n(config); | |
510 | } | |
511 | ||
512 | pr ivate void buttonSet DcfEnviron mentVariab les_Click( object sen der, Event Args e) | |
513 | { | |
514 | LaurelBr idgeFacade .CreateLau relBridgeE nvironment Variables( @"C:\DCF_R unTime"); | |
515 | } | |
516 | ||
517 | pr ivate void buttonRem oveDcfEnvi ronmentVar iables_Cli ck(object sender, Ev entArgs e) | |
518 | { | |
519 | LaurelBr idgeFacade .RemoveLau relBridgeE nvironment Variables( ); | |
520 | } | |
521 | ||
522 | pr ivate void buttonIsD cfToolkitI nstalled_C lick(objec t sender, EventArgs e) | |
523 | { | |
524 | bool isI nstalled = LaurelBri dgeFacade. IsLaurelBr idgeInstal led(); | |
525 | Info("La urelBridge Facade.IsL aurelBridg eInstalled () returne d " + isIn stalled.To String()); | |
526 | } | |
527 | ||
528 | pr ivate void buttonIsD cfToolkitL icensed_Cl ick(object sender, E ventArgs e ) | |
529 | { | |
530 | bool isI nstalled = LaurelBri dgeFacade. IsLaurelBr idgeLicens ed(); | |
531 | Info("La urelBridge Facade.IsL aurelBridg eLicensed( ) returned " + isIns talled.ToS tring()); | |
532 | } | |
533 | ||
534 | pr ivate void buttonLic enseUsingM acKey_Clic k(object s ender, Eve ntArgs e) | |
535 | { | |
536 | string e rrorMessag e = ""; | |
537 | if (Laur elBridgeFa cade.Licen seLaurelBr idgeDcfToo lkitWithMa cBasedKeyF ile(@"C:\I nstall\Lau rel Bridge \DCF-SDK-D EV-3.3.x-M A-VA-Silve rSpring-Ke ithBucklap top-999912 31-00.24.D 7.38.83.C8 .key", ref errorMess age) == fa lse) | |
538 | { | |
539 | Info ("LaurelBr idgeFacade .LicenseLa urelBridge DcfToolkit WithMacBas edKeyFile reported t he followi ng error m essage: " + errorMes sage); | |
540 | } | |
541 | } | |
542 | ||
543 | pr ivate void buttonLic enseUsingE nterpriseL icense_Cli ck(object sender, Ev entArgs e) | |
544 | { | |
545 | string m acAddress = null; | |
546 | LaurelBr idgeFacade .LicenseLa urelBridge DcfToolkit WithEnterp riseLicens e(macAddre ss); | |
547 | } | |
548 | ||
549 | pr ivate void buttonIsV S2008CPlus PlusRuntim eInstalled _Click(obj ect sender , EventArg s e) | |
550 | { | |
551 | bool isI nstalled = BusinessF acade.IsVC PlusPlus20 08Redistri butableIns talled(); | |
552 | this.Inf o("LaurelB ridgeFacad e.IsVS2008 CPlusPlusR edistribut ableInstal led() retu rned " + i sInstalled .ToString( )); | |
553 | } | |
554 | ||
555 | pr ivate void buttonIns tallVS2008 CPlusPlusR untimeInst alled_Clic k(object s ender, Eve ntArgs e) | |
556 | { | |
557 | bool isI nstalled = BusinessF acade.Inst allVCPlusP lus2008Red istributab le(); | |
558 | this.Inf o("LaurelB ridgeFacad e.InstallV S2008CPlus PlusRedist ributable( ) returned " + isIns talled.ToS tring()); | |
559 | } | |
560 | ||
561 | pr ivate void buttonIsJ aiInstalle d_Click(ob ject sende r, EventAr gs e) | |
562 | { | |
563 | bool isI nstalled = JavaFacad e.IsJavaAd vancedImag ingInstall edViaMsi() ; | |
564 | this.Inf o("JavaFac ade.isJava AdvancedIm agingInsta lledViaMsi () returne d " + isIn stalled.To String()); | |
565 | } | |
566 | ||
567 | pr ivate void buttonIsJ avaImageIO Installed_ Click(obje ct sender, EventArgs e) | |
568 | { | |
569 | bool isI nstalled = JavaFacad e.IsJavaIm ageIOInsta lledViaMsi (); | |
570 | this.Inf o("JavaFac ade.IsJava ImageIOIns talledViaM si() retur ned " + is Installed. ToString() ); | |
571 | } | |
572 | ||
573 | pr ivate void buttonUni nstallActi veJre_Clic k(object s ender, Eve ntArgs e) | |
574 | { | |
575 | this.Inf o("Uninsta lling Acti ve JRE"); | |
576 | JavaFaca de.Uninsta llActiveJr e(); | |
577 | this.Inf o("Done"); | |
578 | } | |
579 | ||
580 | pr ivate void buttonDum pVixConfig _Click(obj ect sender , EventArg s e) | |
581 | { | |
582 | VixConfi gurationPa rameters.F romXmlToFi le(VixFaca de.GetVixC onfigurati onDirector y()); | |
583 | this.Inf o("Done"); | |
584 | } | |
585 | ||
586 | pr ivate void buttonCan RunDcfInfo _Click(obj ect sender , EventArg s e) | |
587 | { | |
588 | bool can Run = Laur elBridgeFa cade.CanRu nDcfInfo() ; | |
589 | Info("La urelBridge Facade.Can RunDcfInfo () returne d " + canR un.ToStrin g()); | |
590 | } | |
591 | ||
592 | pr ivate void buttonEna ble64BitIn stallation _Click(obj ect sender , EventArg s e) | |
593 | { | |
594 | bool isE nabled = m anifest.En able64BitI nstallatio n; | |
595 | this.Inf o("manifes t.Enable64 BitInstall ation() re turned " + isEnabled .ToString( )); | |
596 | } | |
597 | ||
598 | pr ivate void buttonTes tTomcatUse rAccess_Cl ick(object sender, E ventArgs e ) | |
599 | { | |
600 | VixManif est manife st = new V ixManifest (Applicati on.Startup Path); | |
601 | TomcatFa cade.Manif est = mani fest; | |
602 | if (!Tom catFacade. TestTomcat UserAccess ("apacheto mcat")) | |
603 | { | |
604 | Info ("TestTomc atUserAcce ss - faile d - delete user"); | |
605 | if ( TomcatFaca de.DeleteT omcatUser( "apachetom cat")) | |
606 | { | |
607 | Info("Test TomcatUser Access - u ser delete d successf ully or do esn't exis t"); | |
608 | ||
609 | //TomcatFa cade.Unins tallCurren tTomcat(); | |
610 | //JavaFaca de.Uninsta llCurrentJ re(); | |
611 | ||
612 | //VixConfi gurationPa rameters c onfig = Vi xConfigura tionParame ters.FromX ml(VixFaca de.GetVixC onfigurati onDirector y()); | |
613 | //if (conf ig != null ) | |
614 | // VixF acade.Dele teLocalCac heRegions( config); | |
615 | ||
616 | } | |
617 | else | |
618 | { | |
619 | Info("Unab le to dele te apachet omcat user "); | |
620 | ||
621 | } | |
622 | ||
623 | } | |
624 | else | |
625 | { | |
626 | Info ("TestTomc atUserAcce ss OKAY"); | |
627 | } | |
628 | ||
629 | if (!Jav aFacade.Un installCur rentJre()) | |
630 | { | |
631 | Info ("Unable t o uninstal l java pro grammatica lly, pleas e remove m anually an d reinstal l"); | |
632 | } | |
633 | ||
634 | string v ixconfig = VixFacade .GetVixCon figuration Directory( ); | |
635 | ||
636 | if (vixc onfig == n ull) | |
637 | vixc onfig = @" c:\vixconf ig"; | |
638 | ||
639 | VixConfi gurationPa rameters c onfig = Vi xConfigura tionParame ters.FromX ml(vixconf ig); | |
640 | if (conf ig != null ) | |
641 | VixF acade.Dele teLocalCac heRegions( config); | |
642 | ||
643 | } | |
644 | ||
645 | Da teTime max Time = Dat eTime.Now; | |
646 | ||
647 | pr ivate void buttonGet VixVersion _Click(obj ect sender , EventArg s e) | |
648 | { | |
649 | ProcessS tartInfo s tartInfo = new Proce ssStartInf o(); | |
650 | //startI nfo.Create NoWindow = false; | |
651 | startInf o.UseShell Execute = true; | |
652 | startInf o.FileName = "VixGet Version.ex e"; | |
653 | startInf o.WindowSt yle = Proc essWindowS tyle.Norma l; | |
654 | //String catalinaP rop = Path .Combine(T omcatFacad e.TomcatCo nfiguratio nFolder, " catalina.p roperties" ); | |
655 | startInf o.Argument s = @"CVIX " + "\"" + @"C:\Pro gram Files \Apache So ftware Fou ndation\To mcat 8.0\c onf" + "\" "; | |
656 | Process. Start(star tInfo); | |
657 | } | |
658 | ||
659 | } | |
660 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.