Development #504

Merged
djankowski merged 33 commits from Development into master 2025-01-30 15:55:02 -05:00
29 changed files with 963 additions and 448 deletions

View File

@ -1154,7 +1154,10 @@ namespace ROEditor
tbtnCancel.Enabled = true; tbtnCancel.Enabled = true;
tbtnSave.Enabled = true; tbtnSave.Enabled = true;
tbtnRestore.Enabled = true; tbtnRestore.Enabled = true;
tbtnSaveAs.Enabled = true; if (newone == null)
{ tbtnSaveAs.Enabled = true; }
else
{ tbtnSaveAs.Enabled = false; }
} }
menuROSave.Enabled = tbtnSave.Enabled; menuROSave.Enabled = tbtnSave.Enabled;
} }
@ -1170,7 +1173,10 @@ namespace ROEditor
tbtnSave.Enabled = true; tbtnSave.Enabled = true;
tbtnRestore.Enabled = true; tbtnRestore.Enabled = true;
tbtnSaveAs.Enabled = true; if (newone == null)
{ tbtnSaveAs.Enabled = true; }
else
{ tbtnSaveAs.Enabled = false; }
tbtnCancel.Enabled = true; tbtnCancel.Enabled = true;
menuROSave.Enabled = tbtnSave.Enabled; menuROSave.Enabled = tbtnSave.Enabled;
//B2021-080 set the mysavexml flag to true to ensure the text change will be saved //B2021-080 set the mysavexml flag to true to ensure the text change will be saved
@ -2392,20 +2398,26 @@ namespace ROEditor
*/ */
private void menuRODelete_Click(object sender, System.EventArgs e) private void menuRODelete_Click(object sender, System.EventArgs e)
{ {
bool success=false; string msgstr = "It is recommended that you may wish to create a backup zip of your RO folder prior to performing deletions.\n\nAre you sure you wish to delete the selected RO/RO Group?";
XmlNode nd = (XmlNode) roTreeView.SelectedNode.Tag;
if (nd.ParentNode.Name == "RO_Root") DialogResult AnswerYN = MessageBox.Show(msgstr, "Deleting ROs/RO Group", MessageBoxButtons.YesNo);
success = myrodb.RODB_DeleteGroup(nd,null,null); if (AnswerYN == DialogResult.Yes)
else
success = myrodb.RODB_DeleteRO(nd);
if (success == true)
{ {
// remove from xml tree & the tree control bool success = false;
XmlNode parent = nd.ParentNode; XmlNode nd = (XmlNode)roTreeView.SelectedNode.Tag;
parent.RemoveChild(nd); if (nd.ParentNode.Name == "RO_Root")
updateRoListView(roTreeView.SelectedNode.Parent); success = myrodb.RODB_DeleteGroup(nd, null, null);
roTreeView.SelectedNode.Remove(); else
roTreeView.Refresh(); success = myrodb.RODB_DeleteRO(nd);
if (success == true)
{
// remove from xml tree & the tree control
XmlNode parent = nd.ParentNode;
parent.RemoveChild(nd);
updateRoListView(roTreeView.SelectedNode.Parent);
roTreeView.SelectedNode.Remove();
roTreeView.Refresh();
}
} }
} }
@ -2616,7 +2628,6 @@ namespace ROEditor
success = ctlXMLEdit2.SaveData(); success = ctlXMLEdit2.SaveData();
if (!success) if (!success)
{ {
MessageBox.Show("Save Failed");
return false; return false;
} }
VlnXmlElement myro; VlnXmlElement myro;
@ -2732,7 +2743,6 @@ namespace ROEditor
if (!success) if (!success)
{ {
tbtnRestore.Enabled = false; // old data may not be around tbtnRestore.Enabled = false; // old data may not be around
MessageBox.Show("Save Failed");
return; return;
} }

View File

@ -324,29 +324,17 @@ namespace ctlXMLEditLib
string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI"; string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI";
// Get the default file extension for graphic files // Get the default file extension for graphic files
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI"); // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI");
// Bug fix: B2006-025 // Bug fix: B2006-025
// needed to pass the full path of ROAPP.INI // needed to pass the full path of ROAPP.INI
// B2025-007 only use the default file location (remove 16 bit PROMS location)
IniReader in1 = new IniReader(ROINI); IniReader in1 = new IniReader(ROINI);
DefaultGraphicFileExtension = in1.ReadString("ROApp","Extention",""); DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extention");
if (DefaultGraphicFileExtension.Equals("")) if (string.IsNullOrEmpty(DefaultGraphicFileExtension)) DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extension", ".TIF");
{ // if (File.Exists(PromsINI))
string ApplPathUp = ApplicationPath.ToUpper(); // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
int idx = ApplPathUp.IndexOf("VE-PROMS.NET\\BIN"); // if (File.Exists("ROAPP.INI"))
if (idx >= 0) // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
{
string PromsINI = ApplicationPath.Substring(0, idx);
PromsINI += "VE-PROMS\\VEPROMS.INI";
IniReader in2 = new IniReader(PromsINI);
DefaultGraphicFileExtension = in2.ReadString("Graphics", "defaultext", ".TIF");
}
else
DefaultGraphicFileExtension = ".TIF";
}
// if (File.Exists(PromsINI))
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
// if (File.Exists("ROAPP.INI"))
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
if (!DefaultGraphicFileExtension.StartsWith(".")) if (!DefaultGraphicFileExtension.StartsWith("."))
DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension; DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension;
@ -784,6 +772,7 @@ namespace ctlXMLEditLib
dosaveflag = false; dosaveflag = false;
return (true); return (true);
} }
MessageBox.Show("Save Failed");
return (false); return (false);
} }
@ -1129,7 +1118,7 @@ namespace ctlXMLEditLib
mylabel.BackColor = chlbckcolor; // PC Applic fields are shaded blue otherwise backcolor is transparent mylabel.BackColor = chlbckcolor; // PC Applic fields are shaded blue otherwise backcolor is transparent
mylabel.Location = new Point(screenx+indent, screeny); mylabel.Location = new Point(screenx+indent, screeny);
mylabel.Name = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName); mylabel.Name = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
mylabel.Text = (applicLabel.Length > 0) ? applicLabel : CvtFldToUserFld(element.Name); // C2021-026 applicLabel is the P/C Child name mylabel.Text = (applicLabel.Length > 0) ? applicLabel : CvtFldToUserFld(element.Name).Replace("Image_",""); // C2021-026 applicLabel is the P/C Child name
mylabel.AutoSize = true; mylabel.AutoSize = true;
Controls.Add(mylabel); Controls.Add(mylabel);
// add 3 onto screeny so that textbox is slightly below label. // add 3 onto screeny so that textbox is slightly below label.
@ -1484,12 +1473,15 @@ namespace ctlXMLEditLib
if (fnamebox.Text != "" && fnamebox.Modified == true) if (fnamebox.Text != "" && fnamebox.Modified == true)
{ {
FileInfo ifi = new FileInfo(fnamebox.Text); FileInfo ifi = new FileInfo(fnamebox.Text);
if (ifi.Exists == false) if (ifi.Exists == false)
{ {
MessageBoxButtons buttons = MessageBoxButtons.OK; FileInfo ifi2 = new FileInfo(fnamebox.Text + DefaultGraphicFileExtension);
MessageBox.Show( "File does not exist.", if (!ifi2.Exists)
"File Input Error", buttons); {
return; MessageBox.Show("File does not exist.",
"File Input Error", MessageBoxButtons.OK);
return;
}
} }
bool ok = ValidGraphicsFile(fnamebox.Text); bool ok = ValidGraphicsFile(fnamebox.Text);
if (ok != true) if (ok != true)
@ -1696,7 +1688,7 @@ namespace ctlXMLEditLib
} }
catch (Exception ee) catch (Exception ee)
{ {
MessageBox.Show("Invalid Height Input",ee.ToString()); MessageBox.Show("The Height and Width cannot be empty fields. Enter a number in either field and the other will automatically adjust to a proportional size.", "Invalid Height Input");
} }
} }
} }
@ -1713,7 +1705,7 @@ namespace ctlXMLEditLib
} }
catch (Exception ee) catch (Exception ee)
{ {
MessageBox.Show("Invalid Width Input", ee.ToString()); MessageBox.Show("The Height and Width cannot be empty fields. Enter a number in either field and the other will automatically adjust to a proportional size.", "Invalid Width Input");
} }
} }
} }

View File

