Merge pull request 'C2025-022-Remove-UCF-2' (#606) from C2025-022-Remove-UCF-2 into Development

Good for QA Testing
This commit is contained in:
2025-09-04 06:55:25 -04:00
38 changed files with 72 additions and 3962 deletions

Binary file not shown.

View File

@@ -14765,40 +14765,11 @@ IF (@@Error = 0) PRINT 'StoredProcedure [getJustFormat] Succeeded'
ELSE PRINT 'StoredProcedure [getJustFormat] Error on Creation'
go
-- Remove getFormatNoUCF from DB (UCF) no longer used.
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatNoUCF]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [getFormatNoUCF];
GO
CREATE PROCEDURE [dbo].[getFormatNoUCF]
(
@FormatID int
)
WITH EXECUTE AS OWNER
AS
SELECT
[FormatID],
[ParentID],
[Name],
[Description],
[Data],
[Config],
[GenMac],
[DTS],
[UserID],
[LastChanged],
(SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formats].[FormatID]) [ContentCount],
(SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formats].[FormatID]) [DocVersionCount],
(SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formats].[FormatID]) [FolderCount],
(SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formats].[FormatID]) [ChildCount]
FROM [Formats]
WHERE [FormatID]=@FormatID
RETURN
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'StoredProcedure [getFormatNoUCF] Succeeded'
ELSE PRINT 'StoredProcedure [getFormatNoUCF] Error on Creation'
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_GetItemsMatchingFormatItems]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1)
DROP FUNCTION [vefn_GetItemsMatchingFormatItems];
@@ -14981,100 +14952,10 @@ IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetFolderMatchingFormatItems] Succ
ELSE PRINT 'StoredProcedure [vefn_GetFolderMatchingFormatItems] Error on Creation'
go
-- Remove vesp_ClearOverrideFormatsByFolder (UCF) from DB. No longer used.
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_ClearOverrideFormatsByFolder]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_ClearOverrideFormatsByFolder];
GO
CREATE PROCEDURE [dbo].[vesp_ClearOverrideFormatsByFolder](@FolderID int, @FormatID int, @NewFormatID int)
WITH EXECUTE AS OWNER
AS
BEGIN
DECLARE @ClearedContents TABLE
(
ContentID int
)
DECLARE @ClearedFolders TABLE
(
FolderID int
)
DECLARE @ClearedDocVersions TABLE
(
VersionID int
)
insert into @ClearedContents
select cc.ContentID from (select contentid from contents where formatid is not null) cc
join vefn_GetFolderMatchingFormatItems(@FolderID, @FormatID, @NewFormatID) vi on vi.ContentID = cc.ContentID
-- update any folders & docversions that are using that formatid to clear them, i.e. so they inherit. To do this
-- get lists of folders & docversions that have non-null format ids that should be null.
BEGIN
With Folderz([FolderID], [FormatID]) as
(
select FF.FolderID, FF.FormatID from Folders FF
Where FF.FolderID = @FolderID
UNION ALL
select FF.FolderID, FF.FormatID from Folders FF
Join Folderz ZZ on FF.ParentID = ZZ.FolderID
Where FF.FolderID != @FolderID and (FF.FormatID is null or FF.FormatID = @FormatID or FF.FormatID = @NewFormatID)
)
insert into @ClearedFolders
select ZZ.FolderID
from Folderz ZZ
where ZZ.FormatID is not null and ZZ.FolderID != @FolderID -- don't include folder passed in, only do children (folder is done in code)
OPTION (MAXRECURSION 10000)
END
BEGIN
With Folderz([FolderID]) as
(
select FF.FolderID from Folders FF
Where FF.FolderID = @FolderID
UNION ALL
select FF.FolderID from Folders FF
Join Folderz ZZ on FF.ParentID = ZZ.FolderID
Where FF.FolderID != @FolderID and (FF.FormatID is null or FF.FormatID = @FormatID or FF.FormatID = @NewFormatID)
)
insert into @ClearedDocVersions
select DV.VersionID
from Folderz ZZ
Left Join DocVersions DV ON DV.FolderID = ZZ.FolderID
where VersionID is not null and DV.FormatID is not null and (DV.FormatID = @FormatID or DV.FormatID = @NewFormatID)
OPTION (MAXRECURSION 10000)
END
update Folders set formatid = null where FolderID in (select FolderID from @ClearedFolders)
update DocVersions set formatid = null where VersionID in (select VersionID from @ClearedDocVersions)
-- now update all of the contents that were found
update contents set formatid = null where contentID in (select contentid from @ClearedContents)
select [ContentID],
[Number],
[Text],
[Type],
[FormatID],
[Config],
[DTS],
[UserID],
[LastChanged],
(SELECT COUNT(*) FROM [Details] WHERE [Details].[ContentID]=[Contents].[ContentID]) [DetailCount],
(SELECT COUNT(*) FROM [Entries] WHERE [Entries].[ContentID]=[Contents].[ContentID]) [EntryCount],
(SELECT COUNT(*) FROM [Grids] WHERE [Grids].[ContentID]=[Contents].[ContentID]) [GridCount],
(SELECT COUNT(*) FROM [Images] WHERE [Images].[ContentID]=[Contents].[ContentID]) [ImageCount],
(SELECT COUNT(*) FROM [Items] WHERE [Items].[ContentID]=[Contents].[ContentID]) [ItemCount],
(SELECT COUNT(*) FROM [Parts] WHERE [Parts].[ContentID]=[Contents].[ContentID]) [PartCount],
(SELECT COUNT(*) FROM [RoUsages] WHERE [RoUsages].[ContentID]=[Contents].[ContentID]) [RoUsageCount],
(SELECT COUNT(*) FROM [Transitions] WHERE [Transitions].[FromID]=[Contents].[ContentID]) [TransitionCount],
(SELECT COUNT(*) FROM [ZContents] WHERE [ZContents].[ContentID]=[Contents].[ContentID]) [ZContentCount]
FROM contents where contentid in (select ContentID from @ClearedContents)
RETURN
END
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_ClearOverrideFormatsByFolder Succeeded'
ELSE PRINT 'Procedure Creation: vesp_ClearOverrideFormatsByFolder Error on Creation'
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_ClearOverrideFormatsByDocVersion]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_ClearOverrideFormatsByDocVersion];

View File

@@ -410,17 +410,5 @@ namespace VEPROMS.Properties {
this["VisioPath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int UCFImportOpt {
get {
return ((int)(this["UCFImportOpt"]));
}
set {
this["UCFImportOpt"] = value;
}
}
}
}

View File

@@ -80,11 +80,9 @@
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="cbShwRplWrdsColor" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
@@ -103,8 +101,5 @@
<Setting Name="VisioPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="UCFImportOpt" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -242,12 +242,6 @@
<Compile Include="dlgTransitionReport.designer.cs">
<DependentUpon>dlgTransitionReport.cs</DependentUpon>
</Compile>
<Compile Include="dlgUCFDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgUCFDetail.Designer.cs">
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
</Compile>
<Compile Include="frmAnnotationsCleanup.cs">
<SubType>Form</SubType>
</Compile>
@@ -302,12 +296,6 @@
<Compile Include="frmSI.Designer.cs">
<DependentUpon>frmSI.cs</DependentUpon>
</Compile>
<Compile Include="frmUCF.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmUCF.designer.cs">
<DependentUpon>frmUCF.cs</DependentUpon>
</Compile>
<Compile Include="frmVEPROMS.cs">
<SubType>Form</SubType>
</Compile>
@@ -378,9 +366,6 @@
<EmbeddedResource Include="dlgSetChangeBarStartDate.resx">
<DependentUpon>dlgSetChangeBarStartDate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgUCFDetail.resx">
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAnnotationsCleanup.resx">
<DependentUpon>frmAnnotationsCleanup.cs</DependentUpon>
</EmbeddedResource>
@@ -402,9 +387,6 @@
<EmbeddedResource Include="frmSI.resx">
<DependentUpon>frmSI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmUCF.resx">
<DependentUpon>frmUCF.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmVEPROMS.resx">
<SubType>Designer</SubType>
<DependentUpon>frmVEPROMS.cs</DependentUpon>
@@ -603,8 +585,6 @@
<Content Include="Resources\Save.png" />
<Content Include="Resources\SaveAllHS.png" />
<Content Include="Resources\SaveAs.png" />
<Content Include="UCFDetails.xsl" />
<Content Include="UCFSummary.xsl" />
<Content Include="VEicon.ico" />
<Content Include="veproms.ico" />
<Content Include="Vicon.ico" />

View File

@@ -1309,7 +1309,7 @@ namespace VEPROMS
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
if (si.IsApproved == 1)
{
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0, selectedSlave); // "true tell export to convert ROs and Transitions to text
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text
dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
dlg.ExportItem(xd, pi, "procedure");

View File

@@ -75,9 +75,8 @@ namespace VEPROMS
xa.InnerText = value;
return xa;
}
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0)
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int unitIndex = 0)
{
UCFImportDefaultFromSettings = frset;
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
_MyMode = mode;
MyFolder = folderInfo;
@@ -97,9 +96,8 @@ namespace VEPROMS
FormClosed += RemoveUnit_OnClose;
}
}
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0)
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int unitIndex = 0)
{
UCFImportDefaultFromSettings = frset;
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
_MyMode = mode;
MyDocVersion = docVersionInfo;
@@ -120,9 +118,8 @@ namespace VEPROMS
FormClosed += RemoveUnit_OnClose;
}
}
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0)
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int unitIndex = 0)
{
UCFImportDefaultFromSettings = frset;
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
_MyMode = mode;
MyProcedure = procedureInfo;
@@ -723,28 +720,9 @@ namespace VEPROMS
ImportProcedureNew(xd);
isImported = true;
}
if (isImported && UCFImportCase == E_UCFImportOptions.LoadForSetOnly) UpdateFormatForUCFInSet();
return true;// Import Suceeded
}
private void UpdateFormatForUCFInSet()
{
// this gets called if the UCFImportCase == LoadForSetOnly, i.e. only items in this PROCEDURE Set whose formats point to a
// UCF format should point to the updated (copied) UCF format.
if (renamedUCFFormatId == null) return;
foreach (int key in renamedUCFFormatId.Keys)
{
using (ContentInfoList cil = ContentInfoList.FixFormatIDAfterImport(MyDocVersion.VersionID.ToString(), renamedUCFFormatId[key], key))
{
foreach (ContentInfo ci in cil)
{
using (Content c = ci.Get())
{
ContentInfo.Refresh(c);
}
}
}
}
}
// Added Error Handling to assure that Change Manager is turned-on regardless of success or failure of the import
// B2019-046: improved error handling (added return value & error message)
private bool TryToLoadImportDataDocument()
@@ -1024,8 +1002,6 @@ namespace VEPROMS
c.Save();
}
}
private E_UCFImportOptions UCFImportDefaultFromSettings;
private E_UCFImportOptions UCFImportCase = E_UCFImportOptions.LoadOnlyImported;
Dictionary<string, string> existingCopyFCName = new Dictionary<string, string>();
// note that this is used when importing a folder or a procedure (procedure was added for UCF changes)
private bool LoadFormats(XmlDocument xd, string xmlpath)
@@ -1067,7 +1043,6 @@ namespace VEPROMS
{
existingFC.Add(exFI.Config);
importedFC.Add(config);
conflictingUCFdata = true;
fname.Add(name);
}
else
@@ -1076,22 +1051,6 @@ namespace VEPROMS
}
}
// there is a difference in UCF data, see if user wants sections to use the existing or new ucf data:
if (conflictingUCFdata)
{
// Bring up dialog to allow user to choose how the UCF data is handled:
// Importing of a procedure(s) (names of UCF exist in current DB and in exported DB)
//Case 0 - ignore (don't bring in new UCF)
//Case 1 - bringing in new UCF and not using it
//Case 2 - bringing in new UCF and only using it for imported data
//Case 3 - bringing in new UCF and using it across the board
//Case 4 - bringing in new UCF and using it for the current procedure set (not applicable for procedure sets)
UCFImportCase = UCFImportDefaultFromSettings; // from the options/settings
dlgUCFImportOptions ucfoptDlg = new dlgUCFImportOptions(fname, existingFC, importedFC, UCFImportCase, xmlpath);
DialogResult dr = ucfoptDlg.ShowDialog();
if (dr != DialogResult.OK) return false;
UCFImportCase = ucfoptDlg.UCFImportOptionsCase; // may be reset from dialog.
}
// first see if any of the imported formats have different data. If so,
foreach (XmlNode nd in nl)
{
@@ -1143,102 +1102,12 @@ namespace VEPROMS
// various cases listed above:
if (existingFormat.ContainsKey(name))
{
// if case 0 and this ucf already exists, ignore it:
if (UCFImportCase == E_UCFImportOptions.Ignore) continue;
// if case 1, 2, 4 and the name exists, make a 'copy' of the newly imported format:
// need to add this format - name must be unique so add 'COPY(x) of 'original name'' where x is unique number:
if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly)
{
int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count();
if (count > 0)
{
string origname = name;
name = string.Format("Copy {0} of {1}", count.ToString(), name);
if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly)
{
if (renamedUCFFormatName == null) renamedUCFFormatName = new Dictionary<string, string>();
renamedUCFFormatName.Add(origname, name);
}
}
}
// if case 3, take the existing config data and create in a record whose name is Old(x) of 'original name' (the record
// creation gets done below). Then modify the existing record to have the config data. The result is that any
// sections that used this UCF throughout the database will have the new config data.
if (UCFImportCase == E_UCFImportOptions.LoadUseAll)
{
string savname = name;
int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count();
if (count > 0)
{
name = string.Format("Old {0} of {1}", count.ToString(), name);
}
// update the 'old' record by getting the original config data.
string savdesc = null;
DateTime savdts = DateTime.Now;
string savuid = null;
int savpar = 0;
string savconfig = null;
using (Format origRecord = Format.Get(existingFormat[savname]))
{
savdesc = origRecord.Description;
savdts = origRecord.DTS;
savuid = origRecord.UserID;
savpar = origRecord.ParentID;
savconfig = origRecord.Config;
origRecord.Name = savname;
origRecord.Description = description;
origRecord.DTS = dts;
origRecord.UserID = userid;
origRecord.MyParent = pformat;
origRecord.Config = config;
origRecord.Save();
description = savdesc;
dts = savdts;
userid = savuid;
pformat = Format.Get(savpar);
config = savconfig;
}
}
}
if (UCFImportCase == 0) // ignore it
{
importedFormat.Add(formatid, name);
}
else
{
Format rec = Format.MakeFormat(pformat, name, description, null, null, dts, userid);
rec.Config = config;
rec.Save();
if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadUseAll) // don't reset format id (case 1 don't use it, case 3 copies new data into original record
importedFormat.Add(formatid, name);
else if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) // case 2 uses it for any items imported, case 4 uses it for any sections within current set
{
existingFormat.Add(name, rec.FormatID); // change to original name?
importedFormat.Add(rec.FormatID, name);
// get format id for the original named format
if (UCFImportCase == E_UCFImportOptions.LoadForSetOnly && renamedUCFFormatName != null)
{
int origformatid = -1;
foreach (var kvp in renamedUCFFormatName)
{
if (kvp.Value == name)
{
origformatid = existingFormat[kvp.Key];
break;
}
}
if (origformatid != -1)
{
if (renamedUCFFormatId == null) renamedUCFFormatId = new Dictionary<int, int>();
renamedUCFFormatId.Add(rec.FormatID, origformatid);
}
}
}
}
importedFormat.Add(formatid, name);
}
FormatInfoList.Reset();
return true;

