This commit is contained in:
Kathy Ruffing 2010-11-16 17:22:12 +00:00
parent e20796dfbf
commit 48fd879622
2 changed files with 76 additions and 50 deletions

View File

@ -92,14 +92,14 @@ namespace VEPROMS
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel(); this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components); this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpLibDoc = new DevComponents.DotNetBar.TabControlPanel();
this.tiLibDoc = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel(); this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbLinkWithEnhancedDoc = new System.Windows.Forms.CheckBox(); this.ppCbLinkWithEnhancedDoc = new System.Windows.Forms.CheckBox();
this.ppCbPlaceKeeper = new System.Windows.Forms.CheckBox(); this.ppCbPlaceKeeper = new System.Windows.Forms.CheckBox();
this.ppCbPrnSecNumTitle = new System.Windows.Forms.CheckBox(); this.ppCbPrnSecNumTitle = new System.Windows.Forms.CheckBox();
this.ppCbIncTOC = new System.Windows.Forms.CheckBox(); this.ppCbIncTOC = new System.Windows.Forms.CheckBox();
this.tiAutomation = new DevComponents.DotNetBar.TabItem(this.components); this.tiAutomation = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpLibDoc = new DevComponents.DotNetBar.TabControlPanel();
this.tiLibDoc = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel4 = new DevComponents.DotNetBar.TabControlPanel(); this.tabControlPanel4 = new DevComponents.DotNetBar.TabControlPanel();
this.tiViewStnns = new DevComponents.DotNetBar.TabItem(this.components); this.tiViewStnns = new DevComponents.DotNetBar.TabItem(this.components);
((System.ComponentModel.ISupportInitialize)(this.sectionConfigBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.sectionConfigBindingSource)).BeginInit();
@ -109,8 +109,8 @@ namespace VEPROMS
this.tcpGeneral.SuspendLayout(); this.tcpGeneral.SuspendLayout();
this.tcpFormat.SuspendLayout(); this.tcpFormat.SuspendLayout();
this.ppGpbxSignoffCheckoff.SuspendLayout(); this.ppGpbxSignoffCheckoff.SuspendLayout();
this.tcpAutomation.SuspendLayout();
this.tcpLibDoc.SuspendLayout(); this.tcpLibDoc.SuspendLayout();
this.tcpAutomation.SuspendLayout();
this.tabControlPanel4.SuspendLayout(); this.tabControlPanel4.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -223,6 +223,7 @@ namespace VEPROMS
// ppBtnDefaultFmt // ppBtnDefaultFmt
// //
this.ppBtnDefaultFmt.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.ppBtnDefaultFmt.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.ppBtnDefaultFmt.CallBasePaintBackground = true;
this.ppBtnDefaultFmt.Location = new System.Drawing.Point(587, 22); this.ppBtnDefaultFmt.Location = new System.Drawing.Point(587, 22);
this.ppBtnDefaultFmt.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnDefaultFmt.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ppBtnDefaultFmt.Name = "ppBtnDefaultFmt"; this.ppBtnDefaultFmt.Name = "ppBtnDefaultFmt";
@ -360,6 +361,7 @@ namespace VEPROMS
// ppBtnCvrtToLibDoc // ppBtnCvrtToLibDoc
// //
this.ppBtnCvrtToLibDoc.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.ppBtnCvrtToLibDoc.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.ppBtnCvrtToLibDoc.CallBasePaintBackground = true;
this.ppBtnCvrtToLibDoc.Location = new System.Drawing.Point(21, 237); this.ppBtnCvrtToLibDoc.Location = new System.Drawing.Point(21, 237);
this.ppBtnCvrtToLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnCvrtToLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ppBtnCvrtToLibDoc.Name = "ppBtnCvrtToLibDoc"; this.ppBtnCvrtToLibDoc.Name = "ppBtnCvrtToLibDoc";
@ -380,7 +382,7 @@ namespace VEPROMS
this.ppCmbxLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppCmbxLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ppCmbxLibDoc.Name = "ppCmbxLibDoc"; this.ppCmbxLibDoc.Name = "ppCmbxLibDoc";
this.ppCmbxLibDoc.Size = new System.Drawing.Size(569, 23); this.ppCmbxLibDoc.Size = new System.Drawing.Size(569, 23);
this.superTooltip1.SetSuperTooltip(this.ppCmbxLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Select Library Document", "", "This allows you to select a library document to reference for this section.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 76))); this.superTooltip1.SetSuperTooltip(this.ppCmbxLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Link to Selected Library Document button", "", "This allows you to select a library document to reference for this section.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 76)));
this.ppCmbxLibDoc.TabIndex = 40; this.ppCmbxLibDoc.TabIndex = 40;
this.ppCmbxLibDoc.WatermarkText = "no library document selected"; this.ppCmbxLibDoc.WatermarkText = "no library document selected";
this.ppCmbxLibDoc.SelectedIndexChanged += new System.EventHandler(this.ppCmbxLibDoc_SelectedIndexChanged); this.ppCmbxLibDoc.SelectedIndexChanged += new System.EventHandler(this.ppCmbxLibDoc_SelectedIndexChanged);
@ -620,6 +622,7 @@ namespace VEPROMS
// ppBtnDefaultPaginationStyle // ppBtnDefaultPaginationStyle
// //
this.ppBtnDefaultPaginationStyle.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.ppBtnDefaultPaginationStyle.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.ppBtnDefaultPaginationStyle.CallBasePaintBackground = true;
this.ppBtnDefaultPaginationStyle.Location = new System.Drawing.Point(281, 166); this.ppBtnDefaultPaginationStyle.Location = new System.Drawing.Point(281, 166);
this.ppBtnDefaultPaginationStyle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnDefaultPaginationStyle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ppBtnDefaultPaginationStyle.Name = "ppBtnDefaultPaginationStyle"; this.ppBtnDefaultPaginationStyle.Name = "ppBtnDefaultPaginationStyle";
@ -635,6 +638,7 @@ namespace VEPROMS
// ppBtnDefaultNumColumns // ppBtnDefaultNumColumns
// //
this.ppBtnDefaultNumColumns.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.ppBtnDefaultNumColumns.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.ppBtnDefaultNumColumns.CallBasePaintBackground = true;
this.ppBtnDefaultNumColumns.Location = new System.Drawing.Point(230, 227); this.ppBtnDefaultNumColumns.Location = new System.Drawing.Point(230, 227);
this.ppBtnDefaultNumColumns.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ppBtnDefaultNumColumns.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ppBtnDefaultNumColumns.Name = "ppBtnDefaultNumColumns"; this.ppBtnDefaultNumColumns.Name = "ppBtnDefaultNumColumns";
@ -691,6 +695,7 @@ namespace VEPROMS
// btnAutomation // btnAutomation
// //
this.btnAutomation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnAutomation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnAutomation.CallBasePaintBackground = true;
this.btnAutomation.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnAutomation.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnAutomation.Dock = System.Windows.Forms.DockStyle.Top; this.btnAutomation.Dock = System.Windows.Forms.DockStyle.Top;
this.btnAutomation.Location = new System.Drawing.Point(0, 69); this.btnAutomation.Location = new System.Drawing.Point(0, 69);
@ -704,6 +709,7 @@ namespace VEPROMS
// btnLibDocs // btnLibDocs
// //
this.btnLibDocs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnLibDocs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnLibDocs.CallBasePaintBackground = true;
this.btnLibDocs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnLibDocs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnLibDocs.Dock = System.Windows.Forms.DockStyle.Top; this.btnLibDocs.Dock = System.Windows.Forms.DockStyle.Top;
this.btnLibDocs.Location = new System.Drawing.Point(0, 46); this.btnLibDocs.Location = new System.Drawing.Point(0, 46);
@ -717,6 +723,7 @@ namespace VEPROMS
// btnFormat // btnFormat
// //
this.btnFormat.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnFormat.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnFormat.CallBasePaintBackground = true;
this.btnFormat.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnFormat.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnFormat.Dock = System.Windows.Forms.DockStyle.Top; this.btnFormat.Dock = System.Windows.Forms.DockStyle.Top;
this.btnFormat.Location = new System.Drawing.Point(0, 23); this.btnFormat.Location = new System.Drawing.Point(0, 23);
@ -730,6 +737,7 @@ namespace VEPROMS
// btnGeneral // btnGeneral
// //
this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnGeneral.CallBasePaintBackground = true;
this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top; this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top;
this.btnGeneral.Location = new System.Drawing.Point(0, 0); this.btnGeneral.Location = new System.Drawing.Point(0, 0);
@ -746,9 +754,9 @@ namespace VEPROMS
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tcSectionProp.BackColor = System.Drawing.Color.Transparent; this.tcSectionProp.BackColor = System.Drawing.Color.Transparent;
this.tcSectionProp.CanReorderTabs = true; this.tcSectionProp.CanReorderTabs = true;
this.tcSectionProp.Controls.Add(this.tcpLibDoc);
this.tcSectionProp.Controls.Add(this.tcpGeneral); this.tcSectionProp.Controls.Add(this.tcpGeneral);
this.tcSectionProp.Controls.Add(this.tcpFormat); this.tcSectionProp.Controls.Add(this.tcpFormat);
this.tcSectionProp.Controls.Add(this.tcpLibDoc);
this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpAutomation);
this.tcSectionProp.Controls.Add(this.tabControlPanel4); this.tcSectionProp.Controls.Add(this.tabControlPanel4);
this.tcSectionProp.Location = new System.Drawing.Point(216, 10); this.tcSectionProp.Location = new System.Drawing.Point(216, 10);
@ -989,6 +997,33 @@ namespace VEPROMS
this.tiFormat.Name = "tiFormat"; this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format"; this.tiFormat.Text = "Format";
// //
// tcpLibDoc
//
this.tcpLibDoc.Controls.Add(this.ppBtnCvrtToLibDoc);
this.tcpLibDoc.Controls.Add(this.lblLibraryDocument);
this.tcpLibDoc.Controls.Add(this.ppCmbxLibDoc);
this.tcpLibDoc.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpLibDoc.Location = new System.Drawing.Point(0, 24);
this.tcpLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tcpLibDoc.Name = "tcpLibDoc";
this.tcpLibDoc.Padding = new System.Windows.Forms.Padding(1);
this.tcpLibDoc.Size = new System.Drawing.Size(648, 301);
this.tcpLibDoc.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpLibDoc.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpLibDoc.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpLibDoc.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpLibDoc.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpLibDoc.Style.GradientAngle = 90;
this.tcpLibDoc.TabIndex = 3;
this.tcpLibDoc.TabItem = this.tiLibDoc;
//
// tiLibDoc
//
this.tiLibDoc.AttachedControl = this.tcpLibDoc;
this.tiLibDoc.Name = "tiLibDoc";
this.tiLibDoc.Text = "Library Document";
//
// tcpAutomation // tcpAutomation
// //
this.tcpAutomation.Controls.Add(this.ppCbLinkWithEnhancedDoc); this.tcpAutomation.Controls.Add(this.ppCbLinkWithEnhancedDoc);
@ -1068,33 +1103,6 @@ namespace VEPROMS
this.tiAutomation.Name = "tiAutomation"; this.tiAutomation.Name = "tiAutomation";
this.tiAutomation.Text = "Automation"; this.tiAutomation.Text = "Automation";
// //
// tcpLibDoc
//
this.tcpLibDoc.Controls.Add(this.ppBtnCvrtToLibDoc);
this.tcpLibDoc.Controls.Add(this.lblLibraryDocument);
this.tcpLibDoc.Controls.Add(this.ppCmbxLibDoc);
this.tcpLibDoc.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpLibDoc.Location = new System.Drawing.Point(0, 24);
this.tcpLibDoc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tcpLibDoc.Name = "tcpLibDoc";
this.tcpLibDoc.Padding = new System.Windows.Forms.Padding(1);
this.tcpLibDoc.Size = new System.Drawing.Size(648, 301);
this.tcpLibDoc.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpLibDoc.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpLibDoc.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpLibDoc.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpLibDoc.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpLibDoc.Style.GradientAngle = 90;
this.tcpLibDoc.TabIndex = 3;
this.tcpLibDoc.TabItem = this.tiLibDoc;
//
// tiLibDoc
//
this.tiLibDoc.AttachedControl = this.tcpLibDoc;
this.tiLibDoc.Name = "tiLibDoc";
this.tiLibDoc.Text = "Library Document";
//
// tabControlPanel4 // tabControlPanel4
// //
this.tabControlPanel4.Controls.Add(this.ppCkLstApplicabilityDesinations); this.tabControlPanel4.Controls.Add(this.ppCkLstApplicabilityDesinations);
@ -1129,7 +1137,7 @@ namespace VEPROMS
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ClientSize = new System.Drawing.Size(869, 387); this.ClientSize = new System.Drawing.Size(865, 383);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.tcSectionProp); this.Controls.Add(this.tcSectionProp);
this.Controls.Add(this.panSectBtns); this.Controls.Add(this.panSectBtns);
@ -1159,10 +1167,10 @@ namespace VEPROMS
this.tcpFormat.PerformLayout(); this.tcpFormat.PerformLayout();
this.ppGpbxSignoffCheckoff.ResumeLayout(false); this.ppGpbxSignoffCheckoff.ResumeLayout(false);
this.ppGpbxSignoffCheckoff.PerformLayout(); this.ppGpbxSignoffCheckoff.PerformLayout();
this.tcpAutomation.ResumeLayout(false);
this.tcpAutomation.PerformLayout();
this.tcpLibDoc.ResumeLayout(false); this.tcpLibDoc.ResumeLayout(false);
this.tcpLibDoc.PerformLayout(); this.tcpLibDoc.PerformLayout();
this.tcpAutomation.ResumeLayout(false);
this.tcpAutomation.PerformLayout();
this.tabControlPanel4.ResumeLayout(false); this.tabControlPanel4.ResumeLayout(false);
this.tabControlPanel4.PerformLayout(); this.tabControlPanel4.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@ -60,7 +60,9 @@ namespace VEPROMS
rbStepSect.Enabled = rbWordSect.Enabled = !(ii.HasWordContent || ii.HasStepContent); rbStepSect.Enabled = rbWordSect.Enabled = !(ii.HasWordContent || ii.HasStepContent);
// if this has already been set to be a step section, i.e. HasStepContent, disable the libdoc tab // if this has already been set to be a step section, i.e. HasStepContent, disable the libdoc tab
if (ii.HasStepContent) tcpLibDoc.Enabled = false; // 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.
if (ii.HasStepContent || !ii.HasWordContent) tcpLibDoc.Enabled = false;
} }
private void btnSectPropOK_Click(object sender, EventArgs e) private void btnSectPropOK_Click(object sender, EventArgs e)
@ -83,6 +85,7 @@ namespace VEPROMS
Document.Delete(_DocumentToDelete.DocID); Document.Delete(_DocumentToDelete.DocID);
_DocumentToDelete = null; _DocumentToDelete = null;
} }
ppSectNumberStpRTB.SaveText(); ppSectNumberStpRTB.SaveText();
ppSectTitleStpRTB.SaveText(); ppSectTitleStpRTB.SaveText();
mySection.Dispose(); mySection.Dispose();
@ -245,15 +248,16 @@ namespace VEPROMS
} }
else else
{ {
ppBtnCvrtToLibDoc.Text = _SectionConfig.MySection.MyContent.MyEntry.MyDocument == null ? "Select Library Document" : "Convert this to a Library Document"; if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
lblLibraryDocument.Text = "Select Library Document to Link"; ppBtnCvrtToLibDoc.Visible = false;
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument==null)
superTooltip1.SetSuperTooltip(this.ppBtnCvrtToLibDoc, new DevComponents.DotNetBar.SuperTooltipInfo("Select Library Document button", "", "This button will attach 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)));
else else
{
ppBtnCvrtToLibDoc.Text = "Convert this to a Library Document";
lblLibraryDocument.Text = "Select Library Document";
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;
@ -264,7 +268,7 @@ namespace VEPROMS
// see if this lib doc should be the selected index? // see if this lib doc should be the selected index?
if (isLib && (LibDocList[i].DocID == _SectionConfig.MySection.MyContent.MyEntry.MyDocument.DocID)) selindx = i; if (isLib && (LibDocList[i].DocID == _SectionConfig.MySection.MyContent.MyEntry.MyDocument.DocID)) selindx = i;
} }
if (selindx>-1) ppCmbxLibDoc.SelectedIndex = selindx; if (selindx > -1) ppCmbxLibDoc.SelectedIndex = selindx;
_Initializing = false; _Initializing = false;
} }
@ -469,6 +473,7 @@ namespace VEPROMS
ppBtnCvrtToLibDoc.Text = "Convert this to a Library Document"; ppBtnCvrtToLibDoc.Text = "Convert this to a Library Document";
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)));
return;
} }
// If current section is not a library document, it is either a new section or the user selected the // If current section is not a library document, it is either a new section or the user selected the
// button to convert it to a library document. Check for this, if new, just attach to document. // button to convert it to a library document. Check for this, if new, just attach to document.
@ -507,6 +512,10 @@ namespace VEPROMS
ppCmbxLibDocFill(); ppCmbxLibDocFill();
ppCmbxLibDoc.Enabled = false; ppCmbxLibDoc.Enabled = false;
} }
ppBtnCvrtToLibDoc.Text = "Convert this Section To A Non-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",
null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(250, 76)));
} }
private void ppCmbxLibDoc_SelectedIndexChanged(object sender, EventArgs e) private void ppCmbxLibDoc_SelectedIndexChanged(object sender, EventArgs e)
@ -514,32 +523,40 @@ namespace VEPROMS
if (_Initializing) return; if (_Initializing) return;
// first check if this is a 'new' section - if so, then just return. // first check if this is a 'new' section - if so, then just return.
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null) return; if (_SectionConfig.MySection.MyContent.MyEntry == null) return;
// see if this was NOT a library document. If it is not a library document, ask the user if // see if this was NOT a library document. If it is not a library document, ask the user if
// it should be linked, thus losing the original text/data. // it should be linked, thus losing the original text/data.
if (!(_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != "")) if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument != null && !(_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != ""))
{ {
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.New(); _SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.New();
if (ppCmbxLibDoc.SelectedIndex > -1) if (ppCmbxLibDoc.SelectedIndex > -1)
{ {
if (MessageBox.Show("Linking to this library document will cause loss of data. Do you want to continue?", "Link", MessageBoxButtons.YesNo) == DialogResult.Yes) if (MessageBox.Show("Linking to this library document will cause loss of data to this section. Do you want to continue?", "Link", MessageBoxButtons.YesNo) == DialogResult.Yes)
{ {
_DocumentToDelete = _SectionConfig.MySection.MyContent.MyEntry.MyDocument; _DocumentToDelete = _SectionConfig.MySection.MyContent.MyEntry.MyDocument;
DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true); DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true);
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID); _SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID);
ppBtnCvrtToLibDoc.Enabled = true;
} }
else else
{ {
ppCmbxLibDoc.SelectedIndex = -1; ppCmbxLibDoc.SelectedIndex = -1;
ppBtnCvrtToLibDoc.Enabled = false;
} }
} }
} }
//else if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
//{
// // was creating a new document & selected to connect it to a libdoc
// _DocumentToDelete = _SectionConfig.MySection.MyContent.MyEntry.MyDocument;
//}
else else
{ {
// it already is a library document, just change usages... // it already is a library document, just change usages...
DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true); DocumentInfoList LibDocList = DocumentInfoList.GetLibraries(true);
_SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID); _SectionConfig.MySection.MyContent.MyEntry.MyDocument = Document.Get(LibDocList[ppCmbxLibDoc.SelectedIndex].DocID);
ppBtnCvrtToLibDoc.Enabled = true;
} }
} }
#endregion #endregion
@ -684,6 +701,7 @@ namespace VEPROMS
{ {
SetupPpCmbxSectionType(); SetupPpCmbxSectionType();
ShowAvailableOptionsForSectionType(); ShowAvailableOptionsForSectionType();
tcpLibDoc.Enabled = !_isStepSection;
} }
} }