@ -328,6 +328,18 @@ namespace VEPROMS.Properties {
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool cbShwRplWrdsColor {
get {
return ((bool)(this["cbShwRplWrdsColor"]));
}
set {
this["cbShwRplWrdsColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")] [global::System.Configuration.DefaultSettingValueAttribute("False")]

View File

@ -80,6 +80,11 @@
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User"> <Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="cbShwRplWrdsColor" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User"> <Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>

View File

@ -88,6 +88,12 @@ namespace VEPROMS
this.btnFormat = new DevComponents.DotNetBar.ButtonX(); this.btnFormat = new DevComponents.DotNetBar.ButtonX();
this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); this.btnGeneral = new DevComponents.DotNetBar.ButtonX();
this.tcSectionProp = new DevComponents.DotNetBar.TabControl(); this.tcSectionProp = new DevComponents.DotNetBar.TabControl();
this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbShowRplWords = new System.Windows.Forms.CheckBox();
this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpGeneral = new DevComponents.DotNetBar.TabControlPanel(); this.tcpGeneral = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbAutoIndent = new System.Windows.Forms.CheckBox(); this.ppCbAutoIndent = new System.Windows.Forms.CheckBox();
this.ppCbEditableData = new System.Windows.Forms.CheckBox(); this.ppCbEditableData = new System.Windows.Forms.CheckBox();
@ -95,11 +101,6 @@ namespace VEPROMS
this.ppSectNumberStpRTB = new Volian.Controls.Library.StepRTB(this.components); this.ppSectNumberStpRTB = new Volian.Controls.Library.StepRTB(this.components);
this.ppSectTitleStpRTB = new Volian.Controls.Library.StepRTB(this.components); this.ppSectTitleStpRTB = new Volian.Controls.Library.StepRTB(this.components);
this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel();
this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel(); this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbNoDuplexFoldout = new System.Windows.Forms.CheckBox(); this.ppCbNoDuplexFoldout = new System.Windows.Forms.CheckBox();
this.gpTOC = new DevComponents.DotNetBar.Controls.GroupPanel(); this.gpTOC = new DevComponents.DotNetBar.Controls.GroupPanel();
@ -120,9 +121,9 @@ namespace VEPROMS
this.panSectBtns.SuspendLayout(); this.panSectBtns.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).BeginInit();
this.tcSectionProp.SuspendLayout(); this.tcSectionProp.SuspendLayout();
this.tcpGeneral.SuspendLayout();
this.tcpFormat.SuspendLayout(); this.tcpFormat.SuspendLayout();
this.ppGpbxSignoffCheckoff.SuspendLayout(); this.ppGpbxSignoffCheckoff.SuspendLayout();
this.tcpGeneral.SuspendLayout();
this.tcpAutomation.SuspendLayout(); this.tcpAutomation.SuspendLayout();
this.gpTOC.SuspendLayout(); this.gpTOC.SuspendLayout();
this.grpLnkEnh.SuspendLayout(); this.grpLnkEnh.SuspendLayout();
@ -871,8 +872,8 @@ namespace VEPROMS
this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | 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.tcpGeneral);
this.tcSectionProp.Controls.Add(this.tcpFormat); this.tcSectionProp.Controls.Add(this.tcpFormat);
this.tcSectionProp.Controls.Add(this.tcpGeneral);
this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpAutomation);
this.tcSectionProp.Controls.Add(this.tcpLibDoc); this.tcSectionProp.Controls.Add(this.tcpLibDoc);
this.tcSectionProp.Controls.Add(this.tabControlPanel4); this.tcSectionProp.Controls.Add(this.tabControlPanel4);
@ -892,6 +893,151 @@ namespace VEPROMS
this.tcSectionProp.TabsVisible = false; this.tcSectionProp.TabsVisible = false;
this.tcSectionProp.Text = "tabControl2"; this.tcSectionProp.Text = "tabControl2";
// //
// tcpFormat
//
this.tcpFormat.Controls.Add(this.ppCbShowRplWords);
this.tcpFormat.Controls.Add(this.cbIsFoldoutSection);
this.tcpFormat.Controls.Add(this.ppCbDefaultStepSection);
this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins);
this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle);
this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppBtnDefaultPaginationStyle);
this.tcpFormat.Controls.Add(this.rbWordSect);
this.tcpFormat.Controls.Add(this.rbStepSect);
this.tcpFormat.Controls.Add(this.ppGpbxSignoffCheckoff);
this.tcpFormat.Controls.Add(this.lblFormat);
this.tcpFormat.Controls.Add(this.ppCmbxNumColumns);
this.tcpFormat.Controls.Add(this.lblColumns);
this.tcpFormat.Controls.Add(this.ppCmbxSectPagination);
this.tcpFormat.Controls.Add(this.lblSectType);
this.tcpFormat.Controls.Add(this.ppCmbxStyleSectionType);
this.tcpFormat.Controls.Add(this.lblPagination);
this.tcpFormat.Controls.Add(this.ppBtnDefaultFmt);
this.tcpFormat.Controls.Add(this.ppCmbxFormat);
this.tcpFormat.Controls.Add(this.ppLblFormatDefault);
this.tcpFormat.DisabledBackColor = System.Drawing.Color.Empty;
this.tcpFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpFormat.Location = new System.Drawing.Point(0, 22);
this.tcpFormat.Margin = new System.Windows.Forms.Padding(2);
this.tcpFormat.Name = "tcpFormat";
this.tcpFormat.Padding = new System.Windows.Forms.Padding(1);
this.tcpFormat.Size = new System.Drawing.Size(557, 318);
this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpFormat.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpFormat.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpFormat.Style.GradientAngle = 90;
this.tcpFormat.TabIndex = 2;
this.tcpFormat.TabItem = this.tiFormat;
this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter);
//
// ppCbShowRplWords
//
this.ppCbShowRplWords.AutoSize = true;
this.ppCbShowRplWords.BackColor = System.Drawing.Color.Transparent;
this.ppCbShowRplWords.Location = new System.Drawing.Point(272, 252);
this.ppCbShowRplWords.Name = "ppCbShowRplWords";
this.ppCbShowRplWords.Size = new System.Drawing.Size(130, 17);
this.ppCbShowRplWords.TabIndex = 62;
this.ppCbShowRplWords.Text = "Show Replace Words";
this.ppCbShowRplWords.UseVisualStyleBackColor = false;
this.ppCbShowRplWords.CheckedChanged += new System.EventHandler(this.ppCbShowRplWords_CheckedChanged);
//
// rbWordSect
//
this.rbWordSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbWordSect.Location = new System.Drawing.Point(247, 60);
this.rbWordSect.Margin = new System.Windows.Forms.Padding(2);
this.rbWordSect.Name = "rbWordSect";
this.rbWordSect.Size = new System.Drawing.Size(88, 19);
this.rbWordSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbWordSect.TabIndex = 23;
this.rbWordSect.TabStop = false;
this.rbWordSect.Text = "Word Section";
//
// rbStepSect
//
this.rbStepSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbStepSect.Checked = true;
this.rbStepSect.CheckState = System.Windows.Forms.CheckState.Checked;
this.rbStepSect.CheckValue = "Y";
this.rbStepSect.FocusCuesEnabled = false;
this.rbStepSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbStepSect.Location = new System.Drawing.Point(138, 60);
this.rbStepSect.Margin = new System.Windows.Forms.Padding(2);
this.rbStepSect.Name = "rbStepSect";
this.rbStepSect.Size = new System.Drawing.Size(86, 19);
this.rbStepSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbStepSect.TabIndex = 22;
this.rbStepSect.TabStop = false;
this.rbStepSect.Text = "Step Section";
this.rbStepSect.CheckedChanged += new System.EventHandler(this.rbStepSect_CheckedChanged);
//
// ppGpbxSignoffCheckoff
//
this.ppGpbxSignoffCheckoff.BackColor = System.Drawing.Color.Transparent;
this.ppGpbxSignoffCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.ppGpbxSignoffCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffHeading);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffHeading);
this.ppGpbxSignoffCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.ppGpbxSignoffCheckoff.Location = new System.Drawing.Point(272, 123);
this.ppGpbxSignoffCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.ppGpbxSignoffCheckoff.Name = "ppGpbxSignoffCheckoff";
this.ppGpbxSignoffCheckoff.Size = new System.Drawing.Size(206, 117);
//
//
//
this.ppGpbxSignoffCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.ppGpbxSignoffCheckoff.Style.BackColorGradientAngle = 90;
this.ppGpbxSignoffCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.ppGpbxSignoffCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderBottomWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.ppGpbxSignoffCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderLeftWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1;
this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4;
this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.ppGpbxSignoffCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.ppGpbxSignoffCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.ppGpbxSignoffCheckoff.TabIndex = 51;
this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs";
//
// tiFormat
//
this.tiFormat.AttachedControl = this.tcpFormat;
this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format";
//
// tcpGeneral // tcpGeneral
// //
this.tcpGeneral.Controls.Add(this.ppCbAutoIndent); this.tcpGeneral.Controls.Add(this.ppCbAutoIndent);
@ -1046,138 +1192,6 @@ namespace VEPROMS
this.tiGeneral.Name = "tiGeneral"; this.tiGeneral.Name = "tiGeneral";
this.tiGeneral.Text = "General"; this.tiGeneral.Text = "General";
// //
// tcpFormat
//
this.tcpFormat.Controls.Add(this.cbIsFoldoutSection);
this.tcpFormat.Controls.Add(this.ppCbDefaultStepSection);
this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins);
this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle);
this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppBtnDefaultPaginationStyle);
this.tcpFormat.Controls.Add(this.rbWordSect);
this.tcpFormat.Controls.Add(this.rbStepSect);
this.tcpFormat.Controls.Add(this.ppGpbxSignoffCheckoff);
this.tcpFormat.Controls.Add(this.lblFormat);
this.tcpFormat.Controls.Add(this.ppCmbxNumColumns);
this.tcpFormat.Controls.Add(this.lblColumns);
this.tcpFormat.Controls.Add(this.ppCmbxSectPagination);
this.tcpFormat.Controls.Add(this.lblSectType);
this.tcpFormat.Controls.Add(this.ppCmbxStyleSectionType);
this.tcpFormat.Controls.Add(this.lblPagination);
this.tcpFormat.Controls.Add(this.ppBtnDefaultFmt);
this.tcpFormat.Controls.Add(this.ppCmbxFormat);
this.tcpFormat.Controls.Add(this.ppLblFormatDefault);
this.tcpFormat.DisabledBackColor = System.Drawing.Color.Empty;
this.tcpFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpFormat.Location = new System.Drawing.Point(0, 22);
this.tcpFormat.Margin = new System.Windows.Forms.Padding(2);
this.tcpFormat.Name = "tcpFormat";
this.tcpFormat.Padding = new System.Windows.Forms.Padding(1);
this.tcpFormat.Size = new System.Drawing.Size(557, 318);
this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpFormat.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpFormat.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpFormat.Style.GradientAngle = 90;
this.tcpFormat.TabIndex = 2;
this.tcpFormat.TabItem = this.tiFormat;
this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter);
//
// rbWordSect
//
this.rbWordSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbWordSect.Location = new System.Drawing.Point(247, 60);
this.rbWordSect.Margin = new System.Windows.Forms.Padding(2);
this.rbWordSect.Name = "rbWordSect";
this.rbWordSect.Size = new System.Drawing.Size(88, 19);
this.rbWordSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbWordSect.TabIndex = 23;
this.rbWordSect.TabStop = false;
this.rbWordSect.Text = "Word Section";
//
// rbStepSect
//
this.rbStepSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbStepSect.Checked = true;
this.rbStepSect.CheckState = System.Windows.Forms.CheckState.Checked;
this.rbStepSect.CheckValue = "Y";
this.rbStepSect.FocusCuesEnabled = false;
this.rbStepSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbStepSect.Location = new System.Drawing.Point(138, 60);
this.rbStepSect.Margin = new System.Windows.Forms.Padding(2);
this.rbStepSect.Name = "rbStepSect";
this.rbStepSect.Size = new System.Drawing.Size(86, 19);
this.rbStepSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbStepSect.TabIndex = 22;
this.rbStepSect.TabStop = false;
this.rbStepSect.Text = "Step Section";
this.rbStepSect.CheckedChanged += new System.EventHandler(this.rbStepSect_CheckedChanged);
//
// ppGpbxSignoffCheckoff
//
this.ppGpbxSignoffCheckoff.BackColor = System.Drawing.Color.Transparent;
this.ppGpbxSignoffCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.ppGpbxSignoffCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffHeading);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffHeading);
this.ppGpbxSignoffCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.ppGpbxSignoffCheckoff.Location = new System.Drawing.Point(272, 123);
this.ppGpbxSignoffCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.ppGpbxSignoffCheckoff.Name = "ppGpbxSignoffCheckoff";
this.ppGpbxSignoffCheckoff.Size = new System.Drawing.Size(206, 117);
//
//
//
this.ppGpbxSignoffCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.ppGpbxSignoffCheckoff.Style.BackColorGradientAngle = 90;
this.ppGpbxSignoffCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.ppGpbxSignoffCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderBottomWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.ppGpbxSignoffCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderLeftWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1;
this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4;
this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.ppGpbxSignoffCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.ppGpbxSignoffCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.ppGpbxSignoffCheckoff.TabIndex = 51;
this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs";
//
// tiFormat
//
this.tiFormat.AttachedControl = this.tcpFormat;
this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format";
//
// tcpAutomation // tcpAutomation
// //
this.tcpAutomation.Controls.Add(this.ppCbNoDuplexFoldout); this.tcpAutomation.Controls.Add(this.ppCbNoDuplexFoldout);
@ -1465,7 +1479,7 @@ namespace VEPROMS
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
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(730, 398); this.ClientSize = new System.Drawing.Size(722, 390);
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);
@ -1489,12 +1503,12 @@ namespace VEPROMS
this.panSectBtns.ResumeLayout(false); this.panSectBtns.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).EndInit();
this.tcSectionProp.ResumeLayout(false); this.tcSectionProp.ResumeLayout(false);
this.tcpGeneral.ResumeLayout(false);
this.tcpGeneral.PerformLayout();
this.tcpFormat.ResumeLayout(false); this.tcpFormat.ResumeLayout(false);
this.tcpFormat.PerformLayout(); this.tcpFormat.PerformLayout();
this.ppGpbxSignoffCheckoff.ResumeLayout(false); this.ppGpbxSignoffCheckoff.ResumeLayout(false);
this.ppGpbxSignoffCheckoff.PerformLayout(); this.ppGpbxSignoffCheckoff.PerformLayout();
this.tcpGeneral.ResumeLayout(false);
this.tcpGeneral.PerformLayout();
this.tcpAutomation.ResumeLayout(false); this.tcpAutomation.ResumeLayout(false);
this.tcpAutomation.PerformLayout(); this.tcpAutomation.PerformLayout();
this.gpTOC.ResumeLayout(false); this.gpTOC.ResumeLayout(false);
@ -1598,5 +1612,6 @@ namespace VEPROMS
private DevComponents.DotNetBar.ButtonX ppBtnConvertToDocX; private DevComponents.DotNetBar.ButtonX ppBtnConvertToDocX;
private System.Windows.Forms.CheckBox cbIsFoldoutSection; private System.Windows.Forms.CheckBox cbIsFoldoutSection;
private System.Windows.Forms.CheckBox ppCbNoDuplexFoldout; private System.Windows.Forms.CheckBox ppCbNoDuplexFoldout;
} private System.Windows.Forms.CheckBox ppCbShowRplWords;
}
} }

View File