View File

@@ -21,7 +21,7 @@ namespace VEPROMS
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex)
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, ( unitIndex))
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_ExportBothConvertedandNot = true;
@@ -29,7 +29,7 @@ namespace VEPROMS
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
}
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex)
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (unitIndex))
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_ExportBothConvertedandNot = true;
@@ -37,7 +37,7 @@ namespace VEPROMS
FormClosed += OnClose;
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
}
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex)
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (unitIndex))
{
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
_ExportBothConvertedandNot = true;

View File

@@ -1,61 +0,0 @@
namespace VEPROMS
{
partial class dlgUCFDetail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.wbBrDet = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// wbBrDet
//
this.wbBrDet.Dock = System.Windows.Forms.DockStyle.Fill;
this.wbBrDet.Location = new System.Drawing.Point(0, 0);
this.wbBrDet.MinimumSize = new System.Drawing.Size(20, 20);
this.wbBrDet.Name = "wbBrDet";
this.wbBrDet.Size = new System.Drawing.Size(897, 445);
this.wbBrDet.TabIndex = 0;
//
// dlgUCFDetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(897, 445);
this.Controls.Add(this.wbBrDet);
this.Name = "dlgUCFDetail";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "User Control of Format Details";
this.Load += new System.EventHandler(this.dlgUCFDetail_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.WebBrowser wbBrDet;
}
}

View File

@@ -1,77 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.IO;
using System.Xml.Xsl;
namespace VEPROMS
{
public partial class dlgUCFDetail : Form
{
private string MyFormatConfig;
private string UCFName;
private string Description;
// This brings up the dialog for displaying the details of what is contained in this User Control of Format
// as defined by the formatConfig. It uses XSL to display the xml. The XSL can be found in UCFDetails.xsl.
// The result is displayed in a web browser control on the dialog.
public dlgUCFDetail(string formatConfig, string name, string desc)
{
MyFormatConfig = formatConfig;
UCFName = name;
Description = desc;
InitializeComponent();
}
private void AddAttribute(XmlNode xn, string name, object value)
{
XmlAttribute xa = xn.OwnerDocument.CreateAttribute(name);
xa.Value = value.ToString();
xn.Attributes.Append(xa);
}
private void dlgUCFDetail_Load(object sender, EventArgs e)
{
try
{
//need to add the UCF name & description to this:
XmlDocument xd = new XmlDocument();
xd.LoadXml(MyFormatConfig);
XmlNodeList xnl = xd.GetElementsByTagName("FormatConfig");
if (xnl != null && xnl.Count > 0)
{
AddAttribute(xnl[0], "Name", UCFName);
AddAttribute(xnl[0], "Description", Description);
}
string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFDetails.xsl");
StringWriter sw = new StringWriter();
StringWriter xsw = new StringWriter();
using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary)))
{
XmlTextWriter tx = new XmlTextWriter(xsw);
xd.WriteTo(tx);
string tmp = sw.ToString();
tmp = xd.InnerXml;
using (XmlReader xri = XmlReader.Create(new StringReader(tmp)))
{
using (XmlWriter xwo = XmlWriter.Create(sw))
{
XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load(xrt);
xsl.Transform(xri, xwo); // Perform Transform
}
this.wbBrDet.DocumentText = sw.ToString();
}
}
}
catch (Exception ex)
{
MessageBox.Show("Problem occurred displaying the details.", "UCF Warning", MessageBoxButtons.OK);
}
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -128,7 +128,7 @@ namespace VEPROMS
private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null;
private StageInfoList myStageInfoList = null;
private LocalStageInfoList myLocalStageInfoList = null;
private int? _cmbxformatOriginal = null;
private void frmFolderProperties_Load(object sender, EventArgs e)
{
_Initializing = true;
@@ -149,7 +149,7 @@ namespace VEPROMS
ppCmbxFormat.DisplayMember = "FullName";
ppCmbxFormat.ValueMember = "FullName";
ppCmbxFormat.DataSource = FormatUtility.GetFilteredFormatList(FormatInfoList.SortedFormatInfoList);
if (_FolderConfig != null && _FolderConfig.MyFolder != null) _cmbxformatOriginal = _FolderConfig.MyFolder.FormatID;
if (_FolderConfig.FormatSelection != null)
{
ppCmbxFormat.SelectedValue = _FolderConfig.FormatSelection;
@@ -337,24 +337,7 @@ namespace VEPROMS
btnAnnoTypeUndo.PerformClick();
//if (btnAnnoTypeSave.Enabled) return;
folderConfigBindingSource.EndEdit();
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
if (_FolderConfig.MyFolder.FormatID != _cmbxformatOriginal)
{
// clean up & then refresh the configs
using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByFolder(_FolderConfig.MyFolder.FolderID, _cmbxformatOriginal, _FolderConfig.MyFolder.FormatID))
{
foreach (ContentInfo ci in cil)
{
using (Content c = ci.Get())
{
// first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen
// and if configs aren't done first, the screen refresh, if based on config data, will not be correct.
foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig();
ContentInfo.Refresh(c);
}
}
}
}
// Save Default settings for User
//
// Save whether we should display the default values on this property page

View File

@@ -120,7 +120,7 @@ namespace VEPROMS
PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat;
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
// C2020-003 use the _CheckOffIndex dictionary to get and save the index of the selected checkoff from the sorted checkoff list
// B2020-039: Added the check for a valid selected index so that crash doesn't occur
if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && maxindx > 1)
@@ -796,7 +796,7 @@ namespace VEPROMS
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
if (chkoffList != null) chkoffList.Sort(CompareCheckoffUsingOrderBy); // C2020-003 sort the checkoff list via the Index and/or OrderBy elements
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
// B2019-013: was crashing on indexer of checkofflist. If there were UCF checkoffs but none in original format, the indexer
// was failing for index of 0 (indexer code went through index attribute of xml and was returning null even though there
// were items in list).

View File

@@ -1211,7 +1211,6 @@ namespace VEPROMS
this.cbUCFLForSetOnly.Size = new System.Drawing.Size(105, 19);
this.cbUCFLForSetOnly.TabIndex = 5;
this.cbUCFLForSetOnly.Text = "Load For Set Only";
this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged);
//
// cbUCFLUseAll
//
@@ -1227,7 +1226,6 @@ namespace VEPROMS
this.cbUCFLUseAll.Size = new System.Drawing.Size(105, 19);
this.cbUCFLUseAll.TabIndex = 4;
this.cbUCFLUseAll.Text = "Load Use All";
this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged);
//
// cbUCFLOnlyImport
//
@@ -1243,7 +1241,6 @@ namespace VEPROMS
this.cbUCFLOnlyImport.Size = new System.Drawing.Size(105, 19);
this.cbUCFLOnlyImport.TabIndex = 3;
this.cbUCFLOnlyImport.Text = "Load Only Imported";
this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged);
//
// cbUCFLNotUsed
//
@@ -1259,7 +1256,6 @@ namespace VEPROMS
this.cbUCFLNotUsed.Size = new System.Drawing.Size(88, 19);
this.cbUCFLNotUsed.TabIndex = 2;
this.cbUCFLNotUsed.Text = "Load Not Used";
this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged);
//
// cbUCFIgnore
//
@@ -1275,7 +1271,6 @@ namespace VEPROMS
this.cbUCFIgnore.Size = new System.Drawing.Size(67, 19);
this.cbUCFIgnore.TabIndex = 1;
this.cbUCFIgnore.Text = "Ignore";
this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged);
//
// btnReset
//

View File

