calls static function to get path to RO Editor, Also, double-click on RO Value will insert the RO Value

This commit is contained in:
John Jenko 2013-03-25 20:57:29 +00:00
parent c105823da0
commit 36fd716fed
2 changed files with 18 additions and 8 deletions

View File

@ -509,6 +509,11 @@ namespace Volian.Controls.Library
} }
} }
private void btnSaveRO_Click(object sender, EventArgs e) private void btnSaveRO_Click(object sender, EventArgs e)
{
SaveRO();
}
private void SaveRO()
{ {
if (tbROValue.Text == null || tbROValue.Text == "") if (tbROValue.Text == null || tbROValue.Text == "")
{ {
@ -763,7 +768,8 @@ namespace Volian.Controls.Library
MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version"); MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version");
return; 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; Object obj = tvROFST.SelectedNode.Tag;
if (obj is ROFSTLookup.rochild) 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"); MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version");
return; 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; Object obj = tvROFST.SelectedNode.Tag;
if (obj is ROFSTLookup.rochild) if (obj is ROFSTLookup.rochild)
{ {
@ -815,8 +822,9 @@ namespace Volian.Controls.Library
private void tvROFST_DoubleClick(object sender, EventArgs e) private void tvROFST_DoubleClick(object sender, EventArgs e)
{ {
if (tvROFST.SelectedNode == null) return; //if (tvROFST.SelectedNode == null) return;
RunRoEditor(); //RunRoEditor();
SaveRO();
} }
} }
} }

View File

@ -1564,7 +1564,8 @@ namespace Volian.Controls.Library
myROID = lt.MyRoUsageInfo.ROID.ToLower(); myROID = lt.MyRoUsageInfo.ROID.ToLower();
myRODB = lt.MyRoUsageInfo.MyRODb; 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; string args = "\"" + myRODB.FolderPath + "\" " + myROID;
if (!Directory.Exists(myRODB.FolderPath)) 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"); MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version");
return; 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) 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"); 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");