@ -523,6 +523,23 @@ namespace VEPROMS
else else
ppCbDefaultStepSection.Text = "Make this the Default Step Section"; ppCbDefaultStepSection.Text = "Make this the Default Step Section";
} }
// Show Replace Words
ppCbShowRplWords.Visible = false;
if (_isStepSection && _SectionConfig.MySection.MySectionInfo.MyActiveParent.IsProcedure)
{
ppCbShowRplWords.Visible = true;
ppCbShowRplWords.Checked = _SectionConfig.Section_ShwRplWords == "Y";
// Use checkbox text to clarify what is case for this section, i.e. is it already
// the default or can it be set. Note that this is used when printing of page numbers
// that use the 'WithSteps' numbering sequence.
if (_SectionConfig.Section_OriginalSteps == "Y")
{
ppCbShowRplWords.Text = "Show Replace Words"; // C2020-021 add the word "the"
_isDefaultStepSection = true;
}
else
ppCbShowRplWords.Text = "Show Replace Words";
}
// if the parent has enhanced documents (and is not an enhanced document, i.e. the test // if the parent has enhanced documents (and is not an enhanced document, i.e. the test
// ed.Type != 0 proves that) put up the group panel on the automation tab that allows for setting of // ed.Type != 0 proves that) put up the group panel on the automation tab that allows for setting of
@ -1211,6 +1228,7 @@ namespace VEPROMS
ppGpbxSignoffCheckoff.Visible = _isStepSection; ppGpbxSignoffCheckoff.Visible = _isStepSection;
cbKeepWordDocMargins.Visible = !_isStepSection; cbKeepWordDocMargins.Visible = !_isStepSection;
ppCbDefaultStepSection.Visible = _isStepSection; ppCbDefaultStepSection.Visible = _isStepSection;
ppCbShowRplWords.Visible = _isStepSection;
} }
private void rbStepSect_CheckedChanged(object sender, EventArgs e) private void rbStepSect_CheckedChanged(object sender, EventArgs e)
@ -1380,7 +1398,8 @@ namespace VEPROMS
_SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N"; _SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N";
} }
} }
private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
{ {
// Get Document as file // Get Document as file
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID); ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
@ -1447,6 +1466,14 @@ namespace VEPROMS
{ {
_SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked; _SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked;
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private void ppCbShowRplWords_CheckedChanged(object sender, EventArgs e)
{
if (!_Initializing)
{
_SectionConfig.Section_ShwRplWords = ppCbShowRplWords.Checked ? "Y" : "N";
}
}
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e) //private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
//{ //{

View File

@ -142,8 +142,11 @@ When a format other than the inherited one is selected, a button labeled "Defaul
Pressing the "Default" button will revert back to using the inherited format for this section. Pressing the "Default" button will revert back to using the inherited format for this section.
</value> </value>
</data> </data>
<metadata name="sectionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>128, 18</value>
</metadata>
<data name="cbIsFoldoutSection.SuperTooltip" xml:space="preserve"> <data name="cbIsFoldoutSection.SuperTooltip" xml:space="preserve">
<value>If the format supports duplex Foldouts: <value>If the format supports duplex Foldouts:
- This can be used to turn On duplexing of the Foldout instead - This can be used to turn On duplexing of the Foldout instead
of using "FOLDOUT" as the section number of using "FOLDOUT" as the section number

View File

@ -77,8 +77,10 @@ namespace VEPROMS
this.btnReset = new DevComponents.DotNetBar.ButtonX(); this.btnReset = new DevComponents.DotNetBar.ButtonX();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.cbOTRemember = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbOTRemember = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbShwRplWrdsColor = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbOTAutoOpen = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbOTAutoOpen = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.gpOpenTabs = new DevComponents.DotNetBar.Controls.GroupPanel(); this.gpOpenTabs = new DevComponents.DotNetBar.Controls.GroupPanel();
this.gpShwRplWords = new DevComponents.DotNetBar.Controls.GroupPanel();
this.gpSystemColor.SuspendLayout(); this.gpSystemColor.SuspendLayout();
this.panButtons.SuspendLayout(); this.panButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit();
@ -95,6 +97,7 @@ namespace VEPROMS
this.gpTransRangeColor.SuspendLayout(); this.gpTransRangeColor.SuspendLayout();
this.gpPropPageStyle.SuspendLayout(); this.gpPropPageStyle.SuspendLayout();
this.gpOpenTabs.SuspendLayout(); this.gpOpenTabs.SuspendLayout();
this.gpShwRplWords.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnCancel // btnCancel
@ -301,6 +304,7 @@ namespace VEPROMS
// tabControlPanel3 // tabControlPanel3
// //
this.tabControlPanel3.Controls.Add(this.gpOpenTabs); this.tabControlPanel3.Controls.Add(this.gpOpenTabs);
this.tabControlPanel3.Controls.Add(this.gpShwRplWords);
this.tabControlPanel3.Controls.Add(this.grPanUCFImpOpt); this.tabControlPanel3.Controls.Add(this.grPanUCFImpOpt);
this.tabControlPanel3.Controls.Add(this.gpVisioPath); this.tabControlPanel3.Controls.Add(this.gpVisioPath);
this.tabControlPanel3.Controls.Add(this.gpSeparateWindows); this.tabControlPanel3.Controls.Add(this.gpSeparateWindows);
@ -1120,6 +1124,20 @@ namespace VEPROMS
this.cbOTRemember.Text = "Remember Setting"; this.cbOTRemember.Text = "Remember Setting";
this.cbOTRemember.CheckedChanged += new System.EventHandler(this.cbOTRemember_CheckedChanged); this.cbOTRemember.CheckedChanged += new System.EventHandler(this.cbOTRemember_CheckedChanged);
// //
// cbShwRplWrdsColor
//
//
this.cbShwRplWrdsColor.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbShwRplWrdsColor.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbShwRplWrdsColor.Location = new System.Drawing.Point(8, 5);
this.cbShwRplWrdsColor.Margin = new System.Windows.Forms.Padding(2);
this.cbShwRplWrdsColor.Name = "cbShwRplWrdsColor";
this.cbShwRplWrdsColor.Size = new System.Drawing.Size(119, 19);
this.cbShwRplWrdsColor.TabIndex = 9;
this.cbShwRplWrdsColor.Text = "Color Replace Words";
this.cbShwRplWrdsColor.CheckedChanged += new System.EventHandler(this.cbShwRplWrdsColor_CheckedChanged);
//this.cbShwRplWrdsColor.Checked;
//
// cbOTAutoOpen // cbOTAutoOpen
// //
// //
@ -1179,6 +1197,48 @@ namespace VEPROMS
this.gpOpenTabs.TabIndex = 13; this.gpOpenTabs.TabIndex = 13;
this.gpOpenTabs.Text = "Open Tabs"; this.gpOpenTabs.Text = "Open Tabs";
// //
// gpShwRplWords
//
this.gpShwRplWords.BackColor = System.Drawing.Color.Transparent;
this.gpShwRplWords.CanvasColor = System.Drawing.SystemColors.Control;
this.gpShwRplWords.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.gpShwRplWords.Controls.Add(this.cbShwRplWrdsColor);
this.gpShwRplWords.DisabledBackColor = System.Drawing.Color.Empty;
this.gpShwRplWords.Location = new System.Drawing.Point(462, 165);
this.gpShwRplWords.Margin = new System.Windows.Forms.Padding(2);
this.gpShwRplWords.Name = "gpShwRplWords";
this.gpShwRplWords.Size = new System.Drawing.Size(139, 72);
//
//
//
this.gpShwRplWords.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.gpShwRplWords.Style.BackColorGradientAngle = 90;
this.gpShwRplWords.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.gpShwRplWords.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpShwRplWords.Style.BorderBottomWidth = 1;
this.gpShwRplWords.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.gpShwRplWords.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpShwRplWords.Style.BorderLeftWidth = 1;
this.gpShwRplWords.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpShwRplWords.Style.BorderRightWidth = 1;
this.gpShwRplWords.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpShwRplWords.Style.BorderTopWidth = 1;
this.gpShwRplWords.Style.CornerDiameter = 4;
this.gpShwRplWords.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.gpShwRplWords.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.gpShwRplWords.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.gpShwRplWords.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.gpShwRplWords.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.gpShwRplWords.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.gpShwRplWords.TabIndex = 13;
this.gpShwRplWords.Text = "Replace Words";
//
// frmSysOptions // frmSysOptions
// //
this.AcceptButton = this.btnOK; this.AcceptButton = this.btnOK;
@ -1214,6 +1274,8 @@ namespace VEPROMS
this.gpTransRangeColor.ResumeLayout(false); this.gpTransRangeColor.ResumeLayout(false);
this.gpPropPageStyle.ResumeLayout(false); this.gpPropPageStyle.ResumeLayout(false);
this.gpOpenTabs.ResumeLayout(false); this.gpOpenTabs.ResumeLayout(false);
this.gpShwRplWords.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -1268,7 +1330,9 @@ namespace VEPROMS
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLNotUsed; private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLNotUsed;
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFIgnore; private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFIgnore;
private DevComponents.DotNetBar.Controls.GroupPanel gpOpenTabs; private DevComponents.DotNetBar.Controls.GroupPanel gpOpenTabs;
private DevComponents.DotNetBar.Controls.GroupPanel gpShwRplWords;
private DevComponents.DotNetBar.Controls.CheckBoxX cbOTRemember; private DevComponents.DotNetBar.Controls.CheckBoxX cbOTRemember;
private DevComponents.DotNetBar.Controls.CheckBoxX cbOTAutoOpen; private DevComponents.DotNetBar.Controls.CheckBoxX cbOTAutoOpen;
private DevComponents.DotNetBar.Controls.CheckBoxX cbShwRplWrdsColor;
} }
} }

View File

@ -68,6 +68,7 @@ namespace VEPROMS
colorPickerButton1.SelectedColor = Settings.Default.TransitionRangeColor; colorPickerButton1.SelectedColor = Settings.Default.TransitionRangeColor;
cbAnnotationPopup.Checked = Settings.Default.AutoPopUpAnnotations; cbAnnotationPopup.Checked = Settings.Default.AutoPopUpAnnotations;
cbStepTypeToolTip.Checked = Settings.Default.StepTypeToolTip; cbStepTypeToolTip.Checked = Settings.Default.StepTypeToolTip;
cbShwRplWrdsColor.Checked = Settings.Default.cbShwRplWrdsColor;
cbTVExpand.Checked = Settings.Default.SaveTreeviewExpanded; cbTVExpand.Checked = Settings.Default.SaveTreeviewExpanded;
cbPasteNoReturns.Checked = Settings.Default.PasteNoReturns; cbPasteNoReturns.Checked = Settings.Default.PasteNoReturns;
cbPastePlainText.Checked = Settings.Default.PastePlainText; cbPastePlainText.Checked = Settings.Default.PastePlainText;
@ -180,6 +181,7 @@ namespace VEPROMS
private Color ss_TransRangeColor; private Color ss_TransRangeColor;
private bool ss_PopUPAnnotations; private bool ss_PopUPAnnotations;
private bool ss_StepTypeToolTip; private bool ss_StepTypeToolTip;
private bool ss_cbShwRplWrdsColor;
private bool ss_SaveTreeviewExpanded; private bool ss_SaveTreeviewExpanded;
private bool ss_PasteNoReturns; private bool ss_PasteNoReturns;
private bool ss_PastePlainText; private bool ss_PastePlainText;
@ -195,6 +197,8 @@ namespace VEPROMS
ss_TransRangeColor = Settings.Default.TransitionRangeColor; ss_TransRangeColor = Settings.Default.TransitionRangeColor;
ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations; ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations;
ss_StepTypeToolTip = Settings.Default.StepTypeToolTip; ss_StepTypeToolTip = Settings.Default.StepTypeToolTip;
ss_cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded; ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded;
ss_PasteNoReturns = Settings.Default.PasteNoReturns; ss_PasteNoReturns = Settings.Default.PasteNoReturns;
ss_PastePlainText = Settings.Default.PastePlainText; ss_PastePlainText = Settings.Default.PastePlainText;
@ -211,6 +215,7 @@ namespace VEPROMS
Settings.Default.TransitionRangeColor = ss_TransRangeColor; Settings.Default.TransitionRangeColor = ss_TransRangeColor;
Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations; Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations;
Settings.Default.StepTypeToolTip = ss_StepTypeToolTip; Settings.Default.StepTypeToolTip = ss_StepTypeToolTip;
Settings.Default.cbShwRplWrdsColor = ss_cbShwRplWrdsColor;
Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded; Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded;
Settings.Default.PasteNoReturns = ss_PasteNoReturns; Settings.Default.PasteNoReturns = ss_PasteNoReturns;
Settings.Default.PastePlainText = ss_PastePlainText; Settings.Default.PastePlainText = ss_PastePlainText;
@ -344,10 +349,16 @@ namespace VEPROMS
Settings.Default.UCFImportOpt = 4; Settings.Default.UCFImportOpt = 4;
} }
} }
private void cbOTRemember_CheckedChanged(object sender, EventArgs e)
private void cbOTRemember_CheckedChanged(object sender, EventArgs e) {
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbShwRplWrdsColor.Checked;
}
private void cbShwRplWrdsColor_CheckedChanged(object sender, EventArgs e)
{ {
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbOTRemember.Checked; Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked;
} VlnSettings.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked;
Properties.Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked; // update setting value
Properties.Settings.Default.Save(); // save settings
}
} }
} }