@@ -75,24 +75,6 @@ namespace VEPROMS
cbEnhancedDocumentSync.Checked = Settings.Default.SyncEnhancedDocuments;
cbSeparateWindows.Checked = Settings.Default.SeparateWindows;
txbxVisioPath.Text = Settings.Default.VisioPath;
switch (Settings.Default.UCFImportOpt) // see dlgExportImport for descripton of these options.
{
case 0:
cbUCFIgnore.Checked = true;
break;
case 1:
cbUCFLNotUsed.Checked = true;
break;
case 2:
cbUCFLOnlyImport.Checked = true;
break;
case 3:
cbUCFLUseAll.Checked = true;
break;
case 4:
cbUCFLForSetOnly.Checked = true;
break;
}
//CSM - C2024-031 - Getting User Settings
//and set checkboxes based on what they are set to
@@ -118,6 +100,7 @@ namespace VEPROMS
Settings.Default.PastePlainText = cbPastePlainText.Checked;
}
}
private void cbPasteNoReturns_CheckedChanged(object sender, EventArgs e)
{
if (!_initializing)
@@ -193,7 +176,6 @@ namespace VEPROMS
private bool ss_SyncEnhancedDocuments;
private bool ss_SeparateWindows;
private string ss_VisioPath;
private int ss_UCFImportOpt;
private void SaveStartingSettings()
{
@@ -210,7 +192,6 @@ namespace VEPROMS
ss_SyncEnhancedDocuments = Settings.Default.SyncEnhancedDocuments;
ss_SeparateWindows = Settings.Default.SeparateWindows;
ss_VisioPath = Settings.Default.VisioPath;
ss_UCFImportOpt = Settings.Default.UCFImportOpt;
}
private void RestoreStartingSettings() // used with the cancel button
@@ -227,7 +208,6 @@ namespace VEPROMS
Settings.Default.SyncEnhancedDocuments = ss_SyncEnhancedDocuments;
Settings.Default.SeparateWindows = ss_SeparateWindows;
Settings.Default.VisioPath = ss_VisioPath;
Settings.Default.UCFImportOpt = ss_UCFImportOpt;
}
@@ -315,45 +295,7 @@ namespace VEPROMS
Settings.Default.VisioPath = txbxVisioPath.Text;
}
private void cbUCFIgnore_CheckedChanged(object sender, EventArgs e)
{
if (!_initializing)
{
Settings.Default.UCFImportOpt = 0;
}
}
private void cbUCFLNotUsed_CheckedChanged(object sender, EventArgs e)
{
if (!_initializing)
{
Settings.Default.UCFImportOpt = 1;
}
}
private void cbUCFLOnlyImport_CheckedChanged(object sender, EventArgs e)
{
if (!_initializing)
{
Settings.Default.UCFImportOpt = 2;
}
}
private void cbUCFLUseAll_CheckedChanged(object sender, EventArgs e)
{
if (!_initializing)
{
Settings.Default.UCFImportOpt = 3;
}
}
private void cbUCFLForSetOnly_CheckedChanged(object sender, EventArgs e)
{
if (!_initializing)
{
Settings.Default.UCFImportOpt = 4;
}
}
private void cbOTRemember_CheckedChanged(object sender, EventArgs e)
{
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbShwRplWrdsColor.Checked;

File diff suppressed because it is too large Load Diff

View File

@@ -1,287 +0,0 @@
namespace VEPROMS
{
partial class frmUCF
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
//protected override void Dispose(bool disposing)
//{
// if (disposing && (components != null))
// {
// components.Dispose();
// }
// base.Dispose(disposing);
//}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.PGpanelBtm = new System.Windows.Forms.Panel();
this.btnSave = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnSaveAs = new System.Windows.Forms.Button();
this.lblPGItem = new System.Windows.Forms.Label();
this.btnSaveClose = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.PG = new System.Windows.Forms.PropertyGrid();
this.pnlFormatList = new System.Windows.Forms.Panel();
this.tbUCFSummary = new System.Windows.Forms.TextBox();
this.btnDetails = new System.Windows.Forms.Button();
this.lblSummary = new System.Windows.Forms.Label();
this.lblDerivedFrom = new System.Windows.Forms.Label();
this.lblDerFrom = new System.Windows.Forms.Label();
this.cbxFormatList = new System.Windows.Forms.ComboBox();
this.lblFormatList = new System.Windows.Forms.Label();
this.PGpanelBtm.SuspendLayout();
this.pnlFormatList.SuspendLayout();
this.SuspendLayout();
//
// PGpanelBtm
//
this.PGpanelBtm.Controls.Add(this.btnSave);
this.PGpanelBtm.Controls.Add(this.btnDelete);
this.PGpanelBtm.Controls.Add(this.btnReset);
this.PGpanelBtm.Controls.Add(this.btnSaveAs);
this.PGpanelBtm.Controls.Add(this.lblPGItem);
this.PGpanelBtm.Controls.Add(this.btnSaveClose);
this.PGpanelBtm.Controls.Add(this.btnCancel);
this.PGpanelBtm.Dock = System.Windows.Forms.DockStyle.Bottom;
this.PGpanelBtm.Location = new System.Drawing.Point(0, 560);
this.PGpanelBtm.Name = "PGpanelBtm";
this.PGpanelBtm.Size = new System.Drawing.Size(614, 68);
this.PGpanelBtm.TabIndex = 0;
//
// btnSave
//
this.btnSave.Dock = System.Windows.Forms.DockStyle.Right;
this.btnSave.Enabled = false;
this.btnSave.Location = new System.Drawing.Point(164, 0);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 68);
this.btnSave.TabIndex = 6;
this.btnSave.Text = "Save";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Visible = false;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnDelete
//
this.btnDelete.Dock = System.Windows.Forms.DockStyle.Right;
this.btnDelete.Enabled = false;
this.btnDelete.Location = new System.Drawing.Point(239, 0);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(75, 68);
this.btnDelete.TabIndex = 5;
this.btnDelete.Text = "Delete";
this.btnDelete.UseVisualStyleBackColor = true;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnReset
//
this.btnReset.Dock = System.Windows.Forms.DockStyle.Right;
this.btnReset.Enabled = false;
this.btnReset.Location = new System.Drawing.Point(314, 0);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(75, 68);
this.btnReset.TabIndex = 4;
this.btnReset.Text = "Reset";
this.btnReset.UseVisualStyleBackColor = true;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
// btnSaveAs
//
this.btnSaveAs.Dock = System.Windows.Forms.DockStyle.Right;
this.btnSaveAs.Enabled = false;
this.btnSaveAs.Location = new System.Drawing.Point(389, 0);
this.btnSaveAs.Name = "btnSaveAs";
this.btnSaveAs.Size = new System.Drawing.Size(75, 68);
this.btnSaveAs.TabIndex = 3;
this.btnSaveAs.Text = "Save As";
this.btnSaveAs.UseVisualStyleBackColor = true;
this.btnSaveAs.Click += new System.EventHandler(this.btnSaveAs_Click);
//
// lblPGItem
//
this.lblPGItem.AutoSize = true;
this.lblPGItem.Location = new System.Drawing.Point(39, 20);
this.lblPGItem.Name = "lblPGItem";
this.lblPGItem.Size = new System.Drawing.Size(46, 17);
this.lblPGItem.TabIndex = 2;
this.lblPGItem.Text = "label1";
this.lblPGItem.Visible = false;
//
// btnSaveClose
//
this.btnSaveClose.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnSaveClose.Dock = System.Windows.Forms.DockStyle.Right;
this.btnSaveClose.Enabled = false;
this.btnSaveClose.Location = new System.Drawing.Point(464, 0);
this.btnSaveClose.Name = "btnSaveClose";
this.btnSaveClose.Size = new System.Drawing.Size(75, 68);
this.btnSaveClose.TabIndex = 1;
this.btnSaveClose.Text = "Save and Close";
this.btnSaveClose.UseVisualStyleBackColor = true;
this.btnSaveClose.Click += new System.EventHandler(this.btnSaveClose_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Dock = System.Windows.Forms.DockStyle.Right;
this.btnCancel.Location = new System.Drawing.Point(539, 0);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 68);
this.btnCancel.TabIndex = 0;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// PG
//
this.PG.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.PG.Font = new System.Drawing.Font("Arial Rounded MT Bold", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.PG.LineColor = System.Drawing.SystemColors.ControlDark;
this.PG.Location = new System.Drawing.Point(0, 155);
this.PG.Name = "PG";
this.PG.Size = new System.Drawing.Size(614, 405);
this.PG.TabIndex = 1;
//
// pnlFormatList
//
this.pnlFormatList.Controls.Add(this.tbUCFSummary);
this.pnlFormatList.Controls.Add(this.btnDetails);
this.pnlFormatList.Controls.Add(this.lblSummary);
this.pnlFormatList.Controls.Add(this.lblDerivedFrom);
this.pnlFormatList.Controls.Add(this.lblDerFrom);
this.pnlFormatList.Controls.Add(this.cbxFormatList);
this.pnlFormatList.Controls.Add(this.lblFormatList);
this.pnlFormatList.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlFormatList.Location = new System.Drawing.Point(0, 0);
this.pnlFormatList.Name = "pnlFormatList";
this.pnlFormatList.Size = new System.Drawing.Size(614, 149);
this.pnlFormatList.TabIndex = 3;
//
// tbUCFSummary
//
this.tbUCFSummary.BackColor = System.Drawing.SystemColors.Control;
this.tbUCFSummary.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tbUCFSummary.Location = new System.Drawing.Point(33, 120);
this.tbUCFSummary.Name = "tbUCFSummary";
this.tbUCFSummary.Size = new System.Drawing.Size(485, 15);
this.tbUCFSummary.TabIndex = 7;
//
// btnDetails
//
this.btnDetails.Location = new System.Drawing.Point(539, 112);
this.btnDetails.Name = "btnDetails";
this.btnDetails.Size = new System.Drawing.Size(63, 33);
this.btnDetails.TabIndex = 6;
this.btnDetails.Text = "Details";
this.btnDetails.UseVisualStyleBackColor = true;
this.btnDetails.Visible = false;
this.btnDetails.Click += new System.EventHandler(this.btnDetails_Click);
//
// lblSummary
//
this.lblSummary.AutoSize = true;
this.lblSummary.Location = new System.Drawing.Point(5, 96);
this.lblSummary.Name = "lblSummary";
this.lblSummary.Size = new System.Drawing.Size(71, 17);
this.lblSummary.TabIndex = 4;
this.lblSummary.Text = "Summary:";
this.lblSummary.Visible = false;
//
// lblDerivedFrom
//
this.lblDerivedFrom.AutoSize = true;
this.lblDerivedFrom.Location = new System.Drawing.Point(33, 75);
this.lblDerivedFrom.Name = "lblDerivedFrom";
this.lblDerivedFrom.Size = new System.Drawing.Size(0, 17);
this.lblDerivedFrom.TabIndex = 3;
this.lblDerivedFrom.Visible = false;
//
// lblDerFrom
//
this.lblDerFrom.AutoSize = true;
this.lblDerFrom.Location = new System.Drawing.Point(3, 52);
this.lblDerFrom.Name = "lblDerFrom";
this.lblDerFrom.Size = new System.Drawing.Size(97, 17);
this.lblDerFrom.TabIndex = 2;
this.lblDerFrom.Text = "Derived From:";
this.lblDerFrom.Visible = false;
//
// cbxFormatList
//
this.cbxFormatList.FormattingEnabled = true;
this.cbxFormatList.Location = new System.Drawing.Point(23, 25);
this.cbxFormatList.Name = "cbxFormatList";
this.cbxFormatList.Size = new System.Drawing.Size(550, 24);
this.cbxFormatList.Sorted = true;
this.cbxFormatList.TabIndex = 1;
this.cbxFormatList.SelectedIndexChanged += new System.EventHandler(this.cbxFormatList_SelectedIndexChanged);
//
// lblFormatList
//
this.lblFormatList.AutoSize = true;
this.lblFormatList.Location = new System.Drawing.Point(5, 4);
this.lblFormatList.Name = "lblFormatList";
this.lblFormatList.Size = new System.Drawing.Size(115, 17);
this.lblFormatList.TabIndex = 0;
this.lblFormatList.Text = "Selected Format:";
//
// frmUCF
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(614, 628);
this.Controls.Add(this.pnlFormatList);
this.Controls.Add(this.PG);
this.Controls.Add(this.PGpanelBtm);
this.Name = "frmUCF";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "User Control of Format";
this.Load += new System.EventHandler(this.frmUCF_Load);
this.PGpanelBtm.ResumeLayout(false);
this.PGpanelBtm.PerformLayout();
this.pnlFormatList.ResumeLayout(false);
this.pnlFormatList.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel PGpanelBtm;
private System.Windows.Forms.Button btnSaveClose;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.PropertyGrid PG;
private System.Windows.Forms.Panel pnlFormatList;
private System.Windows.Forms.Label lblFormatList;
private System.Windows.Forms.ComboBox cbxFormatList;
private System.Windows.Forms.Label lblPGItem;
private System.Windows.Forms.Button btnSaveAs;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Label lblDerivedFrom;
private System.Windows.Forms.Label lblDerFrom;
private System.Windows.Forms.Button btnDetails;
private System.Windows.Forms.Label lblSummary;
private System.Windows.Forms.TextBox tbUCFSummary;
private System.Windows.Forms.Button btnSave;
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -269,8 +269,6 @@ namespace VEPROMS
return true;
}
private E_UCFImportOptions _UCFImportOptionsFromSettings;
public frmVEPROMS()
{
// The following Try/Catch was added to protect against a problem seen by Kathy and Michelle
@@ -724,7 +722,7 @@ namespace VEPROMS
}
else
{
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter
dlg.ShowDialog(this);
MySessionInfo.CheckInItem(ownerid);
@@ -778,7 +776,7 @@ namespace VEPROMS
else
{
dlgExportImport dlg = new dlgExportImport("Import", dvi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter
dlgExportImport dlg = new dlgExportImport("Import", dvi, this);//Added frmVEPROMS Parameter
dlg.MyNewProcedure = null;
dlg.ExternalTransitionItem = null;
dlg.ShowDialog(this);
@@ -820,7 +818,7 @@ namespace VEPROMS
else
{
dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter
dlgExportImport dlg = new dlgExportImport("Export", pi, this);//Added frmVEPROMS Parameter
dlg.ShowDialog(this);
MySessionInfo.CheckInItem(ownerid);
@@ -2010,10 +2008,9 @@ namespace VEPROMS
private DevComponents.DotNetBar.ButtonItem btnAdministrativeTools;
private DevComponents.DotNetBar.ButtonItem btnSecurity;
private DevComponents.DotNetBar.ButtonItem btnFormats;
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormats;
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsExport;
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsImport;
private DevComponents.DotNetBar.ButtonItem btnGeneralTools;
private TabItemsToClose _MyCloseTabList = new TabItemsToClose();
public TabItemsToClose MyCloseTabList
@@ -2203,45 +2200,15 @@ namespace VEPROMS
InitializeSecurity();
UpdateUser();
//btnSecurity = new ButtonItem("btnSecurity", "Security"); // C2019-002: move security & format items into submenus
//btnFormats = new ButtonItem("btnFormats", "Formats");
//btnAdmin.SubItems.Add(btnSecurity);
//btnAdmin.SubItems.Add(btnFormats);
//btnUserControlOfFormats = new ButtonItem("btnUserControlOfFormats", "User Control of Formats");
//btnFormats.SubItems.Add(btnUpdateFormats);
//btnFormats.SubItems.Add(btnUserControlOfFormats);
//btnUserControlOfFormats.Click += new EventHandler(btnUserControlOfFormats_Click);
//btnUserControlOfFormatsExport = new ButtonItem("btnUserControlOfFormatsExport", "Export User Control of Formats");
//btnFormats.SubItems.Add(btnUserControlOfFormatsExport);
//btnUserControlOfFormatsExport.Click += new EventHandler(btnUserControlOfFormatsExport_Click);
//btnUserControlOfFormatsImport = new ButtonItem("btnUserControlOfFormatsImport", "Import User Control of Formats");
//btnFormats.SubItems.Add(btnUserControlOfFormatsImport);
//btnUserControlOfFormatsImport.Click += new EventHandler(btnUserControlOfFormatsImport_Click);
//btnManageSecurity = new ButtonItem("btnManageSecurity", "Manage Security");
//btnSecurity.SubItems.Add(btnManageSecurity);
//btnManageSecurity.Click += new EventHandler(btnManageSecurity_Click);
btnSecurity = new ButtonItem("btnSecurity", "Security"); // C2019-002: move security & format items into submenus
btnFormats = new ButtonItem("btnFormats", "Formats");
btnAdmin.SubItems.Add(btnSecurity);
// btnAdmin.SubItems.Add(btnFormats); // C2024 - 041 remove from Admin(V button) menu
btnAdmin.SubItems.Add(btnUpdateFormats); // C2024 - 041 remove from Admin(V button) menu
btnUserControlOfFormats = new ButtonItem("btnUserControlOfFormats", "User Control of Formats");
//btnFormats.SubItems.Add(btnUpdateFormats);
//btnFormats.SubItems.Add(btnUserControlOfFormats); // C2024-041 remove from Admin (V button) menu
btnUserControlOfFormats.Click += new EventHandler(btnUserControlOfFormats_Click);
btnUserControlOfFormatsExport = new ButtonItem("btnUserControlOfFormatsExport", "Export User Control of Formats");
//btnFormats.SubItems.Add(btnUserControlOfFormatsExport); // C2024-041 remove from Admin (V button) menu
btnUserControlOfFormatsExport.Click += new EventHandler(btnUserControlOfFormatsExport_Click);
btnUserControlOfFormatsImport = new ButtonItem("btnUserControlOfFormatsImport", "Import User Control of Formats");
//btnFormats.SubItems.Add(btnUserControlOfFormatsImport); // C2024-041 remove from Admin (V button) menu
btnUserControlOfFormatsImport.Click += new EventHandler(btnUserControlOfFormatsImport_Click);
btnManageSecurity = new ButtonItem("btnManageSecurity", "Manage Security");
btnSecurity.SubItems.Add(btnManageSecurity);
btnManageSecurity.Click += new EventHandler(btnManageSecurity_Click);
//added by jcb: menu item to reset security requires password to implement
btnResetSecurity = new ButtonItem("btnResetSecurity", "Reset Security");
btnSecurity.SubItems.Add(btnResetSecurity);
@@ -2264,8 +2231,6 @@ namespace VEPROMS
// C2025-031 added tool tip messages
this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", "", "Add, Modify, and Delete PROMS User Access", null, null, eTooltipColor.Gray));
// remove commented out line below when User Control of Formats code is deleted
//this.superTooltip1.SetSuperTooltip(btnUserControlOfFormats, new SuperTooltipInfo("User Control Of Formats", null, null, null, null, eTooltipColor.Gray));
this.superTooltip1.SetSuperTooltip(btnResetSecurity, new SuperTooltipInfo("Reset Security", "", "WARNING this will \nREMOVE ALL PROMS USERS and Reset to the\nOriginal Volian Defaults", null, null, eTooltipColor.Gray));
this.superTooltip1.SetSuperTooltip(btnAdministrativeTools, new SuperTooltipInfo("Administrative Tools", "", "Open the PROMS Adminstration Tools Window", null, null, eTooltipColor.Gray));
this.superTooltip1.SetSuperTooltip(btnUpdateFormats, new SuperTooltipInfo("Update Formats", "", "Install New Formats \n or Re-Install Formats", null, null, eTooltipColor.Gray));
@@ -2307,9 +2272,6 @@ namespace VEPROMS
bool isVisible = MyUserInfo.IsAdministrator();
btnUserControlOfFormats.Visible = isVisible;
btnUserControlOfFormatsExport.Visible = isVisible;
btnUserControlOfFormatsImport.Visible = isVisible;
btnManageSecurity.Visible = isVisible;
btnUpdateFormats.Visible = isVisible;
btnResetSecurity.Visible = isVisible;
@@ -3154,32 +3116,6 @@ namespace VEPROMS
}
}
void btnUserControlOfFormats_Click(object sender, EventArgs e)
{
frmUCF frmucf = new frmUCF();
DialogResult dr = frmucf.ShowDialog(this);
}
void btnUserControlOfFormatsExport_Click(object sender, EventArgs e)
{
DocVersionInfo dvi = null;
dlgExportImport dlg = new dlgExportImport("Export Formats", dvi, this, (E_UCFImportOptions)0);
dlg.MyNewProcedure = null;
dlg.ExternalTransitionItem = null;
dlg.ShowDialog(this);
}
void btnUserControlOfFormatsImport_Click(object sender, EventArgs e)
{
DocVersionInfo dvi = null;
dlgExportImport dlg = new dlgExportImport("Import Formats", dvi, this, (E_UCFImportOptions)0);
dlg.MyNewProcedure = null;
dlg.ExternalTransitionItem = null;
dlg.ShowDialog(this);
}
void btnManageSecurity_Click(object sender, EventArgs e)
{
dlgManageSecurity dlg = new dlgManageSecurity();
@@ -5397,3 +5333,11 @@ namespace VEPROMS
}
}

View File

@@ -213,14 +213,7 @@ namespace VEPROMS.CSLA.Library
[TypeConverter(typeof(ExpandableObjectConverter))]
public class Flags
{
private bool? _CheckOffUCF;
[DisplayName("UCF CheckOffs")]
[Description("Additional UCF Check Offs and Sign Offs")]
public bool? CheckOffUCF
{
get { return _CheckOffUCF; }
set { _CheckOffUCF = value; }
}
private bool? _PartialStepCompression;
[DisplayName("Partial Step Compression")]
[Description("Automatically compress last sub-steps to fit on page")]
@@ -272,41 +265,7 @@ namespace VEPROMS.CSLA.Library
}
#endregion ReplaceStrData
#region ReplaceStr
[Flags]
public enum E_ReplaceFlagsUCF : uint
{
High = 0x0001, // Do ReplaceWords in HIGH LEVEL STEPS
RNO = 0x0002, // Do ReplaceWords in RNOS
Caution = 0x0004, // Do ReplaceWords in CAUTIONS
Note = 0x0008, // Do ReplaceWords in NOTES
Table = 0x0010, // Do ReplaceWords in TABLES
Substep = 0x0020, // Do ReplaceWords in SUBSTEPS
Attach = 0x0040, // Do ReplaceWords in ATTACHMENTS
Bkgd = 0x0080, // Do ReplaceWords in BACKGROUNDS
DiffUnit = 0x0100, // Do ReplaceWords ONLY for different UNIT #
TOC = 0x0200, // Do in auto table-of-contents
StatTree = 0x0400,
HLSSetpnt = 0x0800, // Do ReplaceWords in HighLevelStep SETPoiNTs
Trans = 0x1000, // Do ReplaceWords in TRANSITIONS
Setpoint = 0x2000, // Do ReplaceWords in SETPOINTS
// Case Sensitivity Flags - default is off (Case Sensitive Replace)
CaseInsens = 0x0000C000, // Do ReplaceWords for all words thatmatch, regardless of case,
// and replace with the ReplaceWith string as is
// B2019-022: do not support CaseInsensFirst & CaseInsensAll - there is no supporting replace word code:
//CaseInsensFirst = 0x4000, // Do ReplaceWords for all words thatexactly match the ReplaceWord,
// except the case of the first character may be different
//CaseInsensAll = 0x8000, // Do ReplaceWords for all words that match the ReplaceWord, regardless of case
Partials = 0x10000, // Do replace even on partial matches
Plackeep = 0x20000, // Do replace in PlaceKeepers
InSecTitle = 0x40000,
BeforeTrans = 0x80000, // Only do replace if the string occurs immediately before a transition.
BeforeList = 0x100000, // C2021-045 Only if the text ends with a colon ":"
PageList = 0x200000, // F2021-053 Do replace words for PageList items that are ROs
FirstWord = 0x400000, // C2021-056 Do only if is the first word in the text
NotInRO = 0x800000 // B2022-015 BNPPalr: Determine whether RO text should have Replace Words applied
}
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ReplaceStr
@@ -319,15 +278,7 @@ namespace VEPROMS.CSLA.Library
get { return _State; }
set { _State = value; }
}
private E_ReplaceFlagsUCF _Flag;
[Editor(typeof(FlagEnumUIEditor), typeof(System.Drawing.Design.UITypeEditor))]
[XmlAttribute("Flag")]
[DisplayName("Flags (Use In)")] // Note that [Description] is not used in collection items (that use collection editor)
public E_ReplaceFlagsUCF Flag
{
get { return (E_ReplaceFlagsUCF)_Flag; }
set { _Flag = value; }
}
private string _ReplaceWord;
[XmlAttribute("ReplaceWord")]
[DisplayName("Replace Word")]
@@ -341,7 +292,6 @@ namespace VEPROMS.CSLA.Library
}
}
private string _ReplaceWith;
[Editor(typeof(RtfEditor), typeof(System.Drawing.Design.UITypeEditor))]
[XmlAttribute("ReplaceWith")]
[DisplayName("With")]

