Changed logic too support unlimited levels of alphabetical tabs.
Save current changes to a step before doing a restore. Only show expander if a step has children Added Westinghouse RO Copy logic to Context Menu for Grid.
This commit is contained in:
parent
55f1561a71
commit
a60badb58f
@ -166,6 +166,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// RHM Moving Change
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// MyPrevious = null;
|
||||||
|
// Save();
|
||||||
|
//}
|
||||||
// newPreviousInfo == null if moving into first child, and wasfirstchild == true if moving out of first child.
|
// newPreviousInfo == null if moving into first child, and wasfirstchild == true if moving out of first child.
|
||||||
// This will require adjusting the DocVersion to point to the correct first child if a procedure is moved.
|
// This will require adjusting the DocVersion to point to the correct first child if a procedure is moved.
|
||||||
if (newPreviousInfo == null || wasfirstchild)
|
if (newPreviousInfo == null || wasfirstchild)
|
||||||
@ -2688,10 +2694,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// 'bb', 'cc'. The Westinghouse work required this and 16bit was tested and it worked the
|
// 'bb', 'cc'. The Westinghouse work required this and 16bit was tested and it worked the
|
||||||
// same way as the Westinghouse requirement. The original code to do 'aa', 'ab' was left here,
|
// same way as the Westinghouse requirement. The original code to do 'aa', 'ab' was left here,
|
||||||
// commented out, in case a future plant needs it and then should tie it to a format flag.
|
// commented out, in case a future plant needs it and then should tie it to a format flag.
|
||||||
// And Westinghouse had so many steps, added in to do 'aaa'
|
// Changed logic to support unlimited cases ('aa','aaa','aaaa', etc.)
|
||||||
if (number > 52) retval += Letter(1 + ((number - 1) % 52));
|
retval = retval.PadRight(1 + ((number-1)/26), Letter(1 + ((number - 1) % 26))[0]);
|
||||||
if (number > 26) retval += Letter(1 + ((number - 1) % 26)); // Letter((number - 1) / 26);
|
|
||||||
retval += Letter(1 + ((number - 1) % 26));
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
private string Letter(int number)
|
private string Letter(int number)
|
||||||
|
@ -575,6 +575,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void btnRestore_Click(object sender, EventArgs e)
|
private void btnRestore_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
MyEditItem.SaveContents();
|
||||||
TreeNode tn = tvAudits.SelectedNode;
|
TreeNode tn = tvAudits.SelectedNode;
|
||||||
if (tn.Tag is ContentAuditInfo)
|
if (tn.Tag is ContentAuditInfo)
|
||||||
{
|
{
|
||||||
|
@ -863,7 +863,7 @@ namespace Volian.Controls.Library
|
|||||||
if(MyStepPanel.AutoExpand)
|
if(MyStepPanel.AutoExpand)
|
||||||
CanExpand = itemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && itemInfo.HasChildren; // TemporaryFormat.IsHigh(item); ;
|
CanExpand = itemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && itemInfo.HasChildren; // TemporaryFormat.IsHigh(item); ;
|
||||||
else
|
else
|
||||||
CanExpand = true;
|
CanExpand = itemInfo.HasChildren;
|
||||||
break;
|
break;
|
||||||
default://Procedures cannot expand, because they automatically expand
|
default://Procedures cannot expand, because they automatically expand
|
||||||
CanExpand = false;
|
CanExpand = false;
|
||||||
|
@ -99,17 +99,23 @@ namespace Volian.Controls.Library
|
|||||||
private Dictionary<string, string> MyAvailableROs;
|
private Dictionary<string, string> MyAvailableROs;
|
||||||
public void SetContextMenu()
|
public void SetContextMenu()
|
||||||
{
|
{
|
||||||
|
AddWROContext(btnCMRtfEdit);
|
||||||
|
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
||||||
|
}
|
||||||
|
|
||||||
#region set up save ro menu jcb 20121221
|
#region set up save ro menu jcb 20121221
|
||||||
|
private void AddWROContext(DevComponents.DotNetBar.ButtonItem myButtonItem)
|
||||||
|
{
|
||||||
MyAvailableROs = new Dictionary<string, string>();
|
MyAvailableROs = new Dictionary<string, string>();
|
||||||
DevComponents.DotNetBar.BaseItem btnSaveRO = null;
|
DevComponents.DotNetBar.BaseItem btnSaveRO = null;
|
||||||
if (!btnCMRtfEdit.SubItems.Contains("btnSaveRO"))
|
if (!myButtonItem.SubItems.Contains("btnSaveRO"))
|
||||||
{
|
{
|
||||||
btnSaveRO = new DevComponents.DotNetBar.ButtonItem("btnSaveRO", "Save RO");
|
btnSaveRO = new DevComponents.DotNetBar.ButtonItem("btnSaveRO", "Save RO");
|
||||||
btnSaveRO.Visible = false;
|
btnSaveRO.Visible = false;
|
||||||
btnCMRtfEdit.SubItems.Add(btnSaveRO);
|
myButtonItem.SubItems.Add(btnSaveRO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
btnSaveRO = btnCMRtfEdit.SubItems["btnSaveRO"];
|
btnSaveRO = myButtonItem.SubItems["btnSaveRO"];
|
||||||
if (Clipboard.ContainsData(System.Windows.Forms.DataFormats.Text))
|
if (Clipboard.ContainsData(System.Windows.Forms.DataFormats.Text))
|
||||||
{
|
{
|
||||||
MyLookupData = Clipboard.GetData(System.Windows.Forms.DataFormats.Text).ToString();
|
MyLookupData = Clipboard.GetData(System.Windows.Forms.DataFormats.Text).ToString();
|
||||||
@ -147,9 +153,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
private bool IsValidRO(string data)
|
private bool IsValidRO(string data)
|
||||||
{
|
{
|
||||||
bool rv = false;
|
bool rv = false;
|
||||||
@ -320,6 +325,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public void SetGridCellContextMenu()
|
public void SetGridCellContextMenu()
|
||||||
{
|
{
|
||||||
|
AddWROContext(btnCMRtfCellEdit);
|
||||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfCellEdit);
|
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfCellEdit);
|
||||||
}
|
}
|
||||||
public void SetGridContextMenu()
|
public void SetGridContextMenu()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user