View File

@ -524,6 +524,7 @@ namespace VEPROMS
this.Activated += new EventHandler(frmVEPROMS_Activated); this.Activated += new EventHandler(frmVEPROMS_Activated);
VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip; VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip;
VlnSettings.cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest); displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest);
ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory); ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory);
AnnotationInfo.InfoChanged += new AnnotationInfoEvent(RefreshDisplayHistory); AnnotationInfo.InfoChanged += new AnnotationInfoEvent(RefreshDisplayHistory);
@ -816,6 +817,11 @@ namespace VEPROMS
set { frmVEPROMS._ErrorLogFileName = value; } set { frmVEPROMS._ErrorLogFileName = value; }
} }
public static bool colorReplaceWords()
{
return Properties.Settings.Default.cbShwRplWrdsColor;
}
static bool ChangeLogFileName(string AppenderName, string NewFilename) static bool ChangeLogFileName(string AppenderName, string NewFilename)
{ {
log4net.Repository.ILoggerRepository RootRep; log4net.Repository.ILoggerRepository RootRep;

View File

@ -517,6 +517,57 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion CheckOff #endregion CheckOff
#region ShwRplWds
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ShwRplWds
{
private string _MenuItem;
[XmlAttribute("MenuItem")]
[Browsable(false)]
public string MenuItem
{
get { return _MenuItem; }
set { _MenuItem = value; }
}
private string _Index;
[XmlAttribute("Index")]
[Browsable(false)] // Don't show in the property grid
public string Index
{
get { return _Index; }
set { _Index = value; }
}
private bool? _Active;
[DisplayName("Active ShwRplWds")]
[Description("Allow use of this ShwRplWds")]
public bool? Active
{
get { return _Active; }
set { _Active = value; }
}
private bool? _OrigActive;
[XmlIgnore]
[Browsable(false)]
public bool? OrigActive
{
get { return _OrigActive; }
set { _OrigActive = value; }
}
public ShwRplWds()
{
}
public string ConvertToString()
{
return GenericSerializer<ShwRplWds>.StringSerialize(this);
}
public override string ToString()
{
return MenuItem;
}
}
#endregion ShwRplWds
#region StepData (list) #region StepData (list)
[Serializable] [Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]

View File

@ -528,6 +528,24 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Section_OriginalSteps"); OnPropertyChanged("Section_OriginalSteps");
} }
} }
[Browsable(false)]
[DisplayName("Section ShowReplaceWords")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section ShowReplaceWords")]
public string Section_ShwRplWords
{
get
{
//return _Xp["Section", "ShwRplWords"];
string tmp = _Xp["Section", "ShwRplWords"];
return tmp == null || tmp == "" ? "Y" : tmp;
}
set
{
_Xp["Section", "ShwRplWords"] = value;
OnPropertyChanged("Section_ShwRplWords");
}
}
[Category("Section")] [Category("Section")]
//PROPGRID: Hide Section NumPages //PROPGRID: Hide Section NumPages
[Browsable(false)] [Browsable(false)]

View File

@ -493,6 +493,34 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_DisableInitialLine"); OnPropertyChanged("Step_DisableInitialLine");
} }
} }
//C2019-025 Ability to Toggle Replace Words
public int Step_ShwRplWdsIndex
{
get
{
string s = _Xp["Step", "ShwRplWdsIndex"];
if (s == string.Empty) return 0;
if (s == "0") return 0;
if (s == "1") return 1;
if (s == "2") return 2;
if (s == "3") return 3;
return 0;
}
set
{
string s = _Xp["Step", ""];
if (value.ToString() == s) return;
_Xp["Step", "ShwRplWdsIndex"] = value.ToString();
OnPropertyChanged("Step_ShwRplWdsIndex");
}
}
#region RO image sizing #region RO image sizing
// if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig // if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig
// the size is set for ALL uses. // the size is set for ALL uses.

View File

@ -6,11 +6,18 @@ using System.Text.RegularExpressions;
using System.Drawing; using System.Drawing;
using Volian.Base.Library; using Volian.Base.Library;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
//using VEPROMS.colorReplaceWords;
// This was moved from volian.controls.library // This was moved from volian.controls.library
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public enum E_FieldToEdit { StepText, Text, Number, PSI }; public enum E_FieldToEdit { StepText, Text, Number, PSI };
public enum ReplaceWords
{
Inherit = 0,
Show = 1,
DoNotShow = 2
}
public class DisplayText public class DisplayText
{ {
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -46,6 +53,45 @@ namespace VEPROMS.CSLA.Library
return string.Empty; return string.Empty;
} }
} }
private string ShwRplWords(ItemInfo _MyItemInfo)
{
//if (_Initalizing) return "N";
//_MyItemInfo.
SectionConfig sc = _MyItemInfo.MyConfig as SectionConfig;
if (sc == null) return "N";
return sc.Section_ShwRplWords;
}
// 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 (int)ReplaceWords.DoNotShow:
return false;
break;
case (int)ReplaceWords.Show:
return true;
break;
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")
{
return true;
}
else
{
return false;
}
break;
default:
return false;
break;
}
}
private Item _MyItem; private Item _MyItem;
private string EditText private string EditText
{ {
@ -357,9 +403,34 @@ namespace VEPROMS.CSLA.Library
// But don't do ReplaceWords if the TurnOffReplaceWords format flag is set // But don't do ReplaceWords if the TurnOffReplaceWords format flag is set
if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords) if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords)
{ {
int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2"); int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2");
text = DoReplaceWords2(text); // C2029-025 Show or hide replace words. Can highlight replace words in editor.
if (_MyItemInfo.IsSection)
{
string ShwRplWrds = ShwRplWords(_MyItemInfo);
if (ShwRplWrds == "Y")
{
text = DoReplaceWords2(text, epMode);
}
}
if (_MyItemInfo.IsStep)
{
bool ShwRplWrds = ShwRplWdsIndex(_MyItemInfo);
if (ShwRplWrds == true)
{
text = DoReplaceWords2(text, epMode);
}
}
if (_MyItemInfo.IsFolder || _MyItemInfo.IsProcedure)
{
text = DoReplaceWords2(text, epMode);
}
ProfileTimer.Pop(profileDepth1); ProfileTimer.Pop(profileDepth1);
} }
if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages
@ -2101,7 +2172,7 @@ namespace VEPROMS.CSLA.Library
return (bool) _ProcessReplaceWords; return (bool) _ProcessReplaceWords;
} }
} }
private string DoReplaceWords2(string Text) private string DoReplaceWords2(string Text, E_EditPrintMode epMode)
{ {
if(!ProcessReplaceWords) return Text; if(!ProcessReplaceWords) return Text;
// F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs). // F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs).
@ -2162,6 +2233,7 @@ namespace VEPROMS.CSLA.Library
// CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is // CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is
//RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline; //RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline;
string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0"); string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0");
// if first or last character in replaceword is a non-word character, for example, ',', ')', or '.', // if first or last character in replaceword is a non-word character, for example, ',', ')', or '.',
// don't use the \W, i.e. don't bother to look for a non-word character. // don't use the \W, i.e. don't bother to look for a non-word character.
string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)"; string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)";
@ -2188,7 +2260,7 @@ namespace VEPROMS.CSLA.Library
} }
//ProfileTimer.Pop(profileDepth); //ProfileTimer.Pop(profileDepth);
//int profileDepth5 = ProfileTimer.Push(">>>> DoReplaceWords2.ReplaceMatches"); //int profileDepth5 = ProfileTimer.Push(">>>> DoReplaceWords2.ReplaceMatches");
Text = myMatches.ReplaceMatches(); Text = myMatches.ReplaceMatches(epMode);
//ProfileTimer.Pop(profileDepth5); //ProfileTimer.Pop(profileDepth5);
Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space
return Text; return Text;
@ -2480,7 +2552,8 @@ namespace VEPROMS.CSLA.Library
if (str.Length == index && str == text.Substring(0, str.Length)) return true; if (str.Length == index && str == text.Substring(0, str.Length)) return true;
return false; return false;
} }
public string ReplaceMatches()
public string ReplaceMatches(E_EditPrintMode epMode)
{ {
int offset = 0; int offset = 0;
string text = _Text; string text = _Text;
@ -2572,6 +2645,11 @@ namespace VEPROMS.CSLA.Library
with = with.Replace(@"\ul ", ""); with = with.Replace(@"\ul ", "");
with = with.Replace(@"\ulnone ", ""); with = with.Replace(@"\ulnone ", "");
} }
//if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
{
with = $@"\cf2{with}\cf0 ";
}
text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length); text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length);
//offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length; //offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length;

View File