View File

@@ -1755,165 +1755,6 @@ namespace VEPROMS.CSLA.Library
#endregion
#region UCF Fix FormatId After Import
private class FixFormatIDAfterImportCriteria
{
private string _DocVersionList;
public string DocVersionList
{
get { return _DocVersionList; }
set { _DocVersionList = value; }
}
private int _OldFormatID;
public int OldFormatID
{
get { return _OldFormatID; }
set { _OldFormatID = value; }
}
private int _NewFormatID;
public int NewFormatID
{
get { return _NewFormatID; }
set { _NewFormatID = value; }
}
public FixFormatIDAfterImportCriteria(string dvlst, int oldfid, int newfid)
{
_DocVersionList = dvlst;
_OldFormatID = oldfid;
_NewFormatID = newfid;
}
}
private void DataPortal_Fetch(FixFormatIDAfterImportCriteria criteria)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_UpdateVersionFormatForUCF";
cm.Parameters.AddWithValue("@VersionList", criteria.DocVersionList);
cm.Parameters.AddWithValue("@OldFormatID", criteria.OldFormatID);
cm.Parameters.AddWithValue("@NewFormatID", criteria.NewFormatID);
cm.CommandTimeout = Database.DefaultTimeout;
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{
IsReadOnly = false;
while (dr.Read())
{
ContentInfo contentInfo = new ContentInfo(dr);
this.Add(contentInfo);
}
IsReadOnly = true;
}
}
}
}
catch (Exception ex)
{
Database.LogException("FixFormatIDAfterImport.DataPortal_Fetch", ex);
throw new DbCslaException("FixFormatIDAfterImport.DataPortal_Fetch", ex);
}
}
public static ContentInfoList FixFormatIDAfterImport(string dvlst, int oldfid, int newfid)
{
try
{
ContentInfoList tmp = DataPortal.Fetch<ContentInfoList>(new FixFormatIDAfterImportCriteria(dvlst, oldfid, newfid));
return tmp;
}
catch (Exception ex)
{
throw new DbCslaException("Error on ContentInfoList.FixFormatIDAfterImport", ex);
}
}
#endregion
#region UCF Clear Overwridden Formats
private class ClearOverrideFormatsByFolderCriteria
{
public ClearOverrideFormatsByFolderCriteria(int folderID, int? formatID, int? newformatID)
{
_FormatID = formatID;
_FolderID = folderID;
_NewFormatID = newformatID;
}
private int? _FormatID;
public int? FormatID
{
get { return _FormatID; }
set { _FormatID = value; }
}
private int? _NewFormatID;
public int? NewFormatID
{
get { return _NewFormatID; }
set { _NewFormatID = value; }
}
private int _FolderID;
public int FolderID
{
get { return _FolderID; }
set { _FolderID = value; }
}
}
private void DataPortal_Fetch(ClearOverrideFormatsByFolderCriteria criteria)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_ClearOverrideFormatsByFolder";
cm.Parameters.AddWithValue("@FolderID", criteria.FolderID);
if (criteria.FormatID == null)
cm.Parameters.AddWithValue("@FormatID", DBNull.Value);
else
cm.Parameters.AddWithValue("@FormatID", criteria.FormatID);
if (criteria.NewFormatID == null)
cm.Parameters.AddWithValue("@NewFormatID", DBNull.Value);
else
cm.Parameters.AddWithValue("@NewFormatID", criteria.NewFormatID);
cm.CommandTimeout = Database.DefaultTimeout;
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{
IsReadOnly = false;
while (dr.Read())
{
ContentInfo contentInfo = new ContentInfo(dr);
this.Add(contentInfo);
}
IsReadOnly = true;
}
}
}
}
catch (Exception ex)
{
Database.LogException("ClearOverrideFormatsByFolderCriteria.DataPortal_Fetch", ex);
throw new DbCslaException("ClearOverrideFormatsByFolderCriteria.DataPortal_Fetch", ex);
}
}
public static ContentInfoList ClearOverrideFormatsByFolder(int folderID, int? formatID, int? newformatID)
{
try
{
ContentInfoList tmp = DataPortal.Fetch<ContentInfoList>(new ClearOverrideFormatsByFolderCriteria(folderID, formatID, newformatID));
return tmp;
}
catch (Exception ex)
{
throw new DbCslaException("Error on ContentInfoList.ClearOverrideFormatsByFolder", ex);
}
}
private class ClearOverrideFormatsByDocVersionCriteria
{
@@ -2077,7 +1918,6 @@ namespace VEPROMS.CSLA.Library
}
}
#endregion
#region Enhanced

View File

@@ -2153,7 +2153,7 @@ namespace VEPROMS.CSLA.Library
// return Text;
//}
#endregion
private static Dictionary<FormatConfig.ReplaceStr, Regex> dicReplaceRegex = new Dictionary<FormatConfig.ReplaceStr, Regex>();
private static Dictionary<ReplaceStr, Regex> dicReplaceRegex = new Dictionary<ReplaceStr, Regex>();
private static bool? _ProcessReplaceWords;
public static bool ProcessReplaceWords
{
@@ -2178,7 +2178,7 @@ namespace VEPROMS.CSLA.Library
// F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs).
// if doing replace words for Page List items, the current item is not a step, use _DoReplWordInPageList flags this
if (_MyItemInfo.MyContent.Type < 20000 && !_DoReplWordInPageList) return Text; // for now only replace in steps.
FormatConfig.ReplaceStrData rsl = _MyFormat.PlantFormat.UCFandOrigReplaceStrData;
ReplaceStrList rsl = _MyFormat.PlantFormat.FormatData.SectData.ReplaceStrList;
if (rsl.Count == 1 && (rsl[0].ReplaceWord == null || rsl[0].ReplaceWord == "")) return Text;
// F2021-093: Handle partials first and then plain replace words. Need to do this so that the words don't get processed by plain replace
@@ -2193,15 +2193,15 @@ namespace VEPROMS.CSLA.Library
// Loop through text looking for words to be replaced
Dictionary<E_ReplaceFlags?, bool> shouldReplace = new Dictionary<E_ReplaceFlags?, bool>();
//int profileDepth = ProfileTimer.Push(">>>> DoReplaceWords2.ForLoop");
foreach (FormatConfig.ReplaceStr rs in rsl)
foreach (ReplaceStr rs in rsl)
{
bool dopartial = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.Partials) == E_ReplaceFlags.Partials;
if (!dopartial) // F2021-093: Partials moved into their own method and done first
bool dopartial = (rs.Flag & E_ReplaceFlags.Partials) == E_ReplaceFlags.Partials; // from pre-UCF
if (!dopartial) // F2021-093: Partials moved into their own method and done first
{
bool onlyDoList = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.BeforeList) == E_ReplaceFlags.BeforeList; // C2021-045
bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.FirstWord) == E_ReplaceFlags.FirstWord; // C2021-056
bool doInPagelist = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.PageList) == E_ReplaceFlags.PageList; // B2021-132
//B2021-132 only do replacewords in paglist if the replaceword pagelist flag is set
bool onlyDoList = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.BeforeList) == E_ReplaceFlags.BeforeList; // C2021-045, C2025-022 remove UFC
bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.FirstWord) == E_ReplaceFlags.FirstWord; // C2021-056
bool doInPagelist = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.PageList) == E_ReplaceFlags.PageList; // B2021-132
//B2021-132 only do replacewords in paglist if the replaceword pagelist flag is set
if (_DoReplWordInPageList && !doInPagelist) continue;
// note that the order of this check is important. Check in this order...
@@ -2228,7 +2228,9 @@ namespace VEPROMS.CSLA.Library
{
if (!dicReplaceRegex.ContainsKey(rs))
{
RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None;
RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None;
//RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None;
//RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None;
//int profileDepth3 = ProfileTimer.Push(">>>> DoReplaceWords2.BuildMatch");
// 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;
@@ -2268,18 +2270,18 @@ namespace VEPROMS.CSLA.Library
// F2021-093: separate out partial replace words so that they can all be done before normal replace words. Partials read in the 'repword', use
// it as-is as a dotnet regular expression to do replacement. Aside from the dotnet regular expression process, the rest of this
// code is similar to plain regular expressions, in terms of processing flags for which steps, etc.
private string DoReplacePartials(string Text, FormatConfig.ReplaceStrData rsl)
private string DoReplacePartials(string Text, ReplaceStrList rsl)
{
Dictionary<FormatConfig.ReplaceStr, Regex> partialReplaceList = new Dictionary<FormatConfig.ReplaceStr, Regex>();
Dictionary<ReplaceStr, Regex> partialReplaceList = new Dictionary<ReplaceStr, Regex>();
Dictionary<E_ReplaceFlags?, bool> shouldReplace = new Dictionary<E_ReplaceFlags?, bool>();
foreach (FormatConfig.ReplaceStr rs in rsl)
foreach (ReplaceStr rs in rsl)
{
bool dopartial = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.Partials) == E_ReplaceFlags.Partials;
bool dopartial = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.Partials) == E_ReplaceFlags.Partials;
if (dopartial)
{
bool onlyDoList = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.BeforeList) == E_ReplaceFlags.BeforeList; // C2021-045
bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.FirstWord) == E_ReplaceFlags.FirstWord; // C2021-056
bool doInPagelist = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.PageList) == E_ReplaceFlags.PageList; // B2021-132
bool onlyDoList = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.BeforeList) == E_ReplaceFlags.BeforeList; // C2021-045
bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.FirstWord; // C2021-056
bool doInPagelist = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.PageList) == E_ReplaceFlags.PageList; // B2021-132
//B2021-132 only do replacewords in paglist if the replaceword pagelist flag is set
if (_DoReplWordInPageList && !doInPagelist) continue;
@@ -2304,7 +2306,7 @@ namespace VEPROMS.CSLA.Library
{
if (!dicReplaceRegex.ContainsKey(rs))
{
RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None;
RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None;
dicReplaceRegex.Add(rs, new Regex(rs.ReplaceWord, myOptions));
}
try
@@ -2320,7 +2322,7 @@ namespace VEPROMS.CSLA.Library
Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space
try
{
foreach (FormatConfig.ReplaceStr prs in partialReplaceList.Keys)
foreach (ReplaceStr prs in partialReplaceList.Keys)
Text = partialReplaceList[prs].Replace(Text, prs.ReplaceWith);
//if (partialReplaceList.Count>0) GC.Collect(); // microsoft had a memory leak in regular expression code - this REALLY slows it down though
}
@@ -2486,7 +2488,7 @@ namespace VEPROMS.CSLA.Library
_Font = font;
_MyItemInfo = myItemInfo;
}
public void Add(Regex myRegEx, FormatConfig.ReplaceStr myWord)
public void Add(Regex myRegEx, ReplaceStr myWord)
{
MatchCollection myMatches = myRegEx.Matches(_Text);
foreach (Match myMatch in myMatches)
@@ -2529,7 +2531,7 @@ namespace VEPROMS.CSLA.Library
}
return false;
}
public void Add(Match myMatch, FormatConfig.ReplaceStr myWord)
public void Add(Match myMatch, ReplaceStr myWord)
{
// If one already exists for this location, then don't add another.
if (ContainsKey(myMatch.Index)) return;
@@ -2563,12 +2565,12 @@ namespace VEPROMS.CSLA.Library
{
// B2022-015 BNPPalr: Determine whether RO text should have Replace Words applied. InLinkAndNotInRoFlag checks
// for flag on replace word item & checks that it is within and RO link
bool InLinkAndNotInRoFlag = ((foundMatch.MyWord.Flag & FormatConfig.E_ReplaceFlagsUCF.NotInRO) != 0) ? VerifyWithinLink(text, foundMatch, offset) : false;
bool InLinkAndNotInRoFlag = ((foundMatch.MyWord.Flag & E_ReplaceFlags.NotInRO) != 0) ? VerifyWithinLink(text, foundMatch, offset) : false;
if (!InLinkAndNotInRoFlag && VerifyNoHardSpace(text, foundMatch, offset) && VerifyNoLink(text, foundMatch, offset))
{
//if(offset != 0 || foundMatch.MyMatch.Index != 0 || !foundMatch.MyWord.ReplaceWith.StartsWith(@"{\par}"))
//{
if (((foundMatch.MyWord.Flag & FormatConfig.E_ReplaceFlagsUCF.DiffUnit) == 0) || DiffUnit(foundMatch.MyWord.ReplaceWord, _MyItemInfo, "UNIT "))
if (((foundMatch.MyWord.Flag & E_ReplaceFlags.DiffUnit) == 0) || DiffUnit(foundMatch.MyWord.ReplaceWord, _MyItemInfo, "UNIT "))
{
string with = foundMatch.MyWord.ReplaceWith;
if (offset == 0 && with.StartsWith(@"{\par}"))
@@ -2723,13 +2725,13 @@ namespace VEPROMS.CSLA.Library
get { return _MyMatch; }
set { _MyMatch = value; }
}
private FormatConfig.ReplaceStr _MyWord;
public FormatConfig.ReplaceStr MyWord
private ReplaceStr _MyWord;
public ReplaceStr MyWord
{
get { return _MyWord; }
set { _MyWord = value; }
}
public FoundMatch(Match myMatch, FormatConfig.ReplaceStr myWord)
public FoundMatch(Match myMatch, ReplaceStr myWord)
{
_MyMatch = myMatch;
_MyWord = myWord;

View File

@@ -594,70 +594,7 @@ public partial class FormatInfo : IFormatOrFormatInfo
throw new DbCslaException("FormatInfo.DataPortal_Fetch", ex);
}
}
// Get format data, but do not resolve the 'Data' and 'Genmac' fields, i.e. keep empty if they are
// empty.
public static FormatInfo GetFormatNoUCFByFormatID(int formatID)
{
try
{
FormatInfo tmp = DataPortal.Fetch<FormatInfo>(new FormatIDNoUCFCriteria(formatID));
if (tmp.ErrorMessage == "No Record Found")
{
tmp.Dispose(); // Clean-up FormatInfo
tmp = null;
}
return tmp;
}
catch (Exception ex)
{
throw new DbCslaException("Error on FormatInfo.GetFormatNoUCFByFormatID", ex);
}
}
protected class FormatIDNoUCFCriteria
{
private int _FormatID;
public int FormatID { get { return _FormatID; } }
public FormatIDNoUCFCriteria(int formatID)
{
_FormatID = formatID;
}
}
private void DataPortal_Fetch(FormatIDNoUCFCriteria criteria)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] FormatInfo.DataPortal_Fetch", GetHashCode());
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
ApplicationContext.LocalContext["cn"] = cn;
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "getFormatNoUCF";
cm.Parameters.AddWithValue("@FormatID", criteria.FormatID);
cm.CommandTimeout = Database.DefaultTimeout;
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{
if (!dr.Read())
{
_ErrorMessage = "No Record Found";
return;
}
ReadData(dr);
}
}
// removing of item only needed for local data portal
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
ApplicationContext.LocalContext.Remove("cn");
}
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("FormatInfo.DataPortal_Fetch", ex);
_ErrorMessage = ex.Message;
throw new DbCslaException("FormatInfo.DataPortal_Fetch", ex);
}
}
#region PlantFormat
[NonSerialized]
private PlantFormat _PlantFormat;

