This commit is contained in:
Kathy Ruffing 2011-01-19 16:16:50 +00:00
parent 637bf06ae8
commit 6cf5c943df
3 changed files with 21 additions and 21 deletions

View File

@ -32,7 +32,7 @@ namespace Volian.Controls.Library
/// </summary>
private int _UniqueBarCount;
private ItemInfo _MyItemInfo = null;
private StepItem _MyStepItem = null;
private RTBItem _MyRTBItem = null;
private bool _RibbonExpanded=true;
public bool RibbonExpanded
{
@ -154,12 +154,12 @@ namespace Volian.Controls.Library
if (args != null)
{
_MyItemInfo = args.MyItemInfo;
_MyStepItem = args.MyStepItem;
_MyRTBItem = args.MyRTBItem;
}
else
{
_MyItemInfo = null;
_MyStepItem = null;
_MyRTBItem = null;
}
if (ItemSelectedChanged != null) ItemSelectedChanged(sender, args);
}
@ -213,8 +213,8 @@ namespace Volian.Controls.Library
void DisplayTabControl_Resize(object sender, EventArgs e)
{
// If the currently selected Item is in a Step, then adjust the scroll as necessary to keep it visible
if (_MyStepItem != null)
_MyStepItem.ItemShow();
if (_MyRTBItem != null)
_MyRTBItem.ItemShow();
}
private void SetupBar(Bar myBar)
{
@ -304,7 +304,7 @@ namespace Volian.Controls.Library
else // Otherwise open it in the Word editor
return OpenDSOTabPage(myItemInfo);
}
public bool PasteStepItem(ItemInfo myItemInfo, int copyStartID, ItemInfo.EAddpingPart pasteType, int type)
public bool PasteRTBItem(ItemInfo myItemInfo, int copyStartID, ItemInfo.EAddpingPart pasteType, int type)
{
CleanUpClosedItems();
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
@ -313,9 +313,9 @@ namespace Volian.Controls.Library
if (_MyDisplayTabItems.ContainsKey(key)) // If procedure page open use it
{
DisplayTabItem pg = _MyDisplayTabItems[key];
if (pg.MyStepTabPanel.MyStepPanel._LookupStepItems.ContainsKey(myItemInfo.ItemID))
if (pg.MyStepTabPanel.MyStepPanel._LookupRTBItems.ContainsKey(myItemInfo.ItemID))
{
StepItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupStepItems[myItemInfo.ItemID];
RTBItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupRTBItems[myItemInfo.ItemID];
switch (pasteType)
{
case ItemInfo.EAddpingPart.Before:
@ -336,7 +336,7 @@ namespace Volian.Controls.Library
}
return false;
}
public bool DeleteStepItem(ItemInfo myItemInfo)
public bool DeleteRTBItem(ItemInfo myItemInfo)
{
CleanUpClosedItems();
@ -354,16 +354,16 @@ namespace Volian.Controls.Library
CloseTabItem(pg);
return false;
}
if (pg.MyStepTabPanel.MyStepPanel._LookupStepItems.ContainsKey(myItemInfo.ItemID))
if (pg.MyStepTabPanel.MyStepPanel._LookupRTBItems.ContainsKey(myItemInfo.ItemID))
{
StepItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupStepItems[myItemInfo.ItemID];
RTBItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupRTBItems[myItemInfo.ItemID];
stpitm.RemoveItem();
return true;
}
}
return false;
}
public bool InsertStepItem(ItemInfo myItemInfo, string text, E_InsertType insertType, E_FromType fromType, int type,bool updateSelection)
public bool InsertRTBItem(ItemInfo myItemInfo, string text, E_InsertType insertType, E_FromType fromType, int type,bool updateSelection)
{
CleanUpClosedItems();
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
@ -372,9 +372,9 @@ namespace Volian.Controls.Library
if (_MyDisplayTabItems.ContainsKey(key)) // If procedure page open use it
{
DisplayTabItem pg = _MyDisplayTabItems[key];
if (pg.MyStepTabPanel.MyStepPanel._LookupStepItems.ContainsKey(myItemInfo.ItemID))
if (pg.MyStepTabPanel.MyStepPanel._LookupRTBItems.ContainsKey(myItemInfo.ItemID))
{
StepItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupStepItems[myItemInfo.ItemID];
RTBItem stpitm = pg.MyStepTabPanel.MyStepPanel._LookupRTBItems[myItemInfo.ItemID];
switch (insertType)
{
case E_InsertType.Before:

View File

@ -134,7 +134,7 @@ namespace Volian.Controls.Library
#endregion
#region Event Handlers
/// <summary>
/// Updates SelectedStepItem when the user selects a DisplayTabItem
/// Updates SelectedRTBItem when the user selects a DisplayTabItem
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
@ -145,8 +145,8 @@ namespace Volian.Controls.Library
if(myTabItem == null)return;
StepTabPanel myTabPanel = myTabItem.MyStepTabPanel as StepTabPanel;
if(myTabPanel == null) return;
if (MyStepTabPanel.SelectedStepItem == null) return;
_MyDisplayTabControl.OnItemSelectedChanged(this,new ItemSelectedChangedEventArgs(MyStepTabPanel.SelectedStepItem));
if (MyStepTabPanel.SelectedRTBItem == null) return;
_MyDisplayTabControl.OnItemSelectedChanged(this,new ItemSelectedChangedEventArgs(MyStepTabPanel.SelectedRTBItem));
}
#endregion
#region private Methods
@ -177,7 +177,7 @@ namespace Volian.Controls.Library
_MyStepTabPanel.MyDisplayTabItem = this;
((System.ComponentModel.ISupportInitialize)(_MyDisplayTabControl.MyBar)).EndInit();
_MyDisplayTabControl.MyBar.ResumeLayout(false);
DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
if (dvi == null) return;
if (dvi.VersionType > 127)
MyStepTabPanel.MyStepPanel.PanelViewEditMode = E_ViewMode.View;

View File

@ -288,13 +288,13 @@ namespace Volian.Controls.Library
private void listBoxStepTypes_SelectedIndexChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
StepItem topStepItem = _MyRTB.MyStepItem;
RTBItem topRTBItem = _MyRTB.MyRTBItem;
FormatData fmtdata = CurItemInfo.ActiveFormat.PlantFormat.FormatData;
string msgBox = null;
if (cbChgAll.Checked)
{
ItemInfo startitm = CurItemInfo.FirstSibling;
topStepItem = _MyRTB.MyStepItem.MyStepPanel._LookupStepItems[startitm.ItemID];
topRTBItem = _MyRTB.MyRTBItem.MyStepPanel._LookupRTBItems[startitm.ItemID];
while (startitm != null)
{
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
@ -331,7 +331,7 @@ namespace Volian.Controls.Library
}
msgBox = string.Format("This Step Type was changed to {0}", listBoxStepTypes.Items[listBoxStepTypes.SelectedIndex]);
}
topStepItem.SetAllTabs();
topRTBItem.SetAllTabs();
MessageBox.Show(msgBox);
}