diff --git a/PROMS/Volian.Controls.Library/DisplayRO.cs b/PROMS/Volian.Controls.Library/DisplayRO.cs index a8ae21ff..941d3486 100644 --- a/PROMS/Volian.Controls.Library/DisplayRO.cs +++ b/PROMS/Volian.Controls.Library/DisplayRO.cs @@ -509,6 +509,11 @@ namespace Volian.Controls.Library } } private void btnSaveRO_Click(object sender, EventArgs e) + { + SaveRO(); + } + + private void SaveRO() { if (tbROValue.Text == null || tbROValue.Text == "") { @@ -540,9 +545,9 @@ namespace Volian.Controls.Library MessageBox.Show("Error occurred finding RO. Contact Volian"); return; } - string accPrefix = db.dbiAP.Replace(_Mydvi.DocVersionConfig.RODefaults_graphicsprefix,"IG"); + string accPrefix = db.dbiAP.Replace(_Mydvi.DocVersionConfig.RODefaults_graphicsprefix, "IG"); accPrefix = accPrefix.Replace(_Mydvi.DocVersionConfig.RODefaults_setpointprefix, "SP"); -// string accPrefix = (roch.type == 8) ? _Mydvi.DocVersionConfig.RODefaults_graphicsprefix : _Mydvi.DocVersionConfig.RODefaults_setpointprefix; + // string accPrefix = (roch.type == 8) ? _Mydvi.DocVersionConfig.RODefaults_graphicsprefix : _Mydvi.DocVersionConfig.RODefaults_setpointprefix; string suffix = roch.roid.Substring(12, 4) == "0041" ? "" : "." + ((char)Convert.ToInt32(roch.roid.Substring(12, 4), 16)).ToString(); string AccPageID = string.Format("<{0}-{1}{2}>", accPrefix, roch.appid, suffix);// makes for example Console.WriteLine(AccPageID); @@ -763,7 +768,8 @@ namespace Volian.Controls.Library MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version"); return; } - string roapp = Environment.GetEnvironmentVariable("roapp"); + //string roapp = Environment.GetEnvironmentVariable("roapp"); + string roapp = Volian.Base.Library.ExeInfo.GetROEditorPath(); // get the path to the RO Editor Executable Object obj = tvROFST.SelectedNode.Tag; if (obj is ROFSTLookup.rochild) { @@ -797,7 +803,8 @@ namespace Volian.Controls.Library MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version"); return; } - string roapp = Environment.GetEnvironmentVariable("roapp"); + //string roapp = Environment.GetEnvironmentVariable("roapp"); + string roapp = Volian.Base.Library.ExeInfo.GetROEditorPath(); // get the path to the RO Editor Executable Object obj = tvROFST.SelectedNode.Tag; if (obj is ROFSTLookup.rochild) { @@ -815,8 +822,9 @@ namespace Volian.Controls.Library private void tvROFST_DoubleClick(object sender, EventArgs e) { - if (tvROFST.SelectedNode == null) return; - RunRoEditor(); + //if (tvROFST.SelectedNode == null) return; + //RunRoEditor(); + SaveRO(); } } } diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index d9863220..0e9d43c3 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1564,7 +1564,8 @@ namespace Volian.Controls.Library myROID = lt.MyRoUsageInfo.ROID.ToLower(); myRODB = lt.MyRoUsageInfo.MyRODb; } - string roapp = Environment.GetEnvironmentVariable("roapp"); + //string roapp = Environment.GetEnvironmentVariable("roapp"); + string roapp = Volian.Base.Library.ExeInfo.GetROEditorPath(); // get the path to the RO Editor Executable string args = "\"" + myRODB.FolderPath + "\" " + myROID; if (!Directory.Exists(myRODB.FolderPath)) { @@ -1642,7 +1643,8 @@ namespace Volian.Controls.Library MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version"); return; } - string roapp = Environment.GetEnvironmentVariable("roapp"); + //string roapp = Environment.GetEnvironmentVariable("roapp"); + string roapp = Volian.Base.Library.ExeInfo.GetROEditorPath(); // get the path to the RO Editor Executable if (roapp == null || roapp == string.Empty) { MessageBox.Show("The 'roapp' environment variable needs to be set to the path of the RO Editor\n\n Ex: C:\\VE-PROMS.NET\\Bin\\roeditor.exe", "Environment Variable Error");