View File

@@ -6067,7 +6067,7 @@ namespace VEPROMS.CSLA.Library
// To determine if the section has a checkoff...
// Section won't have checkoffs if there is no checkofflist, or
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (pd.CheckOffData == null || pd.CheckOffData.CheckOffList == null || maxindx <= 0) return false;
if (pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.MaxIndex <= 1) return true;
//if (pd.CheckOffData == null || pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.Count <= 1) return false;
@@ -6099,7 +6099,7 @@ namespace VEPROMS.CSLA.Library
private int SectionDefaultCheckOffIndex()
{
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (pd.CheckOffData != null && pd.CheckOffData.CheckOffList != null && maxindx == 2) return 0; // if only two items, first is macro - use it.
SectionConfig sc = ActiveSection.MyConfig as SectionConfig;
return sc.Section_CheckoffListSelection;
@@ -6111,23 +6111,7 @@ namespace VEPROMS.CSLA.Library
if (!SectionHasCheckOffs()) return null;
int stpCoIndx = CheckOffIndex(); // this step has a checkoff defined
if (stpCoIndx == -1) return null;
if (stpCoIndx > 1)
{
if (ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF && stpCoIndx >= 100)
{
// get index, if greater than 100, store that - otherwise store index down list.
// if this format does not have ucf signoffs, indx is just the selected index from the combo box.
foreach (CheckOff co in ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList)
{
if (stpCoIndx == co.Index)
{
stpCoIndx = (int)co.Index;
break;
}
}
}
return ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList[stpCoIndx]; // DO override of CheckOffList[] to get ucf
}
int sectCoIndx = SectionDefaultCheckOffIndex(); // no checkoff on step, see if there is a section default.
if (sectCoIndx == -1) return null;
if ((ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffOnHLSOnly && IsHigh)
@@ -6161,7 +6145,7 @@ namespace VEPROMS.CSLA.Library
get
{
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (pd.CheckOffData != null && pd.CheckOffData.CheckOffList != null && maxindx == 2 && pd.CheckOffData.CheckOffList[0].MenuItem == "Enabled")
return true; // if only two items, first is macro - use it.
return false;

View File

@@ -249,13 +249,5 @@ namespace VEPROMS.CSLA.Library
SupInfoPdfPrint = 2,
Merge = 3
}
public enum E_UCFImportOptions : uint
{
Ignore = 0,
LoadNotUsed = 1,
LoadOnlyImported = 2,
LoadUseAll = 3,
LoadForSetOnly = 4
}
#endregion
}

View File

@@ -36,27 +36,14 @@ namespace VEPROMS.CSLA.Library
// User Control of Format allows a PROMS user to make modifications to a very limited set of format settings
// Variables in this region are not set in the format files. They are used only in the C# code
// when IgnoreUCF is true, get the original data, i.e. don't apply any UCF changes to it
// when IgnoreUCF is true, get the original data, i.e.don't apply any UCF changes to it
private static bool _IgnoreUCF = false;
public static bool IgnoreUCF
{
get { return PlantFormat._IgnoreUCF; }
set { PlantFormat._IgnoreUCF = value; }
}
// flags that the User Control of Format setting for using additional UCF checkoffs is active
private static bool _DoingUCFCheckOffs = false;
public static bool DoingUCFCheckOffs
{
get { return PlantFormat._DoingUCFCheckOffs; }
set { PlantFormat._DoingUCFCheckOffs = value; }
}
// flags the value that should be used (true/false) for using additional UCF checkoffs (used with DoingUCFCheckOffs)
private static bool _DoingUCFCheckOffsUse = false;
public static bool DoingUCFCheckOffsUse
{
get { return PlantFormat._DoingUCFCheckOffsUse; }
set { PlantFormat._DoingUCFCheckOffsUse = value; }
}
#endregion //User Control of Format (UCF)
public static FormatConfig GetFormatConfig(IFormatOrFormatInfo format)
{
@@ -126,72 +113,6 @@ namespace VEPROMS.CSLA.Library
XmlNodeList nl = XmlDoc.SelectNodes(xpath);
return nl.Count > 0;
}
private FormatConfig.ReplaceStrData _UCFandOrigReplaceStrData = null;
// This will return a complete list of ReplaceWords, combining those in the original plant format
// with the ones added by the user via User Control of Format (UCF)
public FormatConfig.ReplaceStrData UCFandOrigReplaceStrData
{
get
{
if (_UCFandOrigReplaceStrData != null) return _UCFandOrigReplaceStrData;
_UCFandOrigReplaceStrData = GetMergedReplaceList(this);
return _UCFandOrigReplaceStrData;
}
}
private FormatConfig.ReplaceStrData GetMergedReplaceList(PlantFormat OriginalPlantFormat)
{
// need to compare the original format list with the list as it is stored for working with property grid.
FormatConfig.ReplaceStrData retlist = new FormatConfig.ReplaceStrData(); // merged list
List<string> inoriglist = new List<string>(); // use this list to find new items in formatconfig (see below)
foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList)
{
// In the format config list (UCF), find the 'ReplaceWord'. This is the 'key' for defining whether the
// replace word has been overwridden by UCF data. If it exists, use it:
FormatConfig.ReplaceStr usethisone = null;
bool deleted = false;
// States for replacewords: 0 = no change, -1 deleted, 1 added, 2 modified
if (FormatConfig != null)
{
foreach (FormatConfig.ReplaceStr ucfrepstr in FormatConfig.PlantFormat.FormatData.ReplaceStrData)
{
if (ucfrepstr.ReplaceWord == origrepstr.ReplaceWord)
{
if (ucfrepstr.State == -1) deleted = true;
else usethisone = ucfrepstr;
ucfrepstr.State = 2;
inoriglist.Add(origrepstr.ReplaceWord);
break;
}
}
}
if (!deleted && usethisone == null)
{
usethisone = new FormatConfig.ReplaceStr();
usethisone.Flag = (FormatConfig.E_ReplaceFlagsUCF)origrepstr.Flag;
usethisone.State = 0; // no change
usethisone.ReplaceWith = origrepstr.ReplaceWith;
usethisone.ReplaceWord = origrepstr.ReplaceWord;
}
if (!deleted) retlist.Add(usethisone);
}
// now add in any ucf only replacements, any that are not in the inoriglist
if (FormatConfig != null)
{
foreach (FormatConfig.ReplaceStr ucfrepstr in FormatConfig.PlantFormat.FormatData.ReplaceStrData)
{
if (!inoriglist.Contains(ucfrepstr.ReplaceWord))
{
FormatConfig.ReplaceStr newone = new FormatConfig.ReplaceStr();
newone.Flag = (FormatConfig.E_ReplaceFlagsUCF)ucfrepstr.Flag;
newone.State = 1;
newone.ReplaceWith = ucfrepstr.ReplaceWith;
newone.ReplaceWord = ucfrepstr.ReplaceWord;
retlist.Add(newone);
}
}
}
return (retlist);
}
//C2025-023 - Electronic Procedures - Modifications to PROMS
// EPFormatFiles contains which Electronic Procedure Format files apply to this main format file.
@@ -1579,25 +1500,6 @@ namespace VEPROMS.CSLA.Library
return _PSI == null ? _PSI = new PSI(SelectSingleNode("PSI")) : _PSI;
}
}
private LazyLoad<bool> _CheckOffUCF;
public bool CheckOffUCF
{
get
{
// The following line is used in UCF (User Control of Format).
// This needs to be able to control a change in setting in UCF versus its use:
// - This is a special case since the original format, using the value in BaseAll, is always 'false'. And the value
// should never be set in original volian plant format files, if the additional UCF checkoffs are to be used, this must
// be set in the UCF user interface.
if (PlantFormat.DoingUCFCheckOffs) return PlantFormat.DoingUCFCheckOffsUse;
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _CheckOffUCF, "@CheckOffUCF");
bool? localvalue = null; // comes to here if in edit or print - use any UCF data before going to original format.
FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat);
if (fc != null) localvalue = fc.PlantFormat.FormatData.Flags.CheckOffUCF;
return localvalue ?? LazyLoad(ref _CheckOffUCF, "@CheckOffUCF");
}
}
// specifies the maxiumn length of the procedure title before PROMS considers to wrap the title
// this is used with the {PROCTITLE} PageStyle toekn
@@ -1946,53 +1848,9 @@ namespace VEPROMS.CSLA.Library
{
if (_CheckOffList != null) return _CheckOffList;
// Get a list of checkoffs that should be included:
// if !UseCheckOffUCF (Baseall has it as false. User can change setting in UCF to true)
// if !IgnoreUCF, i.e. use UCF changes, return original lists with only active items (Inactive = false)
// if IgnoreUCF, return original lists with all items
// if UseCheckOffUCF is true use the merged lists from current format and baseall.xml and
// do the same processing for IgnoreUCF described above.
// UseCheckOffUCF is false or there is no FormatConfig (UCF) data:
FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat);
if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc==null)
{
_CheckOffList = new CheckOffList(SelectNodes("CheckOffList/CheckOff"), MyFormat);
// B2019-100: If Ignoring the UCF data, just return the entire list. Also, return entire list if there is no UCF data (fc == null)
if (PlantFormat.IgnoreUCF || fc == null) return _CheckOffList;
// If not ignoring UCF settings, only return those that are active
foreach (FormatConfig.CheckOff co in fc.PlantFormat.FormatData.CheckOffList)
{
foreach (CheckOff coo in _CheckOffList)
{
if ((int)coo.Index == Convert.ToInt32(co.Index) && !(bool)co.Active)
{
_CheckOffList.Remove(coo);
break;
}
}
}
return _CheckOffList;
}
// UseCheckOfffUCF is true:
// merge the checkoff list from the current format and the checkoff list from the base format
_CheckOffList = new CheckOffList(SelectNodes("CheckOffList/CheckOff"), MyFormat);
CheckOffList retlist2 = new CheckOffList(SelectNodes("../CheckOffDataUCF/CheckOffList/CheckOff"), MyFormat);
if (retlist2 != null && retlist2.Count > 0) foreach (CheckOff co in retlist2) _CheckOffList.Add(co);
if (PlantFormat.IgnoreUCF) return _CheckOffList;
// if applying UCF, then remove those that are inactive:
foreach (FormatConfig.CheckOff co in fc.PlantFormat.FormatData.CheckOffList)
{
foreach (CheckOff coo in _CheckOffList)
{
if ((int)coo.Index == Convert.ToInt32(co.Index) && !(bool)co.Active)
{
_CheckOffList.Remove(coo);
break;
}
}
}
return _CheckOffList;
}
}
@@ -2008,77 +1866,13 @@ namespace VEPROMS.CSLA.Library
{
if (_CheckOffHeaderList != null) return _CheckOffHeaderList;
FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat);
if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc == null)
{
_CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat);
// Depending on the IgnoreUCF flag, either return this list with UCF Inactive flags set or return the
// list as is.
if (PlantFormat.IgnoreUCF || fc == null) return _CheckOffHeaderList;
// If not ignoring UCF settings, only return those that are active
foreach (FormatConfig.CheckOffHeader coh in fc.PlantFormat.FormatData.CheckOffHeaderList)
{
foreach (CheckOffHeader coo in _CheckOffHeaderList)
{
if ((int)coo.Index == Convert.ToInt32(coh.Index) && !(bool)coh.Active)
{
_CheckOffHeaderList.Remove(coo);
break;
}
}
}
return _CheckOffHeaderList;
}
// merge the checkoff header lists from the current format and the list from the base
_CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat);
CheckOffHeaderList retlist2 = new CheckOffHeaderList(SelectNodes("../CheckOffDataUCF/CheckOffHeaderList/CheckOffHeader"), MyFormat);
if (retlist2 != null && retlist2.Count > 0) foreach (CheckOffHeader co in retlist2) _CheckOffHeaderList.Add(co);
if (PlantFormat.IgnoreUCF) return _CheckOffHeaderList;
// if applying UCF, then remove those that are inactive.
foreach (FormatConfig.CheckOffHeader coh in fc.PlantFormat.FormatData.CheckOffHeaderList)
{
foreach (CheckOffHeader cooh in _CheckOffHeaderList)
{
if ((int)cooh.Index == Convert.ToInt32(coh.Index) && !(bool)coh.Active)
{
_CheckOffHeaderList.Remove(cooh);
break;
}
}
}
return _CheckOffHeaderList;
}
}
public void CheckOffHeaderListRefresh(bool CheckOffUCF)
{
if (!CheckOffUCF)
{
_CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat);
// Depending on the IgnoreUCF flag, either return this list with UCF Inactive flags set or return the
// list as is.
FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat);
if (PlantFormat.IgnoreUCF || fc == null) return;
// If not ignoring UCF settings, only return those that are active
foreach (FormatConfig.CheckOffHeader coh in fc.PlantFormat.FormatData.CheckOffHeaderList)
{
foreach (CheckOffHeader coo in _CheckOffHeaderList)
{
if ((int)coo.Index == Convert.ToInt32(coh.Index) && !(bool)coh.Active)
{
_CheckOffHeaderList.Remove(coo);
break;
}
}
}
return;
}
// if coming from the UCF dialog, then check for the 'ignoreUCF' this will flag whether to only
// merge the checkoff header lists from the current format and the list from the base
CheckOffHeaderList retlist = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat);
CheckOffHeaderList retlist2 = new CheckOffHeaderList(SelectNodes("../CheckOffDataUCF/CheckOffHeaderList/CheckOffHeader"), MyFormat);
if (retlist2 != null && retlist2.Count > 0) foreach (CheckOffHeader co in retlist2) retlist.Add(co);
_CheckOffHeaderList = retlist;
}
// This is used with the {INITIALS} pagelist token and will put the word "INITIALS" at the specified pagelist
// location for the checkoff column header. Used by Calvert Cliffs (BGEOI and BGESTP formats)

