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

@ -105,7 +105,8 @@ namespace VEPROMS
this.displayTransition = new Volian.Controls.Library.DisplayTransition();
this.infotabTransition = new DevComponents.DotNetBar.TabItem(this.components);
this.infotabControlPanelRO = new DevComponents.DotNetBar.TabControlPanel();
this.displayRO = new Volian.Controls.Library.DisplayRO();
this.tc = new Volian.Controls.Library.DisplayTabControl();
this.displayRO = new Volian.Controls.Library.DisplayRO(tc);//Assure that the DispayTabControl is set when the DisplayRO is created
this.infotabRO = new DevComponents.DotNetBar.TabItem(this.components);
this.infotabFoldoutMaint = new DevComponents.DotNetBar.TabItem(this.components);
this.navigationPanePanel2 = new DevComponents.DotNetBar.NavigationPanePanel();
@ -134,7 +135,6 @@ namespace VEPROMS
this.expandableSplitter4 = new DevComponents.DotNetBar.ExpandableSplitter();
this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
this.itemAnnotationsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.tc = new Volian.Controls.Library.DisplayTabControl();
this.fbd = new System.Windows.Forms.FolderBrowserDialog();
((System.ComponentModel.ISupportInitialize)(this.bottomBar)).BeginInit();
this.bottomBar.SuspendLayout();
@ -1086,7 +1086,6 @@ namespace VEPROMS
this.displayRO.ProgressBar = null;
this.displayRO.ROTypeFilter = VEPROMS.CSLA.Library.E_ROValueType.All;
this.displayRO.Size = new System.Drawing.Size(201, 458);
this.displayRO.TabControl = null;
this.displayRO.TabIndex = 0;
//
// infotabRO

View File

@ -2851,8 +2851,6 @@ namespace VEPROMS
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.MyRTB = (SelectedStepTabPanel == null) ? null :
SelectedStepTabPanel.MyStepPanel.SelectedEditItem == null ? null : SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyStepRTB;
displayRO.TabControl = tc;
displayRO.ProgressBar = bottomProgBar;
}
#endregion
@ -3346,7 +3344,6 @@ namespace VEPROMS
E_ROValueType.Table : (SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyItemInfo.IsFigure) ? E_ROValueType.Image: E_ROValueType.Text;
//displayRO.Mydvi = SelectedDVI;
displayRO.ProgressBar = bottomProgBar;
displayRO.TabControl = tc;
}
#endregion
#region VButton

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);