@ -8447,97 +8447,7 @@ namespace VEPROMS.CSLA.Library
Dr = dr; Dr = dr;
} }
} }
public static DataTable GetDisplayTabs(int itemID) //, string displayTabID, string displayTabName)
{
try
{
DataTable tmp = DataPortal.Fetch<DataTable>(new DisplayTabs(itemID, "", "")); //, displayTabID, displayTabName));
//ItemInfo.AddList(tmp);
//tmp.AddEvents();
return tmp;
}
catch (Exception ex)
{
throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
}
}
private DataTable dt = new DataTable();
private DataTable DataPortal_Fetch(DisplayTabs criteria)
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
try
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "GetDisplayTabData";
cm.CommandTimeout = Database.DefaultTimeout;
SqlDataAdapter da = new SqlDataAdapter(cm);
da.Fill(dt);
cn.Close();
da.Dispose();
return dt;
}
catch (Exception ex)
{
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DataPortal_Fetch", ex);
throw new DbCslaException("ItemExt.DataPortal_Fetch", ex);
}
}
}
}
//public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName)
//{
// try
// {
// //DisplayTabs tmp =
// DataPortal.Fetch<DisplayTabs>(new DisplayTabs(itemID, displayTabID, displayTabName)); //, displayTabID, displayTabName));
// //ItemInfo.AddList(tmp);
// //tmp.AddEvents();
// //return tmp;
// }
// catch (Exception ex)
// {
// throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
// }
//}
//private DataTable dt = new DataTable();
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
//{
// using (SqlConnection cn = Database.VEPROMS_SqlConnection)
// {
// using (SqlCommand cm = cn.CreateCommand())
// {
// try
// {
// cm.CommandType = CommandType.StoredProcedure;
// cm.CommandText = "AddDisplayTabState";
// cm.CommandTimeout = Database.DefaultTimeout;
// cm.Parameters.AddWithValue("@ItemID", ItemID);
// cm.Parameters.AddWithValue("@displayTabID", displayTabID);
// cm.Parameters.AddWithValue("@displayTabName", displayTabName);
// cm.ExecuteNonQuery();
// //SqlDataAdapter da = new SqlDataAdapter(cm);
// //da.Fill(dt);
// //cn.Close();
// //da.Dispose();
// //return dt; // fix
// }
// catch (Exception ex)
// {
// //if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DataPortal_Fetch", ex);
// throw new DbCslaException("ItemExt.DataPortal_Fetch", ex);
// }
// }
// }
//}
public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName) public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName)
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName) //private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
{ {

View File

@ -2650,97 +2650,174 @@ namespace VEPROMS.CSLA.Library
firstTrans = false; firstTrans = false;
if (!CanDeleteObject()) if (!CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a Item"); throw new System.Security.SecurityException("User not authorized to remove a Item");
// B2016-009 check source and desintation types and display message box if needed // B2016-009 check source and destination types and display message box if needed
// C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon // C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon
// B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case // B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case
ItemInfo newItemInfo = null; ItemInfo newItemInfo = null;
try using (ItemInfo copyItemInfo = ItemInfo.Get(copyStartID))
{ {
// C2017-031: Support for paste/replace an enhanced step, if this is replacing enhanced, do a specific query try
if (itemInfo.IsEnhancedStep)
{ {
newItemInfo = ItemInfo.CopyPasteReplaceEnhancedItemInfoFetch(copyStartID, itemInfo); // C2017-031: Support for paste/replace an enhanced step, if this is replacing enhanced, do a specific query
if (newItemInfo == null) return null; if (itemInfo.IsEnhancedStep)
{
newItemInfo = ItemInfo.CopyPasteReplaceEnhancedItemInfoFetch(copyStartID, itemInfo);
if (newItemInfo == null) return null;
}
//C2025-003 Enhanced Copy/Paste Upgrade - Added support for paste/replace on a master step
else if (itemInfo.HasEnhancedLinkedStep || copyItemInfo.HasEnhancedLinkedStep)
{
DialogResult rslt = DialogResult.No;
SectionConfig secCfg = itemInfo.ActiveSection.MyConfig as SectionConfig;
if (copyItemInfo.HasEnhancedLinkedStep && secCfg.MyEnhancedDocuments.Count > 0)
rslt = FlexibleMessageBox.Show("The step you are copying contains linked background documents." +
"\r\n\r\nDo you also wish to make a copy of the background documents?",
"Paste background documents", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
//unlink and remove any background documents attached to where you are copying to
//and then delete them
//if selected want to replace BG step (DialogResult.Yes)
if (itemInfo.HasEnhancedLinkedStep && rslt == DialogResult.Yes)
{
foreach (EnhancedDocument ed in itemInfo.GetMyEnhancedDocuments())
{
using (ItemInfo exEnh = ItemInfo.Get(ed.ItemID))
{
exEnh.DoUnlinkEnhanced(exEnh, 0, false);
DeleteItemAndChildren(exEnh);
}
}
}
//do copy/paste replace of the master step
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo);
if (newItemInfo == null) return null;
//copy any background documents
//if selected want to replace BG step (DialogResult.Yes)
if (copyItemInfo.HasEnhancedLinkedStep && rslt == DialogResult.Yes)
{
foreach (EnhancedDocument ed in copyItemInfo.GetMyEnhancedDocuments())
{
using (ItemInfo exEnh = newItemInfo.DoAddMissingEnhancedItems(ed.Type))
{
PasteReplace(exEnh, ed.ItemID, chgid, ref firstTrans);
}
}
}
else if (rslt == DialogResult.No)
{
//if selected didn't want to copy BG documents (DialogResult.No)
//need to unlink BG doc from old removed content (what was pasted over top of)
//re-link BG document to new paste replace master doc
//this should also auto update the text of the main linked item
//to match the new master doc wording
//get original BG documents
EnhancedDocuments orig_eds = itemInfo.GetMyEnhancedDocuments();
//remove link from pre-existing BG docs
foreach (EnhancedDocument ed in orig_eds)
{
using (ItemInfo exEnh = ItemInfo.Get(ed.ItemID))
{ exEnh.DoUnlinkEnhanced(exEnh, 0, false); }
}
//remove link from steps just copied
ItemInfo.PasteClearEnhanced(newItemInfo);
//re-link pre-existing BG docs to newly replaced master step
foreach (EnhancedDocument ed in orig_eds)
{
using (ItemInfo orig_ed_item = ItemInfo.Get(ed.ItemID))
{ newItemInfo.DoCreateLinksEnhancedSingleItem(orig_ed_item, ed.Type); }
}
}
}
else
{
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); if (newItemInfo == null) return null;
}
} }
else catch (Exception ex1)
{ {
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); if (newItemInfo == null) return null; if (ex1.Message.Contains("has External Transitions and has no next step")
}
}
catch (Exception ex1)
{
if (ex1.Message.Contains("has External Transitions and has no next step")
|| ex1.Message.Contains("has External Transitions to Procedure") || ex1.Message.Contains("has External Transitions to Procedure")
|| ex1.Message.Contains("has External Transitions to it's children")) || ex1.Message.Contains("has External Transitions to it's children"))
{ {
FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return null; return null;
}
} }
} try
try {
{ // Delete business objects, including remove from tree
// Delete business objects, including remove from tree ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children
ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item);
using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item); ItemInfo.PasteSetChangeId(newItemInfo, chgid);
ItemInfo.PasteSetChangeId(newItemInfo, chgid); if (!copyItemInfo.HasEnhancedLinkedStep && !itemInfo.HasEnhancedLinkedStep) ItemInfo.PasteClearEnhanced(newItemInfo);
ItemInfo.PasteClearEnhanced(newItemInfo); if (newItemInfo.NextItem != null) using (Item item = newItemInfo.NextItem.Get()) ItemInfo.Refresh(item);
if (newItemInfo.NextItem != null) using (Item item = newItemInfo.NextItem.Get()) ItemInfo.Refresh(item); newItemInfo.RefreshNextItems();
newItemInfo.RefreshNextItems(); // if inserting after a caution or note, refreshes tabs. This will adjust bullets
// if inserting after a caution or note, refreshes tabs. This will adjust bullets // of any previous cautions or notes.
// of any previous cautions or notes. if (newItemInfo.IsCaution || newItemInfo.IsNote) newItemInfo.ResetOrdinal();
if (newItemInfo.IsCaution || newItemInfo.IsNote) newItemInfo.ResetOrdinal(); newItemInfo.UpdateTransitionText();
newItemInfo.UpdateTransitionText(); newItemInfo.UpdateROText();
newItemInfo.UpdateROText(); newItemInfo.UpdatePastedStepTransitionText();
newItemInfo.UpdatePastedStepTransitionText();
// Add to tree // Add to tree
if (newItemInfo.NextItem != null) if (newItemInfo.NextItem != null)
{
using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
{ {
itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before)); using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
{
itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before));
}
} }
} else if (newItemInfo.PreviousID != null)
else if (newItemInfo.PreviousID != null)
{
using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
{ {
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After)); using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
{
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After));
}
} }
else
{
// B2024-045, 049 and 050: if not a single procedure replace, update user interface by using the 'OnNewChild'. Single
// procedure's MyParent is null because its parent is a working draft (docversion) since MyParent's type is iteminfo.
// For the single procedure case, the user interface code in vlntreeview will update the tree.
if (newItemInfo.MyParent != null)
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child));
}
return newItemInfo;
} }
else catch (Exception ex)
{ {
// B2024-045, 049 and 050: if not a single procedure replace, update user interface by using the 'OnNewChild'. Single ItemInfo iii = itemInfo.HandleSqlExceptionOnDelete(ex);
// procedure's MyParent is null because its parent is a working draft (docversion) since MyParent's type is iteminfo. if (iii == itemInfo) return null;// If self returned then return null
// For the single procedure case, the user interface code in vlntreeview will update the tree. if (iii != null)
if (newItemInfo.MyParent != null) {
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child)); firstTrans = true; // B2017-179 set the firstTrans to true and return the itminfo of the first transition location that needs resolved
return iii;
}
if (!HandleSqlExceptionOnCopy(ex))
{
if (ex.Message.Contains("has External Transitions and has no next step")
|| ex.Message.Contains("has External Transitions to Procedure")
|| ex.Message.Contains("has External Transitions to it's children")
|| ex.Message.Contains("This step has been deleted"))
throw ex;
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return itemInfo;
}
else
return itemInfo;
} }
return newItemInfo;
}
catch (Exception ex)
{
ItemInfo iii = itemInfo.HandleSqlExceptionOnDelete(ex);
if (iii == itemInfo) return null;// If self returned then return null
if (iii != null)
{
firstTrans = true; // B2017-179 set the firstTrans to true and return the itminfo of the first transition location that needs resolved
return iii;
}
if (!HandleSqlExceptionOnCopy(ex))
{
if (ex.Message.Contains("has External Transitions and has no next step")
|| ex.Message.Contains("has External Transitions to Procedure")
|| ex.Message.Contains("has External Transitions to it's children")
|| ex.Message.Contains("This step has been deleted")
)
throw ex;
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return itemInfo;
}
else
return itemInfo;
} }
} }
#endregion #endregion

View File

@ -2173,6 +2173,7 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
#endregion #endregion
#region CheckOff #region CheckOff
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]
@ -2284,6 +2285,49 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion #endregion
#region ShwRplWds
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
public class ShwRplWds : vlnFormatItem, IVlnIndexedFormatItem
{
public ShwRplWds(XmlNode xmlNode) : base(xmlNode) { }
public ShwRplWds() : base() { }
private LazyLoad<int?> _Index;
public int? Index
{
get
{
return LazyLoad(ref _Index, "@Index");
}
}
// User Interface Mark (UIMark) is the deimal number of an ASCII character that is desplayed in the step editor
// to indicate the selected checkoff
private LazyLoad<int?> _UIMark;
public int? UIMark
{
get
{
return LazyLoad(ref _UIMark, "@UIMark");
}
}
//Descriptive text shown in the checkoff selection list
private LazyLoad<string> _MenuItem;
public string MenuItem
{
get
{
return LazyLoad(ref _MenuItem, "@MenuItem");
}
}
public override string ToString()
{
return MenuItem;
}
}
#endregion
#region CheckOffList #region CheckOffList
[TypeConverter(typeof(vlnIndexedListConverter<CheckOffList, CheckOff>))] [TypeConverter(typeof(vlnIndexedListConverter<CheckOffList, CheckOff>))]
public class CheckOffList : vlnIndexedFormatList<CheckOff> public class CheckOffList : vlnIndexedFormatList<CheckOff>

View File

@ -105,7 +105,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyContent != null) if (tmp._MyContent != null)
{ {
ContentInfo.Refresh(tmp._MyContent); 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); ItemInfo.Refresh(tmp);
} }
@ -1148,8 +1148,7 @@ namespace VEPROMS.CSLA.Library
} }
catch (Exception ex) catch (Exception ex)
{ {
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DeactivateStateDisplayTabTmp", ex); Database.LogException("ItemExt.DeactivateStateDisplayTabTmp", ex);
throw new DbCslaException("ItemExt.DeactivateStateDisplayTabTmp", ex);
} }
} }
@ -1176,8 +1175,7 @@ namespace VEPROMS.CSLA.Library
} }
catch (Exception ex) catch (Exception ex)
{ {
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.AddDisplayTabsState", ex); Database.LogException("ItemExt.AddDisplayTabsState", ex);
throw new DbCslaException("ItemExt.AddDisplayTabsState", ex);
} }
} }
} }
@ -1194,13 +1192,8 @@ namespace VEPROMS.CSLA.Library
cm.CommandType = CommandType.StoredProcedure; cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "GetDisplayTabdata"; cm.CommandText = "GetDisplayTabdata";
cm.CommandTimeout = Database.DefaultTimeout; cm.CommandTimeout = Database.DefaultTimeout;
cm.Parameters.AddWithValue("@UserID", UserID); cm.Parameters.AddWithValue("@UserID", UserID);
//cm.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter(cm); SqlDataAdapter da = new SqlDataAdapter(cm);
//da.Fill(dt);
//cn.Close();
//da.Dispose();
//return dt; // fix
SqlDataReader reader = cm.ExecuteReader(); SqlDataReader reader = cm.ExecuteReader();
DataTable dt = new DataTable(); DataTable dt = new DataTable();
@ -1210,8 +1203,10 @@ namespace VEPROMS.CSLA.Library
} }
catch (Exception ex) catch (Exception ex)
{ {
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DeactivateStateDisplayTabTmp", ex); //B2025-004
throw new DbCslaException("ItemExt.DeactivateStateDisplayTabTmp", ex); //if it fails loading previously open tabs, simply treat it as if no tabs were open
//instead of crashing
return new DataTable();
} }
} }

View File

@ -48,7 +48,6 @@ namespace VEPROMS.CSLA.Library
catch (Exception ex) catch (Exception ex)
{ {
Database.LogException("UserSettings_GetData", ex); Database.LogException("UserSettings_GetData", ex);
throw new DbCslaException("UserSettings_GetData", ex);
} }
} }

View File

