Added DisplayTabControl to the constructor for DisplayRO

This commit is contained in:
Rich
2017-05-26 11:01:48 +00:00
parent eb96b737f6
commit 0da05e4912
3 changed files with 6 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ namespace Volian.Controls.Library
public DisplayTabControl TabControl
{
get { return _TabControl; }
get { return _TabControl; }
set { _TabControl = value; }
}
private ROFstInfo _CurROFST = null;
@@ -196,9 +196,10 @@ namespace Volian.Controls.Library
#endregion
#region Constructors
public DisplayRO()
public DisplayRO(DisplayTabControl tc)// Added DisplayTabControl to the constructor to assure that it is set
{
InitializeComponent();
TabControl = tc;// B2017-074 Added DisplayTabControl to the constructor to assure that it is set
_ProgressBar = null;
panelRoValue.BackColor = Color.Cornsilk;
panelValue.BackColor = Color.Cornsilk;
@@ -590,7 +591,6 @@ namespace Volian.Controls.Library
{
SaveRO();
}
private void SaveRO()
{
if (tbROValue.Text == null || tbROValue.Text == "")
@@ -602,7 +602,7 @@ namespace Volian.Controls.Library
if (obj is ROFSTLookup.rochild)
{
ROFSTLookup.rochild roch = (ROFSTLookup.rochild)obj;
DisplayTabItem dti = _TabControl.SelectedDisplayTabItem; //.OpenItem(_ItemInfo); // open the corresponding procedure text
DisplayTabItem dti = TabControl.SelectedDisplayTabItem; //.OpenItem(_ItemInfo); // open the corresponding procedure text
if (dti.MyDSOTabPanel != null) // A Word Document tab is the active tab
{
int dbiId = System.Convert.ToInt32(roch.roid.Substring(0, 4), 16);