This commit is contained in:
Kathy Ruffing 2011-11-21 16:42:22 +00:00
parent e192f0e1a3
commit 4ec326169f
3 changed files with 1158 additions and 1107 deletions

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,15 @@ namespace VEPROMS
// also disable if there is no word content yet - the user may want to change from step type to // also disable if there is no word content yet - the user may want to change from step type to
// word type, as long as there is no content yet. // word type, as long as there is no content yet.
if (ii.HasStepContent || !ii.HasWordContent) tcpLibDoc.Enabled = false; if (ii.HasStepContent || !ii.HasWordContent) tcpLibDoc.Enabled = false;
// if this section has subsections, show the editable data check box. If showing 'editable data',
// the procedures steps are shown in editor (tree view & editor) & printed before any subsections.
// If not showing 'editable data', the steps are not shown in editor or print.
ppCbEditableData.Enabled = _SectionConfig.MySection.MySectionInfo.Sections != null && _SectionConfig.MySection.MySectionInfo.Sections.Count > 1; // subsection.hassections?
// Check for the print section num/title config item to determine whether that checkbox should
// be checked.
ppCbPrnSecNumTitle.Checked = _SectionConfig.SubSection_PH != "N";
} }
private void btnSectPropOK_Click(object sender, EventArgs e) private void btnSectPropOK_Click(object sender, EventArgs e)
@ -242,6 +251,9 @@ namespace VEPROMS
// set up some of the format tab: // set up some of the format tab:
SetupPpCmbxSectionType(); SetupPpCmbxSectionType();
ShowAvailableOptionsForSectionType(); ShowAvailableOptionsForSectionType();
// set the section level configs:
ppCbEditableData.Checked = !(_SectionConfig.SubSection_Edit == "N");
_Initializing = false; _Initializing = false;
} }
@ -382,7 +394,7 @@ namespace VEPROMS
if (_isStepSection) if (_isStepSection)
SetupCheckoffsDropdowns(); SetupCheckoffsDropdowns();
} }
private List<CheckOff> SectionPropertyCheckOffList = null;
private void SetupCheckoffsDropdowns() private void SetupCheckoffsDropdowns()
{ {
if (!_isStepSection) return; // not needed for accessory pages (word attachments) if (!_isStepSection) return; // not needed for accessory pages (word attachments)
@ -393,15 +405,22 @@ namespace VEPROMS
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList; CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
if (chkoffList != null && chkoffList.Count > 0) if (chkoffList != null && chkoffList.Count > 0)
{ {
if (SectionPropertyCheckOffList!=null)SectionPropertyCheckOffList.Clear();
SectionPropertyCheckOffList = new List<CheckOff>();
// Don't put up the first item in the chkoffList, it is '{Section Default}'.
for (int i = 1; i < chkoffList.Count; i++)
{
SectionPropertyCheckOffList.Add(chkoffList[i]);
}
ppGpbxSignoffCheckoff.Enabled = true; ppGpbxSignoffCheckoff.Enabled = true;
ppCmbxCheckoffType.DataSource = chkoffList; ppCmbxCheckoffType.DataSource = SectionPropertyCheckOffList;
ppCmbxCheckoffType.SelectedIndex = _SectionConfig.Section_CheckoffListSelection; ppCmbxCheckoffType.SelectedIndex = _SectionConfig.Section_CheckoffListSelection-1;
} }
else else
{ {
ppGpbxSignoffCheckoff.Enabled = false; ppGpbxSignoffCheckoff.Enabled = false;
} }
if (chkoffHeaderList != null && chkoffHeaderList.Count > 0) if (chkoffHeaderList != null && chkoffHeaderList.Count > 1)
{ {
lblCheckoffHeading.Enabled = true; lblCheckoffHeading.Enabled = true;
ppCmbxCheckoffHeading.Enabled = true; ppCmbxCheckoffHeading.Enabled = true;
@ -770,6 +789,20 @@ namespace VEPROMS
ppSectNumberStpRTB.Focus(); ppSectNumberStpRTB.Focus();
} }
private void ppCbEditableData_CheckedChanged(object sender, EventArgs e)
{
bool isEditable = ppCbEditableData.Checked;
if (!_Initializing)
_SectionConfig.SubSection_Edit = isEditable ? "Y" : "N";
}
private void ppCbPrnSecNumTitle_CheckedChanged(object sender, EventArgs e)
{
bool isEditable = ppCbPrnSecNumTitle.Checked;
if (!_Initializing)
_SectionConfig.SubSection_PH = isEditable ? "Y" : "N";
}
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e) //private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
//{ //{
// // Get the parent setting // // Get the parent setting

View File

@ -572,9 +572,9 @@ namespace VEPROMS
private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e) private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{ {
VETreeNode tn = ((VETreeNode)e.Node); VETreeNode tn = ((VETreeNode)e.Node);
tn.LoadingChildernDone += new VETreeNodeEvent(tn_LoadingChildernDone); tn.LoadingChildrenDone += new VETreeNodeEvent(tn_LoadingChildrenDone);
tn.LoadingChildernMax += new VETreeNodeEvent(tn_LoadingChildernMax); tn.LoadingChildrenMax += new VETreeNodeEvent(tn_LoadingChildrenMax);
tn.LoadingChildernValue += new VETreeNodeEvent(tn_LoadingChildernValue); tn.LoadingChildrenValue += new VETreeNodeEvent(tn_LoadingChildrenValue);
tn.LoadingChildrenSQL += new VETreeNodeEvent(tn_LoadingChildrenSQL); tn.LoadingChildrenSQL += new VETreeNodeEvent(tn_LoadingChildrenSQL);
tn.LoadChildren(true); tn.LoadChildren(true);
} }
@ -736,7 +736,7 @@ namespace VEPROMS
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="args"></param> /// <param name="args"></param>
void tn_LoadingChildernValue(object sender, VETreeNodeEventArgs args) void tn_LoadingChildrenValue(object sender, VETreeNodeEventArgs args)
{ {
ProgBarValue = args.Value; ProgBarValue = args.Value;
} }
@ -746,7 +746,7 @@ namespace VEPROMS
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="args"></param> /// <param name="args"></param>
void tn_LoadingChildernMax(object sender, VETreeNodeEventArgs args) void tn_LoadingChildrenMax(object sender, VETreeNodeEventArgs args)
{ {
ProgBarMax = args.Value; ProgBarMax = args.Value;
ProgBarText = "Loading..."; ProgBarText = "Loading...";
@ -757,7 +757,7 @@ namespace VEPROMS
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="args"></param> /// <param name="args"></param>
void tn_LoadingChildernDone(object sender, VETreeNodeEventArgs args) void tn_LoadingChildrenDone(object sender, VETreeNodeEventArgs args)
{ {
if (VlnSettings.DebugMode) if (VlnSettings.DebugMode)
ProgBarText = args.Info + " Seconds"; ProgBarText = args.Info + " Seconds";