@ -103,6 +103,9 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\VEPROMS User Interface\Properties\Settings.Designer.cs">
<Link>Properties\Settings.Designer.cs</Link>
</Compile>
<Compile Include="Config\AnnotationTypeConfig.cs" /> <Compile Include="Config\AnnotationTypeConfig.cs" />
<Compile Include="Config\AssocConfig.cs" /> <Compile Include="Config\AssocConfig.cs" />
<Compile Include="Config\ColorConfig.cs" /> <Compile Include="Config\ColorConfig.cs" />
@ -419,6 +422,7 @@
<DependentUpon>frmRofstLoadStatus.cs</DependentUpon> <DependentUpon>frmRofstLoadStatus.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -201,6 +201,13 @@ namespace Volian.Base.Library
{ {
get { return VlnSettings._StepTypeToolTip; } get { return VlnSettings._StepTypeToolTip; }
set { VlnSettings._StepTypeToolTip = value; } set { VlnSettings._StepTypeToolTip = value; }
}
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private static bool _cbShwRplWrdsColor = false;
public static bool cbShwRplWrdsColor
{
get { return VlnSettings._cbShwRplWrdsColor; }
set { VlnSettings._cbShwRplWrdsColor = value; }
} }
private static string _ReleaseMode = null; private static string _ReleaseMode = null;
public static string ReleaseMode public static string ReleaseMode

View File

@ -587,6 +587,13 @@ namespace Volian.Controls.Library
if (forceReload || RoTreeNeedsReloaded || tvROFST.Nodes == null || tvROFST.Nodes.Count <= 0) if (forceReload || RoTreeNeedsReloaded || tvROFST.Nodes == null || tvROFST.Nodes.Count <= 0)
{ {
//B2025-008
//in cases where a RO table is clicked on
//it will refresh the list
//temp store what the ROID was before the list refreshes
//so can go to it after the refresh
string tmpROID = CurROLink?.ROID;
ROFSTLookup.rodbi[] dbs = MyROFSTLookup.GetRODatabaseList(true); ROFSTLookup.rodbi[] dbs = MyROFSTLookup.GetRODatabaseList(true);
// B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures. // B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures.
@ -609,6 +616,8 @@ namespace Volian.Controls.Library
_currDocVersionID = null; _currDocVersionID = null;
if(_docVersionInfo != null) _currDocVersionID = (int?)_docVersionInfo.VersionID; if(_docVersionInfo != null) _currDocVersionID = (int?)_docVersionInfo.VersionID;
if (tmpROID != null) ExpandNode(ROFSTLookup.FormatRoidKey(tmpROID, true));
} }
var unitInfoNode = tvROFST.Nodes.Cast<TreeNode>().Where(x => x.Text == "Unit Information").FirstOrDefault(); var unitInfoNode = tvROFST.Nodes.Cast<TreeNode>().Where(x => x.Text == "Unit Information").FirstOrDefault();

View File

@ -2362,6 +2362,17 @@ namespace Volian.Controls.Library
if (n.Nodes != null && n.Nodes.Count > 0 && n.Nodes[0].Text != DummyNodeText) CheckTreeNodeChildren(n.Nodes); if (n.Nodes != null && n.Nodes.Count > 0 && n.Nodes[0].Text != DummyNodeText) CheckTreeNodeChildren(n.Nodes);
checkingChildren = false; checkingChildren = false;
} }
else
{
//C2025-005 Find Step Elements
//uncheck the parents if there are any
DevComponents.AdvTree.Node tmp_n = n;
while (tmp_n.Parent != null)
{
tmp_n = tmp_n.Parent;
tmp_n.Checked = false;
}
}
// if the selected folder has a docversion, handle it: // if the selected folder has a docversion, handle it:
if (n.Tag != SelectAllProcedureSetsText) if (n.Tag != SelectAllProcedureSetsText)
@ -2379,6 +2390,26 @@ namespace Volian.Controls.Library
SetupContextMenu(); SetupContextMenu();
buildSetToSearchPanelTitle(); buildSetToSearchPanelTitle();
//C2025-005 Find Step Elements
//Need to refresh the Doc List and Available Step Types
//if All Procedure Sets was selected
if (n.Tag == SelectAllProcedureSetsText)
{
if (n.Checked)
{
checkingChildren = true;
foreach (Node node in advTreeProcSets.Nodes[0].Nodes)
{
node.Checked = true;
CheckTreeNodeChildren(node.Nodes);
}
checkingChildren = false;
}
RefreshLstCheckedDocVersions();
RefreshStepTypes();
}
} }
// check all folder nodes below this // check all folder nodes below this
@ -2452,14 +2483,19 @@ namespace Volian.Controls.Library
ResetStepTypes("....select a procedure set for types to appear..."); ResetStepTypes("....select a procedure set for types to appear...");
} }
private void ResetStepTypes(string str) //C2025-005 Find Step Elements
//improve messaging when multiple formats
private void ResetStepTypes(params string[] strs)
{ {
advTreeStepTypes.Nodes.Clear(); advTreeStepTypes.Nodes.Clear();
lstCheckedStepTypes.Clear(); lstCheckedStepTypes.Clear();
lstCheckedStepTypesStr.Clear(); lstCheckedStepTypesStr.Clear();
Node newnode = new DevComponents.AdvTree.Node(); foreach (string str in strs)
newnode.Text = str; {
advTreeStepTypes.Nodes.Add(newnode); Node newnode = new DevComponents.AdvTree.Node();
newnode.Text = str;
advTreeStepTypes.Nodes.Add(newnode);
}
buildStepTypePannelTitle(); buildStepTypePannelTitle();
} }
@ -2486,7 +2522,11 @@ namespace Volian.Controls.Library
{ {
if (formatName != dvi.ActiveFormat.Name) if (formatName != dvi.ActiveFormat.Name)
{ {
ResetStepTypes("...folders selected include multiple formats"); //C2025-005 Find Step Elements
//improve messaging when multiple formats
string frmt1 = $" Format is {formatName} before {dvi.MyFolder.Name}";
string frmt2 = $" which begins format: {dvi.ActiveFormat.Name}";
ResetStepTypes("...folders selected include multiple formats.", frmt1, frmt2);
return; return;
} }
} }

View File