View File

@@ -1,36 +0,0 @@
using System.ComponentModel;
using System.Drawing.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System;
namespace Volian.Base.Library
{
// The RtfEditor inherits from the UITypeEditor and is used to edit Rtf fields. This provides the interface for fields in FormatConfig
// and uses the frmRtfEdit to provide a mechanism to do basic editing of text with a subset of rtf command support.
public class RtfEditor : UITypeEditor
{
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.Modal;
}
public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
{
IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
string rw = value as string;
if (svc != null && rw != null)
{
using (frmRtfEdit form = new frmRtfEdit())
{
form.Value = rw;
if (svc.ShowDialog(form) == DialogResult.OK)
{
rw = form.Value; // update object
}
}
}
return rw;
}
}
}

View File

@@ -101,17 +101,10 @@
<Compile Include="FrmPopupStatusMessage.Designer.cs">
<DependentUpon>FrmPopupStatusMessage.cs</DependentUpon>
</Compile>
<Compile Include="frmRtfEdit.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmRtfEdit.Designer.cs">
<DependentUpon>frmRtfEdit.cs</DependentUpon>
</Compile>
<Compile Include="GenericSerializer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PropGridCollEditor.cs" />
<Compile Include="RTBAPI.cs" />
<Compile Include="RtfEditor.cs" />
<Compile Include="RtfTools.cs" />
<Compile Include="TmpFile.cs" />
<Compile Include="ValidFileName.cs" />
@@ -126,9 +119,6 @@
<EmbeddedResource Include="FrmPopupStatusMessage.resx">
<DependentUpon>FrmPopupStatusMessage.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmRtfEdit.resx">
<DependentUpon>frmRtfEdit.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -1,179 +0,0 @@
namespace Volian.Base.Library
{
partial class frmRtfEdit
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.rtfBox = new System.Windows.Forms.RichTextBox();
this.btnBold = new DevComponents.DotNetBar.ButtonX();
this.btnItalics = new DevComponents.DotNetBar.ButtonX();
this.btnUnderline = new DevComponents.DotNetBar.ButtonX();
this.btnSubscript = new DevComponents.DotNetBar.ButtonX();
this.btnSuperscript = new DevComponents.DotNetBar.ButtonX();
this.btnHardspace = new DevComponents.DotNetBar.ButtonX();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(38, 144);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 3;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(143, 144);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 4;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// rtfBox
//
this.rtfBox.Location = new System.Drawing.Point(38, 73);
this.rtfBox.Name = "rtfBox";
this.rtfBox.Size = new System.Drawing.Size(214, 50);
this.rtfBox.TabIndex = 5;
this.rtfBox.Text = "";
this.rtfBox.SelectionChanged += new System.EventHandler(this.rtfBox_SelectionChanged);
//
// btnBold
//
this.btnBold.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnBold.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnBold.Location = new System.Drawing.Point(12, 12);
this.btnBold.Name = "btnBold";
this.btnBold.Size = new System.Drawing.Size(31, 24);
this.btnBold.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBold.TabIndex = 6;
this.btnBold.Text = "B";
this.btnBold.Click += new System.EventHandler(this.btnBold_Click);
//
// btnItalics
//
this.btnItalics.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnItalics.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnItalics.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnItalics.Location = new System.Drawing.Point(43, 12);
this.btnItalics.Name = "btnItalics";
this.btnItalics.Size = new System.Drawing.Size(31, 24);
this.btnItalics.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnItalics.TabIndex = 7;
this.btnItalics.Text = "I";
this.btnItalics.Click += new System.EventHandler(this.btnItalics_Click);
//
// btnUnderline
//
this.btnUnderline.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnUnderline.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnUnderline.Location = new System.Drawing.Point(74, 12);
this.btnUnderline.Name = "btnUnderline";
this.btnUnderline.Size = new System.Drawing.Size(31, 24);
this.btnUnderline.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnUnderline.TabIndex = 8;
this.btnUnderline.Text = "U";
this.btnUnderline.Click += new System.EventHandler(this.btnUnderline_Click);
//
// btnSubscript
//
this.btnSubscript.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnSubscript.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnSubscript.Location = new System.Drawing.Point(12, 42);
this.btnSubscript.Name = "btnSubscript";
this.btnSubscript.Size = new System.Drawing.Size(75, 23);
this.btnSubscript.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSubscript.TabIndex = 9;
this.btnSubscript.Text = "Subscript";
this.btnSubscript.Click += new System.EventHandler(this.btnSubscript_Click);
//
// btnSuperscript
//
this.btnSuperscript.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnSuperscript.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnSuperscript.Location = new System.Drawing.Point(90, 42);
this.btnSuperscript.Name = "btnSuperscript";
this.btnSuperscript.Size = new System.Drawing.Size(75, 23);
this.btnSuperscript.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSuperscript.TabIndex = 10;
this.btnSuperscript.Text = "Superscript";
this.btnSuperscript.Click += new System.EventHandler(this.btnSuperscript_Click);
//
// btnHardspace
//
this.btnHardspace.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnHardspace.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnHardspace.Location = new System.Drawing.Point(150, 10);
this.btnHardspace.Name = "btnHardspace";
this.btnHardspace.Size = new System.Drawing.Size(37, 26);
this.btnHardspace.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnHardspace.TabIndex = 11;
this.btnHardspace.Text = "HS";
this.btnHardspace.Click += new System.EventHandler(this.btnHardspace_Click);
//
// frmRtfEdit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(282, 198);
this.Controls.Add(this.btnHardspace);
this.Controls.Add(this.btnSuperscript);
this.Controls.Add(this.btnSubscript);
this.Controls.Add(this.btnUnderline);
this.Controls.Add(this.btnItalics);
this.Controls.Add(this.btnBold);
this.Controls.Add(this.rtfBox);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Name = "frmRtfEdit";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Rich Text Edit";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.RichTextBox rtfBox;
private DevComponents.DotNetBar.ButtonX btnBold;
private DevComponents.DotNetBar.ButtonX btnItalics;
private DevComponents.DotNetBar.ButtonX btnUnderline;
private DevComponents.DotNetBar.ButtonX btnSubscript;
private DevComponents.DotNetBar.ButtonX btnSuperscript;
private DevComponents.DotNetBar.ButtonX btnHardspace;
}
}

View File

