1616using LingTree ;
1717using Microsoft . Win32 ;
1818using System . Text ;
19+ using SIL . FieldWorks . Common . FwUtils ;
1920
2021namespace SIL . PcPatrBrowser
2122{
@@ -87,6 +88,7 @@ public class PcPatrBrowserApp : System.Windows.Forms.Form
8788 "PC-PATR Browser Language Info (*.pbl)|*.pbl|" + "All Files (*.*)|*.*" ;
8889 string m_sFSFile ;
8990 string m_sInterFile ;
91+ string m_sTransformsDir = Path . Combine ( FwDirectoryFinder . CodeDirectory , "Language Explorer" , "Transforms" , "PcPatrBrowser" ) ;
9092 private PcPatrDocument m_doc ;
9193 private PcPatrParse m_parse ;
9294 private LingTreeTree m_tree ;
@@ -201,14 +203,14 @@ private void InitPcPatrBrowser(string sStartupPath)
201203 if ( sStartupPath . Contains ( "x64" ) )
202204 beginPath = @"..\..\" ;
203205 m_sStartUpPath = Path . Combine ( sStartupPath , beginPath ) ;
204- m_treeTransform . Load ( Path . Combine ( m_sStartUpPath , @"Transforms\ PcPatrToLingTree.xsl") ) ;
206+ m_treeTransform . Load ( Path . Combine ( m_sStartUpPath , m_sTransformsDir , " PcPatrToLingTree.xsl") ) ;
205207
206208 m_fsTransform = new XslCompiledTransform ( ) ;
207- m_fsTransform . Load ( Path . Combine ( m_sStartUpPath , @"Transforms\ ShowFS.xsl") ) ;
209+ m_fsTransform . Load ( Path . Combine ( m_sStartUpPath , m_sTransformsDir , " ShowFS.xsl") ) ;
208210
209211 m_interlinearTransform = new XslCompiledTransform ( ) ;
210212 m_interlinearTransform . Load (
211- Path . Combine ( m_sStartUpPath , @"Transforms\ ShowInterlinear.xsl")
213+ Path . Combine ( m_sStartUpPath , m_sTransformsDir , " ShowInterlinear.xsl")
212214 ) ;
213215
214216 InitInterlinearBrowser ( ) ;
@@ -509,7 +511,7 @@ private void InitFeatureStructureBrowser()
509511 InitBrowser ( wbFeatureStructure ) ;
510512 wbFeatureStructure . Name = "wbFeatureStructure" ;
511513 pnlFeatureStructure . Controls . Add ( wbFeatureStructure ) ;
512- m_sInitFeatureMessagePath = Path . Combine ( m_sStartUpPath , @"Transforms\ InitFeature.htm") ;
514+ m_sInitFeatureMessagePath = Path . Combine ( m_sStartUpPath , m_sTransformsDir , " InitFeature.htm") ;
513515 wbFeatureStructure . Navigate ( m_sInitFeatureMessagePath ) ;
514516 }
515517
@@ -521,7 +523,7 @@ private void InitInterlinearBrowser()
521523 pnlInterlinear . Controls . Add ( wbInterlinear ) ;
522524 m_sInitInterlinearMessagePath = Path . Combine (
523525 m_sStartUpPath ,
524- @"Transforms\ InitInterlinear.htm"
526+ m_sTransformsDir , " InitInterlinear.htm"
525527 ) ;
526528 wbInterlinear . Navigate ( m_sInitInterlinearMessagePath ) ;
527529 }
@@ -1356,7 +1358,7 @@ private void ReportNoInterlinear()
13561358 {
13571359 string sNoInterlinearMessagePath = Path . Combine (
13581360 m_sStartUpPath ,
1359- @"Transforms\ NoInterlinear.htm"
1361+ m_sTransformsDir , " NoInterlinear.htm"
13601362 ) ;
13611363 wbInterlinear . Navigate ( sNoInterlinearMessagePath ) ;
13621364 }
0 commit comments