Fixed the visibility of the Convert to DocX button so that it is not visible for Library Documents, Automatic Table of Contents or Step Sections.
This commit is contained in:
parent
b4d867a517
commit
ebbc57e5bb
@ -488,21 +488,27 @@ namespace VEPROMS
|
|||||||
bool sav_Initializing = _Initializing;
|
bool sav_Initializing = _Initializing;
|
||||||
_Initializing = true;
|
_Initializing = true;
|
||||||
bool isLib = false;
|
bool isLib = false;
|
||||||
|
// Only show the Convert To DocX button for non-library MS Word Sections
|
||||||
if (_SectionConfig.MySection.MyContent.MyEntry!=null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument!=null && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != null) && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != "")) isLib = true;
|
if (_SectionConfig.MySection.MyContent.MyEntry!=null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument!=null && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != null) && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != "")) isLib = true;
|
||||||
if (isLib)
|
if (isLib)
|
||||||
{
|
{
|
||||||
ppBtnConvertToDocX.Visible = false; // Don't allow save as DOCX for libraries documents
|
ppBtnConvertToDocX.Visible = false; // Don't allow save as DOCX for libraries documents
|
||||||
ppBtnCvrtToLibDoc.Text = "Convert this Section To A Non-Library Document";
|
ppBtnCvrtToLibDoc.Text = "Convert this Section To A Non-Library Document";
|
||||||
lblLibraryDocument.Text = "Library Document";
|
lblLibraryDocument.Text = "Library Document";
|
||||||
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Non-Library Document", "", "This button will convert the current section from a library document to a non-library document",
|
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Non-Library Document", "", "This button will convert the current section from a library document to a non-library document",
|
||||||
null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
|
null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument != null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument.FileExtension == ".RTF")
|
// Only show the Convert To DocX button for RTF MS Word Sections
|
||||||
this.ppBtnConvertToDocX.Visible = true; // Only allow save as DocX for normal word sections when the exissting text is RTF.
|
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument != null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument.FileExtension == ".RTF")
|
||||||
else
|
{
|
||||||
this.ppBtnConvertToDocX.Visible = false;
|
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
|
||||||
|
if (!ii.IsAutoTOCSection) // Only show the Convert To DocX button for non-Auto Table Of Contents Section
|
||||||
|
this.ppBtnConvertToDocX.Visible = true; // Only allow save as DocX for normal word sections when the existing text is RTF.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
this.ppBtnConvertToDocX.Visible = false;
|
||||||
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
|
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
|
||||||
ppBtnCvrtToLibDoc.Visible = false;
|
ppBtnCvrtToLibDoc.Visible = false;
|
||||||
else
|
else
|
||||||
@ -512,7 +518,7 @@ namespace VEPROMS
|
|||||||
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Library Document button", "", "This button will convert the current section to a library document, allowing it t" +
|
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Convert To Library Document button", "", "This button will convert the current section to a library document, allowing it t" +
|
||||||
"o be shared with other procedures.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
|
"o be shared with other procedures.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true);
|
DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true);
|
||||||
int selindx = -1;
|
int selindx = -1;
|
||||||
@ -624,9 +630,10 @@ namespace VEPROMS
|
|||||||
ppCmbxStyleSectionType.DataSource = newDocStyles;
|
ppCmbxStyleSectionType.DataSource = newDocStyles;
|
||||||
ppCmbxStyleSectionType.SelectedIndex = selindx;
|
ppCmbxStyleSectionType.SelectedIndex = selindx;
|
||||||
ppCmbxStyleSectionType.Refresh();
|
ppCmbxStyleSectionType.Refresh();
|
||||||
|
ppBtnConvertToDocX.Visible = false;// Set the Convert To DocX button to invisible by default
|
||||||
|
|
||||||
if (!_isStepSection)
|
if (!_isStepSection)
|
||||||
ppCmbxLibDocFill();
|
ppCmbxLibDocFill(); // set the Convert To DocX button to Visible if appropriate
|
||||||
_Initializing = myInit;
|
_Initializing = myInit;
|
||||||
if (_isStepSection)
|
if (_isStepSection)
|
||||||
SetupCheckoffsDropdowns();
|
SetupCheckoffsDropdowns();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user