Compare commits
49 Commits
C2025-039_
...
c8047854f6
| Author | SHA1 | Date | |
|---|---|---|---|
| c8047854f6 | |||
| 91ee23287a | |||
| 85b08b8c65 | |||
| c81079a876 | |||
| 8abe57552c | |||
| 525173bc9f | |||
| 47a4c62e92 | |||
| 539ad769d0 | |||
| 5fa90d9eab | |||
| e8327316dd | |||
| 3bd7001106 | |||
| 2e5ad53c6a | |||
| ca0ae279e0 | |||
| adf1120436 | |||
| 7879391de0 | |||
| 11ba9ea418 | |||
| 0fe84ca17c | |||
| 1009ca5111 | |||
| 2c973fb0be | |||
| dba1f4e71c | |||
| 46fe124fe1 | |||
| 50688d7d8a | |||
| a7396e3c4a | |||
| 41e969f79e | |||
| 7b3f78f745 | |||
| 14bc171246 | |||
| a584c0751e | |||
| 3d7528e069 | |||
| 58cc75ef71 | |||
| b5a9462e95 | |||
| 1bc421ac6d | |||
| ad0d091b49 | |||
| 22de686a44 | |||
| 3e7eb09758 | |||
| 28c681a562 | |||
| 44025c3978 | |||
| 8c32d18aec | |||
| 20c31153de | |||
| ecb9a805e5 | |||
| 0577acad93 | |||
| d7f83fa4d4 | |||
| 4c4f4d52d2 | |||
| 0bf9025c0d | |||
| 2784b57a05 | |||
| b9fc9748c7 | |||
| ec25f6426a | |||
| 00283b4f28 | |||
| ec8e4c36a4 | |||
| 92522b1229 |
@@ -180,6 +180,7 @@
|
||||
<Content Include="fmtall\CPL_03all.xml" />
|
||||
<Content Include="fmtall\CPSAMGDataall.xml" />
|
||||
<Content Include="fmtall\CPSAMGDEVall.xml" />
|
||||
<Content Include="fmtall\EPTSTBCK1all.xml" />
|
||||
<Content Include="fmtall\EPTST1all.xml" />
|
||||
<Content Include="fmtall\CWEall.xml" />
|
||||
<Content Include="fmtall\CWEDEVall.xml" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
PROMS/Formats/fmtall/EPTSTBCK1all.xml
Normal file
BIN
PROMS/Formats/fmtall/EPTSTBCK1all.xml
Normal file
Binary file not shown.
@@ -735,23 +735,27 @@ namespace RODBInterface
|
||||
else
|
||||
parentValue = nd.InnerText;
|
||||
|
||||
//applicValues = "";
|
||||
applicValues = string.Format("<APL DefaultVal={0}", parentValue);
|
||||
int pcChildIdx = 0;
|
||||
//C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value
|
||||
foreach (string c in pcChildern)
|
||||
if (parentName != "#whitespace")
|
||||
{
|
||||
//string csufx = CvtUserFldToFld(c);
|
||||
pcChildIdx++;
|
||||
string csufx = string.Format("_PCCHILD{0}", pcChildIdx);
|
||||
//applicValues += ",";
|
||||
XmlNode cn = elmnode.SelectSingleNode(parentName + csufx);
|
||||
if (cn == null || cn.InnerText.Length == 0) // B2024-004 use Parent value if Child text length is zero
|
||||
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, parentValue); // use parent value as default
|
||||
else
|
||||
//applicValues = "";
|
||||
applicValues = string.Format("<APL DefaultVal={0}", parentValue);
|
||||
int pcChildIdx = 0;
|
||||
//C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value
|
||||
|
||||
foreach (string c in pcChildern)
|
||||
{
|
||||
if (parentValue != cn.InnerText)
|
||||
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
|
||||
//string csufx = CvtUserFldToFld(c);
|
||||
pcChildIdx++;
|
||||
string csufx = string.Format("_PCCHILD{0}", pcChildIdx);
|
||||
//applicValues += ",";
|
||||
XmlNode cn = elmnode.SelectSingleNode(parentName + csufx);
|
||||
if (cn == null || cn.InnerText.Length == 0) // B2024-004 use Parent value if Child text length is zero
|
||||
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, parentValue); // use parent value as default
|
||||
else
|
||||
{
|
||||
if (parentValue != cn.InnerText)
|
||||
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
|
||||
}
|
||||
}
|
||||
}
|
||||
applicValues += " /APL>";
|
||||
|
||||
@@ -135,10 +135,10 @@
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="QATItems" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="DefaultDB" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="LastVersion" serializeAs="String">
|
||||
<value>0.0</value>
|
||||
@@ -150,14 +150,17 @@
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="SMTPServer" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SMTPUser" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UpdateSettings" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="cbShwRplWrdsColor" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="PasteNoReturns" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
@@ -170,6 +173,9 @@
|
||||
<setting name="SeparateWindows" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="VisioPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</VEPROMS.Properties.Settings>
|
||||
<UISampleNetBar1.Properties.Settings>
|
||||
<setting name="ShowDefaultFolderProp" serializeAs="String">
|
||||
|
||||
@@ -66,6 +66,12 @@ namespace VEPROMS
|
||||
set { _prtSectID = value; }
|
||||
}
|
||||
|
||||
private bool _OverwritePDF;
|
||||
public bool OverwritePDF
|
||||
{
|
||||
get { return cbxOverwritePDF2.Checked; }
|
||||
set { cbxOverwritePDF2.Checked = value; }
|
||||
}
|
||||
|
||||
// C2018-033 Used to turn off using the date/time PDF file prefix and suffix when doing batch file autmatic baseline print testing (frmVEPROMS.cs RunAutomatic())
|
||||
// This is needed so the the automatic baselines can compare results from different runs of PROMS
|
||||
|
||||
@@ -13635,8 +13635,8 @@ WITH EXECUTE AS OWNER
|
||||
AS
|
||||
BEGIN TRY -- Try Block
|
||||
BEGIN TRANSACTION
|
||||
Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?')
|
||||
where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'
|
||||
Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?'),NCHAR(8209),'\u8209?')
|
||||
where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'or Text Like '%' + NCHAR(8209) + '%' IF( @@TRANCOUNT > 0 ) COMMIT
|
||||
IF( @@TRANCOUNT > 0 ) COMMIT
|
||||
END TRY
|
||||
BEGIN CATCH -- Catch Block
|
||||
@@ -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];
|
||||
@@ -17320,7 +17201,7 @@ GO
|
||||
[RofstID] [int] NOT NULL,
|
||||
[roid] [varchar](50) NOT NULL,
|
||||
[value] [varchar](max) NOT NULL,
|
||||
[AccPageID] [varchar](max) NULL,
|
||||
[AccPageID] [varchar](100) NULL,
|
||||
CONSTRAINT [PK_RofstDefaultValue] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[RofstID] ASC,
|
||||
@@ -24293,6 +24174,56 @@ Go
|
||||
--- end changes for:
|
||||
---C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
|
||||
/*
|
||||
==========================================================================================================
|
||||
Begin: C2025-045: Improve Performance loading procedures with Alarms
|
||||
==========================================================================================================
|
||||
*/
|
||||
|
||||
IF Exists(SELECT 1 from information_schema.columns where character_maximum_length=-1 and column_name = 'AccPageID' and table_name = 'RofstDefaultValue')
|
||||
Begin
|
||||
ALTER TABLE RofstDefaultValue ALTER COLUMN AccPageID varchar(100)
|
||||
END
|
||||
GO
|
||||
|
||||
IF (@@Error = 0) PRINT 'Updating size of RofstDefaultValue.AccPageID Succeeded'
|
||||
ELSE PRINT 'Updating size of RofstDefaultValue.AccPageID Failed to Execute'
|
||||
GO
|
||||
|
||||
EXEC sp_refreshview [dbo.vwRofstData_RofstDefaultValues]
|
||||
EXEC sp_refreshview [dbo.vwRofstData_RofstBaseRoids]
|
||||
GO
|
||||
|
||||
IF (@@Error = 0) PRINT 'Refreshing views: (vwRofstData_RofstDefaultValues,vwRofstData_RofstBaseRoids) Succeeded'
|
||||
ELSE PRINT 'Refreshing views: (vwRofstData_RofstDefaultValues,vwRofstData_RofstBaseRoids) Failed to Execute'
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE name = 'IX_RofstDefaultValue_RofstID_AccPageID')
|
||||
BEGIN
|
||||
CREATE NONCLUSTERED INDEX [IX_RofstDefaultValue_RofstID_AccPageID] ON [dbo].[RofstDefaultValue]
|
||||
(
|
||||
[RofstID] ASC,
|
||||
[AccPageID] ASC
|
||||
)
|
||||
INCLUDE
|
||||
(
|
||||
[roid]
|
||||
,[value]
|
||||
)
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
END
|
||||
GO
|
||||
|
||||
IF (@@Error = 0) PRINT 'Adding Index IX_RofstDefaultValue_RofstID_AccPageID Succeeded'
|
||||
ELSE PRINT 'Adding Index IX_RofstDefaultValue_RofstID_AccPageID Failed to Execute'
|
||||
GO
|
||||
|
||||
/*
|
||||
==========================================================================================================
|
||||
End: C2025-045: Improve Performance loading procedures with Alarms
|
||||
==========================================================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
@@ -24327,8 +24258,8 @@ BEGIN TRY -- Try Block
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
|
||||
set @RevDate = '07/31/2025 10:30 AM'
|
||||
set @RevDescription = 'SQL Optimization'
|
||||
set @RevDate = '08/13/2025 8:07 AM'
|
||||
set @RevDescription = 'Improve Performance loading procedures with Alarms'
|
||||
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||
|
||||
16980
PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs
Normal file
16980
PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -175,6 +175,9 @@
|
||||
<Compile Include="dlgCheckedOutProcedure.designer.cs">
|
||||
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgExportImportEP.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgMSWordMessage.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -241,12 +244,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>
|
||||
@@ -295,12 +292,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>
|
||||
@@ -371,9 +362,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>
|
||||
@@ -392,9 +380,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>
|
||||
@@ -592,8 +577,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" />
|
||||
|
||||
655
PROMS/VEPROMS User Interface/VEPROMS_UI.csproj_bak_2
Normal file
655
PROMS/VEPROMS User Interface/VEPROMS_UI.csproj_bak_2
Normal file
@@ -0,0 +1,655 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{8D1C47B4-F302-4C5A-87CC-24FDC5529872}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>VEPROMS</RootNamespace>
|
||||
<AssemblyName>VEPROMS</AssemblyName>
|
||||
<ApplicationIcon>veproms.ico</ApplicationIcon>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Demo|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Demo\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\debug\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Demo|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Demo\</OutputPath>
|
||||
<DefineConstants>TRACE;DEMO</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="C1.Win.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=944ae1ea0e47ca04" />
|
||||
<Reference Include="C1.Win.C1Command.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=e808566f358766d8" />
|
||||
<Reference Include="C1.Win.C1FlexGrid.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da, processorArchitecture=MSIL" />
|
||||
<Reference Include="C1.Win.C1Input.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a, processorArchitecture=MSIL" />
|
||||
<Reference Include="Csla, Version=2.1.4.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\3rdPartyLibraries\CSLA\CSLA20cs_DLL_Net_4.8.1_Build\Csla.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\3rdPartyLibraries\Ionic\Ionic.Zip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Itenso.Rtf.Interpreter">
|
||||
<HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Itenso.Rtf.Parser">
|
||||
<HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Parser.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\3rdPartyLibraries\Log4Net\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Runtime.Remoting" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UIAutomationProvider" />
|
||||
<Reference Include="VEPROMS.CSLA.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\VEPROMS.CSLA.Library\bin\Debug\VEPROMS.CSLA.Library.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AboutVEPROMS.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AboutVEPROMS.Designer.cs">
|
||||
<DependentUpon>AboutVEPROMS.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BookMarks.cs" />
|
||||
<Compile Include="dlgAnnotationsSelect.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgAnnotationsSelect.Designer.cs">
|
||||
<DependentUpon>dlgAnnotationsSelect.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgAnnotationsSelect.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>dlgAnnotationsSelect.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgApproveProcedure.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgApproveProcedure.Designer.cs">
|
||||
<DependentUpon>dlgApproveProcedure.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgCheckedOutProcedure.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgCheckedOutProcedure.designer.cs">
|
||||
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgExportImportEP.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgMSWordMessage.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgMSWordMessage.Designer.cs">
|
||||
<DependentUpon>dlgMSWordMessage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgCheckOpenTabs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgCheckOpenTabs.Designer.cs">
|
||||
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DlgCloseTabsOrExit.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DlgCloseTabsOrExit.Designer.cs">
|
||||
<DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgExportImport.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgExportImport.designer.cs">
|
||||
<DependentUpon>dlgExportImport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgImpHowToHandleROs.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgImpHowToHandleROs.Designer.cs">
|
||||
<DependentUpon>dlgImpHowToHandleROs.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgManageSecurity.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgManageSecurity.designer.cs">
|
||||
<DependentUpon>dlgManageSecurity.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgPhoneList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgPhoneList.Designer.cs">
|
||||
<DependentUpon>dlgPhoneList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgPickROFolder.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgPickROFolder.designer.cs">
|
||||
<DependentUpon>dlgPickROFolder.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DlgPrintProcedure.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DlgPrintProcedure.designer.cs">
|
||||
<DependentUpon>DlgPrintProcedure.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgSetChangeBarStartDate.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dlgSetChangeBarStartDate.Designer.cs">
|
||||
<DependentUpon>dlgSetChangeBarStartDate.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="dlgTransitionReport.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<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>
|
||||
<Compile Include="frmAnnotationsCleanup.Designer.cs">
|
||||
<DependentUpon>frmAnnotationsCleanup.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmBatchRefresh.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmBatchRefresh.designer.cs">
|
||||
<DependentUpon>frmBatchRefresh.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmBatchRefreshCheckedOut.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmBatchRefreshCheckedOut.designer.cs">
|
||||
<DependentUpon>frmBatchRefreshCheckedOut.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmManageUser.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmManageUser.designer.cs">
|
||||
<DependentUpon>frmManageUser.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmPDFStatusForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmPDFStatusForm.designer.cs">
|
||||
<DependentUpon>frmPDFStatusForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmPSI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmPSI.Designer.cs">
|
||||
<DependentUpon>frmPSI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmRODbProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmRODbProperties.Designer.cs">
|
||||
<DependentUpon>frmRODbProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmSI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmSI.Designer.cs">
|
||||
<DependentUpon>frmSI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmVEPROMS.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmVEPROMS.Designer.cs">
|
||||
<DependentUpon>frmVEPROMS.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmFolderProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmFolderProperties.Designer.cs">
|
||||
<DependentUpon>frmFolderProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmProcedureProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmProcedureProperties.Designer.cs">
|
||||
<DependentUpon>frmProcedureProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmPropGrid.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmPropGrid.Designer.cs">
|
||||
<DependentUpon>frmPropGrid.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmSectionProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmSectionProperties.Designer.cs">
|
||||
<DependentUpon>frmSectionProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmSysOptions.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmSysOptions.Designer.cs">
|
||||
<DependentUpon>frmSysOptions.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmVersionsProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmVersionsProperties.Designer.cs">
|
||||
<DependentUpon>frmVersionsProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<EmbeddedResource Include="AboutVEPROMS.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>AboutVEPROMS.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgAnnotationsSelect.resx">
|
||||
<DependentUpon>dlgAnnotationsSelect.cs</DependentUpon>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgMSWordMessage.resx">
|
||||
<DependentUpon>dlgMSWordMessage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgCheckOpenTabs.resx">
|
||||
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DlgCloseTabsOrExit.resx">
|
||||
<DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgImpHowToHandleROs.resx">
|
||||
<DependentUpon>dlgImpHowToHandleROs.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DlgPrintProcedure.resx">
|
||||
<DependentUpon>DlgPrintProcedure.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<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>
|
||||
<EmbeddedResource Include="frmPDFStatusForm.resx">
|
||||
<DependentUpon>frmPDFStatusForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmPSI.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmPSI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmRODbProperties.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmRODbProperties.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmSI.resx">
|
||||
<DependentUpon>frmSI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmVEPROMS.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmVEPROMS.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmFolderProperties.resx">
|
||||
<DependentUpon>frmFolderProperties.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmProcedureProperties.resx">
|
||||
<DependentUpon>frmProcedureProperties.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmPropGrid.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmPropGrid.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmSectionProperties.resx">
|
||||
<DependentUpon>frmSectionProperties.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmSysOptions.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmSysOptions.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmVersionsProperties.resx">
|
||||
<DependentUpon>frmVersionsProperties.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ShortcutLists.resx">
|
||||
<DependentUpon>ShortcutLists.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="VlnWeb.resx">
|
||||
<DependentUpon>VlnWeb.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="App.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="ShortcutLists.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShortcutLists.designer.cs">
|
||||
<DependentUpon>ShortcutLists.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VlnWeb.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VlnWeb.Designer.cs">
|
||||
<DependentUpon>VlnWeb.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="VEPROMS.gclicx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Separator.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ProtectFormHS.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="FixRev.Bat" />
|
||||
<None Include="MSWordVBA\vlnNextROForm.frm" />
|
||||
<None Include="MSWordVBA\vlnNextROForm.frx" />
|
||||
<None Include="MSWordVBA\vlnWestROConvert.frm" />
|
||||
<None Include="MSWordVBA\vlnWestROConvert.frx" />
|
||||
<None Include="Properties\DataSources\System.Drawing.Imaging.ImageCodecInfo.datasource" />
|
||||
<None Include="Properties\DataSources\VEPROMS.CSLA.Library.DocVersionConfig.datasource" />
|
||||
<None Include="Properties\DataSources\VEPROMS.CSLA.Library.FormatInfoList.datasource" />
|
||||
<None Include="Properties\DataSources\VEPROMS.CSLA.Library.ItemAnnotations.datasource" />
|
||||
<None Include="Properties\DataSources\VEPROMS.CSLA.Library.RODbInfoList.datasource" />
|
||||
<None Include="Properties\DataSources\VEPROMS.CSLA.Library.SectionConfig.datasource" />
|
||||
<None Include="Resources\UnProtectFormHS.png" />
|
||||
<None Include="veproms.dct">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Include="BarakahEULA.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="PROMSFixes.Sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="PROMSRollback %28v2.0%29.Sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="ROBuild.Sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="ROFixes.Sql">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SORTCUTS_INSERT.RTF">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SORTCUTS_MISC.rtf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SORTCUTS_NAVIGATION.rtf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SORTCUTS_RIBBON.rtf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SORTCUTS_TXTMODS.rtf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="DBConnection_Sample.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="DemoEULA.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="EULA.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="MSWordVBA\VlnWROMacros.bas" />
|
||||
<Content Include="Resources\Admin.png" />
|
||||
<EmbeddedResource Include="dlgApproveProcedure.resx">
|
||||
<DependentUpon>dlgApproveProcedure.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgCheckedOutProcedure.resx">
|
||||
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgExportImport.resx">
|
||||
<DependentUpon>dlgExportImport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgManageSecurity.resx">
|
||||
<DependentUpon>dlgManageSecurity.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgPhoneList.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>dlgPhoneList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgPickROFolder.resx">
|
||||
<DependentUpon>dlgPickROFolder.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="dlgTransitionReport.resx">
|
||||
<DependentUpon>dlgTransitionReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmBatchRefresh.resx">
|
||||
<DependentUpon>frmBatchRefresh.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmBatchRefreshCheckedOut.resx">
|
||||
<DependentUpon>frmBatchRefreshCheckedOut.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmManageUser.resx">
|
||||
<DependentUpon>frmManageUser.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\ATOM.BMP">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\CPLLOGO.BMP">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\DOMLOGO.BMP">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\GPCLOGO.BMP">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Resources\Save.png" />
|
||||
<Content Include="Resources\SaveAllHS.png" />
|
||||
<Content Include="Resources\SaveAs.png" />
|
||||
<Content Include="VEicon.ico" />
|
||||
<Content Include="veproms.ico" />
|
||||
<Content Include="Vicon.ico" />
|
||||
<Content Include="WestinghouseEULA.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="stdole">
|
||||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FlexableMessageBox\FlexableMessageBox.csproj">
|
||||
<Project>{b22ce5ad-288c-44cd-8a22-b3bcf77b7161}</Project>
|
||||
<Name>FlexableMessageBox</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LBWordLibrary\LBWordLibrary.csproj">
|
||||
<Project>{70F23722-19A3-4AC1-A900-55831C945786}</Project>
|
||||
<Name>LBWordLibrary</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Base.Library\Volian.Base.Library.csproj">
|
||||
<Project>{AEEE9FD1-6892-45E2-A67E-418C06D46FF9}</Project>
|
||||
<Name>Volian.Base.Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Controls.Library\Volian.Controls.Library.csproj">
|
||||
<Project>{8556527C-6615-487F-8AF7-22EBC3EF0268}</Project>
|
||||
<Name>Volian.Controls.Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Print.Library\Volian.Print.Library.csproj">
|
||||
<Project>{94830C07-6A3A-450E-9674-C9B4293A7726}</Project>
|
||||
<Name>Volian.Print.Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Volian.Utils.Library\Volian.Utils.Library.csproj">
|
||||
<Project>{62314B9C-DA84-4037-8B68-AA18C1F641F5}</Project>
|
||||
<Name>Volian.Utils.Library</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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); // "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");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
347
PROMS/VEPROMS User Interface/dlgExportImportEP.cs
Normal file
347
PROMS/VEPROMS User Interface/dlgExportImportEP.cs
Normal file
@@ -0,0 +1,347 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
//class inherits from normal import/export form
|
||||
//then adds additional functionality
|
||||
#pragma warning disable S101 // Types should be named in PascalCase
|
||||
public partial class dlgExportImportEP : dlgExportImport
|
||||
#pragma warning restore S101 // Types should be named in PascalCase
|
||||
{
|
||||
private readonly AnnotationTypeInfo _AnnotationType;
|
||||
private readonly string multiseparator = ",";
|
||||
|
||||
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
|
||||
|
||||
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, ( unitIndex))
|
||||
{
|
||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||
_ExportBothConvertedandNot = true;
|
||||
DocReplace = new Dictionary<int, byte[]>();
|
||||
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, (unitIndex))
|
||||
{
|
||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||
_ExportBothConvertedandNot = true;
|
||||
DocReplace = new Dictionary<int, byte[]>();
|
||||
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, (unitIndex))
|
||||
{
|
||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||
_ExportBothConvertedandNot = true;
|
||||
DocReplace = new Dictionary<int, byte[]>();
|
||||
FormClosed += OnClose;
|
||||
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}";
|
||||
}
|
||||
|
||||
//Overridden function to handle export of EP data
|
||||
protected override void ExportEPAnnotationInfo(XmlElement xe, ItemInfo ii)
|
||||
{
|
||||
if (_UnitIndex > 0)
|
||||
{
|
||||
ii.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||
ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||
}
|
||||
|
||||
//switch to handle customizations for different formats
|
||||
switch (ii.ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == _AnnotationType.TypeID)?.Name)
|
||||
{
|
||||
default:
|
||||
ExportEPAnnotationInfo_Default(xe, ii);
|
||||
break;
|
||||
}
|
||||
|
||||
ii.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
|
||||
}
|
||||
|
||||
//default export of EP Data
|
||||
private void ExportEPAnnotationInfo_Default(XmlElement xe, ItemInfo ii)
|
||||
{
|
||||
//Add tab text to item
|
||||
string steptab = Volian.Print.Library.PDFReport.BuildStepTab(ii);
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "StepTab", steptab));
|
||||
|
||||
//Add db sequence to item
|
||||
string dbsequence = dbSeq(ii);
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dbsequence", dbsequence));
|
||||
|
||||
//get first transition in item and add it as an xml element
|
||||
if (ii.MyContent.ContentTransitionCount > 0)
|
||||
{
|
||||
TransitionInfo ct = ii.MyContent.ContentTransitions[0];
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionToItemID", ct.ToID.ToString()));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionTodbsequence", dbSeq(ct.ToID)));
|
||||
}
|
||||
|
||||
//export EP annotation details under an EPInfo node
|
||||
if (ii.ItemAnnotations != null)
|
||||
{
|
||||
XmlElement xepinfo = xe.OwnerDocument.CreateElement("EPInfo");
|
||||
|
||||
EPFields myEPFields = ii.GetValidEPFields(_AnnotationType.TypeID);
|
||||
ROFSTLookup lookup = ii.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(ii.MyDocVersion);
|
||||
bool epexportblank = ii.EPexportblank(_AnnotationType.TypeID); //should blank xml elements export?
|
||||
|
||||
//grab the current RO db so will know location of RO files and default graphics ext.
|
||||
using (RODbInfo myRODB = (RODbInfoList.Get()).FirstOrDefault(x => x.RODbID == ii.MyDocVersion.DocVersionAssociations[0].MyROFst.RODbID))
|
||||
{
|
||||
//For each annotation in the item that is of the current EP Annotation type
|
||||
foreach (var EPAnnotation in ii.ItemAnnotations.Where(x => x.TypeID == _AnnotationType.TypeID))
|
||||
{
|
||||
var EPAnnotationConfig = new AnnotationConfig(EPAnnotation.Config);
|
||||
|
||||
XmlElement xepdetails = xe.OwnerDocument.CreateElement("Details");
|
||||
//include the annotation ID for reference
|
||||
xepdetails.Attributes.SetNamedItem(AddAttribute(xepdetails.OwnerDocument, "AnnotationID", EPAnnotation.AnnotationID.ToString()));
|
||||
|
||||
//loop through each EP Field - name the xml elements the EP.name
|
||||
foreach (EPField EP in myEPFields)
|
||||
{
|
||||
string val = EPAnnotationConfig.GetValue("EP", EP.name);
|
||||
|
||||
if (epexportblank || !string.IsNullOrEmpty(val))
|
||||
{
|
||||
|
||||
if (_UnitIndex != 0)
|
||||
{
|
||||
val = DisplayText.ResolveUnitSpecific(ii.MyDocVersion, val);
|
||||
}
|
||||
|
||||
XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name);
|
||||
|
||||
//need to resolve ROs ROSingle, ROMulti, in text
|
||||
//get values
|
||||
switch (EP.type.ToLower())
|
||||
{
|
||||
case "text":
|
||||
|
||||
//for text, check if any embedded ROs
|
||||
//if none, set the xml element to the text
|
||||
//otherwise resolve the ROs
|
||||
MatchCollection matches = _ROAccPageTokenPattern.Matches(val);
|
||||
if (matches.Count == 0)
|
||||
{
|
||||
xindivid.InnerText = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
//resolve ROs
|
||||
//text ROs will replace the AccID key in the text
|
||||
//for binary objects like images,
|
||||
//we will keep the AccID in the text and output the binary as a separate child
|
||||
//XML element with the same xml name as the AccID
|
||||
foreach (Match m in matches)
|
||||
{
|
||||
ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[0].Value);
|
||||
|
||||
// Exclude replacing Images since are binary - for those, add a sub item
|
||||
if (Enumerable.Range(8, 15).Contains(roc.type))
|
||||
{
|
||||
xindivid.InnerText = val;
|
||||
|
||||
XmlElement xroid = AddGraphic(xindivid, m.Groups[0].Value, roc, myRODB, roc.type != 8);
|
||||
|
||||
xindivid.AppendChild(xroid);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(roc.value))
|
||||
{
|
||||
bool convertCaretToDeltaSymbol = (ii.ActiveSection != null) && ii.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
|
||||
|
||||
string rocvalue = roc.value.Replace("`", "\xB0");
|
||||
rocvalue = rocvalue.Replace("\xF8", "\xB0");
|
||||
rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta
|
||||
if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta
|
||||
val = val.Replace($"{m.Groups[0].Value}", rocvalue);
|
||||
xindivid.InnerText = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "rosingle":
|
||||
//Get the output columns from the EPFormatFile
|
||||
//set the "Item" nodes value = to those resolved items
|
||||
//separated by multiseparator
|
||||
XmlElement xindivid_rosingle = xindivid.OwnerDocument.CreateElement("Item");
|
||||
xindivid_rosingle.Attributes.SetNamedItem(AddAttribute(xindivid_rosingle.OwnerDocument, "ROID", val));
|
||||
|
||||
//add values specified in EP input list
|
||||
List<string> ro_single_tmp = EP.getROValuesList(EPAnnotation, val);
|
||||
xindivid_rosingle.InnerText = String.Join(multiseparator, ro_single_tmp.ToArray());
|
||||
|
||||
//if image, add location and binary of image
|
||||
// - images are type 8
|
||||
// but if multiple return values could combine
|
||||
// for example an text (1) + image (8) would be 9
|
||||
ROFSTLookup.rochild roc_single = lookup.GetRoChild(val);
|
||||
if (Enumerable.Range(8, 15).Contains(roc_single.type))
|
||||
{
|
||||
XmlElement xroid = AddGraphic(xindivid, val, roc_single, myRODB, roc_single.type != 8);
|
||||
xindivid_rosingle.AppendChild(xroid);
|
||||
}
|
||||
|
||||
xindivid.AppendChild(xindivid_rosingle);
|
||||
break;
|
||||
case "romulti":
|
||||
//Get the output columns from the EPFormatFile
|
||||
//create an "Item" subnode for each selected RO
|
||||
//set the nodes value = to those resolved items
|
||||
//separated by multiseparator
|
||||
foreach (string ival in val.Split(multiseparator.ToCharArray()))
|
||||
{
|
||||
XmlElement xindivid_romulti = xindivid.OwnerDocument.CreateElement("Item");
|
||||
xindivid_romulti.Attributes.SetNamedItem(AddAttribute(xindivid_romulti.OwnerDocument, "ROID", ival));
|
||||
|
||||
//add values specified in EP input list
|
||||
List<string> ro_multi_tmp = EP.getROValuesList(EPAnnotation, ival);
|
||||
xindivid_romulti.InnerText = String.Join(multiseparator, ro_multi_tmp.ToArray());
|
||||
|
||||
//if image, add location and binary of image
|
||||
// - images are type 8
|
||||
// but if multiple return values could combine
|
||||
// for example an text (1) + image (8) would be 9
|
||||
ROFSTLookup.rochild roc_multi = lookup.GetRoChild(ival);
|
||||
if (Enumerable.Range(8, 15).Contains(roc_multi.type))
|
||||
{
|
||||
XmlElement xroid = AddGraphic(xindivid, ival, roc_multi, myRODB, roc_multi.type != 8);
|
||||
xindivid_romulti.AppendChild(xroid);
|
||||
}
|
||||
|
||||
xindivid.AppendChild(xindivid_romulti);
|
||||
}
|
||||
break;
|
||||
case "tableinput":
|
||||
xindivid.InnerText = val;
|
||||
break;
|
||||
default:
|
||||
xindivid.InnerText = val;
|
||||
break;
|
||||
}
|
||||
xepdetails.AppendChild(xindivid);
|
||||
}
|
||||
}
|
||||
xepinfo.AppendChild(xepdetails);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
xe.AppendChild(xepinfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//return a db sequence string from an Item ID
|
||||
private string dbSeq(int itemID)
|
||||
{
|
||||
using (ItemInfo ii = ItemInfo.Get(itemID))
|
||||
{
|
||||
return dbSeq(ii);
|
||||
}
|
||||
}
|
||||
|
||||
//return a db sequence string from an ItemInfo
|
||||
private string dbSeq(ItemInfo ii) => $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}";
|
||||
|
||||
//For Exporting an RO that is an image
|
||||
//returns the Location and FileName of the RO Image
|
||||
private string GetROImageFileLocation(ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
|
||||
{
|
||||
string rodbpath = rodb.FolderPath;
|
||||
|
||||
string rocval = roc.value;
|
||||
if (rocval == null) rocval = Array.Find(roc.children, x => x.value.Contains('.')).value;
|
||||
|
||||
if (rocval == null) return "";
|
||||
string imgname;
|
||||
if (isMulti)
|
||||
{
|
||||
imgname = rocval.Substring(rocval.IndexOf(' ') + 1, rocval.IndexOf("\r\n") - rocval.IndexOf(' ') - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
imgname = rocval.Substring(0, rocval.IndexOf('\n'));
|
||||
}
|
||||
int thedot = imgname.LastIndexOf('.');
|
||||
string fname = imgname;
|
||||
if (thedot == -1 || (thedot != (imgname.Length - 4)))
|
||||
{
|
||||
RODbConfig roDbCfg = new RODbConfig(rodb.Config);
|
||||
fname += string.Format(".{0}", roDbCfg.GetDefaultGraphicExtension());
|
||||
}
|
||||
|
||||
string imgfile = Path.Combine(rodbpath, fname);
|
||||
return imgfile;
|
||||
}
|
||||
|
||||
//For Exporting an RO that is an image
|
||||
//returns an xmlElement
|
||||
// - that is a child to xindivid
|
||||
// - that has a name of Name
|
||||
// - that has a value of the binary representation of the image
|
||||
// - that has an attribute designating the location of the image file
|
||||
private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
|
||||
{
|
||||
Name = Name.Replace("<", "").Replace(">", "");
|
||||
|
||||
XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name);
|
||||
|
||||
string imgfile = GetROImageFileLocation(roc, rodb, isMulti);
|
||||
if (string.IsNullOrEmpty(imgfile)) return xroid;
|
||||
xroid.Attributes.SetNamedItem(AddAttribute(xroid.OwnerDocument, "Location", imgfile));
|
||||
|
||||
if (File.Exists(imgfile))
|
||||
{
|
||||
using (FileStream fsIn = new FileStream(imgfile, FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||
{
|
||||
// Create an instance of StreamReader that can read characters from the FileStream.
|
||||
using (BinaryReader r = new BinaryReader(fsIn))
|
||||
xroid.InnerText = Encoding.Default.GetString(r.ReadBytes((int)fsIn.Length));
|
||||
}
|
||||
}
|
||||
|
||||
return xroid;
|
||||
}
|
||||
|
||||
//overridden - used to set the RO location for RO Images that are not in annotations
|
||||
protected override void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
|
||||
{
|
||||
string imgfile = GetROImageFileLocation(roc, rodb, isMulti);
|
||||
if (!string.IsNullOrEmpty(imgfile)) xindivid.Attributes.SetNamedItem(AddAttribute(xindivid.OwnerDocument, "Location", imgfile));
|
||||
}
|
||||
|
||||
//overridden - used to set specific enhanced doc info
|
||||
protected override void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii)
|
||||
{
|
||||
EnhancedDocuments eds = ii.GetMyEnhancedDocuments();
|
||||
|
||||
if (eds != null && eds.Count == 1)
|
||||
{
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocType", eds[0].Type.ToString()));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToItemID", eds[0].ItemID.ToString()));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToDbSeq", dbSeq(eds[0].ItemID)));
|
||||
}
|
||||
}
|
||||
|
||||
//clear objects to release memory
|
||||
private void OnClose(object sender, EventArgs e)
|
||||
{
|
||||
DocReplace.Clear();
|
||||
DocReplace = null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -338,23 +338,23 @@ namespace VEPROMS
|
||||
//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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//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
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -1211,7 +1211,7 @@ 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);
|
||||
//this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged);
|
||||
//
|
||||
// cbUCFLUseAll
|
||||
//
|
||||
@@ -1227,7 +1227,7 @@ 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);
|
||||
//this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged);
|
||||
//
|
||||
// cbUCFLOnlyImport
|
||||
//
|
||||
@@ -1243,7 +1243,7 @@ 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);
|
||||
//this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged);
|
||||
//
|
||||
// cbUCFLNotUsed
|
||||
//
|
||||
@@ -1259,7 +1259,7 @@ 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);
|
||||
//this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged);
|
||||
//
|
||||
// cbUCFIgnore
|
||||
//
|
||||
@@ -1275,7 +1275,7 @@ 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);
|
||||
//this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged);
|
||||
//
|
||||
// btnReset
|
||||
//
|
||||
|
||||
@@ -75,24 +75,24 @@ 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;
|
||||
}
|
||||
//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
|
||||
@@ -193,7 +193,7 @@ namespace VEPROMS
|
||||
private bool ss_SyncEnhancedDocuments;
|
||||
private bool ss_SeparateWindows;
|
||||
private string ss_VisioPath;
|
||||
private int ss_UCFImportOpt;
|
||||
//private int ss_UCFImportOpt;
|
||||
|
||||
private void SaveStartingSettings()
|
||||
{
|
||||
@@ -210,7 +210,7 @@ namespace VEPROMS
|
||||
ss_SyncEnhancedDocuments = Settings.Default.SyncEnhancedDocuments;
|
||||
ss_SeparateWindows = Settings.Default.SeparateWindows;
|
||||
ss_VisioPath = Settings.Default.VisioPath;
|
||||
ss_UCFImportOpt = Settings.Default.UCFImportOpt;
|
||||
//ss_UCFImportOpt = Settings.Default.UCFImportOpt;
|
||||
}
|
||||
|
||||
private void RestoreStartingSettings() // used with the cancel button
|
||||
@@ -227,7 +227,7 @@ namespace VEPROMS
|
||||
Settings.Default.SyncEnhancedDocuments = ss_SyncEnhancedDocuments;
|
||||
Settings.Default.SeparateWindows = ss_SeparateWindows;
|
||||
Settings.Default.VisioPath = ss_VisioPath;
|
||||
Settings.Default.UCFImportOpt = ss_UCFImportOpt;
|
||||
//Settings.Default.UCFImportOpt = ss_UCFImportOpt;
|
||||
}
|
||||
|
||||
|
||||
@@ -315,45 +315,45 @@ namespace VEPROMS
|
||||
Settings.Default.VisioPath = txbxVisioPath.Text;
|
||||
}
|
||||
|
||||
private void cbUCFIgnore_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_initializing)
|
||||
{
|
||||
Settings.Default.UCFImportOpt = 0;
|
||||
}
|
||||
}
|
||||
//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 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 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 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 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
287
PROMS/VEPROMS User Interface/frmUCF.designer.cs
generated
287
PROMS/VEPROMS User Interface/frmUCF.designer.cs
generated
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -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
|
||||
@@ -707,15 +705,32 @@ namespace VEPROMS
|
||||
else
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Session);
|
||||
|
||||
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
|
||||
if (args.Index == 1 && dlg.MyNewFolder != null)
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
//form for exporting Electronic Procedures from FolderInfo
|
||||
if (args.AnnotationTypeId > 0)
|
||||
{
|
||||
tv.AddNewNode(dlg.MyNewFolder);
|
||||
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId, args.UnitIndex);
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
|
||||
if (args.Index == 1 && dlg.MyNewFolder != null)
|
||||
{
|
||||
tv.AddNewNode(dlg.MyNewFolder);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
|
||||
if (args.Index == 1 && dlg.MyNewFolder != null)
|
||||
{
|
||||
tv.AddNewNode(dlg.MyNewFolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -741,18 +756,40 @@ namespace VEPROMS
|
||||
|
||||
int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion);
|
||||
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
//form for exporting Electronic Procedures from DocVersionInfo
|
||||
if (args.AnnotationTypeId > 0)
|
||||
{
|
||||
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId, args.UnitIndex);
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
|
||||
if (dlg.MyNewProcedure != null)
|
||||
tv.AddNewNode(dlg.MyNewProcedure);
|
||||
if (dlg.MyNewProcedure != null)
|
||||
tv.AddNewNode(dlg.MyNewProcedure);
|
||||
|
||||
if (dlg.ExternalTransitionItem != null)
|
||||
tc.OpenItem(dlg.ExternalTransitionItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi, this);//Added frmVEPROMS Parameter
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
|
||||
if (dlg.MyNewProcedure != null)
|
||||
tv.AddNewNode(dlg.MyNewProcedure);
|
||||
|
||||
if (dlg.ExternalTransitionItem != null)
|
||||
tc.OpenItem(dlg.ExternalTransitionItem);
|
||||
}
|
||||
|
||||
if (dlg.ExternalTransitionItem != null)
|
||||
tc.OpenItem(dlg.ExternalTransitionItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -768,10 +805,24 @@ namespace VEPROMS
|
||||
else
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(pi.ItemID, CheckOutType.Procedure);
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
//form for exporting Electronic Procedures from ProcedureInfo
|
||||
if (args.AnnotationTypeId > 0)
|
||||
{
|
||||
dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId, args.UnitIndex);
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, this);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1192,6 +1243,7 @@ namespace VEPROMS
|
||||
|
||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||
{
|
||||
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs B2025-041
|
||||
prnDlg.SelectedSlave = args.UnitIndex;
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.SetupForProcedure(); // Setup filename
|
||||
@@ -1215,7 +1267,7 @@ namespace VEPROMS
|
||||
|
||||
//Print Section
|
||||
//C2025-028 Add a Quick Print Section option
|
||||
|
||||
|
||||
void tv_PrintSection(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
PrintSection(sender, args, false);
|
||||
@@ -1225,7 +1277,7 @@ namespace VEPROMS
|
||||
PrintSection(sender, args, true);
|
||||
}
|
||||
|
||||
void PrintSection(object sender, vlnTreeEventArgs args, bool quickprint)
|
||||
void PrintSection(object sender, vlnTreeEventArgs args, bool quickprint)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1486,9 +1538,11 @@ namespace VEPROMS
|
||||
// and if they are not the same, use the CurrentItem from the main frmVEPROMS.
|
||||
ProcedureInfo piThis = null;
|
||||
if (_CurrentItem != null) piThis = _CurrentItem.MyProcedure;
|
||||
|
||||
ProcedureInfo pi = args.Proc as ProcedureInfo;
|
||||
if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis;
|
||||
if (args.OringFlg == 1) // B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed.
|
||||
{
|
||||
if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis;
|
||||
}
|
||||
|
||||
// Check if Procedure Info is null
|
||||
if (pi == null) return;
|
||||
@@ -1530,8 +1584,11 @@ namespace VEPROMS
|
||||
if (_CurrentItem != null) piThis = _CurrentItem.MyProcedure;
|
||||
|
||||
ProcedureInfo pi = args.Proc as ProcedureInfo;
|
||||
if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis;
|
||||
|
||||
if (args.OringFlg == 1) // B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed.
|
||||
{
|
||||
if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis;
|
||||
}
|
||||
// Check if Procedure Info is null
|
||||
if (pi == null) return;
|
||||
|
||||
@@ -1544,6 +1601,7 @@ namespace VEPROMS
|
||||
{
|
||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||
{
|
||||
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs C2025-048.
|
||||
prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.SetupForProcedure(); // Setup filename
|
||||
@@ -1950,9 +2008,6 @@ 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 TabItemsToClose _MyCloseTabList = new TabItemsToClose();
|
||||
|
||||
public TabItemsToClose MyCloseTabList
|
||||
@@ -2142,45 +2197,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);
|
||||
@@ -2193,12 +2218,10 @@ 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));
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
MyUserInfo = UserInfo.GetByUserID(VlnSettings.UserID);
|
||||
@@ -2235,9 +2258,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;
|
||||
@@ -3075,32 +3095,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();
|
||||
@@ -5318,3 +5312,11 @@ namespace VEPROMS
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -213,14 +213,14 @@ 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? _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 +272,41 @@ 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
|
||||
//[Flags]
|
||||
//public enum E_ReplaceFlags : 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
|
||||
// // 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
|
||||
}
|
||||
// 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 +319,15 @@ 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 E_ReplaceFlags _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_ReplaceFlags Flag
|
||||
//{
|
||||
// get { return (E_ReplaceFlags)_Flag; }
|
||||
// set { _Flag = value; }
|
||||
//}
|
||||
private string _ReplaceWord;
|
||||
[XmlAttribute("ReplaceWord")]
|
||||
[DisplayName("Replace Word")]
|
||||
@@ -341,7 +341,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
private string _ReplaceWith;
|
||||
[Editor(typeof(RtfEditor), typeof(System.Drawing.Design.UITypeEditor))]
|
||||
//[Editor(typeof(RtfEditor), typeof(System.Drawing.Design.UITypeEditor))]
|
||||
|
||||
[XmlAttribute("ReplaceWith")]
|
||||
[DisplayName("With")]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,8 @@ 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;
|
||||
//FormatConfig.ReplaceStrData rsl = _MyFormat.PlantFormat.FormatConfig.UCFandReplaceStrData;
|
||||
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 +2194,16 @@ 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 = (E_ReplaceFlags)(rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.Partials; // save it may need to be changed back to this code.
|
||||
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 +2230,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 +2272,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 +2308,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 +2324,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 +2490,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 +2533,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 +2567,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 +2727,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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -346,21 +346,21 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
var ii = _CacheByPrimaryKey.FirstOrDefault();
|
||||
|
||||
while (ii.Value.Count > 0)
|
||||
{
|
||||
if (ii.Value[0]?.MyContent?.ContentParts != null)
|
||||
{ foreach (PartInfo pi in ii.Value[0]?.MyContent?.ContentParts) pi.Dispose(); }
|
||||
ii.Value[0].Dispose();
|
||||
}
|
||||
while (ii.Value.Count > 0)
|
||||
{
|
||||
if (ii.Value[0]?.MyContent?.ContentParts != null)
|
||||
{ foreach (PartInfo pi in ii.Value[0]?.MyContent?.ContentParts) pi.Dispose(); }
|
||||
ii.Value[0].Dispose();
|
||||
}
|
||||
_CacheByPrimaryKey.Remove(ii.Key);
|
||||
}
|
||||
|
||||
while (_CacheList.Count > 0)
|
||||
{
|
||||
if (_CacheList[0]?.MyContent?.ContentParts != null)
|
||||
{foreach (PartInfo pi in _CacheList[0]?.MyContent?.ContentParts) pi.Dispose(); }
|
||||
_CacheList[0].Dispose();
|
||||
}
|
||||
{
|
||||
if (_CacheList[0]?.MyContent?.ContentParts != null)
|
||||
{foreach (PartInfo pi in _CacheList[0]?.MyContent?.ContentParts) pi.Dispose(); }
|
||||
_CacheList[0].Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private bool _PrintAllAtOnce = false;
|
||||
@@ -450,86 +450,86 @@ namespace VEPROMS.CSLA.Library
|
||||
StringBuilder sret = new StringBuilder();
|
||||
ItemInfo pitem = this;
|
||||
while (!pitem.IsSection && !pitem.IsHigh)
|
||||
{
|
||||
{
|
||||
using (StepInfo stpinfo = StepInfo.Get(pitem.ItemID))
|
||||
{
|
||||
string thisTab = stpinfo.MyTab.CleanText;
|
||||
{
|
||||
string thisTab = stpinfo.MyTab.CleanText;
|
||||
|
||||
string typeName = stpinfo.FormatStepData.StepEditData.TypeMenu.MenuItem;
|
||||
string typeName = stpinfo.FormatStepData.StepEditData.TypeMenu.MenuItem;
|
||||
|
||||
if (!string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
thisTab = thisTab.Trim();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
thisTab = thisTab.Trim();
|
||||
}
|
||||
|
||||
// if the tab is null or
|
||||
// if the the tab is not a letter or number OR
|
||||
// the tab is an AND or OR type and is the letter "o"
|
||||
// then reset the tab an empty string so that the type name along with the count of that type
|
||||
// (ex. "AND 2", "OR 3")
|
||||
if (string.IsNullOrEmpty(thisTab) || (thisTab != string.Empty && (!(char.IsLetterOrDigit(thisTab[0])) || ((pitem.IsAnd || pitem.IsOr || pitem.IsCaution || pitem.IsNote) && thisTab.Contains("o")))))
|
||||
{
|
||||
thisTab = string.Empty;
|
||||
}
|
||||
// if the tab is null or
|
||||
// if the the tab is not a letter or number OR
|
||||
// the tab is an AND or OR type and is the letter "o"
|
||||
// then reset the tab an empty string so that the type name along with the count of that type
|
||||
// (ex. "AND 2", "OR 3")
|
||||
if (string.IsNullOrEmpty(thisTab) || (thisTab != string.Empty && (!(char.IsLetterOrDigit(thisTab[0])) || ((pitem.IsAnd || pitem.IsOr || pitem.IsCaution || pitem.IsNote) && thisTab.Contains("o")))))
|
||||
{
|
||||
thisTab = string.Empty;
|
||||
}
|
||||
|
||||
if (pitem.IsRNOPart)
|
||||
{
|
||||
if (string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
sret.Insert(0, "RNO.");
|
||||
}
|
||||
else
|
||||
{
|
||||
thisTab = thisTab.Trim();
|
||||
if (pitem.IsRNOPart)
|
||||
{
|
||||
if (string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
sret.Insert(0, "RNO.");
|
||||
}
|
||||
else
|
||||
{
|
||||
thisTab = thisTab.Trim();
|
||||
|
||||
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")"))
|
||||
{
|
||||
thisTab += ".";
|
||||
}
|
||||
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")"))
|
||||
{
|
||||
thisTab += ".";
|
||||
}
|
||||
|
||||
sret.Insert(0, "RNO." + thisTab);
|
||||
}
|
||||
}
|
||||
else if (pitem.IsCaution || pitem.IsNote)
|
||||
{
|
||||
// add the Caution or Note count to the tab (ex "Caution 1", "Note 2")
|
||||
if (string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
sret.Append("{" + typeName + " " + pitem.Ordinal.ToString() + "}");
|
||||
}
|
||||
else
|
||||
{
|
||||
thisTab = thisTab.Trim(" ".ToCharArray());
|
||||
sret.Append(thisTab + " " + pitem.Ordinal.ToString() + sret);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
thisTab = thisTab.Trim(" ".ToCharArray());
|
||||
sret.Insert(0, "RNO." + thisTab);
|
||||
}
|
||||
}
|
||||
else if (pitem.IsCaution || pitem.IsNote)
|
||||
{
|
||||
// add the Caution or Note count to the tab (ex "Caution 1", "Note 2")
|
||||
if (string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
sret.Append("{" + typeName + " " + pitem.Ordinal.ToString() + "}");
|
||||
}
|
||||
else
|
||||
{
|
||||
thisTab = thisTab.Trim(" ".ToCharArray());
|
||||
sret.Append(thisTab + " " + pitem.Ordinal.ToString() + sret);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(thisTab))
|
||||
{
|
||||
thisTab = thisTab.Trim(" ".ToCharArray());
|
||||
|
||||
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")"))
|
||||
{
|
||||
thisTab += ".";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
thisTab = "{" + typeName + " " + pitem.Ordinal.ToString() + "}.";
|
||||
}
|
||||
if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")"))
|
||||
{
|
||||
thisTab += ".";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
thisTab = "{" + typeName + " " + pitem.Ordinal.ToString() + "}.";
|
||||
}
|
||||
|
||||
sret.Insert(0, thisTab);
|
||||
}
|
||||
}
|
||||
sret.Insert(0, thisTab);
|
||||
}
|
||||
}
|
||||
|
||||
pitem = pitem.ActiveParent as ItemInfo;
|
||||
pitem = pitem.ActiveParent as ItemInfo;
|
||||
|
||||
if (pitem == null)
|
||||
break;
|
||||
}
|
||||
if (pitem == null)
|
||||
break;
|
||||
}
|
||||
|
||||
return sret.ToString().Trim(" .)".ToCharArray());
|
||||
return sret.ToString().Trim(" .)".ToCharArray());
|
||||
}
|
||||
|
||||
public void SetHeader(VE_Font myFont, string myText)
|
||||
@@ -574,11 +574,11 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
_MyPrevious = null; // Reset list so that the next line gets a new list
|
||||
if (MyPrevious != null) MyPrevious.RefreshNextItems(); // Update List for new value
|
||||
//if (_ContentID != tmp.ContentID)
|
||||
//{
|
||||
//if (_ContentID != tmp.ContentID)
|
||||
//{
|
||||
if (MyContent != null) MyContent.RefreshContentItems(); // Update List for old value
|
||||
_ContentID = tmp.ContentID; // Update the value
|
||||
//}
|
||||
//}
|
||||
_MyContent = null; // Reset list so that the next line gets a new list
|
||||
if (MyContent != null) MyContent.RefreshContentItems(); // Update List for new value
|
||||
_DTS = tmp.DTS;
|
||||
@@ -674,12 +674,12 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal static void SetParentSectionAndDocVersion(ItemInfo itemInfo, IVEDrillDownReadOnly itemParent, SectionInfo sectionInfo, ProcedureInfo procInfo, DocVersionInfo docVersionInfo, bool isAutomatic = false)
|
||||
{
|
||||
// B2022-107: Display Progress Bar Messages/Statuses when a new ROFST binary file is loaded into the database
|
||||
// Added Optional Parameter "bool isAutomatic = false" to disable the RofstLoadingStatus pop-up screen when printing baselines
|
||||
|
||||
|
||||
if (itemInfo == null) return;
|
||||
itemInfo.LoadAllAtOnce = true;
|
||||
itemInfo.ActiveParent = itemParent;
|
||||
@@ -721,7 +721,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The following method is used only in print because the 'printed' data is loaded into
|
||||
/// memory before printing. Find the next item from memory (do not go out to database).
|
||||
@@ -784,7 +784,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
bool forceConvertToText = false;
|
||||
TranCheckCount++;
|
||||
|
||||
|
||||
if (!forceConvertToText)
|
||||
{
|
||||
if (traninfo.MyItemToID.ActiveSection != null)
|
||||
@@ -802,7 +802,7 @@ namespace VEPROMS.CSLA.Library
|
||||
content.FixTransitionText(traninfo, true);
|
||||
content.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// B2025-020 Null Reference fix. Added check for valid index into the TransitionTypeList
|
||||
if (!forceConvertToText)
|
||||
@@ -812,7 +812,7 @@ namespace VEPROMS.CSLA.Library
|
||||
forceConvertToText = true;
|
||||
TranFixCount++;
|
||||
itemInfo.MyContent.FixTransitionText(traninfo, itemInfo, "Reason for Change: Transition type is not available");
|
||||
using (Content content = Content.Get(itemInfo.MyContent.ContentID))
|
||||
using (Content content = Content.Get(itemInfo.MyContent.ContentID))
|
||||
{
|
||||
content.FixTransitionText(traninfo, true);
|
||||
content.Save();
|
||||
@@ -835,14 +835,14 @@ namespace VEPROMS.CSLA.Library
|
||||
content.FixTransitionText(traninfo, true);
|
||||
content.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!forceConvertToText)
|
||||
{
|
||||
if (itemInfo.MyDocVersion != null && traninfo.MyItemToID.MyDocVersion != null && itemInfo.MyDocVersion.VersionID != traninfo.MyItemToID.MyDocVersion.VersionID) //different doc version
|
||||
if (itemInfo.MyDocVersion != null && traninfo.MyItemToID.MyDocVersion != null && itemInfo.MyDocVersion.VersionID != traninfo.MyItemToID.MyDocVersion.VersionID) //different doc version
|
||||
{
|
||||
if (!itemInfo.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[traninfo.TranType].TransMenu.Contains("Proc")) //internal format
|
||||
{
|
||||
@@ -903,7 +903,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (itemInfo.MyContent.Text.Contains("Link:Transition"))
|
||||
{
|
||||
Content content = Content.Get(itemInfo.MyContent.ContentID);
|
||||
|
||||
|
||||
if (itemInfo.MyContent.ContentTransitions != null)
|
||||
{
|
||||
foreach (TransitionInfo ct in itemInfo.MyContent.ContentTransitions)
|
||||
@@ -913,7 +913,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
|
||||
itemInfo.MyContent.RefreshContentTransitions();
|
||||
|
||||
|
||||
while (content.Text.Contains("Link:Transition"))
|
||||
{
|
||||
TranCheckCount++;
|
||||
@@ -931,7 +931,7 @@ namespace VEPROMS.CSLA.Library
|
||||
else // B2018-043 Eliminate infinite loop for invalid transition structure
|
||||
{
|
||||
// Add annotation for Invalid Transition
|
||||
AddInvalidTransitionAnnotation(itemInfo,"Invalid Transition Format");
|
||||
AddInvalidTransitionAnnotation(itemInfo, "Invalid Transition Format");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -984,16 +984,16 @@ namespace VEPROMS.CSLA.Library
|
||||
ContentInfo myContent = itemInfo.MyContent;
|
||||
string txt = myContent.Text;
|
||||
string regDelete = @"(\\v |)\<START\]\#Link\:Transition(|Range)\:[0-9]+ [0-9]+ [0-9]+(| [0-9]+)\[END\>(\\v0 |)";
|
||||
string txt2=txt;
|
||||
string txt2 = txt;
|
||||
|
||||
do{
|
||||
do {
|
||||
txt = txt2;
|
||||
txt2 = Regex.Replace(txt, regDelete, "");
|
||||
} while(txt2 != txt);
|
||||
} while (txt2 != txt);
|
||||
|
||||
if(txt2 != myContent.Text)
|
||||
if (txt2 != myContent.Text)
|
||||
{
|
||||
using(Content tmp = myContent.Get())
|
||||
using (Content tmp = myContent.Get())
|
||||
{
|
||||
tmp.Text = txt2;
|
||||
tmp.Save();
|
||||
@@ -1001,7 +1001,7 @@ namespace VEPROMS.CSLA.Library
|
||||
AddInvalidTransitionAnnotation(itemInfo, "Removed Empty Transition Text");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static bool IsTransitionToNonEditable(TransitionInfo ti)
|
||||
{
|
||||
foreach (TransitionInfo til in TransitionsToNonEditable)
|
||||
@@ -1032,7 +1032,7 @@ namespace VEPROMS.CSLA.Library
|
||||
public static int ROCheckCount = 0;
|
||||
public static int ROFixCount = 0;
|
||||
private static AnnotationType _VolianCommentType = null; // Using this to flag ro value issues with byron to braidwood
|
||||
|
||||
|
||||
public static AnnotationType VolianCommentType
|
||||
{
|
||||
get
|
||||
@@ -1065,7 +1065,7 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, this);
|
||||
ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID);
|
||||
|
||||
|
||||
this.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, this);
|
||||
string newText = this.MyContent.Text;
|
||||
|
||||
@@ -1263,7 +1263,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string GetCombinedTab(ItemInfo itemInfo, string parTab)
|
||||
{
|
||||
string pTab = parTab == null ? "" : parTab;
|
||||
@@ -1276,7 +1276,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// for supplemental information, bulleted tabs need to be included in the tab. The 'isletterordigit' should not occur for supinfo items -
|
||||
// and this includes the parent of the supinfo since that is the tab used for supinfo concatenated with its parent. (B2017-120)
|
||||
// // B2020-154: Added check for the tab to start with '(', tabs that started with this were not included in the combined tab
|
||||
if (thisTab != null && thisTab != "" && (!char.IsLetterOrDigit(thisTab[0]) && thisTab[0] != '(') && !vcbHeaderCheck && !itemInfo.IsInSupInfo && (itemInfo.SupInfos == null || itemInfo.SupInfos.Count <= 0 )) return pTab;
|
||||
if (thisTab != null && thisTab != "" && (!char.IsLetterOrDigit(thisTab[0]) && thisTab[0] != '(') && !vcbHeaderCheck && !itemInfo.IsInSupInfo && (itemInfo.SupInfos == null || itemInfo.SupInfos.Count <= 0)) return pTab;
|
||||
if (itemInfo.FormatStepData.NumberWithLevel) pTab = itemInfo.MyHLS.MyTab.CleanText.Trim();
|
||||
// if the parent tab ends with a alphanumeric and this tab is alphanumeric, add a '.' to separate them
|
||||
// also, include use the separator for bullets if doing the supplemental information tab (B2017-120)
|
||||
@@ -1285,7 +1285,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (ms && mn) pTab = pTab.TrimEnd() + ".";
|
||||
// remove ending '.' (if this is a hls, don't remove the '.')
|
||||
if (!itemInfo.IsHigh && thisTab.EndsWith(".")) thisTab = thisTab.Substring(0, thisTab.Length - 1);
|
||||
if (itemInfo.HasParentTab) return thisTab.Trim(); // F2020-023: if tab includes parent tab already, don't concatenate it
|
||||
if (itemInfo.HasParentTab) return thisTab.Trim(); // F2020-023: if tab includes parent tab already, don't concatenate it
|
||||
return pTab + thisTab.Trim();
|
||||
}
|
||||
|
||||
@@ -1341,8 +1341,8 @@ namespace VEPROMS.CSLA.Library
|
||||
// B2023-037: loading print text, resolve the RO symbols
|
||||
|
||||
bool GTLT = !itemInfo.IsTable && sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertGTELTEPMinROValue;
|
||||
bool GLTArrows = !itemInfo.IsTable && sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseDashGreaterLessThenForArrowsInROValue;
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, GTLT || GLTArrows, itemInfo);
|
||||
bool GLTArrows = !itemInfo.IsTable && sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseDashGreaterLessThenForArrowsInROValue;
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, GTLT || GLTArrows, itemInfo);
|
||||
ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID);
|
||||
itemInfo.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, itemInfo);
|
||||
}
|
||||
@@ -1367,7 +1367,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (itemInfo.MyContent.ContentTransitionCount > 0)
|
||||
{
|
||||
foreach (TransitionInfo traninfo in itemInfo.MyContent.ContentTransitions)
|
||||
@@ -1440,14 +1440,14 @@ namespace VEPROMS.CSLA.Library
|
||||
private float _MSWordPageCount = 0;
|
||||
public float MSWordPageCount
|
||||
{
|
||||
get {
|
||||
get {
|
||||
if (_MSWordPageCount == 0) // C2018-011 Get the proper word page count from the saved pdf attachment
|
||||
if (MyContent.MyEntry != null && MyContent.MyEntry.MyDocument != null)
|
||||
{
|
||||
PdfInfo pi = PdfInfo.Get(this, false);
|
||||
if(pi != null) _MSWordPageCount = (float)pi.PageCount;// B2018-071 Don't crash on invalid MS Word section
|
||||
if (pi != null) _MSWordPageCount = (float)pi.PageCount;// B2018-071 Don't crash on invalid MS Word section
|
||||
}
|
||||
return _MSWordPageCount;
|
||||
return _MSWordPageCount;
|
||||
}
|
||||
set { _MSWordPageCount = value; }
|
||||
}
|
||||
@@ -1649,7 +1649,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// the addition of the parent.IsNote, the note was breaking between 2 ANDs (the 1st AND was a
|
||||
// steplevel of 5, but the 2nd was a steplevel of 4). If something similar is seen with Cautions,
|
||||
// that check could be added.
|
||||
if (!item.IsRNOPart && !item.IsHigh && (item.MyPrevious == null || (((item.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.EnhancedBackgrounds) != E_PurchaseOptions.EnhancedBackgrounds)
|
||||
if (!item.IsRNOPart && !item.IsHigh && (item.MyPrevious == null || (((item.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.EnhancedBackgrounds) != E_PurchaseOptions.EnhancedBackgrounds)
|
||||
&& item.MyParent != null && item.MyParent.IsNote)))
|
||||
level += firstInc;
|
||||
else
|
||||
@@ -1716,7 +1716,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
return maxRNOLevel;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private bool ParentAndOr
|
||||
{
|
||||
@@ -1767,7 +1767,7 @@ namespace VEPROMS.CSLA.Library
|
||||
RemoveEnhancedFromConfig(false);
|
||||
}
|
||||
|
||||
public void RemoveEnhancedFromConfig(bool doOneStepOnly)
|
||||
public void RemoveEnhancedFromConfig(bool doOneStepOnly)
|
||||
{
|
||||
XmlDocument xd = new XmlDocument();
|
||||
if (this.MyContent.Config == null || this.MyContent.Config == "") return; // B2017-164 & B2017-172 check for null or empty config
|
||||
@@ -1782,7 +1782,7 @@ namespace VEPROMS.CSLA.Library
|
||||
ctmp.Config = config;
|
||||
ctmp.Save();
|
||||
ContentInfo.Refresh(ctmp);
|
||||
_MyConfig = null; // refresh the memory value
|
||||
_MyConfig = null; // refresh the memory value
|
||||
}
|
||||
}
|
||||
if (doOneStepOnly) return;
|
||||
@@ -2071,7 +2071,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
bool rval = false;
|
||||
ItemInfo itm = this;
|
||||
while (itm != null &&!itm.IsHigh && !rval)
|
||||
while (itm != null && !itm.IsHigh && !rval)
|
||||
{
|
||||
rval = itm.IsCautionOrNotePart;
|
||||
if (!rval) itm = itm.MyParent;
|
||||
@@ -2111,6 +2111,16 @@ namespace VEPROMS.CSLA.Library
|
||||
return (sd.Type == type);
|
||||
}
|
||||
|
||||
// C2025-024 - Electronic Procedures - Export
|
||||
//return if should export blanks
|
||||
public bool EPexportblank(int AnnTypeID)
|
||||
{
|
||||
if (ActiveFormat.PlantFormat.EPFormatFiles.Count == 0 || !ActiveFormat.PlantFormat.EPFormatFiles.Exists(x => x.AnnotationTypeID == AnnTypeID))
|
||||
return true;
|
||||
else
|
||||
return ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == AnnTypeID).exportblank;
|
||||
}
|
||||
|
||||
// C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
//return EPFields that match this step type or a parent step type
|
||||
public EPFields GetValidEPFields(int AnnTypeID)
|
||||
@@ -6057,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;
|
||||
@@ -6089,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;
|
||||
@@ -6101,23 +6111,23 @@ 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
|
||||
}
|
||||
//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)
|
||||
@@ -6151,7 +6161,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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -11,138 +11,157 @@ using static VEPROMS.CSLA.Library.ROFSTLookup;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
// class to handle storage and access of EPFormatFile and EPFormatFile details
|
||||
#region EPFormatFiles
|
||||
[TypeConverter(typeof(vlnListConverter<EPFormatFiles, EPFormatFile>))]
|
||||
public class EPFormatFiles : vlnFormatList<EPFormatFile>
|
||||
{
|
||||
public EPFormatFiles(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
}
|
||||
#endregion
|
||||
#region EPFormatFile
|
||||
public class EPFormatFile : vlnFormatItem
|
||||
{
|
||||
#region Constructor
|
||||
public EPFormatFile(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public EPFormatFile() : base() { }
|
||||
#endregion
|
||||
#region Business Fields
|
||||
// Name of the EP Viewer Format File
|
||||
private LazyLoad<string> _Name;
|
||||
[DisplayName("Name")]
|
||||
[Description("EP Viewer File Name")]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Name, "@Name");
|
||||
}
|
||||
}
|
||||
// Name of the EP Viewer Format File
|
||||
private LazyLoad<string> _Description;
|
||||
[DisplayName("Description")]
|
||||
[Description("EP Viewer Description")]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Description, "@Description");
|
||||
}
|
||||
}
|
||||
// Id of Annotation Type Associated with this file
|
||||
private LazyLoad<int?> _AnnotationTypeID;
|
||||
[DisplayName("AnnotationTypeID")]
|
||||
[Description("Id of Annotation Type Associated with this file")]
|
||||
public int? AnnotationTypeID
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID");
|
||||
}
|
||||
}
|
||||
// returns a list of fields that are defined in the EP format's structure
|
||||
private EPFields _FieldList;
|
||||
public EPFields FieldList
|
||||
{
|
||||
get
|
||||
{
|
||||
XmlDocument xd = GetEPFormatData(Name);
|
||||
return _FieldList == null ? _FieldList = new EPFields(xd.SelectNodes("/EPFormat/EPField")) : _FieldList;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Business Methods
|
||||
// update all in-use annotation types that have Electronic Procedures
|
||||
public static void UpdateAllInUseEPAnnotationTypes()
|
||||
{
|
||||
foreach (int formatid in GetAllInUseFormats())
|
||||
{
|
||||
PlantFormat frmt = FormatInfo.Get(formatid).PlantFormat;
|
||||
foreach (EPFormatFile EP in frmt.EPFormatFiles)
|
||||
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
// class to handle storage and access of EPFormatFile and EPFormatFile details
|
||||
#region EPFormatFiles
|
||||
[TypeConverter(typeof(vlnListConverter<EPFormatFiles, EPFormatFile>))]
|
||||
public class EPFormatFiles : vlnFormatList<EPFormatFile>
|
||||
{
|
||||
public EPFormatFiles(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
}
|
||||
#endregion
|
||||
#region EPFormatFile
|
||||
public class EPFormatFile : vlnFormatItem
|
||||
{
|
||||
#region Constructor
|
||||
public EPFormatFile(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public EPFormatFile() : base() { }
|
||||
#endregion
|
||||
#region Business Fields
|
||||
// Name of the EP Viewer Format File
|
||||
private LazyLoad<string> _Name;
|
||||
[DisplayName("Name")]
|
||||
[Description("EP Viewer File Name")]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Name, "@Name");
|
||||
}
|
||||
}
|
||||
// Name of the EP Viewer Format File
|
||||
private LazyLoad<string> _Description;
|
||||
[DisplayName("Description")]
|
||||
[Description("EP Viewer Description")]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Description, "@Description");
|
||||
}
|
||||
}
|
||||
// Id of Annotation Type Associated with this file
|
||||
private LazyLoad<int?> _AnnotationTypeID;
|
||||
[DisplayName("AnnotationTypeID")]
|
||||
[Description("Id of Annotation Type Associated with this file")]
|
||||
public int? AnnotationTypeID
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID");
|
||||
}
|
||||
}
|
||||
|
||||
// Return Name of Annotation that EP Format File is Attached to
|
||||
public string AnnotationName()
|
||||
{
|
||||
return AnnotationTypeInfo.Get((int) AnnotationTypeID).Name;
|
||||
}
|
||||
|
||||
//if xml value is blank, should element export?
|
||||
//defaults to true
|
||||
private LazyLoad<bool> _exportblank;
|
||||
[DisplayName("exportblank")]
|
||||
[Description("if xml value is blank, should element export?")]
|
||||
public bool exportblank
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _exportblank, "@exportblank");
|
||||
}
|
||||
}
|
||||
// returns a list of fields that are defined in the EP format's structure
|
||||
private EPFields _FieldList;
|
||||
public EPFields FieldList
|
||||
{
|
||||
get
|
||||
{
|
||||
XmlDocument xd = GetEPFormatData(Name);
|
||||
return _FieldList ?? (_FieldList = new EPFields(xd.SelectNodes("/EPFormat/EPField")));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Business Methods
|
||||
// update all in-use annotation types that have Electronic Procedures
|
||||
public static void UpdateAllInUseEPAnnotationTypes()
|
||||
{
|
||||
foreach (int formatid in GetAllInUseFormats())
|
||||
{
|
||||
PlantFormat frmt = FormatInfo.Get(formatid).PlantFormat;
|
||||
foreach (EPFormatFile EP in frmt.EPFormatFiles)
|
||||
{
|
||||
UpdateAnnotationTypeAsEP((int) EP.AnnotationTypeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Data Access
|
||||
// static - Load EP Format details - save to db (insert/update)
|
||||
public static void UpdateEPFormat(string name, string data, string userID)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "vesp_UpdateEPFormat";
|
||||
cm.Parameters.AddWithValue("@name", name);
|
||||
cm.Parameters.AddWithValue("@data", data);
|
||||
cm.Parameters.AddWithValue("@userID", userID);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
UpdateAnnotationTypeAsEP((int) EP.AnnotationTypeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Data Access
|
||||
// static - Load EP Format details - save to db (insert/update)
|
||||
public static void UpdateEPFormat(string name, string data, string userID)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "vesp_UpdateEPFormat";
|
||||
cm.Parameters.AddWithValue("@name", name);
|
||||
cm.Parameters.AddWithValue("@data", data);
|
||||
cm.Parameters.AddWithValue("@userID", userID);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// load data for getting fieldlist for this EPFormat
|
||||
public static XmlDocument GetEPFormatData(string name)
|
||||
{
|
||||
name = name.Replace(".xml", "");
|
||||
// load data for getting fieldlist for this EPFormat
|
||||
public static XmlDocument GetEPFormatData(string name)
|
||||
{
|
||||
name = name.Replace(".xml", "");
|
||||
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = "Select Data FROM EPFormats where Name = @Name";
|
||||
cm.Parameters.AddWithValue("@Name", name);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
if (dr.Read())
|
||||
{
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.XmlResolver = null;
|
||||
xd.LoadXml(dr.GetString("Data"));
|
||||
return xd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = "Select Data FROM EPFormats where Name = @Name";
|
||||
cm.Parameters.AddWithValue("@Name", name);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
if (dr.Read())
|
||||
{
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.XmlResolver = null;
|
||||
xd.LoadXml(dr.GetString("Data"));
|
||||
return xd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get all in-use formats
|
||||
public static List<int> GetAllInUseFormats()
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = @"SELECT Distinct Formats.[FormatID]
|
||||
// Get all in-use formats
|
||||
public static List<int> GetAllInUseFormats()
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = @"SELECT Distinct Formats.[FormatID]
|
||||
FROM
|
||||
(
|
||||
SELECT FormatID FROM Contents
|
||||
@@ -153,260 +172,272 @@ namespace VEPROMS.CSLA.Library
|
||||
) inuse
|
||||
inner join Formats
|
||||
on inuse.FormatID = Formats.FormatID";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
|
||||
using (DataTable dt = new DataTable())
|
||||
{
|
||||
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||
{
|
||||
da.Fill(dt);
|
||||
return dt.AsEnumerable().Select(x => x.Field<int>("FormatID")).ToList();
|
||||
}
|
||||
}
|
||||
using (DataTable dt = new DataTable())
|
||||
{
|
||||
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||
{
|
||||
da.Fill(dt);
|
||||
return dt.AsEnumerable().Select(x => x.Field<int>("FormatID")).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update an annotation type as an Electronic Procedure Annotation Type
|
||||
public static void UpdateAnnotationTypeAsEP(int typeID)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = @"Update AnnotationTypes
|
||||
// update an annotation type as an Electronic Procedure Annotation Type
|
||||
public static void UpdateAnnotationTypeAsEP(int typeID)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = @"Update AnnotationTypes
|
||||
SET IsEPAnnotationType = 1
|
||||
WHERE TypeID = @typeID";
|
||||
cm.Parameters.AddWithValue("@typeID", typeID);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
cm.Parameters.AddWithValue("@typeID", typeID);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if there are any EP Annotation Types
|
||||
public static bool IsEPAnnotationType()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = @"SELECT RESULT = CASE WHEN
|
||||
// Returns true if there are any EP Annotation Types
|
||||
public static bool IsEPAnnotationType()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = @"SELECT RESULT = CASE WHEN
|
||||
EXISTS(SELECT 1 FROM AnnotationTypes where IsEPAnnotationType = 1)
|
||||
THEN 1 ELSE 0 END";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
if (dr.Read() && dr.GetInt32("RESULT") == 1)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// EP Support has not yet been added for this DB
|
||||
// IsEPAnnotationType does not exist
|
||||
// need to run PROMS Fixes
|
||||
// until then will ignore EP code
|
||||
// instead of crashing for a field not found
|
||||
}
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
if (dr.Read() && dr.GetInt32("RESULT") == 1)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// EP Support has not yet been added for this DB
|
||||
// IsEPAnnotationType does not exist
|
||||
// need to run PROMS Fixes
|
||||
// until then will ignore EP code
|
||||
// instead of crashing for a field not found
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class EPFields : vlnFormatList<EPField>
|
||||
{
|
||||
public class EPFields : vlnFormatList<EPField>
|
||||
{
|
||||
public EPFields()
|
||||
{
|
||||
}
|
||||
|
||||
public EPFields(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
}
|
||||
// EP field class
|
||||
public class EPField : vlnFormatItem
|
||||
{
|
||||
public EPField(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public EPField() : base() { }
|
||||
private LazyLoad<string> _name;
|
||||
public string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _name, "@name");
|
||||
}
|
||||
}
|
||||
private LazyLoad<string> _type;
|
||||
public string type
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _type, "@type");
|
||||
}
|
||||
}
|
||||
private LazyLoad<string> _label;
|
||||
public string label
|
||||
{
|
||||
get
|
||||
{
|
||||
string tmp = LazyLoad(ref _label, "@label");
|
||||
}
|
||||
// EP field class
|
||||
public class EPField : vlnFormatItem
|
||||
{
|
||||
public EPField(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public EPField() : base() { }
|
||||
private LazyLoad<string> _name;
|
||||
public string name
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _name, "@name");
|
||||
}
|
||||
}
|
||||
private LazyLoad<string> _type;
|
||||
public string type
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _type, "@type");
|
||||
}
|
||||
}
|
||||
private LazyLoad<string> _label;
|
||||
public string label
|
||||
{
|
||||
get
|
||||
{
|
||||
string tmp = LazyLoad(ref _label, "@label");
|
||||
|
||||
if (string.IsNullOrEmpty(tmp))
|
||||
return LazyLoad(ref _name, "@name");
|
||||
else
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
private LazyLoad<string> _text;
|
||||
public string text
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _text, "@text");
|
||||
}
|
||||
}
|
||||
//roid of group item that individual sub-items will be the choices for the list/combobox for ROSINGLE and ROMULTI
|
||||
private LazyLoad<string> _rosource;
|
||||
public string rosource
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _rosource, "@rosource");
|
||||
}
|
||||
}
|
||||
//the columns in the RO that will be included in the exports
|
||||
private LazyLoad<string> _returncols;
|
||||
public List<string> returncols()
|
||||
{
|
||||
try
|
||||
{
|
||||
string tmp = LazyLoad(ref _returncols, "@returncols");
|
||||
if (string.IsNullOrEmpty(tmp))
|
||||
return LazyLoad(ref _name, "@name");
|
||||
else
|
||||
return tmp;
|
||||
}
|
||||
}
|
||||
private LazyLoad<string> _text;
|
||||
public string text
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _text, "@text");
|
||||
}
|
||||
}
|
||||
//roid of group item that individual sub-items will be the choices for the list/combobox for ROSINGLE and ROMULTI
|
||||
private LazyLoad<string> _rosource;
|
||||
public string rosource
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _rosource, "@rosource");
|
||||
}
|
||||
}
|
||||
//the columns in the RO that will be included in the exports
|
||||
private LazyLoad<string> _returncols;
|
||||
public List<string> returncols()
|
||||
{
|
||||
try
|
||||
{
|
||||
string tmp = LazyLoad(ref _returncols, "@returncols");
|
||||
|
||||
if (string.IsNullOrEmpty(tmp))
|
||||
return new List<string>();
|
||||
else
|
||||
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new ArgumentException($"Error in returncols for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(tmp))
|
||||
return new List<string>();
|
||||
else
|
||||
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new ArgumentException($"Error in returncols for EP file, field: {name}");
|
||||
}
|
||||
}
|
||||
|
||||
//number of lines for a multi-line text box to span
|
||||
private LazyLoad<int?> _numlines;
|
||||
public int numlines
|
||||
{
|
||||
get
|
||||
{
|
||||
int? tmp = LazyLoad(ref _numlines, "@numlines");
|
||||
//number of lines for a multi-line text box to span
|
||||
private LazyLoad<int?> _numlines;
|
||||
public int numlines
|
||||
{
|
||||
get
|
||||
{
|
||||
int? tmp = LazyLoad(ref _numlines, "@numlines");
|
||||
|
||||
if (tmp == null)
|
||||
return 1;
|
||||
if (tmp == null)
|
||||
return 1;
|
||||
|
||||
return (int) tmp;
|
||||
}
|
||||
}
|
||||
//step types that the EPForma Item is valid for (as a list of types)
|
||||
private LazyLoad<string> _validforsteptypes;
|
||||
return (int) tmp;
|
||||
}
|
||||
}
|
||||
//step types that the EPForma Item is valid for (as a list of types)
|
||||
private LazyLoad<string> _validforsteptypes;
|
||||
public List<string> validforsteptypes()
|
||||
{
|
||||
try
|
||||
{
|
||||
string tmp = LazyLoad(ref _validforsteptypes, "@validforsteptypes");
|
||||
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new ArgumentException($"Error in validforsteptypes for EP file: {((EPFormatFile) MyParentFormat).Name}.xml, field: {name}");
|
||||
}
|
||||
}
|
||||
public bool IsValidForStepType(string StepType)
|
||||
{
|
||||
List<string> tmp = validforsteptypes();
|
||||
return tmp.Contains(StepType);
|
||||
}
|
||||
{
|
||||
try
|
||||
{
|
||||
string tmp = LazyLoad(ref _validforsteptypes, "@validforsteptypes");
|
||||
return tmp.Split(',').Select(p => p.Trim()).ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new ArgumentException($"Error in validforsteptypes for EP file, field: {name}");
|
||||
}
|
||||
}
|
||||
public bool IsValidForStepType(string StepType)
|
||||
{
|
||||
List<string> tmp = validforsteptypes();
|
||||
return tmp.Contains(StepType);
|
||||
}
|
||||
|
||||
//return a list of items based on the ROsource specified in the EPFormat File
|
||||
//will return all RO items under the Group that's roid = the rosource
|
||||
public List<ROListItem> getROList(AnnotationInfo currAnn, bool includeblank)
|
||||
{
|
||||
if (string.IsNullOrEmpty(rosource))
|
||||
return new List<ROListItem>();
|
||||
//return a list of items based on the ROsource specified in the EPFormat File
|
||||
//will return all RO items under the Group that's roid = the rosource
|
||||
public List<ROListItem> getROList(AnnotationInfo currAnn, bool includeblank)
|
||||
{
|
||||
if (string.IsNullOrEmpty(rosource))
|
||||
return new List<ROListItem>();
|
||||
|
||||
try
|
||||
{
|
||||
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
||||
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||
try
|
||||
{
|
||||
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
||||
|
||||
string roid = FormatRoidKey(rosource, false);
|
||||
rochild[] children = lookup.GetRoChildrenByRoid(roid);
|
||||
if (MyDocVersion.DocVersionAssociations != null && MyDocVersion.DocVersionAssociations.Any())
|
||||
{
|
||||
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||
|
||||
List<ROListItem> mylist = children.Select(x => new ROListItem(x.title, x.roid.Substring(0, 12))).ToList();
|
||||
if (includeblank)
|
||||
mylist.Insert(0, new ROListItem("", ""));
|
||||
string roid = FormatRoidKey(rosource, false);
|
||||
rochild[] children = lookup.GetRoChildrenByRoid(roid);
|
||||
|
||||
return mylist;
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
throw new ArgumentException($"Error in rosource for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
||||
}
|
||||
}
|
||||
List<ROListItem> mylist = children.Select(x => new ROListItem(x.title, x.roid.Substring(0, 12))).ToList();
|
||||
if (includeblank)
|
||||
mylist.Insert(0, new ROListItem("", ""));
|
||||
|
||||
return mylist;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<ROListItem>
|
||||
{
|
||||
new ROListItem("", "")
|
||||
};
|
||||
}
|
||||
|
||||
//return a list of values for the specified ROID
|
||||
//given the EP items return columns
|
||||
//will return all RO items under the Group that's roid = the rosource
|
||||
public List<string> getROValuesList(AnnotationInfo currAnn, string roid)
|
||||
{
|
||||
if (string.IsNullOrEmpty(roid))
|
||||
return new List<string>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new ArgumentException($"Error in rosource for EP file, field: {name}");
|
||||
}
|
||||
}
|
||||
|
||||
List<string> values = new List<string>();
|
||||
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
||||
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||
rochild ro = lookup.GetRoChild(roid);
|
||||
//return a list of values for the specified ROID
|
||||
//given the EP items return columns
|
||||
//will return all RO items under the Group that's roid = the rosource
|
||||
public List<string> getROValuesList(AnnotationInfo currAnn, string roid)
|
||||
{
|
||||
if (string.IsNullOrEmpty(roid))
|
||||
return new List<string>();
|
||||
|
||||
List<string> rtncols = returncols();
|
||||
List<string> values = new List<string>();
|
||||
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
||||
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||
rochild ro = lookup.GetRoChild(roid);
|
||||
|
||||
if (rtncols.Count == 0)
|
||||
{
|
||||
values.Add(ro.value);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (string rcol in rtncols)
|
||||
{
|
||||
rochild ro_indiv = Array.Find(ro.children, x => x.appid.EndsWith($".{rcol}"));
|
||||
if (ro_indiv.value != null) values.Add(ro_indiv.value);
|
||||
}
|
||||
}
|
||||
List<string> rtncols = returncols();
|
||||
|
||||
return values;
|
||||
if (rtncols.Count == 0)
|
||||
{
|
||||
values.Add(ro.value);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (string rcol in rtncols)
|
||||
{
|
||||
rochild ro_indiv = Array.Find(ro.children, x => x.appid.EndsWith($".{rcol}"));
|
||||
if (ro_indiv.value != null) values.Add(ro_indiv.value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
// class to handle return of RO Lists
|
||||
#region EPFormatFiles
|
||||
public class ROListItem
|
||||
{
|
||||
public string Text { get; private set; }
|
||||
public string Value { get; private set; }
|
||||
public ROListItem(string _text, string _value)
|
||||
{
|
||||
Text = _text; Value = _value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
return values;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
// class to handle return of RO Lists
|
||||
#region EPFormatFiles
|
||||
public class ROListItem
|
||||
{
|
||||
public string Text { get; private set; }
|
||||
public string Value { get; private set; }
|
||||
public ROListItem(string _text, string _value)
|
||||
{
|
||||
Text = _text; Value = _value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
179
PROMS/Volian.Base.Library/frmRtfEdit.Designer.cs
generated
179
PROMS/Volian.Base.Library/frmRtfEdit.Designer.cs
generated
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -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))
|
||||
|
||||
@@ -618,6 +618,15 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private int _MyLastFormatID = -1;
|
||||
private StepRTB _MyStepRTB;
|
||||
private static int _OringFlg;
|
||||
public static int OringFlg
|
||||
{
|
||||
get { return _OringFlg; }
|
||||
set
|
||||
{
|
||||
_OringFlg = value;
|
||||
}
|
||||
}
|
||||
public StepRTB MyStepRTB
|
||||
{
|
||||
get { return _MyStepRTB; }
|
||||
@@ -4096,6 +4105,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
public void DoCopyStep()
|
||||
{
|
||||
MyEditItem.SaveCurrentAndContents(); // B2025-038 copy step and text to another procedure in another screen.
|
||||
// highlight selected step(s) and prompt to see if selection is what user wants:
|
||||
if (MyFlexGrid != null) MyEditItem.IdentifyMe(true);
|
||||
MyEditItem.IdentifyChildren(true);
|
||||
@@ -4143,16 +4153,22 @@ namespace Volian.Controls.Library
|
||||
|
||||
private void btnPdfCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed.
|
||||
_OringFlg = 0;
|
||||
DevComponents.DotNetBar.eEventSource oring = ((DevComponents.DotNetBar.Events.EventSourceArgs)e).Source;
|
||||
if (oring == eEventSource.Keyboard)
|
||||
_OringFlg = 1;
|
||||
|
||||
if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return;
|
||||
if (MyEditItem != null) MyEditItem.SaveCurrentAndContents();
|
||||
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure), 0);
|
||||
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 0);
|
||||
}
|
||||
|
||||
private void btnPdfQuickCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return;
|
||||
if (MyEditItem != null) MyEditItem.SaveCurrentAndContents();
|
||||
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure), 1);
|
||||
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 1);
|
||||
}
|
||||
|
||||
private void btnCASCreate_Click(object sender, EventArgs e)
|
||||
@@ -4814,9 +4830,10 @@ namespace Volian.Controls.Library
|
||||
public class StepTabRibbonEventArgs : EventArgs
|
||||
{
|
||||
public StepTabRibbonEventArgs() { ; }
|
||||
public StepTabRibbonEventArgs(ItemInfo proc)
|
||||
public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0)
|
||||
{
|
||||
_Proc = proc;
|
||||
OringFlg = oringFlg;
|
||||
}
|
||||
private ItemInfo _Proc;
|
||||
|
||||
@@ -4825,6 +4842,13 @@ namespace Volian.Controls.Library
|
||||
get { return _Proc; }
|
||||
set { _Proc = value; }
|
||||
}
|
||||
// B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed.
|
||||
private int _OringFlg;
|
||||
public int OringFlg
|
||||
{
|
||||
get { return _OringFlg; }
|
||||
set { _OringFlg = value; }
|
||||
}
|
||||
}
|
||||
public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -120,7 +120,7 @@ namespace Volian.Controls.Library
|
||||
foreach (string t in tmps) cmb.Items.Add(t.Trim());
|
||||
string val = MyConfig.GetValue("EP", EP.name);
|
||||
if (val != null && val != "") cmb.SelectedItem = val;
|
||||
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Length).First(), cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Length).FirstOrDefault(), cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||
cmb.Width = cmb.DropDownWidth;
|
||||
_DicComboBox.Add(EP.name, cmb);
|
||||
panelEP.Controls.Add(cmb, 1, panelEP.RowCount - 1);
|
||||
@@ -135,7 +135,7 @@ namespace Volian.Controls.Library
|
||||
cmb.ValueMember = "Value";
|
||||
cmb.DataSource = tmps;
|
||||
cmb.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).First().Text, cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).FirstOrDefault()?.Text, cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||
cmb.Width = cmb.DropDownWidth;
|
||||
|
||||
_DicSingleRO.Add(EP.name, cmb);
|
||||
@@ -148,7 +148,7 @@ namespace Volian.Controls.Library
|
||||
List<ROListItem> tmps = EP.getROList(currAnn, false);
|
||||
lb.DisplayMember = "Text";
|
||||
lb.ValueMember = "Value";
|
||||
lb.Width = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).First().Text, lb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||
lb.Width = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).FirstOrDefault()?.Text, lb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||
|
||||
lb.DataSource = tmps;
|
||||
_DicMultiRO.Add(EP.name, lb);
|
||||
|
||||
@@ -152,6 +152,15 @@ namespace Volian.Controls.Library
|
||||
get { return _Index; }
|
||||
set { _Index = value; }
|
||||
}
|
||||
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
//AnnotationType that would be doing an export for
|
||||
private int _AnnotationTypeId = -1;
|
||||
public int AnnotationTypeId
|
||||
{
|
||||
get { return _AnnotationTypeId; }
|
||||
set { _AnnotationTypeId = value; }
|
||||
}
|
||||
//jcb multiunit
|
||||
private string _Unit;
|
||||
public string Unit
|
||||
@@ -179,6 +188,13 @@ namespace Volian.Controls.Library
|
||||
_Destination = destination;
|
||||
_Index = index;
|
||||
}
|
||||
public vlnTreeEventArgs(TreeNode node, TreeNode destination, int index, int annTypeId)
|
||||
{
|
||||
_Node = node;
|
||||
_Destination = destination;
|
||||
_Index = index;
|
||||
_AnnotationTypeId = annTypeId;
|
||||
}
|
||||
//jcb multiunit
|
||||
public vlnTreeEventArgs(TreeNode node, TreeNode destination, int index, string unit, int unitIndex)
|
||||
{
|
||||
@@ -188,6 +204,15 @@ namespace Volian.Controls.Library
|
||||
_Unit = unit;
|
||||
_UnitIndex = unitIndex;
|
||||
}
|
||||
public vlnTreeEventArgs(TreeNode node, TreeNode destination, int index, string unit, int unitIndex, int annTypeId)
|
||||
{
|
||||
_Node = node;
|
||||
_Destination = destination;
|
||||
_Index = index;
|
||||
_Unit = unit;
|
||||
_UnitIndex = unitIndex;
|
||||
_AnnotationTypeId = annTypeId;
|
||||
}
|
||||
//end jcb multiunit
|
||||
#endregion
|
||||
public override string ToString()
|
||||
@@ -706,7 +731,10 @@ namespace Volian.Controls.Library
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(fi))// && fi.MyParent == null) //VEPROMS level
|
||||
{
|
||||
if (fi.HasWorkingDraft)
|
||||
{
|
||||
cm.MenuItems.Add("Export Procedure Set", new EventHandler(mi_Click));
|
||||
//AddEPExport(cm.MenuItems, 0, null);
|
||||
}
|
||||
else
|
||||
cm.MenuItems.Add("Import Procedure Set", new EventHandler(mi_Click));
|
||||
if (DoSpecificInfo)
|
||||
@@ -842,6 +870,9 @@ namespace Volian.Controls.Library
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion))
|
||||
{
|
||||
cm.MenuItems.Add("Export Procedure", mi_Click);
|
||||
//C2025-024 Proms XML Output - if have any EP Format files, add dropdown menu for exporting EP formats
|
||||
if (pri.ActiveFormat.PlantFormat.EPFormatFiles.Count > 0)
|
||||
AddEPExport(cm.MenuItems, pri.MyDocVersion.MultiUnitCount, pri.MyDocVersion.UnitNames, pri.ActiveFormat.PlantFormat.EPFormatFiles);
|
||||
}
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion))
|
||||
{
|
||||
@@ -1355,6 +1386,43 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
// Add context menu for exporting Electronic Procedures
|
||||
// if has an Electronic procedure
|
||||
// then loop through and add an Export for each EP Viewer
|
||||
private void AddEPExport(Menu.MenuItemCollection menuItems, int MultiUnitCount, string[] UnitNames, EPFormatFiles EPFiles)
|
||||
{
|
||||
//add outer menu
|
||||
MenuItem mi = menuItems.Add("Electronic Procedure Viewer Export");
|
||||
foreach (EPFormatFile epAnnType in EPFiles)
|
||||
{
|
||||
|
||||
//Add item for each individual EP Viewer
|
||||
MenuItem mv = mi.MenuItems.Add(epAnnType.AnnotationName());
|
||||
|
||||
//tag will be of format:
|
||||
//{EP Annotation Type ID},{Unit}
|
||||
//if not multi-unit, unit will be zero.
|
||||
if (MultiUnitCount > 1)
|
||||
{
|
||||
//if multi-unit, add menu item for each unit
|
||||
int k = 0;
|
||||
foreach (string s in UnitNames)
|
||||
{
|
||||
k++;
|
||||
MenuItem multiunit_mv = mv.MenuItems.Add(s);
|
||||
multiunit_mv.Tag = $"{epAnnType.AnnotationTypeID},{k}";
|
||||
multiunit_mv.Click += new EventHandler(miEP_Click);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mv.Tag = $"{epAnnType.AnnotationTypeID},0";
|
||||
mv.Click += new EventHandler(miEP_Click);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
|
||||
{
|
||||
_currentPri = pri;
|
||||
@@ -1538,6 +1606,27 @@ namespace Volian.Controls.Library
|
||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
//C2025-015 Get a partial folder path. This will be used in building the PDF file name when viewing Approved procedures
|
||||
string ProcFolderPathforApprovedPDF(string fullPath)
|
||||
{
|
||||
string rtnStr = "";
|
||||
try
|
||||
{
|
||||
// the fullPath string that is passed in ends with the Working Draft node. We want to trim that off
|
||||
string[] strParts = fullPath.Substring(0, fullPath.LastIndexOf("\\")).Split('\\'); //fullPath.Replace("\\Working Draft","").Split('\\');
|
||||
int lastPart = Math.Max(strParts.Length - 1, 0);
|
||||
rtnStr = strParts[lastPart];
|
||||
if (rtnStr.ToUpper().StartsWith("UNIT"))
|
||||
{
|
||||
rtnStr = strParts[lastPart - 1] + "_" + rtnStr;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
rtnStr = fullPath.Replace("\\", "_"); // just return the full path with _ intead of backslashes
|
||||
}
|
||||
return rtnStr;
|
||||
}
|
||||
|
||||
void ApprovedRevision_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1551,7 +1640,10 @@ namespace Volian.Controls.Library
|
||||
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
|
||||
superceded = true;
|
||||
}
|
||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||
ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID);
|
||||
// C2025-015 build a file name that includes a partial folder path and approved revision number
|
||||
string approvedPDFName = string.Format("{0}_{1} Revision {2}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean), prcInfo.PDFNumber,ri.RevisionNumber);
|
||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||
OnViewPDF(sender, args);
|
||||
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
||||
}
|
||||
@@ -1560,6 +1652,7 @@ namespace Volian.Controls.Library
|
||||
bool superceded = false;
|
||||
MenuItem mi = sender as MenuItem;
|
||||
if (mi == null) return;
|
||||
string childName = "";
|
||||
//RevisionInfo ri = mi.Tag as RevisionInfo;
|
||||
RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString()));
|
||||
{
|
||||
@@ -1567,12 +1660,22 @@ namespace Volian.Controls.Library
|
||||
//B2021-086 Added the check for the last revision stage is an Approved stage
|
||||
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
|
||||
superceded = true;
|
||||
// C2025_015 get the child's name to append to file name
|
||||
mip = mip.Parent as MenuItem;
|
||||
if (mip != null)
|
||||
{
|
||||
childName = "_" + mip.Text;
|
||||
}
|
||||
}
|
||||
ItemInfo ii = ItemInfo.Get(ri.ItemID);
|
||||
ii.MyDocVersion.DocVersionConfig.SelectedSlave = ri.MyConfig.Applicability_Index;
|
||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||
ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID);
|
||||
if (prcInfo.MyContent.Number.ToUpper().Contains("<U") || ii.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber.Contains("#"))
|
||||
childName = ""; // unit identification already part of procedure number-no need to add the child name to the PDF file name
|
||||
// C2025-015 build a file name that includes a partial folder path, the child name and approved revision number
|
||||
string approvedPDFName = string.Format("{0}{1}_{2} Revision {3}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean),childName, prcInfo.PDFNumber, ri.RevisionNumber);
|
||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||
OnViewPDF(sender, args);
|
||||
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
||||
}
|
||||
void SummaryOfChanges_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -2251,6 +2354,23 @@ namespace Volian.Controls.Library
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//C2025-024 Electronic Procedures - Phase 2 (PROMS XML output)
|
||||
// Handles clicking of items in the context menu
|
||||
// for exporting Electronic Procedures
|
||||
// tag will be of format:
|
||||
// {EP Annotation Type ID},{Unit}
|
||||
// if not multi-unit, unit will be zero.
|
||||
void miEP_Click(object sender, EventArgs e)
|
||||
{
|
||||
MenuItem mi = sender as MenuItem;
|
||||
int annTypeid = int.Parse(((string)mi.Tag).Split(',')[0]);
|
||||
int unit = int.Parse(((string)mi.Tag).Split(',')[1]);
|
||||
if (unit == 0)
|
||||
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, annTypeid));
|
||||
else
|
||||
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, "", unit, annTypeid));
|
||||
}
|
||||
private bool _doingCollapseNode = false; // B2016-058 when collapse is done, it always calls the drag node event which doesn't appear to be needed
|
||||
private void CollapseProcedures()
|
||||
{
|
||||
|
||||
@@ -1688,7 +1688,7 @@ namespace Volian.Print.Library
|
||||
System.Windows.Forms.MessageBox.Show(msg.ToString(), "Error during PDF creation for search:", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
private static string BuildStepTab(ItemInfo item)
|
||||
public static string BuildStepTab(ItemInfo item)
|
||||
{
|
||||
if (item == null)
|
||||
return string.Empty;
|
||||
|
||||
@@ -4459,11 +4459,11 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
//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 +5215,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user