@@ -1,199 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using DevComponents.DotNetBar;
namespace Volian.Base.Library
{
// this is the form used in the UCF (User Control of Format) feature that displays text and allows the user to modify it to
// add/remove various text attributes: Underline, bold, italics, super/sub script & Hard space.
public partial class frmRtfEdit : Form
{
public frmRtfEdit()
{
InitializeComponent();
}
private static Regex regHyphen = new Regex(@"(?<!\\)(\\u8208\?|\\u8210\?|\\u8211\?|\\u8212\?|\\u8213\?|\\_|\\endash|\\emdash)");
// Value is used by the UITypeEditor, RtfEditor, to set/return the text that is being edited.
public string Value
{
get
{
string rtbString = regHyphen.Replace(RtfToDbText(rtfBox.Rtf).Replace("<BackSlash>", "\\\\"), @"\u8209?");
int indx = rtbString.IndexOf('-');
while (indx > -1)
{
if (indx > 2)
{
if (rtbString[indx - 1] != 'i' || rtbString[indx - 2] != 'f' || rtbString[indx - 3] != '\\')
{
rtbString = rtbString.Remove(indx, 1);
rtbString = rtbString.Insert(indx, @"\u8209?");
}
if (indx + 1 > rtbString.Length) indx = -1;
else indx = rtbString.IndexOf('-', indx + 1);
}
}
return rtbString;
}
set
{
string makeRtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}\viewkind4\uc1\pard\f0\fs16 " + value + @"\par}";
makeRtf = makeRtf.Replace(@"\xa0", "'");
rtfBox.Rtf = makeRtf;
}
}
// when saving text, keep all of the necessary rtf commands that are used to define the text attributes. The rest are removed
public static string StaticReplaceRTFClause(Match m)
{
try
{
string token = m.Groups[1].Value;
switch (token[1])
{
case '\\':
return token;
case 'u':
if (Regex.IsMatch(token, @"^\\u[0-9]+$"))
return token; // Special Charcaters
if (Regex.IsMatch(token, @"^\\ulnone ?$"))
return token;
if (Regex.IsMatch(token, @"^\\ul.*$"))
return token; // Underline
if (Regex.IsMatch(token, @"^\\up[0-9] ?$"))
return token; // shift up (superscript)
break;
case 'd':
if (Regex.IsMatch(token, @"^\\dn[0-9] ?$"))
return token; // shift down (subscript)
break;
case '\'': // Special Character
return token;
case 'b': // Bold
return token;
case 'i': // Italics
return token;
case '{': // look for escape for curly braces:
return token;
case '}':
return token;
case 'l':
if (Regex.IsMatch(token, @"^\\line ?$")) return token;
if (Regex.IsMatch(token, @"^\\li[-0-9]+ ?$")) return token; // line indent
break;
case 'f':
if (Regex.IsMatch(token, @"^\\fi[-0-9]+ ?$")) return token; // first line indent
break;
case 'p':
if (Regex.IsMatch(token, @"^\\par ?$")) return @"{\par}";
break;
}
}
catch (Exception ex)
{
Console.WriteLine("StaticReplaceRTFClause {0} - {1}", ex.GetType().Name, ex.Message);
}
return "";//Strip All
}
// remove all of the rtf commands that are not needed to define the attributes of text that are supported:
private static Regex reg1 = new Regex(@"\\par\r\n(?!\\)");
private static Regex reg2 = new Regex(@"[\r\n]", RegexOptions.Singleline); // Strip Carriage Returns and Newlines
private static Regex reg3 = new Regex(@"^\{(.*)\}$", RegexOptions.Singleline); // Strip Opening and Closing Braces
private static Regex reg4 = new Regex(@"\{[^{]*?\}", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces
private static Regex reg5 = new Regex(@"\{[^{]*?\}", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces
private static Regex reg6 = new Regex(@"(\\[^' \\?\r\n\t]+)(?=\\)"); // add space after token if followed by token
private static Regex reg7 = new Regex(@"(\\[^' \\?\r\n\t]+ )"); // take backslash xyz and evaluates them
private static Regex reg8 = new Regex(@"(\\[^' \\?\r\n\t]+) (?=\\)"); // remove space between tokens
private static Regex reg9 = new Regex(@"(\\[^' \\?\r\n\t]+) (?=\r\n)"); // remove space before /r/n
private static Regex reg10 = new Regex(@"(\\[0-9a-z]+)$"); // end of text attribute needs a 'space'
private string RtfToDbText(string rtf)
{
// replace \{ & \} with (![ & (!] respectively and then redo at end. The curly braces
// are rtf so were getting removed and/or not handled correctly.
string retval = rtf.Replace(@"\{", @" (![");
retval = retval.Replace(@"\}", @" (!]");
// remove carriage return/newlines after \par commands (these are introduced by rtb
// for hard returns, goes into rtb as \par and comes out as \par\r\n):
retval = reg1.Replace(retval, "\\par ");
retval = retval.Replace("\\v0\r\n", "\\v0 "); // Replace Carriage Return and Newline after comment
retval = reg2.Replace(retval, ""); // Strip Carriage Returns and Newlines
retval = reg3.Replace(retval, "$1"); // Strip Opening and Closing Braces
retval = reg4.Replace(retval, ""); // Strip Clauses - remove anything from curly braces
retval = reg5.Replace(retval, ""); // Strip Clauses - remove anything from curly braces
retval = reg6.Replace(retval, "$1 "); // add space after token if followed by token
retval = reg7.Replace(retval, new MatchEvaluator(StaticReplaceRTFClause)); // take backslash xyz and evaluates them
retval = reg8.Replace(retval, "$1"); // remove space between tokens
retval = reg9.Replace(retval, "$1"); // remove space before /r/n
if (retval.EndsWith(@"{\par}")) retval = retval.Remove(retval.Length - 6, 6);
retval = reg10.Replace(retval, "$1 ");
// remove \r\n at end of string if the string has 2 or more characters
if (retval.EndsWith("\r\n")) retval = retval.Remove(retval.Length - 2, 2);
if (retval.Length == 0) return "";
if (retval.EndsWith(@"\v")) retval = retval.Remove(retval.Length - 2, 2);
retval = retval.Replace(@" (![", @"\{");
retval = retval.Replace(@" (!]", @"\}");
retval = retval.Replace("`",@"\xA0");
return retval;
}
private void btnBold_Click(object sender, EventArgs e)
{
RTBAPI.ToggleBold(!RTBAPI.IsBold(rtfBox), rtfBox, rtfBox.SelectionLength == 0 ? RTBAPI.RTBSelection.SCF_DEFAULT : RTBAPI.RTBSelection.SCF_SELECTION);
btnBold.Checked = RTBAPI.IsBold(rtfBox);
}
private void btnItalics_Click(object sender, EventArgs e)
{
RTBAPI.ToggleItalic(!RTBAPI.IsItalic(rtfBox), rtfBox, rtfBox.SelectionLength == 0 ? RTBAPI.RTBSelection.SCF_DEFAULT : RTBAPI.RTBSelection.SCF_SELECTION);
btnItalics.Checked = RTBAPI.IsItalic(rtfBox);
}
private void btnUnderline_Click(object sender, EventArgs e)
{
RTBAPI.ToggleUnderline(!RTBAPI.IsUnderline(rtfBox), rtfBox, rtfBox.SelectionLength == 0 ? RTBAPI.RTBSelection.SCF_DEFAULT : RTBAPI.RTBSelection.SCF_SELECTION);
btnUnderline.Checked = RTBAPI.IsUnderline(rtfBox);
}
private void btnSubscript_Click(object sender, EventArgs e)
{
RTBAPI.ToggleSubscript(!RTBAPI.IsSubScript(rtfBox), rtfBox, rtfBox.SelectionLength == 0 ? RTBAPI.RTBSelection.SCF_DEFAULT : RTBAPI.RTBSelection.SCF_SELECTION);
btnSubscript.Checked = RTBAPI.IsSubScript(rtfBox);
}
private void btnSuperscript_Click(object sender, EventArgs e)
{
RTBAPI.ToggleSuperscript(!RTBAPI.IsSuperScript(rtfBox), rtfBox, rtfBox.SelectionLength == 0 ? RTBAPI.RTBSelection.SCF_DEFAULT : RTBAPI.RTBSelection.SCF_SELECTION);
btnSuperscript.Checked = RTBAPI.IsSuperScript(rtfBox);
}
private void btnOK_Click(object sender, EventArgs e)
{
}
private void btnCancel_Click(object sender, EventArgs e)
{
}
private void rtfBox_SelectionChanged(object sender, EventArgs e)
{
btnBold.Checked = RTBAPI.IsBold(rtfBox);
btnItalics.Checked = RTBAPI.IsItalic(rtfBox);
btnUnderline.Checked = RTBAPI.IsUnderline(rtfBox);
}
private void btnHardspace_Click(object sender, EventArgs e)
{
AddText("`");
}
private void AddText(string str)
{
// See comments in AddRtf(string str) to explain the font style setting
RTBAPI.E_FontStyle fs = RTBAPI.GetFontStyle(rtfBox);
int positionStart = rtfBox.SelectionStart;
rtfBox.SelectedText = str;
int positionAfter = rtfBox.SelectionStart;
rtfBox.Select(positionStart, positionAfter - positionStart);
RTBAPI.SetFontStyle(rtfBox, fs);
rtfBox.Select(positionAfter, 0);
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -315,12 +315,6 @@ namespace Volian.Controls.Library
if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER
//// if there are no checkoffs OR
//// if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we
//// may want to allow them to turn off the checkoff
//if ((fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) ||
// fmtdata.ProcData.CheckOffData.Menu=="Signoff")
// cmbCheckoff.Enabled = false;
cbCAS.Enabled = (!CurItemInfo.IsFigure && !CurItemInfo.IsRtfRaw);
cbTCAS.Enabled = (!CurItemInfo.IsFigure && !CurItemInfo.IsRtfRaw); //F2022-024 Time Critical Action Summary
if (((CurItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds) ||
@@ -367,7 +361,7 @@ namespace Volian.Controls.Library
if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly)
_checkoffsAllowed = cmbCheckoff.Enabled = CurItemInfo.IsType("Substep");
int maxindx = fmtdata.ProcData.CheckOffUCF ? fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndex : fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(maxindx == 0))
{
CheckOffList chkoffList = fmtdata.ProcData.CheckOffData.CheckOffList;
@@ -856,21 +850,6 @@ namespace Volian.Controls.Library
MyEditItem.SaveContents();
// set selected index in the step's config.
int indx = _CheckOffIndex[cmbCheckoff.SelectedIndex]; // C2020-003 get the non-sorted index from the sorted index
// get index, if greater than 100, store that - otherwise store index down list.
// if this format does not have ucf signoffs, indx is just the selected index from the combo box.
if (CurItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF)
{
// get index, if greater than 100, store that - otherwise store index down list.
// if this format does not have ucf signoffs, indx is just the selected index from the combo mobx.
foreach (CheckOff co in CurItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList)
{
if (cmbCheckoff.SelectedItem == co.MenuItem)
{
if ((int)co.Index >= 100) indx = (int)co.Index;
break;
}
}
}
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
sc.Step_CheckOffIndex = indx;
//using (Content cnt = Content.Get(CurItemInfo.MyContent.ContentID))

View File

@@ -218,12 +218,6 @@
<Compile Include="dlgEnhMissingItem.Designer.cs">
<DependentUpon>dlgEnhMissingItem.cs</DependentUpon>
</Compile>
<Compile Include="dlgUCFImportOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgUCFImportOptions.Designer.cs">
<DependentUpon>dlgUCFImportOptions.cs</DependentUpon>
</Compile>
<Compile Include="EditItem.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -479,9 +473,6 @@
<EmbeddedResource Include="dlgEnhMissingItem.resx">
<DependentUpon>dlgEnhMissingItem.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgUCFImportOptions.resx">
<DependentUpon>dlgUCFImportOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FindReplace.resx">
<DependentUpon>FindReplace.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -1,397 +0,0 @@
namespace Volian.Controls.Library
{
partial class dlgUCFImportOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.pnlOptions = new System.Windows.Forms.Panel();
this.pnlChoices = new System.Windows.Forms.Panel();
this.cmbFNames = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.grPnlLoad = new DevComponents.DotNetBar.Controls.GroupPanel();
this.grPnlUse = new DevComponents.DotNetBar.Controls.GroupPanel();
this.rbOnlyImported = new System.Windows.Forms.RadioButton();
this.rbAll = new System.Windows.Forms.RadioButton();
this.rbSetOnly = new System.Windows.Forms.RadioButton();
this.cbUse = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.lblLoadFormat = new DevComponents.DotNetBar.LabelX();
this.sBtnLoad = new DevComponents.DotNetBar.Controls.SwitchButton();
this.lblFmt = new System.Windows.Forms.Label();
this.pnlXmlDiff = new System.Windows.Forms.Panel();
this.wbBrwsExisting = new System.Windows.Forms.WebBrowser();
this.splitterWebBrowsers = new System.Windows.Forms.Splitter();
this.pnlWbBrwsImp = new System.Windows.Forms.Panel();
this.wbBrwsImporting = new System.Windows.Forms.WebBrowser();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.pnlChoices.SuspendLayout();
this.grPnlLoad.SuspendLayout();
this.grPnlUse.SuspendLayout();
this.pnlXmlDiff.SuspendLayout();
this.pnlWbBrwsImp.SuspendLayout();
this.SuspendLayout();
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.Location = new System.Drawing.Point(31, 356);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(65, 23);
this.btnOk.TabIndex = 5;
this.btnOk.Text = "OK";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(121, 356);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 23);
this.btnCancel.TabIndex = 6;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// pnlOptions
//
this.pnlOptions.Location = new System.Drawing.Point(0, 0);
this.pnlOptions.Name = "pnlOptions";
this.pnlOptions.Size = new System.Drawing.Size(200, 100);
this.pnlOptions.TabIndex = 0;
//
// pnlChoices
//
this.pnlChoices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.pnlChoices.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlChoices.Controls.Add(this.cmbFNames);
this.pnlChoices.Controls.Add(this.grPnlLoad);
this.pnlChoices.Controls.Add(this.lblLoadFormat);
this.pnlChoices.Controls.Add(this.sBtnLoad);
this.pnlChoices.Controls.Add(this.lblFmt);
this.pnlChoices.Controls.Add(this.btnCancel);
this.pnlChoices.Controls.Add(this.btnOk);
this.pnlChoices.Location = new System.Drawing.Point(0, 0);
this.pnlChoices.Name = "pnlChoices";
this.pnlChoices.Size = new System.Drawing.Size(250, 606);
this.pnlChoices.TabIndex = 7;
//
// cmbFNames
//
this.cmbFNames.DisplayMember = "Text";
this.cmbFNames.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbFNames.FormattingEnabled = true;
this.cmbFNames.ItemHeight = 16;
this.cmbFNames.Location = new System.Drawing.Point(26, 48);
this.cmbFNames.Name = "cmbFNames";
this.cmbFNames.Size = new System.Drawing.Size(191, 22);
this.cmbFNames.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbFNames.TabIndex = 15;
this.cmbFNames.SelectedIndexChanged += new System.EventHandler(this.cmbFNames_SelectedIndexChanged);
//
// grPnlLoad
//
this.grPnlLoad.CanvasColor = System.Drawing.SystemColors.Control;
this.grPnlLoad.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.grPnlLoad.Controls.Add(this.grPnlUse);
this.grPnlLoad.Controls.Add(this.cbUse);
this.grPnlLoad.DisabledBackColor = System.Drawing.Color.Empty;
this.grPnlLoad.Location = new System.Drawing.Point(11, 130);
this.grPnlLoad.Name = "grPnlLoad";
this.grPnlLoad.Size = new System.Drawing.Size(224, 184);
//
//
//
this.grPnlLoad.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.grPnlLoad.Style.BackColorGradientAngle = 90;
this.grPnlLoad.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.grPnlLoad.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlLoad.Style.BorderBottomWidth = 1;
this.grPnlLoad.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.grPnlLoad.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlLoad.Style.BorderLeftWidth = 1;
this.grPnlLoad.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlLoad.Style.BorderRightWidth = 1;
this.grPnlLoad.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlLoad.Style.BorderTopWidth = 1;
this.grPnlLoad.Style.CornerDiameter = 4;
this.grPnlLoad.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.grPnlLoad.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.grPnlLoad.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.grPnlLoad.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.grPnlLoad.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.grPnlLoad.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.grPnlLoad.TabIndex = 14;
this.grPnlLoad.Text = "Load Options";
//
// grPnlUse
//
this.grPnlUse.BackColor = System.Drawing.Color.Transparent;
this.grPnlUse.CanvasColor = System.Drawing.SystemColors.Control;
this.grPnlUse.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.grPnlUse.Controls.Add(this.rbOnlyImported);
this.grPnlUse.Controls.Add(this.rbAll);
this.grPnlUse.Controls.Add(this.rbSetOnly);
this.grPnlUse.DisabledBackColor = System.Drawing.Color.Empty;
this.grPnlUse.Location = new System.Drawing.Point(15, 39);
this.grPnlUse.Name = "grPnlUse";
this.grPnlUse.Size = new System.Drawing.Size(181, 119);
//
//
//
this.grPnlUse.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.grPnlUse.Style.BackColorGradientAngle = 90;
this.grPnlUse.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.grPnlUse.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlUse.Style.BorderBottomWidth = 1;
this.grPnlUse.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.grPnlUse.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlUse.Style.BorderLeftWidth = 1;
this.grPnlUse.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlUse.Style.BorderRightWidth = 1;
this.grPnlUse.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.grPnlUse.Style.BorderTopWidth = 1;
this.grPnlUse.Style.CornerDiameter = 4;
this.grPnlUse.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.grPnlUse.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.grPnlUse.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.grPnlUse.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.grPnlUse.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.grPnlUse.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.grPnlUse.TabIndex = 1;
this.grPnlUse.Text = "In Procedure(s)";
//
// rbOnlyImported
//
this.rbOnlyImported.AutoSize = true;
this.rbOnlyImported.BackColor = System.Drawing.Color.Transparent;
this.rbOnlyImported.Location = new System.Drawing.Point(12, 6);
this.rbOnlyImported.Name = "rbOnlyImported";
this.rbOnlyImported.Size = new System.Drawing.Size(142, 21);
this.superTooltip1.SetSuperTooltip(this.rbOnlyImported, new DevComponents.DotNetBar.SuperTooltipInfo("For Imported Only", "", "The changed UCF will only be used by the procedure(s) that are being imported.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rbOnlyImported.TabIndex = 5;
this.rbOnlyImported.TabStop = true;
this.rbOnlyImported.Text = "For Imported Only";
this.rbOnlyImported.UseVisualStyleBackColor = false;
//
// rbAll
//
this.rbAll.AutoSize = true;
this.rbAll.BackColor = System.Drawing.Color.Transparent;
this.rbAll.Location = new System.Drawing.Point(12, 33);
this.rbAll.Name = "rbAll";
this.rbAll.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.rbAll.Size = new System.Drawing.Size(69, 21);
this.superTooltip1.SetSuperTooltip(this.rbAll, new DevComponents.DotNetBar.SuperTooltipInfo("For All ", "", "The changed UCF will be used in all procedure(s) and section(s) within the databa" +
"se that referenced this UCF. The one that existed in the database will be renam" +
"ed to \'Old N of UCFname\'.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rbAll.TabIndex = 6;
this.rbAll.TabStop = true;
this.rbAll.Text = "For All";
this.rbAll.UseVisualStyleBackColor = false;
//
// rbSetOnly
//
this.rbSetOnly.AutoSize = true;
this.rbSetOnly.BackColor = System.Drawing.Color.Transparent;
this.rbSetOnly.Location = new System.Drawing.Point(12, 60);
this.rbSetOnly.Name = "rbSetOnly";
this.rbSetOnly.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.rbSetOnly.Size = new System.Drawing.Size(108, 21);
this.superTooltip1.SetSuperTooltip(this.rbSetOnly, new DevComponents.DotNetBar.SuperTooltipInfo("For Set Only", "", "The changed UCF will only be used by the procedure(s)/sections(s) within the proc" +
"edure set that this procedure belongs.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rbSetOnly.TabIndex = 7;
this.rbSetOnly.TabStop = true;
this.rbSetOnly.Text = "For Set Only";
this.rbSetOnly.UseVisualStyleBackColor = false;
//
// cbUse
//
this.cbUse.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.cbUse.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbUse.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbUse.Location = new System.Drawing.Point(17, 5);
this.cbUse.Name = "cbUse";
this.cbUse.Size = new System.Drawing.Size(125, 28);
this.cbUse.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.cbUse, new DevComponents.DotNetBar.SuperTooltipInfo("Use", "", "If checked, the changes will be used as defined In Procedure(s) below. Otherwise," +
" the format is loaded but not used. ", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbUse.TabIndex = 0;
this.cbUse.Text = "Use";
this.cbUse.CheckedChanged += new System.EventHandler(this.cbUse_CheckedChanged);
//
// lblLoadFormat
//
//
//
//
this.lblLoadFormat.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblLoadFormat.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLoadFormat.Location = new System.Drawing.Point(124, 89);
this.lblLoadFormat.Name = "lblLoadFormat";
this.lblLoadFormat.Size = new System.Drawing.Size(94, 24);
this.superTooltip1.SetSuperTooltip(this.lblLoadFormat, new DevComponents.DotNetBar.SuperTooltipInfo("Load Format", "", "The User Control of Format changes will be loaded (imported) into the database. O" +
"therwise it will be ignored and the existing User Control of Format will be used" +
".", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.lblLoadFormat.TabIndex = 13;
this.lblLoadFormat.Text = "Load Format";
//
// sBtnLoad
//
this.sBtnLoad.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.sBtnLoad.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.sBtnLoad.Location = new System.Drawing.Point(13, 88);
this.sBtnLoad.Name = "sBtnLoad";
this.sBtnLoad.Size = new System.Drawing.Size(102, 26);
this.sBtnLoad.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.sBtnLoad.TabIndex = 12;
this.sBtnLoad.ValueChanged += new System.EventHandler(this.sBtnLoad_ValueChanged);
//
// lblFmt
//
this.lblFmt.AutoSize = true;
this.lblFmt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblFmt.Location = new System.Drawing.Point(16, 19);
this.lblFmt.Name = "lblFmt";
this.lblFmt.Size = new System.Drawing.Size(140, 18);
this.lblFmt.TabIndex = 8;
this.lblFmt.Text = "Changes to Format:";
//
// pnlXmlDiff
//
this.pnlXmlDiff.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlXmlDiff.Controls.Add(this.wbBrwsExisting);
this.pnlXmlDiff.Controls.Add(this.splitterWebBrowsers);
this.pnlXmlDiff.Controls.Add(this.pnlWbBrwsImp);
this.pnlXmlDiff.Location = new System.Drawing.Point(255, 0);
this.pnlXmlDiff.Name = "pnlXmlDiff";
this.pnlXmlDiff.Size = new System.Drawing.Size(548, 601);
this.pnlXmlDiff.TabIndex = 8;
//
// wbBrwsExisting
//
this.wbBrwsExisting.Dock = System.Windows.Forms.DockStyle.Fill;
this.wbBrwsExisting.Location = new System.Drawing.Point(0, 0);
this.wbBrwsExisting.MinimumSize = new System.Drawing.Size(20, 20);
this.wbBrwsExisting.Name = "wbBrwsExisting";
this.wbBrwsExisting.Size = new System.Drawing.Size(548, 298);
this.wbBrwsExisting.TabIndex = 0;
//
// splitterWebBrowsers
//
this.splitterWebBrowsers.Dock = System.Windows.Forms.DockStyle.Bottom;
this.splitterWebBrowsers.Location = new System.Drawing.Point(0, 298);
this.splitterWebBrowsers.Name = "splitterWebBrowsers";
this.splitterWebBrowsers.Size = new System.Drawing.Size(548, 3);
this.splitterWebBrowsers.TabIndex = 2;
this.splitterWebBrowsers.TabStop = false;
//
// pnlWbBrwsImp
//
this.pnlWbBrwsImp.Controls.Add(this.wbBrwsImporting);
this.pnlWbBrwsImp.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlWbBrwsImp.Location = new System.Drawing.Point(0, 301);
this.pnlWbBrwsImp.Name = "panel1";
this.pnlWbBrwsImp.Size = new System.Drawing.Size(548, 300);
this.pnlWbBrwsImp.TabIndex = 3;
//
// wbBrwsImporting
//
this.wbBrwsImporting.Dock = System.Windows.Forms.DockStyle.Fill;
this.wbBrwsImporting.Location = new System.Drawing.Point(0, 0);
this.wbBrwsImporting.MinimumSize = new System.Drawing.Size(20, 20);
this.wbBrwsImporting.Name = "wbBrwsImporting";
this.wbBrwsImporting.Size = new System.Drawing.Size(548, 300);
this.wbBrwsImporting.TabIndex = 0;
//
// superTooltip1
//
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// dlgUCFImportOptions
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(803, 606);
this.Controls.Add(this.pnlXmlDiff);
this.Controls.Add(this.pnlChoices);
this.Name = "dlgUCFImportOptions";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "User Control Of Format - Import Options";
this.pnlChoices.ResumeLayout(false);
this.pnlChoices.PerformLayout();
this.grPnlLoad.ResumeLayout(false);
this.grPnlUse.ResumeLayout(false);
this.grPnlUse.PerformLayout();
this.pnlXmlDiff.ResumeLayout(false);
this.pnlWbBrwsImp.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Panel pnlOptions;
private System.Windows.Forms.Panel pnlXmlDiff;
private System.Windows.Forms.WebBrowser wbBrwsExisting;
private System.Windows.Forms.Panel pnlChoices;
private System.Windows.Forms.Label lblFmt;
private DevComponents.DotNetBar.LabelX lblLoadFormat;
private DevComponents.DotNetBar.Controls.SwitchButton sBtnLoad;
private DevComponents.DotNetBar.Controls.GroupPanel grPnlLoad;
private DevComponents.DotNetBar.Controls.GroupPanel grPnlUse;
private DevComponents.DotNetBar.Controls.CheckBoxX cbUse;
private System.Windows.Forms.RadioButton rbOnlyImported;
private System.Windows.Forms.RadioButton rbAll;
private System.Windows.Forms.RadioButton rbSetOnly;
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbFNames;
private System.Windows.Forms.Splitter splitterWebBrowsers;
private System.Windows.Forms.Panel pnlWbBrwsImp;
private System.Windows.Forms.WebBrowser wbBrwsImporting;
}
}

View File

@@ -1,183 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Xsl;
using System.IO;
using VEPROMS.CSLA.Library;
namespace Volian.Controls.Library
{
// This dialog is used when the imported UCF is different than one existing in the database. It allows the user to
// select whether to overwrite, copy, etc. See the user interface project/dlgExportImport.cs for the options.
public partial class dlgUCFImportOptions : Form
{
List<string>ExistingFC;
List<string>ImportedFC;
private bool _Initializing = false;
public E_UCFImportOptions UCFImportOptionsCase = E_UCFImportOptions.LoadOnlyImported;
public dlgUCFImportOptions(List<string> name, List<string> existingFC, List<string> importedFC, E_UCFImportOptions defImpOpt, string xmlpath)
{
_Initializing = true;
InitializeComponent();
InitializeFNamesCombo(name);
ExistingFC = existingFC;
ImportedFC = importedFC;
cmbFNames.SelectedIndex = 0; // this displays the web browser differences for first name in the combo box.
// initialize the import of UCF option radio buttons:
UCFImportOptionsCase = defImpOpt;
rbSetOnly.Visible = !xmlpath.ToLower().Contains("folder");
if (defImpOpt == E_UCFImportOptions.Ignore)
{
sBtnLoad.Value = false;
grPnlLoad.Enabled = false;
grPnlUse.Enabled = false;
}
else if (defImpOpt == E_UCFImportOptions.LoadNotUsed)
{
sBtnLoad.Value = true;
grPnlLoad.Enabled = true;
cbUse.Checked = false;
grPnlUse.Enabled = false;
}
else if (defImpOpt == E_UCFImportOptions.LoadOnlyImported)
{
sBtnLoad.Value = true;
grPnlLoad.Enabled = true;
cbUse.Checked = true;
grPnlUse.Enabled = true;
rbOnlyImported.Checked = true;
}
else if (defImpOpt == E_UCFImportOptions.LoadUseAll)
{
sBtnLoad.Value = true;
grPnlLoad.Enabled = true;
cbUse.Checked = true;
grPnlUse.Enabled = true;
rbAll.Checked = true;
}
else if (defImpOpt == E_UCFImportOptions.LoadForSetOnly)
{
sBtnLoad.Value = true;
grPnlLoad.Enabled = true;
cbUse.Checked = true;
grPnlUse.Enabled = true;
rbSetOnly.Checked = true;
}
_Initializing = false;
return;
}
private void InitializeFNamesCombo(List<string> name)
{
foreach (string str in name)
cmbFNames.Items.Add(str);
}
private void DisplayXmlDiff(string existingFC, string importedFC)
{
XmlDocument xd = new XmlDocument();
xd.LoadXml(existingFC);
XmlNodeList xnl = xd.GetElementsByTagName("FormatConfig");
if (xnl != null && xnl.Count > 0) AddAttribute(xnl[0], "Version", "Existing");
string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFImpDetails.xsl");
StringWriter sw = new StringWriter();
StringWriter xsw = new StringWriter();
using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary)))
{
XmlTextWriter tx = new XmlTextWriter(xsw);
xd.WriteTo(tx);
string tmp = sw.ToString();
tmp = xd.InnerXml;
using (XmlReader xri = XmlReader.Create(new StringReader(tmp)))
{
using (XmlWriter xwo = XmlWriter.Create(sw))
{
XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load(xrt);
xsl.Transform(xri, xwo); // Perform Transform
}
wbBrwsExisting.DocumentText = sw.ToString();
}
}
StringWriter sw1 = new StringWriter();
StringWriter xsw1 = new StringWriter();
XmlDocument xd1 = new XmlDocument();
xd1.LoadXml(importedFC);
xnl = xd1.GetElementsByTagName("FormatConfig");
if (xnl != null && xnl.Count > 0) AddAttribute(xnl[0], "Version", "Importing");
using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary)))
{
XmlTextWriter tx = new XmlTextWriter(xsw1);
xd1.WriteTo(tx);
string tmp = xd1.InnerXml;
using (XmlReader xri = XmlReader.Create(new StringReader(tmp)))
{
using (XmlWriter xwo = XmlWriter.Create(sw1))
{
XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load(xrt);
xsl.Transform(xri, xwo); // Perform Transform
}
wbBrwsImporting.DocumentText = sw1.ToString();
}
}
}
private void AddAttribute(XmlNode xn, string name, string value)
{
XmlAttribute xa = xn.OwnerDocument.CreateAttribute(name);
xa.Value = value.ToString();
xn.Attributes.Append(xa);
}
private void btnOk_Click(object sender, EventArgs e)
{
if (!sBtnLoad.Value) UCFImportOptionsCase = E_UCFImportOptions.Ignore;
else if (!cbUse.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadNotUsed;
else if (rbOnlyImported.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadOnlyImported;
else if (rbAll.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadUseAll;
else if (rbSetOnly.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadForSetOnly;
this.Close();
}
private void sBtnLoad_ValueChanged(object sender, EventArgs e) // Import options for UCF Change: Load switch button
{
if (_Initializing) return;
if (sBtnLoad.Value)
{
grPnlLoad.Enabled = true; // Import the ucf change. let user select whether to use it.
grPnlUse.Enabled = false;
cbUse.Checked = false;
}
else
{
grPnlLoad.Enabled = false; // Don't import the ucf change.
grPnlUse.Enabled = false;
}
}
private void cbUse_CheckedChanged(object sender, EventArgs e) // Import options for UCF Change: use checkbox
{
if (_Initializing) return;
if (cbUse.Checked)
grPnlUse.Enabled = true; // Use the change. enable the load group & select for imported only
else
grPnlUse.Enabled = false; // Don't use the change.
}
private void cmbFNames_SelectedIndexChanged(object sender, EventArgs e)
{
int indx = cmbFNames.SelectedIndex;
string existingFC = ExistingFC[indx];
string importedFC = ImportedFC[indx];
DisplayXmlDiff(existingFC, importedFC);
}
}
}

View File

@@ -1,126 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="wbBrwsExisting.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -4458,12 +4458,6 @@ namespace Volian.Print.Library
xloc_co = XOffset + (relX > 0 ? Width : 0) + relX;
}
}
// if there is ucf value for adjusting the alignment for checkoffs, use it:
FormatConfig fc = PlantFormat.GetFormatConfig(formatInfo);
if (fc != null && fc.PlantFormat.FormatData.CheckOffXOffAdj != null)
{
if (co.Index > 99) xloc_co += ((float)fc.PlantFormat.FormatData.CheckOffXOffAdj * 72);
}
// CheckOffXtraLines was introduced for the additional lines needed for the longer signoffs
// for VCBA (&WST1), for F2016-061.
@@ -5215,7 +5209,7 @@ namespace Volian.Print.Library
// First see if there is any checkoff data in the format file and that there
// is a pagelist item for the checkoff header.
int maxindx = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF ? itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (maxindx <= 0) return;
if (MyPageHelper.PageListCheckOffHeader == null) return;