@ -33,8 +33,10 @@ namespace Volian.Controls.Library
this.cbPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbCAS = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbCAS = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmbCheckoff = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.cmbCheckoff = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.cmbShwRplWds = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.groupPanelCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel(); this.groupPanelCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbInitialLine = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.cbInitialLine = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.groupPanelcmbShwRplWds = new DevComponents.DotNetBar.Controls.GroupPanel();
this.groupPanelChgBar = new DevComponents.DotNetBar.Controls.GroupPanel(); this.groupPanelChgBar = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tbChgID = new System.Windows.Forms.TextBox(); this.tbChgID = new System.Windows.Forms.TextBox();
this.lblChgId = new System.Windows.Forms.Label(); this.lblChgId = new System.Windows.Forms.Label();
@ -60,8 +62,10 @@ namespace Volian.Controls.Library
this.tbFSWd = new System.Windows.Forms.TextBox(); this.tbFSWd = new System.Windows.Forms.TextBox();
this.lblFSHt = new System.Windows.Forms.Label(); this.lblFSHt = new System.Windows.Forms.Label();
this.lblFSWidth = new System.Windows.Forms.Label(); this.lblFSWidth = new System.Windows.Forms.Label();
this.btnSaveChangeID = new System.Windows.Forms.Button();
this.groupPanelPaginate.SuspendLayout(); this.groupPanelPaginate.SuspendLayout();
this.groupPanelCheckoff.SuspendLayout(); this.groupPanelCheckoff.SuspendLayout();
this.groupPanelcmbShwRplWds.SuspendLayout();
this.groupPanelChgBar.SuspendLayout(); this.groupPanelChgBar.SuspendLayout();
this.groupPanelChgStepType.SuspendLayout(); this.groupPanelChgStepType.SuspendLayout();
this.groupPanelIncludeOn.SuspendLayout(); this.groupPanelIncludeOn.SuspendLayout();
@ -79,7 +83,7 @@ namespace Volian.Controls.Library
this.groupPanelPaginate.Controls.Add(this.cbPageBreak); this.groupPanelPaginate.Controls.Add(this.cbPageBreak);
this.groupPanelPaginate.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelPaginate.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelPaginate.Dock = System.Windows.Forms.DockStyle.Top; this.groupPanelPaginate.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelPaginate.Location = new System.Drawing.Point(0, 339); this.groupPanelPaginate.Location = new System.Drawing.Point(0, 425);
this.groupPanelPaginate.Margin = new System.Windows.Forms.Padding(2); this.groupPanelPaginate.Margin = new System.Windows.Forms.Padding(2);
this.groupPanelPaginate.Name = "groupPanelPaginate"; this.groupPanelPaginate.Name = "groupPanelPaginate";
this.groupPanelPaginate.Size = new System.Drawing.Size(202, 58); this.groupPanelPaginate.Size = new System.Drawing.Size(202, 58);
@ -184,15 +188,36 @@ namespace Volian.Controls.Library
this.cmbCheckoff.WatermarkText = "select signoff / checkoff"; this.cmbCheckoff.WatermarkText = "select signoff / checkoff";
this.cmbCheckoff.SelectedIndexChanged += new System.EventHandler(this.cmbCheckoff_SelectedIndexChanged); this.cmbCheckoff.SelectedIndexChanged += new System.EventHandler(this.cmbCheckoff_SelectedIndexChanged);
// //
// cmbShwRplWds
//
this.cmbShwRplWds.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cmbShwRplWds.DisplayMember = "Text";
this.cmbShwRplWds.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbShwRplWds.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbShwRplWds.FormattingEnabled = true;
this.cmbShwRplWds.ItemHeight = 17;
this.cmbShwRplWds.Items.AddRange(new object[] {
"Inherit from Section",
"Show replace words",
"Do not show replace words"});
this.cmbShwRplWds.Location = new System.Drawing.Point(3, 17);
this.cmbShwRplWds.Margin = new System.Windows.Forms.Padding(2);
this.cmbShwRplWds.Name = "cmbShwRplWds";
this.cmbShwRplWds.Size = new System.Drawing.Size(194, 23);
this.cmbShwRplWds.TabIndex = 0;
this.cmbShwRplWds.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmbShwRplWds.WatermarkText = "Show Replace Words";
this.cmbShwRplWds.SelectedIndexChanged += new System.EventHandler(this.cmbShwRplWds_SelectedIndexChanged);
//
// groupPanelCheckoff // groupPanelCheckoff
// //
this.groupPanelCheckoff.CanvasColor = System.Drawing.SystemColors.Control; this.groupPanelCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; this.groupPanelCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelCheckoff.Controls.Add(this.cbInitialLine);
this.groupPanelCheckoff.Controls.Add(this.cmbCheckoff); this.groupPanelCheckoff.Controls.Add(this.cmbCheckoff);
this.groupPanelCheckoff.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelCheckoff.Dock = System.Windows.Forms.DockStyle.Top; this.groupPanelCheckoff.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 145); this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 231);
this.groupPanelCheckoff.Margin = new System.Windows.Forms.Padding(2); this.groupPanelCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.groupPanelCheckoff.Name = "groupPanelCheckoff"; this.groupPanelCheckoff.Name = "groupPanelCheckoff";
this.groupPanelCheckoff.Size = new System.Drawing.Size(202, 86); this.groupPanelCheckoff.Size = new System.Drawing.Size(202, 86);
@ -247,18 +272,63 @@ namespace Volian.Controls.Library
this.cbInitialLine.Visible = false; this.cbInitialLine.Visible = false;
this.cbInitialLine.CheckedChanged += new System.EventHandler(this.cbInitialLine_CheckedChanged); this.cbInitialLine.CheckedChanged += new System.EventHandler(this.cbInitialLine_CheckedChanged);
// //
// groupPanelcmbShwRplWds
//
this.groupPanelcmbShwRplWds.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelcmbShwRplWds.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelcmbShwRplWds.Controls.Add(this.cbInitialLine);
this.groupPanelcmbShwRplWds.Controls.Add(this.cmbShwRplWds);
this.groupPanelcmbShwRplWds.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelcmbShwRplWds.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelcmbShwRplWds.Location = new System.Drawing.Point(0, 145);
this.groupPanelcmbShwRplWds.Margin = new System.Windows.Forms.Padding(2);
this.groupPanelcmbShwRplWds.Name = "groupPanelcmbShwRplWds";
this.groupPanelcmbShwRplWds.Size = new System.Drawing.Size(202, 86);
//
//
//
this.groupPanelcmbShwRplWds.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.groupPanelcmbShwRplWds.Style.BackColorGradientAngle = 90;
this.groupPanelcmbShwRplWds.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.groupPanelcmbShwRplWds.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelcmbShwRplWds.Style.BorderBottomWidth = 1;
this.groupPanelcmbShwRplWds.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.groupPanelcmbShwRplWds.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelcmbShwRplWds.Style.BorderLeftWidth = 1;
this.groupPanelcmbShwRplWds.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelcmbShwRplWds.Style.BorderRightWidth = 1;
this.groupPanelcmbShwRplWds.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelcmbShwRplWds.Style.BorderTopWidth = 1;
this.groupPanelcmbShwRplWds.Style.CornerDiameter = 4;
this.groupPanelcmbShwRplWds.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelcmbShwRplWds.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelcmbShwRplWds.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelcmbShwRplWds.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelcmbShwRplWds.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.groupPanelcmbShwRplWds.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.groupPanelcmbShwRplWds.TabIndex = 8;
this.groupPanelcmbShwRplWds.Text = "Show Replace Words";
this.groupPanelcmbShwRplWds.VisibleChanged += new System.EventHandler(this.groupPanelcmbShwRplWds_VisibleChanged);
//
// groupPanelChgBar // groupPanelChgBar
// //
this.groupPanelChgBar.BackColor = System.Drawing.Color.Transparent; this.groupPanelChgBar.BackColor = System.Drawing.Color.Transparent;
this.groupPanelChgBar.CanvasColor = System.Drawing.SystemColors.Control; this.groupPanelChgBar.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelChgBar.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; this.groupPanelChgBar.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelChgBar.Controls.Add(this.btnSaveChangeID);
this.groupPanelChgBar.Controls.Add(this.tbChgID); this.groupPanelChgBar.Controls.Add(this.tbChgID);
this.groupPanelChgBar.Controls.Add(this.lblChgId); this.groupPanelChgBar.Controls.Add(this.lblChgId);
this.groupPanelChgBar.Controls.Add(this.rbChgBarOff); this.groupPanelChgBar.Controls.Add(this.rbChgBarOff);
this.groupPanelChgBar.Controls.Add(this.rbChgBarOn); this.groupPanelChgBar.Controls.Add(this.rbChgBarOn);
this.groupPanelChgBar.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelChgBar.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelChgBar.Dock = System.Windows.Forms.DockStyle.Top; this.groupPanelChgBar.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelChgBar.Location = new System.Drawing.Point(0, 231); this.groupPanelChgBar.Location = new System.Drawing.Point(0, 317);
this.groupPanelChgBar.Margin = new System.Windows.Forms.Padding(2); this.groupPanelChgBar.Margin = new System.Windows.Forms.Padding(2);
this.groupPanelChgBar.Name = "groupPanelChgBar"; this.groupPanelChgBar.Name = "groupPanelChgBar";
this.groupPanelChgBar.Size = new System.Drawing.Size(202, 108); this.groupPanelChgBar.Size = new System.Drawing.Size(202, 108);
@ -301,7 +371,6 @@ namespace Volian.Controls.Library
this.tbChgID.Name = "tbChgID"; this.tbChgID.Name = "tbChgID";
this.tbChgID.Size = new System.Drawing.Size(81, 20); this.tbChgID.Size = new System.Drawing.Size(81, 20);
this.tbChgID.TabIndex = 4; this.tbChgID.TabIndex = 4;
this.tbChgID.TextChanged += new System.EventHandler(this.tbChgID_TextChanged);
// //
// lblChgId // lblChgId
// //
@ -518,7 +587,7 @@ namespace Volian.Controls.Library
this.groupPanelIncludeOn.Controls.Add(this.cbCAS); this.groupPanelIncludeOn.Controls.Add(this.cbCAS);
this.groupPanelIncludeOn.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelIncludeOn.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelIncludeOn.Dock = System.Windows.Forms.DockStyle.Top; this.groupPanelIncludeOn.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelIncludeOn.Location = new System.Drawing.Point(0, 397); this.groupPanelIncludeOn.Location = new System.Drawing.Point(0, 483);
this.groupPanelIncludeOn.Margin = new System.Windows.Forms.Padding(2); this.groupPanelIncludeOn.Margin = new System.Windows.Forms.Padding(2);
this.groupPanelIncludeOn.Name = "groupPanelIncludeOn"; this.groupPanelIncludeOn.Name = "groupPanelIncludeOn";
this.groupPanelIncludeOn.Size = new System.Drawing.Size(202, 121); this.groupPanelIncludeOn.Size = new System.Drawing.Size(202, 121);
@ -561,7 +630,7 @@ namespace Volian.Controls.Library
this.groupPanelWcnTrnResp.Controls.Add(this.tbRespons); this.groupPanelWcnTrnResp.Controls.Add(this.tbRespons);
this.groupPanelWcnTrnResp.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelWcnTrnResp.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelWcnTrnResp.Dock = System.Windows.Forms.DockStyle.Top; this.groupPanelWcnTrnResp.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelWcnTrnResp.Location = new System.Drawing.Point(0, 518); this.groupPanelWcnTrnResp.Location = new System.Drawing.Point(0, 604);
this.groupPanelWcnTrnResp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.groupPanelWcnTrnResp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupPanelWcnTrnResp.Name = "groupPanelWcnTrnResp"; this.groupPanelWcnTrnResp.Name = "groupPanelWcnTrnResp";
this.groupPanelWcnTrnResp.Size = new System.Drawing.Size(202, 138); this.groupPanelWcnTrnResp.Size = new System.Drawing.Size(202, 138);
@ -620,7 +689,7 @@ namespace Volian.Controls.Library
this.groupPanelFigSize.Controls.Add(this.lblFSWidth); this.groupPanelFigSize.Controls.Add(this.lblFSWidth);
this.groupPanelFigSize.DisabledBackColor = System.Drawing.Color.Empty; this.groupPanelFigSize.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelFigSize.Dock = System.Windows.Forms.DockStyle.Top; this.groupPanelFigSize.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelFigSize.Location = new System.Drawing.Point(0, 656); this.groupPanelFigSize.Location = new System.Drawing.Point(0, 742);
this.groupPanelFigSize.Margin = new System.Windows.Forms.Padding(2); this.groupPanelFigSize.Margin = new System.Windows.Forms.Padding(2);
this.groupPanelFigSize.Name = "groupPanelFigSize"; this.groupPanelFigSize.Name = "groupPanelFigSize";
this.groupPanelFigSize.Size = new System.Drawing.Size(202, 135); this.groupPanelFigSize.Size = new System.Drawing.Size(202, 135);
@ -727,6 +796,16 @@ namespace Volian.Controls.Library
this.lblFSWidth.TabIndex = 0; this.lblFSWidth.TabIndex = 0;
this.lblFSWidth.Text = "Width"; this.lblFSWidth.Text = "Width";
// //
// btnSaveChangeID
//
this.btnSaveChangeID.Location = new System.Drawing.Point(86, 65);
this.btnSaveChangeID.Name = "btnSaveChangeID";
this.btnSaveChangeID.Size = new System.Drawing.Size(75, 23);
this.btnSaveChangeID.TabIndex = 5;
this.btnSaveChangeID.Text = "Save";
this.btnSaveChangeID.UseVisualStyleBackColor = true;
this.btnSaveChangeID.Click += new System.EventHandler(this.btnSaveChangeID_Click);
//
// DisplayTags // DisplayTags
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -737,6 +816,7 @@ namespace Volian.Controls.Library
this.Controls.Add(this.groupPanelPaginate); this.Controls.Add(this.groupPanelPaginate);
this.Controls.Add(this.groupPanelChgBar); this.Controls.Add(this.groupPanelChgBar);
this.Controls.Add(this.groupPanelCheckoff); this.Controls.Add(this.groupPanelCheckoff);
this.Controls.Add(this.groupPanelcmbShwRplWds);
this.Controls.Add(this.groupPanelChgStepType); this.Controls.Add(this.groupPanelChgStepType);
this.Margin = new System.Windows.Forms.Padding(2); this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "DisplayTags"; this.Name = "DisplayTags";
@ -744,7 +824,8 @@ namespace Volian.Controls.Library
this.groupPanelPaginate.ResumeLayout(false); this.groupPanelPaginate.ResumeLayout(false);
this.groupPanelPaginate.PerformLayout(); this.groupPanelPaginate.PerformLayout();
this.groupPanelCheckoff.ResumeLayout(false); this.groupPanelCheckoff.ResumeLayout(false);
this.groupPanelCheckoff.PerformLayout(); this.groupPanelcmbShwRplWds.ResumeLayout(false);
this.groupPanelcmbShwRplWds.PerformLayout();
this.groupPanelChgBar.ResumeLayout(false); this.groupPanelChgBar.ResumeLayout(false);
this.groupPanelChgBar.PerformLayout(); this.groupPanelChgBar.PerformLayout();
this.groupPanelChgStepType.ResumeLayout(false); this.groupPanelChgStepType.ResumeLayout(false);
@ -764,7 +845,9 @@ namespace Volian.Controls.Library
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelPaginate; private DevComponents.DotNetBar.Controls.GroupPanel groupPanelPaginate;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbCheckoff; private DevComponents.DotNetBar.Controls.ComboBoxEx cmbCheckoff;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelCheckoff; private DevComponents.DotNetBar.Controls.ComboBoxEx cmbShwRplWds;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelCheckoff;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelcmbShwRplWds;
private DevComponents.DotNetBar.Controls.CheckBoxX cbPageBreak; private DevComponents.DotNetBar.Controls.CheckBoxX cbPageBreak;
private DevComponents.DotNetBar.Controls.CheckBoxX cbCAS; private DevComponents.DotNetBar.Controls.CheckBoxX cbCAS;
private DevComponents.DotNetBar.Controls.GroupPanel groupPanelChgBar; private DevComponents.DotNetBar.Controls.GroupPanel groupPanelChgBar;
@ -794,5 +877,6 @@ namespace Volian.Controls.Library
private DevComponents.DotNetBar.Controls.CheckBoxX cbIncludeInTOC; private DevComponents.DotNetBar.Controls.CheckBoxX cbIncludeInTOC;
private DevComponents.DotNetBar.Controls.CheckBoxX cbTCAS; private DevComponents.DotNetBar.Controls.CheckBoxX cbTCAS;
private DevComponents.DotNetBar.Controls.CheckBoxX cbInitialLine; private DevComponents.DotNetBar.Controls.CheckBoxX cbInitialLine;
private System.Windows.Forms.Button btnSaveChangeID;
} }
} }

View File

