Added a message box to notify the user when an RO cannot be found. This is used when you do a Go To RO in PROMS.
Added a NULL reference check.
This commit is contained in:
@@ -349,7 +349,13 @@ namespace ROEditor
|
||||
private System.Windows.Forms.MenuItem menuEditDelete;
|
||||
private System.Windows.Forms.MenuItem menuEditSelAll;
|
||||
private TreeNode LastSelectedNode;
|
||||
private TextBox CurrentTextBox; // currently selected TextBox field
|
||||
private TextBox _CurrentTextBox; // currently selected TextBox field
|
||||
|
||||
public TextBox CurrentTextBox
|
||||
{
|
||||
get { return _CurrentTextBox; }
|
||||
set { _CurrentTextBox = value; }
|
||||
}
|
||||
private VlnXmlElement rootXml;
|
||||
private TreeNode rootNode;
|
||||
|
||||
@@ -448,7 +454,14 @@ namespace ROEditor
|
||||
// read in this element from the table.
|
||||
VlnXmlElement spro;
|
||||
spro = myrodb.RODB_ReadRO(tbname, recid);
|
||||
|
||||
// RODB_ReadRO will return a NULL if the RO cannot be found
|
||||
// Pop up a message box to notify the user.
|
||||
// This will leave the RO Editor open. The user can continue to work or just close it.
|
||||
if (spro == null)
|
||||
{
|
||||
MessageBox.Show("Could not find this RO", "RO Not Found", MessageBoxButtons.OK);
|
||||
return;
|
||||
}
|
||||
VlnXmlElement parent;
|
||||
string parentid;
|
||||
parentid = spro.GetAttribute("ParentID");
|
||||
|
Reference in New Issue
Block a user