Compare commits
8 Commits
C2019-025_
...
C2019-025_
Author | SHA1 | Date | |
---|---|---|---|
b7aa85f4fc | |||
90e25f3fcf | |||
ca61597863 | |||
a04def360d | |||
5e43a8501b | |||
e893264075 | |||
82d8fe6e17 | |||
4ca3697845 |
@@ -12,6 +12,12 @@ using JR.Utils.GUI.Forms;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public enum E_FieldToEdit { StepText, Text, Number, PSI };
|
||||
public enum ReplaceWords
|
||||
{
|
||||
Inherit = 0,
|
||||
Show = 1,
|
||||
DoNotShow = 2
|
||||
}
|
||||
public class DisplayText
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -55,22 +61,20 @@ namespace VEPROMS.CSLA.Library
|
||||
if (sc == null) return "N";
|
||||
return sc.Section_ShwRplWords;
|
||||
}
|
||||
|
||||
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
|
||||
// C2019-025 c2025-010 Ability-to-Toggle-Replace-Words
|
||||
private bool ShwRplWdsIndex(ItemInfo _MyItemInfo)
|
||||
{
|
||||
StepConfig sc = _MyItemInfo.MyConfig as StepConfig;
|
||||
int setting = sc.Step_ShwRplWdsIndex;
|
||||
switch (setting)
|
||||
{
|
||||
case 3:
|
||||
case (int)ReplaceWords.DoNotShow:
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
case (int)ReplaceWords.Show:
|
||||
return true;
|
||||
break;
|
||||
case 1:
|
||||
case 0:
|
||||
case (int)ReplaceWords.Inherit:
|
||||
//SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig;
|
||||
SectionConfig sc2 = _MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
if (sc2 == null || sc2.Section_ShwRplWords == "Y")
|
||||
@@ -87,6 +91,7 @@ namespace VEPROMS.CSLA.Library
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private Item _MyItem;
|
||||
private string EditText
|
||||
{
|
||||
|
@@ -105,7 +105,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (tmp._MyContent != null)
|
||||
{
|
||||
ContentInfo.Refresh(tmp._MyContent);
|
||||
if (tmp._MyContent.MyImage != null) ImageInfo.Refresh(tmp._MyContent.MyImage);
|
||||
if (tmp._MyContent?.MyImage != null) ImageInfo.Refresh(tmp._MyContent.MyImage);
|
||||
}
|
||||
ItemInfo.Refresh(tmp);
|
||||
}
|
||||
|
1589
PROMS/Volian.Controls.Library/DisplayTags.Designer.cs
generated
1589
PROMS/Volian.Controls.Library/DisplayTags.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -142,6 +142,7 @@ namespace Volian.Controls.Library
|
||||
tbChgID.Text = "";
|
||||
tbChgID.Enabled = false;
|
||||
lblChgId.Visible = tbChgID.Visible = false;
|
||||
btnSaveChangeID.Enabled = btnSaveChangeID.Visible = false;
|
||||
CurItemInfo = null;
|
||||
cbInitialLine.Visible = cbInitialLine.Enabled = false;
|
||||
|
||||
@@ -521,9 +522,10 @@ namespace Volian.Controls.Library
|
||||
tbChgID.Text = sc1.Step_ChangeID;
|
||||
tbChgID.Enabled = true;
|
||||
lblChgId.Visible = tbChgID.Visible = true;
|
||||
btnSaveChangeID.Enabled = btnSaveChangeID.Visible = true;
|
||||
}
|
||||
else
|
||||
lblChgId.Visible = tbChgID.Visible = false;
|
||||
lblChgId.Visible = tbChgID.Visible = btnSaveChangeID.Enabled = btnSaveChangeID.Visible = false;
|
||||
|
||||
// Walk up tree until this step type's parentType is "Base". Start adding menuitems from this step type.
|
||||
StepData top = fmtdata.StepDataList[formatSteptype];
|
||||
@@ -903,18 +905,6 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void tbChgID_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
MyEditItem.SaveContents();
|
||||
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
|
||||
// if the changeID changed, then reset the change bar override
|
||||
// B2021-029: don't change changeid if the config & text box are both empty
|
||||
if (sc.Step_ChangeID != tbChgID.Text && sc.Step_ChangeID != null && tbChgID.Text != "")
|
||||
{
|
||||
sc.Step_ChangeID = tbChgID.Text;
|
||||
sc.Step_CBOverride = null;
|
||||
}
|
||||
}
|
||||
#region WCNTRN format
|
||||
// The following supports the Wolf Creek Training format/Responsibility data
|
||||
// off of the High Level Step
|
||||
@@ -1037,25 +1027,41 @@ namespace Volian.Controls.Library
|
||||
|
||||
}
|
||||
|
||||
//private void txbxAltConActSumText_Leave(object sender, EventArgs e)
|
||||
//{
|
||||
// // User left Atlernate Continuous Action Text field. If text changed, then prompt
|
||||
// // to see if save should occur.
|
||||
// StepConfig sc = CurItemInfo.MyConfig as StepConfig;
|
||||
// if (sc == null) return;
|
||||
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == "");
|
||||
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text)
|
||||
// {
|
||||
// if (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
// {
|
||||
// MyEditItem.SaveContents();
|
||||
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config
|
||||
// }
|
||||
// else
|
||||
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
|
||||
// }
|
||||
//B2025-010 PROMS -Fixed issues updating Changeid
|
||||
// Changed to a Save button instead of onTextChanged
|
||||
// Also was issue where sometimes would lave last character / digit (not allowing the change id to be completely removed)
|
||||
private void btnSaveChangeID_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyEditItem.SaveContents();
|
||||
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
|
||||
// if the changeID changed, then reset the change bar override
|
||||
// B2021-029: don't change changeid if the config & text box are both empty
|
||||
if (sc.Step_ChangeID != tbChgID.Text && (!string.IsNullOrEmpty(sc.Step_ChangeID) || !string.IsNullOrEmpty(tbChgID.Text)))
|
||||
{
|
||||
sc.Step_ChangeID = tbChgID.Text;
|
||||
sc.Step_CBOverride = null;
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
//private void txbxAltConActSumText_Leave(object sender, EventArgs e)
|
||||
//{
|
||||
// // User left Atlernate Continuous Action Text field. If text changed, then prompt
|
||||
// // to see if save should occur.
|
||||
// StepConfig sc = CurItemInfo.MyConfig as StepConfig;
|
||||
// if (sc == null) return;
|
||||
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == "");
|
||||
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text)
|
||||
// {
|
||||
// if (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
// {
|
||||
// MyEditItem.SaveContents();
|
||||
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config
|
||||
// }
|
||||
// else
|
||||
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -409,7 +409,7 @@ namespace Volian.Print.Library
|
||||
else if (cai.Type > 20099) // B2020-054: Always put out 'Equation' (removed checking for null text)
|
||||
txt = "Equation";
|
||||
else
|
||||
txt = ItemInfo.ConvertToDisplayText(cai.Text);
|
||||
txt = ItemInfo.ConvertToDisplayText(cai.Text).Replace("Go to \u25cf", "Go to ?");
|
||||
if (MyProc.MyDocVersion.MultiUnitCount > 1)
|
||||
{
|
||||
System.Xml.XmlNode nd;
|
||||
@@ -1570,7 +1570,7 @@ namespace Volian.Print.Library
|
||||
else if (cai.Type > 20099)
|
||||
txt = "Equation";
|
||||
else
|
||||
txt = ItemInfo.ConvertToDisplayText(cai.Text);
|
||||
txt = ItemInfo.ConvertToDisplayText(cai.Text).Replace("Go to \u25cf", "Go to ?");
|
||||
// Add Parent/Child information if applicable
|
||||
// We were doing this for the Chronology report so I added the same logic here for the Summary report
|
||||
if (MyProc.MyDocVersion.MultiUnitCount > 1)
|
||||
|
Reference in New Issue
Block a user