@ -124,6 +124,7 @@ namespace Volian.Controls.Library
private void ClearControls() private void ClearControls()
{ {
cmbCheckoff.Enabled = false; cmbCheckoff.Enabled = false;
cmbShwRplWds.Enabled = false;
cbPageBreak.Enabled = false; cbPageBreak.Enabled = false;
cbPrefPageBreak.Enabled = false; cbPrefPageBreak.Enabled = false;
cbPlaceKeeper.Enabled = false; cbPlaceKeeper.Enabled = false;
@ -141,6 +142,7 @@ namespace Volian.Controls.Library
tbChgID.Text = ""; tbChgID.Text = "";
tbChgID.Enabled = false; tbChgID.Enabled = false;
lblChgId.Visible = tbChgID.Visible = false; lblChgId.Visible = tbChgID.Visible = false;
btnSaveChangeID.Enabled = btnSaveChangeID.Visible = false;
CurItemInfo = null; CurItemInfo = null;
cbInitialLine.Visible = cbInitialLine.Enabled = false; cbInitialLine.Visible = cbInitialLine.Enabled = false;
@ -258,6 +260,7 @@ namespace Volian.Controls.Library
groupPanelChgStepType.Style.BackColor = Color.Cornsilk; groupPanelChgStepType.Style.BackColor = Color.Cornsilk;
groupPanelPaginate.Style.BackColor = Color.Cornsilk; groupPanelPaginate.Style.BackColor = Color.Cornsilk;
groupPanelCheckoff.Style.BackColor = Color.Cornsilk; groupPanelCheckoff.Style.BackColor = Color.Cornsilk;
groupPanelcmbShwRplWds.Style.BackColor = Color.Cornsilk;
groupPanelIncludeOn.Style.BackColor = Color.Cornsilk; groupPanelIncludeOn.Style.BackColor = Color.Cornsilk;
groupPanelWcnTrnResp.Style.BackColor = Color.Cornsilk; groupPanelWcnTrnResp.Style.BackColor = Color.Cornsilk;
groupPanelFigSize.Style.BackColor = Color.Cornsilk; groupPanelFigSize.Style.BackColor = Color.Cornsilk;
@ -298,10 +301,21 @@ namespace Volian.Controls.Library
// in certain cases, the checkbox control should be disabled, check for this stuff now... // in certain cases, the checkbox control should be disabled, check for this stuff now...
int formatSteptype = CurItemInfo.FormatStepType; int formatSteptype = CurItemInfo.FormatStepType;
cmbCheckoff.Enabled = true; cmbCheckoff.Enabled = true;
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
cmbShwRplWds.Enabled = true; // new show replace words
if (cmbShwRplWds.Visible)
{
cmbShwRplWds.SelectedIndex = 0;
//StepConfig sc = CurItemInfo.MyConfig as StepConfig;
cmbShwRplWds.Enabled = true;
cmbShwRplWds.SelectedIndex = sc.Step_ShwRplWdsIndex;
}
if ((CurItemInfo.IsCaution || CurItemInfo.IsNote) & !fmtdata.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel) if ((CurItemInfo.IsCaution || CurItemInfo.IsNote) & !fmtdata.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
cmbCheckoff.Enabled = false; cmbCheckoff.Enabled = false;
if (CurItemInfo.IsRNOPart && sc != null && sc.Step_CheckOffIndex != -1 && !fmtdata.StepDataList[formatSteptype].CheckOffSameAsParent) if (CurItemInfo.IsRNOPart && sc != null && sc.Step_CheckOffIndex != -1 && !fmtdata.StepDataList[formatSteptype].CheckOffSameAsParent)
cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO. cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO.
if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER
//// if there are no checkoffs OR //// if there are no checkoffs OR
@ -508,9 +522,10 @@ namespace Volian.Controls.Library
tbChgID.Text = sc1.Step_ChangeID; tbChgID.Text = sc1.Step_ChangeID;
tbChgID.Enabled = true; tbChgID.Enabled = true;
lblChgId.Visible = tbChgID.Visible = true; lblChgId.Visible = tbChgID.Visible = true;
btnSaveChangeID.Enabled = btnSaveChangeID.Visible = true;
} }
else 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. // Walk up tree until this step type's parentType is "Base". Start adding menuitems from this step type.
StepData top = fmtdata.StepDataList[formatSteptype]; StepData top = fmtdata.StepDataList[formatSteptype];
@ -532,7 +547,7 @@ namespace Volian.Controls.Library
tbRespons.Text = sc2.Step_Responsibility; tbRespons.Text = sc2.Step_Responsibility;
} }
// diable fields if user is only a reviewer // diable fields if user is only a reviewer
groupPanelCheckoff.Enabled = groupPanelChgBar.Enabled = groupPanelChgStepType.Enabled = groupPanelIncludeOn.Enabled = groupPanelPaginate.Enabled = groupPanelWcnTrnResp.Enabled = UserInfo.CanEdit(MyUserInfo, Mydvi); // Can Change Tag Info groupPanelCheckoff.Enabled = groupPanelChgBar.Enabled = groupPanelChgStepType.Enabled = groupPanelIncludeOn.Enabled = groupPanelPaginate.Enabled = groupPanelWcnTrnResp.Enabled = groupPanelcmbShwRplWds.Enabled = UserInfo.CanEdit(MyUserInfo, Mydvi); // Can Change Tag Info
// C2021-015: Barakah - High Level Steps in Table of Contents. Make the check box visible if format has TofCAllowHLS and // C2021-015: Barakah - High Level Steps in Table of Contents. Make the check box visible if format has TofCAllowHLS and
// if format allow this and on a HLS, get the database from step's config to see if included and set checkbox accordingly. // if format allow this and on a HLS, get the database from step's config to see if included and set checkbox accordingly.
@ -794,6 +809,12 @@ namespace Volian.Controls.Library
if (Visible == true && NotVisibleEditItem != null) if (Visible == true && NotVisibleEditItem != null)
MyEditItem = NotVisibleEditItem; MyEditItem = NotVisibleEditItem;
} }
private void groupPanelcmbShwRplWds_VisibleChanged(object sender, EventArgs e)
{
// If it becomes visible, update the panel
if (Visible == true && NotVisibleEditItem != null)
MyEditItem = NotVisibleEditItem;
}
private void rbChgBarOvrRideOn_CheckedChanged(object sender, EventArgs e) private void rbChgBarOvrRideOn_CheckedChanged(object sender, EventArgs e)
{ {
if (_Initalizing) return; if (_Initalizing) return;
@ -862,20 +883,28 @@ namespace Volian.Controls.Library
// cnt.Save(); // cnt.Save();
//} //}
} }
#endregion // C2029-025 Show or hide replace words. Can highlight replace words in editor.
private void cmbShwRplWds_SelectedIndexChanged(object sender, EventArgs e) // new show replace words
private void tbChgID_TextChanged(object sender, EventArgs e)
{ {
// --------
if (_Initalizing) return;
MyEditItem.SaveContents(); MyEditItem.SaveContents();
StepConfig sc = CurItemInfo.MyConfig as StepConfig; StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if the changeID changed, then reset the change bar override if (sc == null) return;
// B2021-029: don't change changeid if the config & text box are both empty MyEditItem.ChangeBarForConfigItemChange = false;
if (sc.Step_ChangeID != tbChgID.Text && sc.Step_ChangeID != null && tbChgID.Text != "") //sc.Step_DisableInitialLine = cbInitialLine.Checked;
{ sc.Step_ShwRplWdsIndex = cmbShwRplWds.SelectedIndex;
sc.Step_ChangeID = tbChgID.Text; MyEditItem.ChangeBarForConfigItemChange = true;
sc.Step_CBOverride = null;
}
//needed to refresh display changing
MyEditItem.RefreshContent();
MyEditItem.SetAllTabs();
} }
#endregion
#region WCNTRN format #region WCNTRN format
// The following supports the Wolf Creek Training format/Responsibility data // The following supports the Wolf Creek Training format/Responsibility data
// off of the High Level Step // off of the High Level Step
@ -998,25 +1027,41 @@ namespace Volian.Controls.Library
} }
//private void txbxAltConActSumText_Leave(object sender, EventArgs e) //B2025-010 PROMS -Fixed issues updating Changeid
//{ // Changed to a Save button instead of onTextChanged
// // User left Atlernate Continuous Action Text field. If text changed, then prompt // Also was issue where sometimes would lave last character / digit (not allowing the change id to be completely removed)
// // to see if save should occur. private void btnSaveChangeID_Click(object sender, EventArgs e)
// StepConfig sc = CurItemInfo.MyConfig as StepConfig; {
// if (sc == null) return; MyEditItem.SaveContents();
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == ""); StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text) // 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 (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) if (sc.Step_ChangeID != tbChgID.Text && (!string.IsNullOrEmpty(sc.Step_ChangeID) || !string.IsNullOrEmpty(tbChgID.Text)))
// { {
// MyEditItem.SaveContents(); sc.Step_ChangeID = tbChgID.Text;
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config sc.Step_CBOverride = null;
// } }
// else }
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
// }
//} //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;
// }
} //}
}
} }

View File

@ -121,6 +121,6 @@
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>36</value> <value>132</value>
</metadata> </metadata>
</root> </root>

View File

@ -1284,9 +1284,9 @@ namespace Volian.Controls.Library
} }
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}"; selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
if (!isFixed) if (!isFixed)
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols
else else
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
selectedRtfSB.Append("\r\n"); selectedRtfSB.Append("\r\n");
// use styles to construct rtf commands to insert into next line (where \b, etc is) // use styles to construct rtf commands to insert into next line (where \b, etc is)
// B2015-134 Hanging Indent with Hard Returns was not being saved- removed \sl-240\slmult0 // B2015-134 Hanging Indent with Hard Returns was not being saved- removed \sl-240\slmult0
@ -1405,7 +1405,7 @@ namespace Volian.Controls.Library
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 "); linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
linkValue = linkValue.Replace(@"{", @"\{"); linkValue = linkValue.Replace(@"{", @"\{");
linkValue = linkValue.Replace(@"}", @"\}"); linkValue = linkValue.Replace(@"}", @"\}");
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }"; SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
this.SelectionLength = 0; this.SelectionLength = 0;
this.SelectionStart = position; this.SelectionStart = position;
FindAllLinks(); FindAllLinks();

View File

@ -1806,7 +1806,7 @@ namespace Volian.Controls.Library
//B20170-158 Don't allow a step to replace a linked step //B20170-158 Don't allow a step to replace a linked step
//B2017-180: The fix for B2017-158 also needed the 'HasEnhancedLinkedStep' to check if the copied step is a source step //B2017-180: The fix for B2017-158 also needed the 'HasEnhancedLinkedStep' to check if the copied step is a source step
// C2017-031: Support for paste/replace an enhanced step, enable button // C2017-031: Support for paste/replace an enhanced step, enable button
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = enable && ((!MyItemInfo.IsEnhancedStep && !MyItemInfo.HasEnhancedLinkedStep) || (MyItemInfo.IsEnhancedStep)); btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = enable;
} }
private void SetPasteButtonEnabled() private void SetPasteButtonEnabled()
{ {
@ -1866,25 +1866,6 @@ namespace Volian.Controls.Library
if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count > 0 && stepToCfg.MyEnhancedDocuments[0].Type != 0) toSourceHasEnhancedLinks = true; if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count > 0 && stepToCfg.MyEnhancedDocuments[0].Type != 0) toSourceHasEnhancedLinks = true;
} }
} }
// enhanced: if 'from' step is not enhanced, only allow paste before/after
if (MyItemInfo.IsHigh && !MyItemInfo.IsEnhancedStep)
{
stepToCfg = MyItemInfo.MyConfig as StepConfig;
if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count > 0 && stepToCfg.MyEnhancedDocuments[0].Type != 0)
{
// Current selected step is source (i.e. has enhanced links to enhanced steps)
// check if 'from' step is non. If so, allow paste before/after but not replace
if (tmp.MyDisplayTabControl.MyCopyStep.IsHigh)
{
StepConfig fromCfg = tmp.MyDisplayTabControl.MyCopyStep.MyConfig as StepConfig;
if (fromCfg != null && (fromCfg.MyEnhancedDocuments==null || fromCfg.MyEnhancedDocuments.Count==0))
{
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = false;
return;
}
}
}
}
//copy item is high level step //copy item is high level step
// Allow a High Level step to be pasted to a sub-step, but not to a table, figure, section or procedure type // Allow a High Level step to be pasted to a sub-step, but not to a table, figure, section or procedure type
if (tmp.MyDisplayTabControl.MyCopyStep.IsHigh && (MyItemInfo.IsTable || MyItemInfo.IsFigure || MyItemInfo.IsSection || MyItemInfo.IsProcedure)) if (tmp.MyDisplayTabControl.MyCopyStep.IsHigh && (MyItemInfo.IsTable || MyItemInfo.IsFigure || MyItemInfo.IsSection || MyItemInfo.IsProcedure))

View File

@ -409,7 +409,7 @@ namespace Volian.Print.Library
else if (cai.Type > 20099) // B2020-054: Always put out 'Equation' (removed checking for null text) else if (cai.Type > 20099) // B2020-054: Always put out 'Equation' (removed checking for null text)
txt = "Equation"; txt = "Equation";
else else
txt = ItemInfo.ConvertToDisplayText(cai.Text); txt = ItemInfo.ConvertToDisplayText(cai.Text).Replace("Go to \u25cf", "Go to ?");
if (MyProc.MyDocVersion.MultiUnitCount > 1) if (MyProc.MyDocVersion.MultiUnitCount > 1)
{ {
System.Xml.XmlNode nd; System.Xml.XmlNode nd;
@ -1570,7 +1570,7 @@ namespace Volian.Print.Library
else if (cai.Type > 20099) else if (cai.Type > 20099)
txt = "Equation"; txt = "Equation";
else else
txt = ItemInfo.ConvertToDisplayText(cai.Text); txt = ItemInfo.ConvertToDisplayText(cai.Text).Replace("Go to \u25cf", "Go to ?");
// Add Parent/Child information if applicable // 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 // We were doing this for the Chronology report so I added the same logic here for the Summary report
if (MyProc.MyDocVersion.MultiUnitCount > 1) if (MyProc.MyDocVersion.MultiUnitCount > 1)