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

View File

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

View File

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