From e2392f5fec24637e2891c8902a97226a8068545e Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 12 Dec 2018 15:25:53 +0000 Subject: [PATCH] =?UTF-8?q?C2018-039:=20Upgrade=20=E2=80=93=20User=20Contr?= =?UTF-8?q?ol=20of=20Format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/AdjustBuildRevision/Program.cs | 2 +- PROMS/DataLoader/PROMSFixes.Sql | 1017 +++++++- PROMS/Formats/fmtall/BASEall.xml | Bin 85686 -> 90782 bytes PROMS/Formats/genmacall/base.svg | Bin 0 -> 15998 bytes PROMS/VEPROMS User Interface/PROMSFixes.Sql | 1017 +++++++- .../dlgApproveProcedure.cs | 2 +- .../VEPROMS User Interface/dlgExportImport.cs | 721 ++++-- .../dlgUCFDetail.Designer.cs | 61 + PROMS/VEPROMS User Interface/dlgUCFDetail.cs | 77 + .../VEPROMS User Interface/dlgUCFDetail.resx | 120 + .../frmFolderProperties.cs | 20 + .../frmProcedureProperties.cs | 34 +- .../frmSectionProperties.cs | 38 +- .../frmSysOptions.Designer.cs | 2076 +++++++++-------- PROMS/VEPROMS User Interface/frmSysOptions.cs | 62 + PROMS/VEPROMS User Interface/frmUCF.cs | 966 ++++++++ .../VEPROMS User Interface/frmUCF.designer.cs | 287 +++ PROMS/VEPROMS User Interface/frmUCF.resx | 120 + PROMS/VEPROMS User Interface/frmVEPROMS.cs | 51 +- .../frmVersionsProperties.cs | 23 +- 20 files changed, 5491 insertions(+), 1203 deletions(-) create mode 100644 PROMS/Formats/genmacall/base.svg create mode 100644 PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs create mode 100644 PROMS/VEPROMS User Interface/dlgUCFDetail.cs create mode 100644 PROMS/VEPROMS User Interface/dlgUCFDetail.resx create mode 100644 PROMS/VEPROMS User Interface/frmUCF.cs create mode 100644 PROMS/VEPROMS User Interface/frmUCF.designer.cs create mode 100644 PROMS/VEPROMS User Interface/frmUCF.resx diff --git a/PROMS/AdjustBuildRevision/Program.cs b/PROMS/AdjustBuildRevision/Program.cs index bd4e52cf..dcd911de 100644 --- a/PROMS/AdjustBuildRevision/Program.cs +++ b/PROMS/AdjustBuildRevision/Program.cs @@ -30,7 +30,7 @@ namespace AdjustBuildRevision string outline = line; if (line.Contains("AssemblyVersion") || line.Contains("AssemblyFileVersion")) { - outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("1.5.yyMM.dHH") + "\")"); + outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("1.6.yyMM.dHH") + "\")"); // if (outline != line) // { // Console.WriteLine("Before: '{0}'", line); diff --git a/PROMS/DataLoader/PROMSFixes.Sql b/PROMS/DataLoader/PROMSFixes.Sql index d658320c..f646b76c 100644 --- a/PROMS/DataLoader/PROMSFixes.Sql +++ b/PROMS/DataLoader/PROMSFixes.Sql @@ -6876,7 +6876,8 @@ RETURNS @VersionItems TABLE VersionID int, ItemID int, ContentID int primary key, - FormatID int + FormatID int, + ParentFormatID int ) WITH EXECUTE AS OWNER AS @@ -6908,7 +6909,7 @@ BEGIN join Contents C on I.ContentID = C.ContentID ) insert into @VersionItems - select VersionID, [ItemID], [ContentID], [FormatID] + select VersionID, [ItemID], [ContentID], [FormatID], [ParentFormatID] from ItemZ I --Select * From rousages RU Where RU.ContentID in (Select ContentID from ItemZ) OPTION (MAXRECURSION 10000) @@ -13836,6 +13837,20 @@ IF (@@Error = 0) PRINT 'StoredProcedure [vesp_BuildContentsEnhanced] Succeeded' ELSE PRINT 'StoredProcedure [vesp_BuildContentsEnhanced] Error on Creation' go +---The following Formats/Config column was added for User Control of Format (UCF), but needed to be added before existing procedures. +--- Added for additional config column on formats to store UCF data. Also modified existing queries to get UCF Data for Formats +--- Note that vefn_GetVersionFormatItems was also modified as part of this work to return the parentformatId +IF NOT EXISTS(SELECT * + FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_NAME = 'Formats' + AND COLUMN_NAME = 'Config') +ALTER TABLE Formats ADD Config nvarchar(MAX) NULL; +go +-- Display the status +IF (@@Error = 0) PRINT 'Altered table [Formats] Succeeded' +ELSE PRINT 'Altered table [Formats] Error on Alter' +go + /****** Object: StoredProcedure [getChildFormats] ******/ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getChildFormats]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [getChildFormats]; @@ -13852,22 +13867,21 @@ CREATE PROCEDURE [dbo].[getChildFormats] ) WITH EXECUTE AS OWNER AS - SELECT * From (SELECT - [FormatID], - [ParentID], - [Name], - [Description], - [Data], - [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] ) T1 WHERE [ParentID]=@ParentID AND [FormatID]<>@ParentID - AND (Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0)) + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select * from ( + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz) T1 + WHERE [ParentID]=@ParentID AND [FormatID]<>@ParentID AND (Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0)) RETURN GO -- Display the status of Proc creation @@ -13887,23 +13901,24 @@ CREATE PROCEDURE [dbo].[getFormats] WITH EXECUTE AS OWNER AS - SELECT * From (SELECT - [FormatID], - [ParentID], - [Name], - [Description], - [Data], - [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] ) T1 +BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select * from ( + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz) t1 where Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0) - RETURN +END +RETURN GO -- Display the status of Proc creation IF (@@Error = 0) PRINT 'Procedure Creation: getFormats Succeeded' @@ -13929,6 +13944,7 @@ AS [Name], [Description], [Data], + [Config], [GenMac], [DTS], [UserID], @@ -14030,6 +14046,935 @@ IF (@@Error = 0) PRINT 'Procedure Creation: vefn_FindSpecificApplicUsage Succeed ELSE PRINT 'Procedure Creation: vefn_FindSpecificApplicUsage Error on Creation' GO +/***************************************************************************** + Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE + Copyright 2018 - Volian Enterprises, Inc. All rights reserved. +*****************************************************************************/ + +---- ************************* UCF Changes ************************************* + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[addFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [addFormat]; +GO +CREATE PROCEDURE [dbo].[addFormat] + +( + @ParentID int, + @Name nvarchar(100), + @Description nvarchar(250)=null, + @Data xml, + @Config nvarchar(MAX)=null, + @GenMac xml=null, + @DTS datetime, + @UserID nvarchar(100), + @newFormatID int output, + @newLastChanged timestamp output +) +WITH EXECUTE AS OWNER +AS +BEGIN TRY -- Try Block + BEGIN TRANSACTION + INSERT INTO [Formats] + ( + [ParentID], + [Name], + [Description], + [Data], + [Config], + [GenMac], + [DTS], + [UserID] + ) + VALUES + ( + @ParentID, + @Name, + @Description, + @Data, + @Config, + @GenMac, + @DTS, + @UserID + ) + SELECT @newFormatID= SCOPE_IDENTITY() + SELECT @newLastChanged=[LastChanged] + FROM [Formats] WHERE [FormatID]=@newFormatID + IF( @@TRANCOUNT > 0 ) COMMIT +END TRY +BEGIN CATCH -- Catch Block + IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level + ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback + EXEC vlnErrorHandler +END CATCH +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [addFormat] Succeeded' +ELSE PRINT 'StoredProcedure [addFormat] Error on Creation' +go +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[updateFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [updateFormat]; +GO +CREATE PROCEDURE [dbo].[updateFormat] + +( + @FormatID int, + @ParentID int, + @Name nvarchar(100), + @Description nvarchar(250)=null, + @Data xml, + @Config nvarchar(MAX), + @GenMac xml=null, + @DTS datetime, + @UserID nvarchar(100), + @LastChanged timestamp, + @newLastChanged timestamp output +) +WITH EXECUTE AS OWNER +AS +BEGIN TRY -- Try Block + BEGIN TRANSACTION + UPDATE [Formats] + SET + [ParentID]=@ParentID, + [Name]=@Name, + [Description]=@Description, + [Data]=@Data, + [Config]=@Config, + [GenMac]=@GenMac, + [DTS]=@DTS, + [UserID]=@UserID + WHERE [FormatID]=@FormatID AND [LastChanged]=@LastChanged + IF @@ROWCOUNT = 0 + BEGIN + IF NOT exists(select * from [Formats] WHERE [FormatID]=@FormatID) + RAISERROR('Format record has been deleted by another user', 16, 1) + ELSE + RAISERROR('Format has been edited by another user', 16, 1) + END + + SELECT @newLastChanged=[LastChanged] + FROM [Formats] WHERE [FormatID]=@FormatID + + IF( @@TRANCOUNT > 0 ) COMMIT +END TRY +BEGIN CATCH -- Catch Block + IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level + ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback + EXEC vlnErrorHandler +END CATCH +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [updateFormat] Succeeded' +ELSE PRINT 'StoredProcedure [updateFormat] Error on Creation' +go + +ALTER TABLE Formats ALTER COLUMN Data Xml NULL +IF (@@Error = 0) PRINT 'Alter Table Formats Succeeded' +ELSE PRINT 'Alter Table Formats Error on Alter' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatListUsed]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormatListUsed]; +GO +CREATE PROCEDURE [dbo].[getFormatListUsed] +WITH EXECUTE AS OWNER +AS +BEGIN +with formatz([FormatID], [ParentID],[Name],[Description],[Data],[GenMac],[DTS],[UserID],[Config]) as +(select [FormatID], [ParentID],[Name],[Description],[Data],[GenMac],[DTS],[UserID],[Config] +FROM [dbo].[Formats] where formatid in +((select formatid from folders union +select formatid from docversions union +select formatid from contents) +) and name != 'base' --and DATALENGTH(Data) > 5 +union all -- Child formats +select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[Config] +from formats fs +join formatz fz on fz.FormatID = fs.ParentID +--where fs.Data is null) +where fs.Data is not null and DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) +select *, + (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 in (select distinct formatid from formatz) +END +RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormatListUsed] Succeeded' +ELSE PRINT 'StoredProcedure [getFormatListUsed] Error on Creation' +go + + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormat]; +GO +CREATE PROCEDURE [dbo].[getFormat] +( + @FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@FormatID +END + + SELECT + [Contents].[ContentID], + [Contents].[Number], + [Contents].[Text], + [Contents].[Type], + [Contents].[FormatID], + [Contents].[Config], + [Contents].[DTS], + [Contents].[UserID], + [Contents].[LastChanged] + FROM [Contents] + WHERE + [Contents].[FormatID]=@FormatID + + + SELECT + [DocVersions].[VersionID], + [DocVersions].[FolderID], + [DocVersions].[VersionType], + [DocVersions].[Name], + [DocVersions].[Title], + [DocVersions].[ItemID], + [DocVersions].[FormatID], + [DocVersions].[Config], + [DocVersions].[DTS], + [DocVersions].[UserID], + [DocVersions].[LastChanged], + [Folders].[ParentID] [Folder_ParentID], + [Folders].[DBID] [Folder_DBID], + [Folders].[Name] [Folder_Name], + [Folders].[Title] [Folder_Title], + [Folders].[ShortName] [Folder_ShortName], + [Folders].[FormatID] [Folder_FormatID], + [Folders].[ManualOrder] [Folder_ManualOrder], + [Folders].[Config] [Folder_Config], + [Folders].[DTS] [Folder_DTS], + [Folders].[UsrID] [Folder_UsrID] + FROM [DocVersions] + JOIN [Folders] ON + [Folders].[FolderID]=[DocVersions].[FolderID] + WHERE + [DocVersions].[FormatID]=@FormatID + + + SELECT + [Folders].[FolderID], + [Folders].[ParentID], + [Folders].[DBID], + [Folders].[Name], + [Folders].[Title], + [Folders].[ShortName], + [Folders].[FormatID], + [Folders].[ManualOrder], + [Folders].[Config], + [Folders].[DTS], + [Folders].[UsrID], + [Folders].[LastChanged], + [Connections].[Name] [Connection_Name], + [Connections].[Title] [Connection_Title], + [Connections].[ConnectionString] [Connection_ConnectionString], + [Connections].[ServerType] [Connection_ServerType], + [Connections].[Config] [Connection_Config], + [Connections].[DTS] [Connection_DTS], + [Connections].[UsrID] [Connection_UsrID] + FROM [Folders] + JOIN [Connections] ON + [Connections].[DBID]=[Folders].[DBID] + WHERE + [Folders].[FormatID]=@FormatID +RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormat] Succeeded' +ELSE PRINT 'StoredProcedure [getFormat] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatByName]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormatByName]; +GO +CREATE PROCEDURE [dbo].[getFormatByName] +( + @Name varchar(255) +) +WITH EXECUTE AS OWNER +AS + DECLARE @FormatID INT + Set @FormatID = (select FormatID from Formats where Name = @Name) + BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@FormatID + END + + SELECT + [Contents].[ContentID], + [Contents].[Number], + [Contents].[Text], + [Contents].[Type], + [Contents].[FormatID], + [Contents].[Config], + [Contents].[DTS], + [Contents].[UserID], + [Contents].[LastChanged] + FROM [Contents] + WHERE + [Contents].[FormatID]=@FormatID + + + SELECT + [DocVersions].[VersionID], + [DocVersions].[FolderID], + [DocVersions].[VersionType], + [DocVersions].[Name], + [DocVersions].[Title], + [DocVersions].[ItemID], + [DocVersions].[FormatID], + [DocVersions].[Config], + [DocVersions].[DTS], + [DocVersions].[UserID], + [DocVersions].[LastChanged], + [Folders].[ParentID] [Folder_ParentID], + [Folders].[DBID] [Folder_DBID], + [Folders].[Name] [Folder_Name], + [Folders].[Title] [Folder_Title], + [Folders].[ShortName] [Folder_ShortName], + [Folders].[FormatID] [Folder_FormatID], + [Folders].[ManualOrder] [Folder_ManualOrder], + [Folders].[Config] [Folder_Config], + [Folders].[DTS] [Folder_DTS], + [Folders].[UsrID] [Folder_UsrID] + FROM [DocVersions] + JOIN [Folders] ON + [Folders].[FolderID]=[DocVersions].[FolderID] + WHERE + [DocVersions].[FormatID]=@FormatID + + + SELECT + [Folders].[FolderID], + [Folders].[ParentID], + [Folders].[DBID], + [Folders].[Name], + [Folders].[Title], + [Folders].[ShortName], + [Folders].[FormatID], + [Folders].[ManualOrder], + [Folders].[Config], + [Folders].[DTS], + [Folders].[UsrID], + [Folders].[LastChanged], + [Connections].[Name] [Connection_Name], + [Connections].[Title] [Connection_Title], + [Connections].[ConnectionString] [Connection_ConnectionString], + [Connections].[ServerType] [Connection_ServerType], + [Connections].[Config] [Connection_Config], + [Connections].[DTS] [Connection_DTS], + [Connections].[UsrID] [Connection_UsrID] + FROM [Folders] + JOIN [Connections] ON + [Connections].[DBID]=[Folders].[DBID] + WHERE + [Folders].[FormatID]=@FormatID + + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormatByName] Succeeded' +ELSE PRINT 'StoredProcedure [getFormatByName] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatByParentID_Name]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormatByParentID_Name]; +GO +CREATE PROCEDURE [dbo].[getFormatByParentID_Name] +( + @ParentID int, + @Name nvarchar(20) +) +WITH EXECUTE AS OWNER +AS + BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [ParentID]=@ParentID AND [Name]=@Name + END + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormatByParentID_Name] Succeeded' +ELSE PRINT 'StoredProcedure [getFormatByParentID_Name] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getParentFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getParentFormat]; +GO +CREATE PROCEDURE [dbo].[getParentFormat] +( + @ParentID int +) +WITH EXECUTE AS OWNER +AS + BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@ParentID + END + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getParentFormat] Succeeded' +ELSE PRINT 'StoredProcedure [getParentFormat] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getJustFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getJustFormat]; +GO +CREATE PROCEDURE [dbo].[getJustFormat] + +( + @FormatID int +) +WITH EXECUTE AS OWNER +AS + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@FormatID + + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getJustFormat] Succeeded' +ELSE PRINT 'StoredProcedure [getJustFormat] Error on Creation' +go + + +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]; +GO +CREATE FUNCTION [dbo].[vefn_GetItemsMatchingFormatItems](@ItemID int, @OldFormatID int, @NewFormatID int) +RETURNS @Items TABLE +( + ItemID int, + ContentID int primary key, + FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + BEGIN + -- recursive, walk through content, items and parts table to find children + -- ('with' makes it recursive, which is called cte, common table expressions, in sql) + with Itemz([ItemID], [ContentID], [FormatID], [Level]) as + (Select [I].[ItemID], [I].[ContentID], + C.[FormatID], 0 + FROM [Items] I + join Contents C on I.ContentID = C.ContentID + where I.ItemID = @ItemID and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) + Union All + -- Children : get sections off procedures and subsections off sections + select I.[ItemID], I.[ContentID], C.[FormatID], Z.[Level]+1 + from Itemz Z + join Parts P on P.ContentID = Z.ContentID + join Items I on I.ItemID = P.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) and (Z.[FormatID] is null or Z.[FormatID] = @OldFormatID or Z.FormatID = @NewFormatID) + Union All + -- Siblings : get remaining items (procedure and section) + select I.[ItemID], I.[ContentID], C.[FormatID], Z.[Level] + from Itemz Z + join Items I on I.PreviousID = Z.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and Z.[Level] > 0 + ) + insert into @Items + select [ItemID], [ContentID], [FormatID] + from ItemZ I + where ([FormatID] = @OldFormatID or [FormatID] = @NewFormatID) and [ItemID] != @ItemID + OPTION (MAXRECURSION 10000) + END +RETURN +END +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetItemsMatchingFormatItems] Succeeded' +ELSE PRINT 'StoredProcedure [vefn_GetItemsMatchingFormatItems] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_GetVersionMatchingFormatItems]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1) + DROP FUNCTION [vefn_GetVersionMatchingFormatItems]; +GO +CREATE FUNCTION [dbo].[vefn_GetVersionMatchingFormatItems](@DocVersionList varchar(MAX), @OldFormatID int, @NewFormatID int) +RETURNS @VersionItems TABLE +( + VersionID int, + ItemID int, + ContentID int primary key, + FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + BEGIN + -- recursive, walk through content, items and parts table to find children + -- ('with' makes it recursive, which is called cte, common table expressions, in sql) + with Itemz([VersionID], [ItemID], [ContentID], [FormatID]) as + (Select DV.VersionID, [I].[ItemID], [I].[ContentID], C.[FormatID] + FROM [Items] I + JOIN vefn_DocVersionSplit(@DocVersionList) DV ON I.[ItemID] = DV.[ItemID] -- get first procedure for each doc version in list + join docversions DV2 on DV.[VersionID] = DV2.[VersionID] + join Contents C on I.ContentID = C.ContentID + where (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) + Union All + -- Children : get sections off procedures and subsections off sections + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Parts P on P.ContentID = Z.ContentID + join Items I on I.ItemID = P.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) and (Z.[FormatID] is null or Z.[FormatID] = @OldFormatID or Z.FormatID = @NewFormatID) + Union All + -- Siblings : get remaining items (procedure and section) + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Items I on I.PreviousID = Z.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 + ) + insert into @VersionItems + select VersionID, [ItemID], [ContentID], [FormatID] + from ItemZ I + where [FormatID] = @OldFormatID or [FormatID] = @NewFormatID + OPTION (MAXRECURSION 10000) + END +RETURN +END +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetVersionMatchingFormatItems] Succeeded' +ELSE PRINT 'StoredProcedure [vefn_GetVersionMatchingFormatItems] Error on Creation' +go + + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_GetFolderMatchingFormatItems]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1) + DROP FUNCTION [vefn_GetFolderMatchingFormatItems]; +GO +CREATE FUNCTION [dbo].[vefn_GetFolderMatchingFormatItems](@FolderID int, @OldFormatID int, @NewFormatID int) +RETURNS @VersionItems TABLE +( + VersionID int, + ItemID int, + ContentID int primary key, + FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + DECLARE @DocVersionList NVARCHAR(MAX) -- get list of docversions for a folder: + 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 = @OldFormatID or FF.FormatID = @NewFormatID) + ) + select @DocVersionList = coalesce(@DocVersionList+',','')+cast(VersionId as varchar(255)) + from Folderz ZZ + Left Join DocVersions DV ON DV.FolderID = ZZ.FolderID + where VersionID is not null and (DV.FormatID is null or DV.FormatID = @OldFormatID or DV.FormatID = @NewFormatID) + order by versionID + OPTION (MAXRECURSION 10000) +END + BEGIN + -- recursive, walk through content, items and parts table to find children + -- ('with' makes it recursive, which is called cte, common table expressions, in sql) + with Itemz([VersionID], [ItemID], [ContentID], [FormatID]) as + ( + Select DV.VersionID, [I].[ItemID], [I].[ContentID], C.[FormatID] + FROM [Items] I + JOIN vefn_DocVersionSplit(@DocVersionList) DV ON I.[ItemID] = DV.[ItemID] -- get first procedure for each doc version in list + join docversions DV2 on DV.[VersionID] = DV2.[VersionID] + join Contents C on I.ContentID = C.ContentID + where (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) + Union All + -- Children : get sections off procedures and subsections off sections + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Parts P on P.ContentID = Z.ContentID + join Items I on I.ItemID = P.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) and (Z.[FormatID] is null or Z.[FormatID] = @OldFormatID or Z.FormatID = @NewFormatID) + Union All + -- Siblings : get remaining items (procedure and section) + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Items I on I.PreviousID = Z.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 + ) + insert into @VersionItems + select VersionID, [ItemID], [ContentID], [FormatID] + from ItemZ I + where [FormatID] = @OldFormatID or [FormatID] = @NewFormatID + OPTION (MAXRECURSION 10000) + END +RETURN +END +GO + +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetFolderMatchingFormatItems] Succeeded' +ELSE PRINT 'StoredProcedure [vefn_GetFolderMatchingFormatItems] Error on Creation' +go + +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]; +GO +CREATE PROCEDURE [dbo].[vesp_ClearOverrideFormatsByDocVersion](@DocVersionList varchar(MAX), @FormatID int, @NewFormatID int) +WITH EXECUTE AS OWNER +AS +BEGIN +DECLARE @ClearedContents TABLE +( + ContentID int +) +insert into @ClearedContents +select cc.ContentID from (select contentid from contents where formatid is not null) cc +join vefn_GetVersionMatchingFormatItems(@DocVersionList, @FormatID, @NewFormatID) vi on vi.ContentID = cc.ContentID +--where vi.FormatID = @FormatID --and vi.ParentFormatID = @FormatID +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_ClearOverrideFormatsByDocVersion Succeeded' +ELSE PRINT 'Procedure Creation: vesp_ClearOverrideFormatsByDocVersion Error on Creation' +GO + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_ClearOverrideFormatsByItem]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [vesp_ClearOverrideFormatsByItem]; +GO +CREATE PROCEDURE [dbo].[vesp_ClearOverrideFormatsByItem](@ItemID int, @FormatID int, @NewFormatID int) +WITH EXECUTE AS OWNER +AS +BEGIN +DECLARE @ClearedContents TABLE +( + ContentID int + +) +-- to test with the Ginna database: +-- vesp_ClearOverrideFormatsByItem 36421, 205 +insert into @ClearedContents +select cc.ContentID from (select contentid, FormatID from contents where formatid is not null) cc +join vefn_GetItemsMatchingFormatItems(@ItemID, @FormatID, @NewFormatID) ci on ci.ContentID = cc.ContentID +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_ClearOverrideFormatsByItem Succeeded' +ELSE PRINT 'Procedure Creation: vesp_ClearOverrideFormatsByItem Error on Creation' +GO + +IF COL_LENGTH('Formats','Name') = 40 +ALTER TABLE [Formats] ALTER COLUMN [Name] [NVARCHAR](100) NOT NULL +IF (@@Error = 0) PRINT 'Alter Table Formats Succeeded' +ELSE PRINT 'Alter Table Formats Error on Alter' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateVersionFormatForUCF]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE vesp_UpdateVersionFormatForUCF; +GO +CREATE PROCEDURE [dbo].vesp_UpdateVersionFormatForUCF +( + @VersionList nvarchar(MAX), + @OldFormatID int, + @NewFormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN +DECLARE @ClearedContents TABLE +( + ContentID int +) +-- save the content ids that will have there format changed so that these can be returned to the application +-- for a refresh. +insert into @ClearedContents +select contentid from contents where formatID=@OldFormatID and ContentID in (select distinct ContentID from vefn_GetVersionItems(@VersionList) ) + +-- reset the oldformat to the newformat. This is used when during an import of procedure(s) in the case where +-- all procedures in a set that use the oldformat should be set to the newformat (UCF formats) +UPDATE [Contents] + SET FormatID=@NewFormatID + WHERE FormatID=@OldFormatID AND ContentID in (select distinct ContentID from vefn_GetVersionItems(@VersionList) ) + +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) +END +RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'Procedure Creation: vesp_UpdateVersionFormatForUCF Succeeded' +ELSE PRINT 'Procedure Creation: vesp_UpdateVersionFormatForUCF Error on Creation' +GO + ----------------------------------------------------------------------------- /* --------------------------------------------------------------------------- @@ -14055,8 +15000,8 @@ BEGIN TRY -- Try Block set nocount on DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '9/27/2018 10:09 AM' - set @RevDescription = 'added vesp_SearchSepcifiedApplicability' + set @RevDate = '12/12/2018 07:00 AM' + set @RevDescription = 'UCF Changes' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription IF( @@TRANCOUNT > 0 ) COMMIT diff --git a/PROMS/Formats/fmtall/BASEall.xml b/PROMS/Formats/fmtall/BASEall.xml index 57398a9294e28dfa08ce61cfb39c366645ddc67f..de3b8f1e0394106f51ffbd1506f1b3dfc524628b 100644 GIT binary patch delta 3708 zcmcInOHUI~6h0NHCJ;m(lB$gZL^g^tea(=FS_?uGL6L_VLmDgv8{}b&L}G|B?%mu4 z8zpXBnV1k0j4q5WbZ?@2{Ri%d8j0VT+X{?#=+M|S?X;bH&iU?lzH`o<)hFf4AIhJ$ z*2m~3r6@_0bdkpK8lo7T7tv$2FV~OPdBxl2st)^-P8y{-ysf3AQ7;@!(;e!dCK%`4 z%~y^Vx+6hmc*fn1x=I5%H z&iXx7puIAW!++8-2AC1we*2DYyW%f*SlM7lyNTC*wtHf6t-;4T90K}YWFiBNaEf(m zr-cAvF&-%405KDE^6 zb>IqZP>I%*`Rcx8)lwEYnFiLFb>%`%0znGQYgQIzE)$j~RThINTE9mVE3Nfh%sw@K zAlWhckP>}_3>()m7hFqUMRM&*n_(qdsdH!}EZJmDr@=2*Kex@4#j#U`gp1+U721dc zT3u?R!wKym&`%XW9VrI2D?J-Z)TXTdq=s&q0lr!E@(i7$1$-Mt{bZqJCx)d*ce*G> z!=@5(1fvd`5Zbf4vN&~$=!@EzsCm++(V3((x{-eL1dRs3=!DfFaw8o7sjy04 zrNYW}r0V@ft{e37Bz288@2zxb)sxDk05dyt85J}IZSo9db-LqN&&@wO>OLH{rsxKI zW~@`&*2#gsw8PG;^Q-|X`=mF>6#B;_6KNdf7I43dZXqU53$D5(-lNb-*0TLqA$hNM z^#5yK=%k)@28EgPJ%d&+m~^PMymjf&si&DKPY(CxEFQ-U&RG4Gr!TX~*8${r*2?ZY zIOchsapYJ%=eAb}Y<8>=^|Ui(UrSsATGn+Ruxe1|49;-;kGc!%IKT0o(s8ezb|y}s zP{y|04_mym;?wvx=C}hH!M=lnyyF~jT6}5Qzk^eqjt3=Gbw;GlQ(L+3qo}J46f+04 epL?C2AeI`-JPm$39b29hA65ikRRlfH5B&jzGv&nq delta 30 ocmV+(0O9|h#RayV1)wdHK1Uj}L@oFQld!x5gZ@Uh{zd_y8_qKgVgLXD diff --git a/PROMS/Formats/genmacall/base.svg b/PROMS/Formats/genmacall/base.svg new file mode 100644 index 0000000000000000000000000000000000000000..66a2fc4d311b3efddc5fbc694dc64b060219e42f GIT binary patch literal 15998 zcmeHOZEw?76h5CP?LT--+NYT`X(6HOiXaq;O)v%((ms~HMr{LYT1bZY>)W2kCnt8U z?bvSO`chR<)5Q1s`n;d#oO|=%zgzNH#&Rxa638bxlnWWjKt9M&ewBODmiw}X{{cpZ zvXAQr7#+%SGHvMt}scd{iv;94lJvDOFqi1z{RzLY(DnqZ|Dxc>+v z7kKI(uItkR+!07Wx?>XEb1Wwq4Wt7K+S0=(&Ul9zXSin%s|2!x_sfWCea;A_H6AIKBTCwHVn*BnLPIFtO6>jTUr&Bnn9SC27EB{Rg#O?>8ahjJS6PTDTP-KMng z`W(IP<9!_~k+)-9ZOfzR)k@q;S;nhU#${Hb4ESn+5>m!hK7*PA&~Osb(~D^1^%L-8 zoT?7jW@Df5=@5551&!nAzBSyzzX#HV76ZKVS@))r2ykU9k_4Z{)%xIylq6^9ES1h7 z?igbZ=c?sQ=Dv-wKF9Pa0W3nl>)a9eq1Bv%O3r!@neRc5r}!Lz_jojP_+NwEAK=A# ztvTvjpkMWx$4wh|#WQr)1t{3Z^T-V;X@gF#J&C^2=J`auHm`{;uG1gVnute^pa)td zR~~}jA)e-PSdD*rD*33+J$Z1s_fwau8T$J;p_y>1b;cITtRowd92jF59YRE#J;WMH zT($RQ?#fqZHsjwvQ~Ub@o6~PP>o>WItZ;x8bgefS*Qi1%zCe81g8dndRpn~5=Xr^Z zCq1E>oh;)g>lv0}oSL7|Gun>_(+OL^4i!CKYR@3~NozX)?UK_7Br{~#A2k1+4v}S_3;?6cAe6=V~ z+4vAQ@+H@slboTQCSo>``vCEo82=2hdy%Bw>|-)k{ogDXePk4?M(9t^KtJirrk_`f za4At_8NVc-=6OlvZE-wA^WIXnm*bUg0Kjh6q?by0jdnxZ$ z2iM0>k!3waZTt}&jta83Yh4!GtjFTJWtGX{&uBMYU(2)SO2Qbuc!GPIV((>nCFh^G+!UmLHN ztGp=JNnk@CQ1PGWAZvGi1Pjw1E92p!ER-dAzfqf?SSMS?#s0uvcRGq?X{Fd7*d1)z zBi3itkPja5Qhq|NJcl>@BD>hpYRPkX3m^HhvQOB~40kD-jIepJXk(^%ALQPL)M>-- z=g?SyOm~I2#Q)3H@3i!^*Q9fQ(r4<;{oBBkJMvPV;Q#NivFv!D+RO6pP9mE%Z(msy zCS|D<8m6>fh>J38eDymj`EpECY5O{PRN8p6RFZC1S9w(0c(YV)Oe@knDs6oARF=u4 z<#t=yEh$2lwA`jMsb3L&ez)%x>TGtAxz}FDULW_Jo0WfzfqlrQi}PiEG>mPi`J9r@ z&M{i`LB`AWDceyWzPKO36J7rFDcMOnMc!Gi|3IG1Uz@bFGFhVB-hH_&p{KR#KWUYR z`nfA>a`(Z9G)u70%M*yq3<1u=O)8_|xU`d(UrC!?L@^)2#zU&+By9T>Cbun&e&dY2!C1b=St5mHA>D zFBA2daoybP?vd~mj_nBR{u>dB|0hxNJm=x`w5IJ^Sv}s2-~0uiS$yIot&fcvQo0TL zh|#zYxtcXx^)8j64gd18QRahe%bl|-6SvBqQ(}fN31sOeE0^p1o69NbOx|onxJFldH-84zI5Ed}=#7YgLR_ ziBGMUbQ=&-a+lSIJboR_8h4IwgGRbD`|?2_MVK{RLD=sW?cCe9UD3t6B7SJ2h5hck j8p3}6_%+(WjjL<>eIw&Q@vj|Sq*T3zpeFP;%-ixm+`SUe literal 0 HcmV?d00001 diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index d658320c..f646b76c 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -6876,7 +6876,8 @@ RETURNS @VersionItems TABLE VersionID int, ItemID int, ContentID int primary key, - FormatID int + FormatID int, + ParentFormatID int ) WITH EXECUTE AS OWNER AS @@ -6908,7 +6909,7 @@ BEGIN join Contents C on I.ContentID = C.ContentID ) insert into @VersionItems - select VersionID, [ItemID], [ContentID], [FormatID] + select VersionID, [ItemID], [ContentID], [FormatID], [ParentFormatID] from ItemZ I --Select * From rousages RU Where RU.ContentID in (Select ContentID from ItemZ) OPTION (MAXRECURSION 10000) @@ -13836,6 +13837,20 @@ IF (@@Error = 0) PRINT 'StoredProcedure [vesp_BuildContentsEnhanced] Succeeded' ELSE PRINT 'StoredProcedure [vesp_BuildContentsEnhanced] Error on Creation' go +---The following Formats/Config column was added for User Control of Format (UCF), but needed to be added before existing procedures. +--- Added for additional config column on formats to store UCF data. Also modified existing queries to get UCF Data for Formats +--- Note that vefn_GetVersionFormatItems was also modified as part of this work to return the parentformatId +IF NOT EXISTS(SELECT * + FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_NAME = 'Formats' + AND COLUMN_NAME = 'Config') +ALTER TABLE Formats ADD Config nvarchar(MAX) NULL; +go +-- Display the status +IF (@@Error = 0) PRINT 'Altered table [Formats] Succeeded' +ELSE PRINT 'Altered table [Formats] Error on Alter' +go + /****** Object: StoredProcedure [getChildFormats] ******/ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getChildFormats]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [getChildFormats]; @@ -13852,22 +13867,21 @@ CREATE PROCEDURE [dbo].[getChildFormats] ) WITH EXECUTE AS OWNER AS - SELECT * From (SELECT - [FormatID], - [ParentID], - [Name], - [Description], - [Data], - [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] ) T1 WHERE [ParentID]=@ParentID AND [FormatID]<>@ParentID - AND (Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0)) + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select * from ( + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz) T1 + WHERE [ParentID]=@ParentID AND [FormatID]<>@ParentID AND (Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0)) RETURN GO -- Display the status of Proc creation @@ -13887,23 +13901,24 @@ CREATE PROCEDURE [dbo].[getFormats] WITH EXECUTE AS OWNER AS - SELECT * From (SELECT - [FormatID], - [ParentID], - [Name], - [Description], - [Data], - [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] ) T1 +BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select * from ( + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz) t1 where Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0) - RETURN +END +RETURN GO -- Display the status of Proc creation IF (@@Error = 0) PRINT 'Procedure Creation: getFormats Succeeded' @@ -13929,6 +13944,7 @@ AS [Name], [Description], [Data], + [Config], [GenMac], [DTS], [UserID], @@ -14030,6 +14046,935 @@ IF (@@Error = 0) PRINT 'Procedure Creation: vefn_FindSpecificApplicUsage Succeed ELSE PRINT 'Procedure Creation: vefn_FindSpecificApplicUsage Error on Creation' GO +/***************************************************************************** + Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE + Copyright 2018 - Volian Enterprises, Inc. All rights reserved. +*****************************************************************************/ + +---- ************************* UCF Changes ************************************* + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[addFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [addFormat]; +GO +CREATE PROCEDURE [dbo].[addFormat] + +( + @ParentID int, + @Name nvarchar(100), + @Description nvarchar(250)=null, + @Data xml, + @Config nvarchar(MAX)=null, + @GenMac xml=null, + @DTS datetime, + @UserID nvarchar(100), + @newFormatID int output, + @newLastChanged timestamp output +) +WITH EXECUTE AS OWNER +AS +BEGIN TRY -- Try Block + BEGIN TRANSACTION + INSERT INTO [Formats] + ( + [ParentID], + [Name], + [Description], + [Data], + [Config], + [GenMac], + [DTS], + [UserID] + ) + VALUES + ( + @ParentID, + @Name, + @Description, + @Data, + @Config, + @GenMac, + @DTS, + @UserID + ) + SELECT @newFormatID= SCOPE_IDENTITY() + SELECT @newLastChanged=[LastChanged] + FROM [Formats] WHERE [FormatID]=@newFormatID + IF( @@TRANCOUNT > 0 ) COMMIT +END TRY +BEGIN CATCH -- Catch Block + IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level + ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback + EXEC vlnErrorHandler +END CATCH +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [addFormat] Succeeded' +ELSE PRINT 'StoredProcedure [addFormat] Error on Creation' +go +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[updateFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [updateFormat]; +GO +CREATE PROCEDURE [dbo].[updateFormat] + +( + @FormatID int, + @ParentID int, + @Name nvarchar(100), + @Description nvarchar(250)=null, + @Data xml, + @Config nvarchar(MAX), + @GenMac xml=null, + @DTS datetime, + @UserID nvarchar(100), + @LastChanged timestamp, + @newLastChanged timestamp output +) +WITH EXECUTE AS OWNER +AS +BEGIN TRY -- Try Block + BEGIN TRANSACTION + UPDATE [Formats] + SET + [ParentID]=@ParentID, + [Name]=@Name, + [Description]=@Description, + [Data]=@Data, + [Config]=@Config, + [GenMac]=@GenMac, + [DTS]=@DTS, + [UserID]=@UserID + WHERE [FormatID]=@FormatID AND [LastChanged]=@LastChanged + IF @@ROWCOUNT = 0 + BEGIN + IF NOT exists(select * from [Formats] WHERE [FormatID]=@FormatID) + RAISERROR('Format record has been deleted by another user', 16, 1) + ELSE + RAISERROR('Format has been edited by another user', 16, 1) + END + + SELECT @newLastChanged=[LastChanged] + FROM [Formats] WHERE [FormatID]=@FormatID + + IF( @@TRANCOUNT > 0 ) COMMIT +END TRY +BEGIN CATCH -- Catch Block + IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level + ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback + EXEC vlnErrorHandler +END CATCH +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [updateFormat] Succeeded' +ELSE PRINT 'StoredProcedure [updateFormat] Error on Creation' +go + +ALTER TABLE Formats ALTER COLUMN Data Xml NULL +IF (@@Error = 0) PRINT 'Alter Table Formats Succeeded' +ELSE PRINT 'Alter Table Formats Error on Alter' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatListUsed]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormatListUsed]; +GO +CREATE PROCEDURE [dbo].[getFormatListUsed] +WITH EXECUTE AS OWNER +AS +BEGIN +with formatz([FormatID], [ParentID],[Name],[Description],[Data],[GenMac],[DTS],[UserID],[Config]) as +(select [FormatID], [ParentID],[Name],[Description],[Data],[GenMac],[DTS],[UserID],[Config] +FROM [dbo].[Formats] where formatid in +((select formatid from folders union +select formatid from docversions union +select formatid from contents) +) and name != 'base' --and DATALENGTH(Data) > 5 +union all -- Child formats +select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[Config] +from formats fs +join formatz fz on fz.FormatID = fs.ParentID +--where fs.Data is null) +where fs.Data is not null and DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) +select *, + (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 in (select distinct formatid from formatz) +END +RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormatListUsed] Succeeded' +ELSE PRINT 'StoredProcedure [getFormatListUsed] Error on Creation' +go + + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormat]; +GO +CREATE PROCEDURE [dbo].[getFormat] +( + @FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@FormatID +END + + SELECT + [Contents].[ContentID], + [Contents].[Number], + [Contents].[Text], + [Contents].[Type], + [Contents].[FormatID], + [Contents].[Config], + [Contents].[DTS], + [Contents].[UserID], + [Contents].[LastChanged] + FROM [Contents] + WHERE + [Contents].[FormatID]=@FormatID + + + SELECT + [DocVersions].[VersionID], + [DocVersions].[FolderID], + [DocVersions].[VersionType], + [DocVersions].[Name], + [DocVersions].[Title], + [DocVersions].[ItemID], + [DocVersions].[FormatID], + [DocVersions].[Config], + [DocVersions].[DTS], + [DocVersions].[UserID], + [DocVersions].[LastChanged], + [Folders].[ParentID] [Folder_ParentID], + [Folders].[DBID] [Folder_DBID], + [Folders].[Name] [Folder_Name], + [Folders].[Title] [Folder_Title], + [Folders].[ShortName] [Folder_ShortName], + [Folders].[FormatID] [Folder_FormatID], + [Folders].[ManualOrder] [Folder_ManualOrder], + [Folders].[Config] [Folder_Config], + [Folders].[DTS] [Folder_DTS], + [Folders].[UsrID] [Folder_UsrID] + FROM [DocVersions] + JOIN [Folders] ON + [Folders].[FolderID]=[DocVersions].[FolderID] + WHERE + [DocVersions].[FormatID]=@FormatID + + + SELECT + [Folders].[FolderID], + [Folders].[ParentID], + [Folders].[DBID], + [Folders].[Name], + [Folders].[Title], + [Folders].[ShortName], + [Folders].[FormatID], + [Folders].[ManualOrder], + [Folders].[Config], + [Folders].[DTS], + [Folders].[UsrID], + [Folders].[LastChanged], + [Connections].[Name] [Connection_Name], + [Connections].[Title] [Connection_Title], + [Connections].[ConnectionString] [Connection_ConnectionString], + [Connections].[ServerType] [Connection_ServerType], + [Connections].[Config] [Connection_Config], + [Connections].[DTS] [Connection_DTS], + [Connections].[UsrID] [Connection_UsrID] + FROM [Folders] + JOIN [Connections] ON + [Connections].[DBID]=[Folders].[DBID] + WHERE + [Folders].[FormatID]=@FormatID +RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormat] Succeeded' +ELSE PRINT 'StoredProcedure [getFormat] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatByName]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormatByName]; +GO +CREATE PROCEDURE [dbo].[getFormatByName] +( + @Name varchar(255) +) +WITH EXECUTE AS OWNER +AS + DECLARE @FormatID INT + Set @FormatID = (select FormatID from Formats where Name = @Name) + BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@FormatID + END + + SELECT + [Contents].[ContentID], + [Contents].[Number], + [Contents].[Text], + [Contents].[Type], + [Contents].[FormatID], + [Contents].[Config], + [Contents].[DTS], + [Contents].[UserID], + [Contents].[LastChanged] + FROM [Contents] + WHERE + [Contents].[FormatID]=@FormatID + + + SELECT + [DocVersions].[VersionID], + [DocVersions].[FolderID], + [DocVersions].[VersionType], + [DocVersions].[Name], + [DocVersions].[Title], + [DocVersions].[ItemID], + [DocVersions].[FormatID], + [DocVersions].[Config], + [DocVersions].[DTS], + [DocVersions].[UserID], + [DocVersions].[LastChanged], + [Folders].[ParentID] [Folder_ParentID], + [Folders].[DBID] [Folder_DBID], + [Folders].[Name] [Folder_Name], + [Folders].[Title] [Folder_Title], + [Folders].[ShortName] [Folder_ShortName], + [Folders].[FormatID] [Folder_FormatID], + [Folders].[ManualOrder] [Folder_ManualOrder], + [Folders].[Config] [Folder_Config], + [Folders].[DTS] [Folder_DTS], + [Folders].[UsrID] [Folder_UsrID] + FROM [DocVersions] + JOIN [Folders] ON + [Folders].[FolderID]=[DocVersions].[FolderID] + WHERE + [DocVersions].[FormatID]=@FormatID + + + SELECT + [Folders].[FolderID], + [Folders].[ParentID], + [Folders].[DBID], + [Folders].[Name], + [Folders].[Title], + [Folders].[ShortName], + [Folders].[FormatID], + [Folders].[ManualOrder], + [Folders].[Config], + [Folders].[DTS], + [Folders].[UsrID], + [Folders].[LastChanged], + [Connections].[Name] [Connection_Name], + [Connections].[Title] [Connection_Title], + [Connections].[ConnectionString] [Connection_ConnectionString], + [Connections].[ServerType] [Connection_ServerType], + [Connections].[Config] [Connection_Config], + [Connections].[DTS] [Connection_DTS], + [Connections].[UsrID] [Connection_UsrID] + FROM [Folders] + JOIN [Connections] ON + [Connections].[DBID]=[Folders].[DBID] + WHERE + [Folders].[FormatID]=@FormatID + + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormatByName] Succeeded' +ELSE PRINT 'StoredProcedure [getFormatByName] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatByParentID_Name]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getFormatByParentID_Name]; +GO +CREATE PROCEDURE [dbo].[getFormatByParentID_Name] +( + @ParentID int, + @Name nvarchar(20) +) +WITH EXECUTE AS OWNER +AS + BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [ParentID]=@ParentID AND [Name]=@Name + END + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getFormatByParentID_Name] Succeeded' +ELSE PRINT 'StoredProcedure [getFormatByParentID_Name] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getParentFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getParentFormat]; +GO +CREATE PROCEDURE [dbo].[getParentFormat] +( + @ParentID int +) +WITH EXECUTE AS OWNER +AS + BEGIN + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@ParentID + END + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getParentFormat] Succeeded' +ELSE PRINT 'StoredProcedure [getParentFormat] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getJustFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getJustFormat]; +GO +CREATE PROCEDURE [dbo].[getJustFormat] + +( + @FormatID int +) +WITH EXECUTE AS OWNER +AS + with formatz([FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged]) as + (select [FormatID], [ParentID],[Name],[Description],[Data],[Config],[GenMac],[DTS],[UserID],[LastChanged] + FROM [dbo].[Formats] fs where DATALENGTH(fs.Data) > 5 + union all -- Child formats + select fs.[FormatID], fs.[ParentID], fs.[Name], fs.[Description], fz.[Data], fs.[Config], fz.[GenMac], fs.[DTS], fs.[UserID], fs.[LastChanged] + from formats fs + join formatz fz on fz.FormatID = fs.ParentID + where DATALENGTH(fs.Data) = 5) -- the DATALENGTH(fs.Data) = 5 is how to check for empty xml (Data's type is xml) + select *, + (SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formatz].[FormatID]) [ContentCount], + (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formatz].[FormatID]) [DocVersionCount], + (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formatz].[FormatID]) [FolderCount], + (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formatz].[FormatID]) [ChildCount] from Formatz + WHERE [FormatID]=@FormatID + + RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [getJustFormat] Succeeded' +ELSE PRINT 'StoredProcedure [getJustFormat] Error on Creation' +go + + +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]; +GO +CREATE FUNCTION [dbo].[vefn_GetItemsMatchingFormatItems](@ItemID int, @OldFormatID int, @NewFormatID int) +RETURNS @Items TABLE +( + ItemID int, + ContentID int primary key, + FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + BEGIN + -- recursive, walk through content, items and parts table to find children + -- ('with' makes it recursive, which is called cte, common table expressions, in sql) + with Itemz([ItemID], [ContentID], [FormatID], [Level]) as + (Select [I].[ItemID], [I].[ContentID], + C.[FormatID], 0 + FROM [Items] I + join Contents C on I.ContentID = C.ContentID + where I.ItemID = @ItemID and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) + Union All + -- Children : get sections off procedures and subsections off sections + select I.[ItemID], I.[ContentID], C.[FormatID], Z.[Level]+1 + from Itemz Z + join Parts P on P.ContentID = Z.ContentID + join Items I on I.ItemID = P.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) and (Z.[FormatID] is null or Z.[FormatID] = @OldFormatID or Z.FormatID = @NewFormatID) + Union All + -- Siblings : get remaining items (procedure and section) + select I.[ItemID], I.[ContentID], C.[FormatID], Z.[Level] + from Itemz Z + join Items I on I.PreviousID = Z.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and Z.[Level] > 0 + ) + insert into @Items + select [ItemID], [ContentID], [FormatID] + from ItemZ I + where ([FormatID] = @OldFormatID or [FormatID] = @NewFormatID) and [ItemID] != @ItemID + OPTION (MAXRECURSION 10000) + END +RETURN +END +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetItemsMatchingFormatItems] Succeeded' +ELSE PRINT 'StoredProcedure [vefn_GetItemsMatchingFormatItems] Error on Creation' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_GetVersionMatchingFormatItems]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1) + DROP FUNCTION [vefn_GetVersionMatchingFormatItems]; +GO +CREATE FUNCTION [dbo].[vefn_GetVersionMatchingFormatItems](@DocVersionList varchar(MAX), @OldFormatID int, @NewFormatID int) +RETURNS @VersionItems TABLE +( + VersionID int, + ItemID int, + ContentID int primary key, + FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + BEGIN + -- recursive, walk through content, items and parts table to find children + -- ('with' makes it recursive, which is called cte, common table expressions, in sql) + with Itemz([VersionID], [ItemID], [ContentID], [FormatID]) as + (Select DV.VersionID, [I].[ItemID], [I].[ContentID], C.[FormatID] + FROM [Items] I + JOIN vefn_DocVersionSplit(@DocVersionList) DV ON I.[ItemID] = DV.[ItemID] -- get first procedure for each doc version in list + join docversions DV2 on DV.[VersionID] = DV2.[VersionID] + join Contents C on I.ContentID = C.ContentID + where (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) + Union All + -- Children : get sections off procedures and subsections off sections + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Parts P on P.ContentID = Z.ContentID + join Items I on I.ItemID = P.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) and (Z.[FormatID] is null or Z.[FormatID] = @OldFormatID or Z.FormatID = @NewFormatID) + Union All + -- Siblings : get remaining items (procedure and section) + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Items I on I.PreviousID = Z.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 + ) + insert into @VersionItems + select VersionID, [ItemID], [ContentID], [FormatID] + from ItemZ I + where [FormatID] = @OldFormatID or [FormatID] = @NewFormatID + OPTION (MAXRECURSION 10000) + END +RETURN +END +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetVersionMatchingFormatItems] Succeeded' +ELSE PRINT 'StoredProcedure [vefn_GetVersionMatchingFormatItems] Error on Creation' +go + + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_GetFolderMatchingFormatItems]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1) + DROP FUNCTION [vefn_GetFolderMatchingFormatItems]; +GO +CREATE FUNCTION [dbo].[vefn_GetFolderMatchingFormatItems](@FolderID int, @OldFormatID int, @NewFormatID int) +RETURNS @VersionItems TABLE +( + VersionID int, + ItemID int, + ContentID int primary key, + FormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN + DECLARE @DocVersionList NVARCHAR(MAX) -- get list of docversions for a folder: + 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 = @OldFormatID or FF.FormatID = @NewFormatID) + ) + select @DocVersionList = coalesce(@DocVersionList+',','')+cast(VersionId as varchar(255)) + from Folderz ZZ + Left Join DocVersions DV ON DV.FolderID = ZZ.FolderID + where VersionID is not null and (DV.FormatID is null or DV.FormatID = @OldFormatID or DV.FormatID = @NewFormatID) + order by versionID + OPTION (MAXRECURSION 10000) +END + BEGIN + -- recursive, walk through content, items and parts table to find children + -- ('with' makes it recursive, which is called cte, common table expressions, in sql) + with Itemz([VersionID], [ItemID], [ContentID], [FormatID]) as + ( + Select DV.VersionID, [I].[ItemID], [I].[ContentID], C.[FormatID] + FROM [Items] I + JOIN vefn_DocVersionSplit(@DocVersionList) DV ON I.[ItemID] = DV.[ItemID] -- get first procedure for each doc version in list + join docversions DV2 on DV.[VersionID] = DV2.[VersionID] + join Contents C on I.ContentID = C.ContentID + where (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) + Union All + -- Children : get sections off procedures and subsections off sections + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Parts P on P.ContentID = Z.ContentID + join Items I on I.ItemID = P.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 and (C.FormatID is null or C.FormatID = @OldFormatID or C.FormatID = @NewFormatID) and (Z.[FormatID] is null or Z.[FormatID] = @OldFormatID or Z.FormatID = @NewFormatID) + Union All + -- Siblings : get remaining items (procedure and section) + select Z.VersionID, I.[ItemID], I.[ContentID], C.[FormatID] + from Itemz Z + join Items I on I.PreviousID = Z.ItemID + join Contents C on I.ContentID = C.ContentID + where C.Type < 20000 + ) + insert into @VersionItems + select VersionID, [ItemID], [ContentID], [FormatID] + from ItemZ I + where [FormatID] = @OldFormatID or [FormatID] = @NewFormatID + OPTION (MAXRECURSION 10000) + END +RETURN +END +GO + +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'StoredProcedure [vefn_GetFolderMatchingFormatItems] Succeeded' +ELSE PRINT 'StoredProcedure [vefn_GetFolderMatchingFormatItems] Error on Creation' +go + +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]; +GO +CREATE PROCEDURE [dbo].[vesp_ClearOverrideFormatsByDocVersion](@DocVersionList varchar(MAX), @FormatID int, @NewFormatID int) +WITH EXECUTE AS OWNER +AS +BEGIN +DECLARE @ClearedContents TABLE +( + ContentID int +) +insert into @ClearedContents +select cc.ContentID from (select contentid from contents where formatid is not null) cc +join vefn_GetVersionMatchingFormatItems(@DocVersionList, @FormatID, @NewFormatID) vi on vi.ContentID = cc.ContentID +--where vi.FormatID = @FormatID --and vi.ParentFormatID = @FormatID +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_ClearOverrideFormatsByDocVersion Succeeded' +ELSE PRINT 'Procedure Creation: vesp_ClearOverrideFormatsByDocVersion Error on Creation' +GO + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_ClearOverrideFormatsByItem]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [vesp_ClearOverrideFormatsByItem]; +GO +CREATE PROCEDURE [dbo].[vesp_ClearOverrideFormatsByItem](@ItemID int, @FormatID int, @NewFormatID int) +WITH EXECUTE AS OWNER +AS +BEGIN +DECLARE @ClearedContents TABLE +( + ContentID int + +) +-- to test with the Ginna database: +-- vesp_ClearOverrideFormatsByItem 36421, 205 +insert into @ClearedContents +select cc.ContentID from (select contentid, FormatID from contents where formatid is not null) cc +join vefn_GetItemsMatchingFormatItems(@ItemID, @FormatID, @NewFormatID) ci on ci.ContentID = cc.ContentID +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_ClearOverrideFormatsByItem Succeeded' +ELSE PRINT 'Procedure Creation: vesp_ClearOverrideFormatsByItem Error on Creation' +GO + +IF COL_LENGTH('Formats','Name') = 40 +ALTER TABLE [Formats] ALTER COLUMN [Name] [NVARCHAR](100) NOT NULL +IF (@@Error = 0) PRINT 'Alter Table Formats Succeeded' +ELSE PRINT 'Alter Table Formats Error on Alter' +go + +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateVersionFormatForUCF]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE vesp_UpdateVersionFormatForUCF; +GO +CREATE PROCEDURE [dbo].vesp_UpdateVersionFormatForUCF +( + @VersionList nvarchar(MAX), + @OldFormatID int, + @NewFormatID int +) +WITH EXECUTE AS OWNER +AS +BEGIN +DECLARE @ClearedContents TABLE +( + ContentID int +) +-- save the content ids that will have there format changed so that these can be returned to the application +-- for a refresh. +insert into @ClearedContents +select contentid from contents where formatID=@OldFormatID and ContentID in (select distinct ContentID from vefn_GetVersionItems(@VersionList) ) + +-- reset the oldformat to the newformat. This is used when during an import of procedure(s) in the case where +-- all procedures in a set that use the oldformat should be set to the newformat (UCF formats) +UPDATE [Contents] + SET FormatID=@NewFormatID + WHERE FormatID=@OldFormatID AND ContentID in (select distinct ContentID from vefn_GetVersionItems(@VersionList) ) + +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) +END +RETURN +GO +-- Display the status of Proc creation +IF (@@Error = 0) PRINT 'Procedure Creation: vesp_UpdateVersionFormatForUCF Succeeded' +ELSE PRINT 'Procedure Creation: vesp_UpdateVersionFormatForUCF Error on Creation' +GO + ----------------------------------------------------------------------------- /* --------------------------------------------------------------------------- @@ -14055,8 +15000,8 @@ BEGIN TRY -- Try Block set nocount on DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '9/27/2018 10:09 AM' - set @RevDescription = 'added vesp_SearchSepcifiedApplicability' + set @RevDate = '12/12/2018 07:00 AM' + set @RevDescription = 'UCF Changes' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription IF( @@TRANCOUNT > 0 ) COMMIT diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index 42219be0..23e409a2 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -1151,7 +1151,7 @@ namespace VEPROMS pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; if (si.IsApproved == 1) { - dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS); // "true tell export to convert ROs and Transitions to text + dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0); // "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"); diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 5e3c2215..bf75b724 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Text; using System.Windows.Forms; using VEPROMS.CSLA.Library; +using Volian.Controls.Library; using Volian.Base.Library; using System.Xml; using System.IO; @@ -39,8 +40,10 @@ namespace VEPROMS set { _ExternalTransitionItem = value; } } private Dictionary floatFoldout; - private Dictionary oldFormat; - private Dictionary newFormat; + private Dictionary importedFormat; + private Dictionary existingFormat; + private Dictionary renamedUCFFormatName; // if format is renamed, this is its new name so references to it can be made + private Dictionary renamedUCFFormatId; // if format is renamed, this is its old->new formatid private int oldRODbID; private int newRODbID; private FolderInfo _MyNewFolder; @@ -65,24 +68,30 @@ namespace VEPROMS xa.InnerText = value; return xa; } - public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS) + public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset) { + UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing _MyMode = mode; MyFolder = folderInfo; InitializeComponent(); this.Text = mode + " Dialog for " + folderInfo.Name; } - public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS) + public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset) { + UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing _MyMode = mode; MyDocVersion = docVersionInfo; InitializeComponent(); - this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name; + if (mode.ToUpper().Contains("FORMAT")) + this.Text = mode; + else + this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name; } - public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS) + public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset) { + UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing _MyMode = mode; MyProcedure = procedureInfo; @@ -105,20 +114,43 @@ namespace VEPROMS } pnlExport.Dock = DockStyle.Fill; pnlImport.Dock = DockStyle.Fill; - if (_MyMode.ToLower() == "export") + int formsize = 2; + if (_MyMode.ToLower().Contains("export")) { + // if doing formats, make various controls invisible: + if (_MyMode.ToUpper().Contains("FORMAT")) + { + cbxExportAudits.Visible = false; + lblExportProcedure.Visible = lblExportSection.Visible = lblExportStep.Visible = false; + pbExportProcedure.Visible = pbExportSection.Visible = pbExportStep.Visible = false; + lblExportTime.Visible = false; + formsize = 4; + } sfd.InitialDirectory = PEIPath; pnlExport.BringToFront(); } else { + if (_MyMode.ToUpper().Contains("FORMAT")) + { + cbxImportAudits.Visible = false; + lblImportProcedure.Visible = lblImportSection.Visible = lblImportStep.Visible = false; + pbImportProcedure.Visible = pbImportSection.Visible = pbImportStep.Visible = false; + lblExportTime.Visible = false; + formsize = 4; + } ofd.InitialDirectory = PEIPath; pnlImport.BringToFront(); } - this.Height = this.Height / 2; + this.Height = this.Height / formsize; } private void btnExport_Click(object sender, EventArgs e) { + if (_MyMode.ToUpper().Contains("FORMAT")) + { + txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, "UCF"); + return; + } if (MyFolder != null) { //Database.SelectedDatabase @@ -158,7 +190,19 @@ namespace VEPROMS { btnExport.Enabled = false; string msg = "Finished Exporting:\n\n"; - if (MyFolder != null) + if (_MyMode.ToUpper().Contains("FORMAT")) + { + this.Cursor = Cursors.WaitCursor; + MyStart = DateTime.Now; + btnDoExport.Enabled = false; + lblExportStatus.Text = "Performing Export of UC Formats"; + SaveExportUCF(); + + TimeSpan elapsed = DateTime.Now.Subtract(MyStart); + lblExportStatus.Text = "Format Export Completed in " + elapsed.ToString(); + this.Cursor = Cursors.Default; + } + else if (MyFolder != null) { this.Cursor = Cursors.WaitCursor; MyStart = DateTime.Now; @@ -181,19 +225,43 @@ namespace VEPROMS pbExportProcedure.Maximum = 1; XmlDocument xd = new XmlDocument(); ExportItem(xd, MyProcedure, "procedure"); + XmlElement xe = xd.CreateElement("formats"); + xd.DocumentElement.AppendChild(xe); + ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", false); xd.Save(txtExport.Text); TimeSpan elapsed = DateTime.Now.Subtract(MyStart); lblExportStatus.Text = "Export Completed in " + elapsed.ToString(); this.Cursor = Cursors.Default; } // added message to user when export of a procedure or procedure set has completed - if (successfullExport) - msg += MyProcedure; - else - msg = "Could not complete export"; + if (successfullExport) + { + if (!_MyMode.ToUpper().Contains("FORMAT")) + msg += MyProcedure; + else + msg += "Formats"; + } + else + msg = "Could not complete export"; MessageBox.Show(msg, "Export", MessageBoxButtons.OK, MessageBoxIcon.Information); btnCloseExport.Enabled = true; } + + private void SaveExportUCF() + { + lblExportStatus.Text = "Exporting UC Formats..."; + Application.DoEvents(); + XmlDocument xd = new XmlDocument(); + XmlElement xe = xd.CreateElement("ucformats"); + xd.AppendChild(xe); + FormatInfoList fil = FormatInfoList.Get(); + foreach (FormatInfo fi in fil) + { + if (fi.Config != null && fi.Config != "") + ExportFormat(xe, fi, "ucformat"); + } + xd.Save(txtExport.Text); + } private void SaveExportData() { XmlDocument xd = new XmlDocument(); @@ -228,7 +296,26 @@ namespace VEPROMS _DidProcessTransitions = false; // B2017-076 to know if we processed any transition (used in status message at the end of importing) _DidProcessROs = false; // B2017-076 to know if we processed any transition (used in status message at the end of importing) //LoadImportDataReader(); - if (MyFolder != null) // import a folder - a .expx file + if (_MyMode.ToUpper().Contains("FORMAT")) + { + TurnChangeManagerOff.Execute(); + MyFrmVEPROMS.DisablePing = true;// Turn-off SessionPing + bool result = TryToImportUCFs(ref isImported, ref canceledPressed); + MyFrmVEPROMS.DisablePing = false;// Turn-on SessionPing + TurnChangeManagerOn.Execute(); + if (!result) return; + if (isImported) + { + TimeSpan elapsed = DateTime.Now.Subtract(MyStart); + lblImportStatus.Text = "Format Import Completed in " + elapsed.ToString(); + } + else + { + btnImport.Enabled = true; + btnDoImport.Enabled = true; + } + } + else if (MyFolder != null) // import a folder - a .expx file { TurnChangeManagerOff.Execute(); MyFrmVEPROMS.DisablePing = true;// Turn-off SessionPing @@ -289,6 +376,71 @@ namespace VEPROMS btnCloseImport.PerformClick(); } } + + private bool TryToImportUCFs(ref bool isImported, ref bool canceledPressed) + { + try + { + existingFormat = new Dictionary(); + FormatInfoList fil = FormatInfoList.Get(); + foreach (FormatInfo fi in fil) + existingFormat.Add(fi.Name, fi.FormatID); + XmlDocument xd = new XmlDocument(); + xd.Load(txtImport.Text); + XmlNodeList nl = xd.SelectNodes("ucformats/ucformat"); + foreach (XmlNode nd in nl) + { + int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText); + string name = nd.Attributes.GetNamedItem("name").InnerText; + string config = null; + XmlNode cfg = nd.Attributes.GetNamedItem("config"); + if (cfg != null) config = cfg.InnerText; + string pname = nd.Attributes.GetNamedItem("pname").InnerText; + string description = null; + XmlNode descript = nd.Attributes.GetNamedItem("description"); + if (descript != null) description = descript.InnerText; + string userid = nd.Attributes.GetNamedItem("userid").InnerText; + DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText); + if (!existingFormat.ContainsKey(pname)) return false; + int pid = existingFormat[pname]; + Format pformat = Format.Get(pid); + if (existingFormat.ContainsKey(name)) // this UCF already exists in database, just update the record. + { + FormatInfo exFI = FormatInfo.Get(existingFormat[name]); + if (exFI.Config != config) + { + using (Format f = Format.Get(exFI.FormatID)) + { + f.Name = name; + f.MyParent = pformat; + f.Description = description; + f.UserID = userid; + f.DTS = dts; + f.Config = config; + f.Save(); + } + } + } + else // doesn't exist in the database, add it + { + + Format rec = Format.MakeFormat(pformat, name, description, null, null, dts, userid); + rec.Config = config; + rec.Save(); + } + } + isImported = true; + return true; + } + catch (Exception ex) + { + MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); + _MyLog.Warn("Failed during UC Formats Import", ex); + this.Close(); + isImported = false; + return false; + } + } private bool TryToImportProcedure(ref bool isImported, ref bool canceledPressed) { try @@ -411,7 +563,14 @@ namespace VEPROMS } #endregion } // end - need to select RO Path - + bool didImp = LoadFormats(xd, "procedure/formats/format"); + if (!didImp) + { + this.Cursor = Cursors.Default; + this.btnImport.Enabled = true; // allow user to select a different export file to import + this.btnDoImport.Enabled = true; // allow user to change mind and perform the import + return false; // Return False to Indicate that the Import did not succeed + } // use resolvedProcNum to determine if procedure is 'unique', i.e. if the procedure number exists // and user does not overwrite or copy, then the procedure should NOT be imported. Fix for B2016-045 bool resolvedProcNum = true; @@ -472,8 +631,28 @@ namespace VEPROMS ImportProcedureNew(xd); isImported = true; } + if (isImported && UCFImportCase==E_UCFImportOptions.LoadForSetOnly) UpdateFormatForUCFInSet(); return true;// Import Suceeded } + private void UpdateFormatForUCFInSet() + { + // this gets called if the UCFImportCase == LoadForSetOnly, i.e. only items in this PROCEDURE Set whose formats point to a + // UCF format should point to the updated (copied) UCF format. + if (renamedUCFFormatId == null) return; + foreach (int key in renamedUCFFormatId.Keys) + { + using (ContentInfoList cil = ContentInfoList.FixFormatIDAfterImport(MyDocVersion.VersionID.ToString(), renamedUCFFormatId[key], key)) + { + foreach (ContentInfo ci in cil) + { + using (Content c = ci.Get()) + { + ContentInfo.Refresh(c); + } + } + } + } + } // Added Error Handling to assure that Change Manager is turned-on regardless of success or failure of the import private void TryToLoadImportDataDocument() { @@ -490,14 +669,14 @@ namespace VEPROMS { //add imported procedure floatFoldout = new Dictionary(); - oldFormat = new Dictionary(); - newFormat = new Dictionary(); - FormatInfoList fil = FormatInfoList.Get(); - foreach (FormatInfo fi in fil) - { - oldFormat.Add(fi.FormatID, fi.Name); - newFormat.Add(fi.Name, fi.FormatID); - } + importedFormat = new Dictionary(); + existingFormat = new Dictionary(); + FormatInfoList fil = FormatInfoList.Get(); + foreach (FormatInfo fi in fil) + { + importedFormat.Add(fi.FormatID, fi.Name); + existingFormat.Add(fi.Name, fi.FormatID); + } Old2NewItem = new Dictionary(); Old2NewContent = new Dictionary(); Old2NewLibDoc = new Dictionary(); @@ -519,13 +698,13 @@ namespace VEPROMS private void ImportProcedureCopy(XmlDocument xd) { floatFoldout = new Dictionary(); - oldFormat = new Dictionary(); - newFormat = new Dictionary(); + importedFormat = new Dictionary(); + existingFormat = new Dictionary(); FormatInfoList fil = FormatInfoList.Get(); foreach (FormatInfo fi in fil) { - oldFormat.Add(fi.FormatID, fi.Name); - newFormat.Add(fi.Name, fi.FormatID); + importedFormat.Add(fi.FormatID, fi.Name); + existingFormat.Add(fi.Name, fi.FormatID); } Old2NewItem = new Dictionary(); Old2NewContent = new Dictionary(); @@ -558,13 +737,13 @@ namespace VEPROMS private bool ImportProcedureOverwrite(XmlDocument xd, ProcedureInfo pi) { floatFoldout = new Dictionary(); - oldFormat = new Dictionary(); - newFormat = new Dictionary(); + importedFormat = new Dictionary(); + existingFormat = new Dictionary( ); FormatInfoList fil = FormatInfoList.Get(); foreach (FormatInfo fi in fil) { - oldFormat.Add(fi.FormatID, fi.Name); - newFormat.Add(fi.Name, fi.FormatID); + importedFormat.Add(fi.FormatID, fi.Name); + existingFormat.Add(fi.Name, fi.FormatID); } Old2NewItem = new Dictionary(); Old2NewContent = new Dictionary(); @@ -620,7 +799,14 @@ namespace VEPROMS ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently); XmlDocument xd = new XmlDocument(); xd.Load(fn); - LoadFormats(xd); + bool didImp = LoadFormats(xd, "folder/formats/format"); + if (!didImp) + { + this.Cursor = Cursors.Default; + this.btnImport.Enabled = true; // allow user to select a different export file to import + this.btnDoImport.Enabled = true; // allow user to change mind and perform the import + return; // Return False to Indicate that the Import did not succeed + } Folder ff = AddFolder(Folder.Get(MyFolder.FolderID), xd); if (ff == null) { @@ -656,33 +842,33 @@ namespace VEPROMS FixFloatingFoldouts(); SaveTransitionAndItemContentIDs(); } - private void FixSectionStart(ProcedureInfo pi) - { - Content c = Content.Get(pi.MyContent.ContentID); - XmlDocument xd = new XmlDocument(); - // If the config field is empty, add an empty xml node. - if (c.Config == "") c.Config = ""; - xd.LoadXml(c.Config); - XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart"); - if (xn != null) - { - int iid = int.Parse(xn.InnerText); - if (Old2NewItem.ContainsKey(iid)) - iid = Old2NewItem[iid]; - else - { - int oldid = iid; - iid = pi.ItemID; - XmlAttribute xa = xd.CreateAttribute("ErrorSectionStart"); - xa.InnerText = oldid.ToString(); - XmlNode xp = xd.SelectSingleNode("Config/Procedure"); - xp.Attributes.SetNamedItem(xa); - } - xn.InnerText = iid.ToString(); - c.Config = xd.OuterXml; - c.Save(); - } - } + private void FixSectionStart(ProcedureInfo pi) + { + Content c = Content.Get(pi.MyContent.ContentID); + XmlDocument xd = new XmlDocument(); + // If the config field is empty, add an empty xml node. + if (c.Config == "") c.Config = ""; + xd.LoadXml(c.Config); + XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart"); + if (xn != null) + { + int iid = int.Parse(xn.InnerText); + if (Old2NewItem.ContainsKey(iid)) + iid = Old2NewItem[iid]; + else + { + int oldid = iid; + iid = pi.ItemID; + XmlAttribute xa = xd.CreateAttribute("ErrorSectionStart"); + xa.InnerText = oldid.ToString(); + XmlNode xp = xd.SelectSingleNode("Config/Procedure"); + xp.Attributes.SetNamedItem(xa); + } + xn.InnerText = iid.ToString(); + c.Config = xd.OuterXml; + c.Save(); + } + } private void FixFloatingFoldouts() { foreach (int key in floatFoldout.Keys) @@ -699,24 +885,241 @@ namespace VEPROMS c.Save(); } } - - // note that his is only used when importing a folder - private void LoadFormats(XmlDocument xd) + private E_UCFImportOptions UCFImportDefaultFromSettings; + private E_UCFImportOptions UCFImportCase = E_UCFImportOptions.LoadOnlyImported; + Dictionary existingCopyFCName = new Dictionary(); + // note that this is used when importing a folder or a procedure (procedure was added for UCF changes) + private bool LoadFormats(XmlDocument xd, string xmlpath) { - oldFormat = new Dictionary(); - XmlNodeList nl = xd.SelectNodes("folder/formats/format"); - foreach (XmlNode nd in nl) - { - int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText); - string name = nd.Attributes.GetNamedItem("name").InnerText; - oldFormat.Add(formatid, name); - } - newFormat = new Dictionary(); - FormatInfoList fil = FormatInfoList.Get(); - foreach (FormatInfo fi in fil) - newFormat.Add(fi.Name, fi.FormatID); + existingFormat = new Dictionary(); + FormatInfoList fil = FormatInfoList.Get(); + foreach (FormatInfo fi in fil) + existingFormat.Add(fi.Name, fi.FormatID); + + importedFormat = new Dictionary(); + XmlNodeList nl = xd.SelectNodes(xmlpath); + + bool conflictingUCFdata = false; + List existingFC = new List(); + List importedFC = new List(); + List fname = new List(); + + foreach (XmlNode nd in nl) + { + string copyOfUCF = null; + // see if any of the imported formats are 'UCF' formats, i.e. have config data. If they are UCF, + // see if this is different that what is in the database. If it is, the user needs to decide + // whether to associate sections with existing UCF format or the new one. All UCF formats will be + // connected the same way, i.e. existing or new. + int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText); + string name = nd.Attributes.GetNamedItem("name").InnerText; + string config = null; + XmlNode cfg = nd.Attributes.GetNamedItem("config"); + if (cfg != null) config = cfg.InnerText; + if (existingFormat.ContainsKey(name) && config != null && config != "") + { + FormatInfo exFI = FormatInfo.Get(existingFormat[name]); + if (exFI.Config != config && exFI.Config != "" && exFI.Config != null && config != "" && config != null) + { + // See if there are copies of this UCF format, if so, this may match (have same config) one of those and should + // use it before stating there is conflicting data. + copyOfUCF = ContentsOfUCFExists(name, config); + if (copyOfUCF == null) + { + existingFC.Add(exFI.Config); + importedFC.Add(config); + conflictingUCFdata = true; + fname.Add(name); + } + else + existingCopyFCName.Add(name, copyOfUCF); + } + } + } + + // there is a difference in UCF data, see if user wants sections to use the existing or new ucf data: + if (conflictingUCFdata) + { + // Bring up dialog to allow user to choose how the UCF data is handled: + // Importing of a procedure(s) (names of UCF exist in current DB and in exported DB) + //Case 0 - ignore (don't bring in new UCF) + //Case 1 - bringing in new UCF and not using it + //Case 2 - bringing in new UCF and only using it for imported data + //Case 3 - bringing in new UCF and using it across the board + //Case 4 - bringing in new UCF and using it for the current procedure set (not applicable for procedure sets) + UCFImportCase = UCFImportDefaultFromSettings; // from the options/settings + dlgUCFImportOptions ucfoptDlg = new dlgUCFImportOptions(fname, existingFC, importedFC, UCFImportCase, xmlpath); + DialogResult dr = ucfoptDlg.ShowDialog(); + if (dr != DialogResult.OK) return false; + UCFImportCase = ucfoptDlg.UCFImportOptionsCase; // may be reset from dialog. + } + // first see if any of the imported formats have different data. If so, + foreach (XmlNode nd in nl) + { + int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText); + string name = nd.Attributes.GetNamedItem("name").InnerText; + string config = null; + XmlNode cfg = nd.Attributes.GetNamedItem("config"); + if (cfg != null) config = cfg.InnerText; + string pname = nd.Attributes.GetNamedItem("pname").InnerText; + string description = null; + XmlNode descript = nd.Attributes.GetNamedItem("description"); + if (descript != null) description = descript.InnerText; + string userid = nd.Attributes.GetNamedItem("userid").InnerText; + DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText); + // If the format that is being imported exists as a copy (already was imported and a 'Copy x of name' was created) and the imported and + // existing config match, use the existing (copied) format's name rather than importing it again (the dictionary was set up during + // the import formats process. + if (existingCopyFCName.ContainsKey(name)) name = existingCopyFCName[name]; + + // compare this imported format to the original in the database. + // If format name exists, or if it has same config data, just use it. + if (existingFormat.ContainsKey(name)) + { + // Note that Data & Genmac fields can have different contents. The format information should always be used from + // the original database, not the export file. So no processing is done on these fields when exporting & importing. + // Data or Genmac can be different if formats were updated in one database & not the other. + FormatInfo exFI = FormatInfo.Get(existingFormat[name]); + if ((exFI.Config == config || ((exFI.Config == "" || exFI.Config == null) && (config == "" || config == null)))) + { + // importedFormat is used to set correct formatid on imported sections (if different formatid <-> name between + // the current database and the one from which export came) + importedFormat.Add(formatid, name); + continue; // go on to next format in import list + } + } + // parent format will always be in there, if it is a new format, it will be added before the child. Check just in case (no null reference). + if (!existingFormat.ContainsKey(pname)) break; + int pid = existingFormat[pname]; + Format pformat = Format.Get(pid); + + // if the new format doesn't exist, it will be added (after these other checks). Otherwise, handle the + // various cases listed above: + if (existingFormat.ContainsKey(name)) + { + // if case 0 and this ucf already exists, ignore it: + if (UCFImportCase == E_UCFImportOptions.Ignore) continue; + + // if case 1, 2, 4 and the name exists, make a 'copy' of the newly imported format: + // need to add this format - name must be unique so add 'COPY(x) of 'original name'' where x is unique number: + if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) + { + int count = 0; + foreach (FormatInfo fi in fil) if (fi.Name.EndsWith(name)) count++; + if (count > 0) + { + string origname = name; + name = string.Format("Copy {0} of {1}", count.ToString(), name); + if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) + { + if (renamedUCFFormatName == null) renamedUCFFormatName = new Dictionary(); + renamedUCFFormatName.Add(origname, name); + } + } + } + // if case 3, take the existing config data and create in a record whose name is Old(x) of 'original name' (the record + // creation gets done below). Then modify the existing record to have the config data. The result is that any + // sections that used this UCF throughout the database will have the new config data. + if (UCFImportCase == E_UCFImportOptions.LoadUseAll) + { + string savname = name; + int count = 0; + foreach (FormatInfo fi in fil) if (fi.Name.EndsWith(name)) count++; + if (count > 0) + { + name = string.Format("Old {0} of {1}", count.ToString(), name); + } + // update the 'old' record by getting the original config data. + string savdesc = null; + DateTime savdts = DateTime.Now; + string savuid = null; + int savpar = 0; + string savconfig = null; + using (Format origRecord = Format.Get(existingFormat[savname])) + { + savdesc = origRecord.Description; + savdts = origRecord.DTS; + savuid = origRecord.UserID; + savpar = origRecord.ParentID; + savconfig = origRecord.Config; + origRecord.Name = savname; + origRecord.Description = description; + origRecord.DTS = dts; + origRecord.UserID = userid; + origRecord.MyParent = pformat; + origRecord.Config = config; + origRecord.Save(); + description = savdesc; + dts = savdts; + userid = savuid; + pformat = Format.Get(savpar); + config = savconfig; + + } + } + + } + if (UCFImportCase == 0) // ignore it + { + importedFormat.Add(formatid, name); + } + else + { + Format rec = Format.MakeFormat(pformat, name, description, null, null, dts, userid); + rec.Config = config; + rec.Save(); + if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadUseAll) // don't reset format id (case 1 don't use it, case 3 copies new data into original record + importedFormat.Add(formatid, name); + else if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) // case 2 uses it for any items imported, case 4 uses it for any sections within current set + { + existingFormat.Add(name, rec.FormatID); // change to original name? + importedFormat.Add(rec.FormatID, name); + + // get format id for the original named format + if (UCFImportCase == E_UCFImportOptions.LoadForSetOnly && renamedUCFFormatName != null) + { + int origformatid = -1; + foreach (var kvp in renamedUCFFormatName) + { + if (kvp.Value == name) + { + origformatid = existingFormat[kvp.Key]; + break; + } + } + if (origformatid != -1) + { + if (renamedUCFFormatId == null) renamedUCFFormatId = new Dictionary(); + renamedUCFFormatId.Add(rec.FormatID, origformatid); + } + } + } + } + } + FormatInfoList.Reset(); + return true; } + private string ContentsOfUCFExists(string name, string config) + { + // See if there is an existing format file that was created as a copy. If so, check if the passed in format's + // config is the same as an existing 'Copy of' format - if so, use rather than importing the same format as + // defined by config. + foreach (var existname in existingFormat) + { + if (existname.Key.Contains(name)) + { + string cpy = existname.Key; + if (cpy.StartsWith("Copy") && cpy.Contains("of " + name)) + { + FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]); + if (exFI.Config == config) return cpy; + } + } + } + return null; + } + //jsj 4-29-2016 appears to not be used //Dictionary dicParentItem = null; //private void UpdateParentItem(int depth, ItemInfo ii) @@ -1257,6 +1660,13 @@ namespace VEPROMS private void btnImport_Click(object sender, EventArgs e) { + if (_MyMode.ToUpper().Contains("FORMAT")) + { + ofd.Filter = "PROMS Procedure Export Files|*.pxml"; + if (ofd.ShowDialog(this) == DialogResult.OK) + txtImport.Text = ofd.FileName; + return; + } if (MyFolder != null) { if (ofd.ShowDialog(this) == DialogResult.OK) @@ -1376,25 +1786,38 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xd, "formatfilename",formatFileName)); xd.AppendChild(xe); ExportAnnotationTypes(xe, "annotationtypes"); - ExportFormats(xe, "formats"); + ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", true); if (fi.FolderDocVersionCount > 0) foreach (DocVersionInfo dvi in fi.FolderDocVersions) ExportDocVersion(xe, dvi, "docversion"); } - private void ExportFormats(XmlElement xn, string nodename) + private void ExportFormats(FormatInfoList fil, XmlElement xn, string nodename, bool doElement) { - XmlElement xe = xn.OwnerDocument.CreateElement(nodename); - FormatInfoList fil = FormatInfoList.Get(); + XmlElement xe = null; + if (doElement) xe = xn.OwnerDocument.CreateElement(nodename); + else xe = xn; foreach (FormatInfo fi in fil) ExportFormat(xe, fi, "format"); - xn.AppendChild(xe); + if (doElement) xn.AppendChild(xe); } private void ExportFormat(XmlElement xn, FormatInfo fi, string nodename) { - XmlElement xe = xn.OwnerDocument.CreateElement(nodename); - xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", fi.FormatID.ToString())); - xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", fi.Name)); - xn.AppendChild(xe); + XmlElement xe = xn.OwnerDocument.CreateElement(nodename); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", fi.FormatID.ToString())); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", fi.Name)); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "pname", fi.MyParent==null?"null":fi.MyParent.Name)); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "description", fi.Description)); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", fi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", fi.UserID)); + + if (fi.Config != null && fi.Config != "") + { + FormatConfig MyFormatConfig = FormatConfig.Get(fi.Config); + string scf = MyFormatConfig.ConvertToString(); + scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", ""); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", scf)); + } + xn.AppendChild(xe); } private void ExportAnnotationTypes(XmlElement xn, string nodename) { @@ -2931,10 +3354,11 @@ namespace VEPROMS string formatName = formatFileName; // B2016-103, new export files include the format filename use that if it exists if (formatFileName == string.Empty) { - if (formatID >= oldFormat.Count) return null; // formatID not found, use default file name - formatName = oldFormat[formatID]; // for backwards compatibility with older export files + if (formatID >= importedFormat.Count) return null; // formatID not found, use default file name + formatName = importedFormat[formatID]; // for backwards compatibility with older export files } - formatID = newFormat[formatName]; + if (renamedUCFFormatName != null && renamedUCFFormatName.ContainsKey(formatFileName)) formatName = renamedUCFFormatName[formatName]; + formatID = existingFormat[formatName]; return Format.Get(formatID); } catch @@ -3198,33 +3622,35 @@ namespace VEPROMS config = StripEnhanced(config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); - Procedure p = Procedure.MakeProcedure(dvInfo, procInfo, number, text, proctype); - p.DTS = dts; - p.UserID = userid; - // check for a null in case an older export file is being imported (the older files will not have the fromatfilename attribute) - XmlNode fnNode = xc.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - string formatfilename = (fnNode !=null)? fnNode.InnerText : ""; - if (formatid != string.Empty) - p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid),formatfilename); - p.MyContent.Config = config; - p.MyContent.DTS = dts; - p.MyContent.UserID = userid; - p.Save(); - if (!Old2NewItem.ContainsKey(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText))) - Old2NewItem.Add(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText), p.ItemID); - else - Old2NewItem[int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText)] = p.ItemID; // B2016-176, B2016-197 refresh saved ItemId with current ItemID - if (!Old2NewContent.ContainsKey(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText))) - Old2NewContent.Add(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText), p.MyContent.ContentID); - else - Old2NewContent[int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText)] = p.MyContent.ContentID; // B2016-176, B2016-197 refresh saved ContentID with current ContentID - if (xn.SelectNodes("annotation").Count > 0) - AddAnnotations(p.ItemID, xn); - if (xc.SelectNodes("rousage").Count > 0) - AddROUsages(p.MyContent, xc); - if (xc.SelectNodes("transition").Count > 0) - AddTransitions(p.MyContent, xc); - procInfo = ProcedureInfo.Get(p.ItemID); + using (Procedure p = Procedure.MakeProcedure(dvInfo, procInfo, number, text, proctype)) + { + p.DTS = dts; + p.UserID = userid; + // check for a null in case an older export file is being imported (the older files will not have the fromatfilename attribute) + XmlNode fnNode = xc.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to + string formatfilename = (fnNode != null) ? fnNode.InnerText : ""; + if (formatid != string.Empty) + p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); + p.MyContent.Config = config; + p.MyContent.DTS = dts; + p.MyContent.UserID = userid; + p.Save(); + if (!Old2NewItem.ContainsKey(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText))) + Old2NewItem.Add(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText), p.ItemID); + else + Old2NewItem[int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText)] = p.ItemID; // B2016-176, B2016-197 refresh saved ItemId with current ItemID + if (!Old2NewContent.ContainsKey(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText))) + Old2NewContent.Add(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText), p.MyContent.ContentID); + else + Old2NewContent[int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText)] = p.MyContent.ContentID; // B2016-176, B2016-197 refresh saved ContentID with current ContentID + if (xn.SelectNodes("annotation").Count > 0) + AddAnnotations(p.ItemID, xn); + if (xc.SelectNodes("rousage").Count > 0) + AddROUsages(p.MyContent, xc); + if (xc.SelectNodes("transition").Count > 0) + AddTransitions(p.MyContent, xc); + procInfo = ProcedureInfo.Get(p.ItemID); + } if (xc.HasChildNodes) AddParts(xc, procInfo); FixSectionStart(procInfo); @@ -4116,37 +4542,44 @@ namespace VEPROMS CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); - sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype); - sect.DTS = dts; - sect.UserID = userid; - // check for a null in case an older export file is being imported (the older files will not have the fromatfilename attribute) - XmlNode fnNode = xc.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - string formatfilename = (fnNode != null) ? fnNode.InnerText : ""; - if (formatid != string.Empty) - sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); - sect.MyContent.Config = config; - sect.MyContent.DTS = dts; - sect.MyContent.UserID = userid; - sect.Save(); - if (!Old2NewContent.ContainsKey(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText))) - Old2NewContent.Add(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText), sect.MyContent.ContentID); - else - Old2NewContent[int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText)] = sect.MyContent.ContentID; // B2016-176, B2016-197 refresh saved ContentID with current ContentID - if (!Old2NewItem.ContainsKey(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText))) - Old2NewItem.Add(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText), sect.ItemID); - else - Old2NewItem[int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText)] = sect.ItemID; // B2016-176, B2016-197 refresh saved ItemId with current ItemID - if (xn.SelectNodes("annotation").Count > 0) - AddAnnotations(sect.ItemID, xn); - if (xc.SelectNodes("entry").Count > 0) - AddEntry(sect.MyContent, xc); - if (xc.SelectNodes("rousage").Count > 0) - AddROUsages(sect.MyContent, xc); - if (xc.SelectNodes("transition").Count > 0) - AddTransitions(sect.MyContent, xc); - prevInfo = SectionInfo.Get(sect.ItemID); - if (xc.HasChildNodes) - AddParts(xc, prevInfo); + using (sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype)) + { + sect.DTS = dts; + sect.UserID = userid; + // check for a null in case an older export file is being imported (the older files will not have the fromatfilename attribute) + XmlNode fnNode = xc.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to + string formatfilename = (fnNode != null) ? fnNode.InnerText : ""; + // If this formatfile is a copy in this database (was not in exported database), use the copy name (note that the + // Config data must match and this was checked in the code that loads the formats: + if (formatid != string.Empty) + { + if (existingCopyFCName.ContainsKey(formatfilename)) formatfilename = existingCopyFCName[formatfilename]; + sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); + } + sect.MyContent.Config = config; + sect.MyContent.DTS = dts; + sect.MyContent.UserID = userid; + sect.Save(); + if (!Old2NewContent.ContainsKey(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText))) + Old2NewContent.Add(int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText), sect.MyContent.ContentID); + else + Old2NewContent[int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText)] = sect.MyContent.ContentID; // B2016-176, B2016-197 refresh saved ContentID with current ContentID + if (!Old2NewItem.ContainsKey(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText))) + Old2NewItem.Add(int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText), sect.ItemID); + else + Old2NewItem[int.Parse(xn.Attributes.GetNamedItem("itemid").InnerText)] = sect.ItemID; // B2016-176, B2016-197 refresh saved ItemId with current ItemID + if (xn.SelectNodes("annotation").Count > 0) + AddAnnotations(sect.ItemID, xn); + if (xc.SelectNodes("entry").Count > 0) + AddEntry(sect.MyContent, xc); + if (xc.SelectNodes("rousage").Count > 0) + AddROUsages(sect.MyContent, xc); + if (xc.SelectNodes("transition").Count > 0) + AddTransitions(sect.MyContent, xc); + prevInfo = SectionInfo.Get(sect.ItemID); + if (xc.HasChildNodes) + AddParts(xc, prevInfo); + } return prevInfo; } private string StripEnhanced(string config) diff --git a/PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs b/PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs new file mode 100644 index 00000000..c6ee262b --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs @@ -0,0 +1,61 @@ +namespace VEPROMS +{ + partial class dlgUCFDetail + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + } +} \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/dlgUCFDetail.cs b/PROMS/VEPROMS User Interface/dlgUCFDetail.cs new file mode 100644 index 00000000..18fa64f4 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgUCFDetail.cs @@ -0,0 +1,77 @@ +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); + } + } + } +} diff --git a/PROMS/VEPROMS User Interface/dlgUCFDetail.resx b/PROMS/VEPROMS User Interface/dlgUCFDetail.resx new file mode 100644 index 00000000..7080a7d1 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgUCFDetail.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmFolderProperties.cs b/PROMS/VEPROMS User Interface/frmFolderProperties.cs index 74953bfe..93bd8cbf 100644 --- a/PROMS/VEPROMS User Interface/frmFolderProperties.cs +++ b/PROMS/VEPROMS User Interface/frmFolderProperties.cs @@ -130,6 +130,7 @@ namespace VEPROMS private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null; private StageInfoList myStageInfoList = null; private LocalStageInfoList myLocalStageInfoList = null; + private int? _cmbxformatOriginal = null; private void frmFolderProperties_Load(object sender, EventArgs e) { _Initializing = true; @@ -150,6 +151,7 @@ namespace VEPROMS ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; + if (_FolderConfig != null && _FolderConfig.MyFolder != null) _cmbxformatOriginal = _FolderConfig.MyFolder.FormatID; if (_FolderConfig.FormatSelection != null) { ppCmbxFormat.SelectedValue = _FolderConfig.FormatSelection; @@ -350,6 +352,24 @@ namespace VEPROMS btnAnnoTypeUndo.PerformClick(); //if (btnAnnoTypeSave.Enabled) return; folderConfigBindingSource.EndEdit(); + // if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change: + if (_FolderConfig.MyFolder.FormatID != _cmbxformatOriginal) + { + // clean up & then refresh the configs + using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByFolder(_FolderConfig.MyFolder.FolderID, _cmbxformatOriginal, _FolderConfig.MyFolder.FormatID)) + { + foreach (ContentInfo ci in cil) + { + using (Content c = ci.Get()) + { + // first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen + // and if configs aren't done first, the screen refresh, if based on config data, will not be correct. + foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig(); + ContentInfo.Refresh(c); + } + } + } + } // Save Default settings for User // // Save whether we should display the default values on this property page diff --git a/PROMS/VEPROMS User Interface/frmProcedureProperties.cs b/PROMS/VEPROMS User Interface/frmProcedureProperties.cs index 83a43fa2..01530d6f 100644 --- a/PROMS/VEPROMS User Interface/frmProcedureProperties.cs +++ b/PROMS/VEPROMS User Interface/frmProcedureProperties.cs @@ -72,6 +72,29 @@ namespace VEPROMS SaveText(ppProcTitleStpRTB); SaveText(ppProcNumStpRTB); _ProcedureConfig.MyProcedure.MyProcedureInfo.CreateEnhanced = cbEnhanced.Checked; + + // if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change: + // To determine a change to the format, first see if selection changed in list and then see if the format selected does not match + // what was set on procedure, if necessary resolve for an inherited format. + + if (_ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat != null && + _ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat.FormatID != _cmbxformatOriginal) + { + // clean up & then refresh the configs + using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByItem(_ProcedureConfig.MyProcedure.ItemID, _cmbxformatOriginal, _ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat.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); + } + } + } + } DialogResult = DialogResult.OK; this.Close(); } @@ -149,7 +172,7 @@ namespace VEPROMS _ProcedureConfig.ParentLookup = false; } - + private int? _cmbxformatOriginal = null; private void frmProcedureProperties_Load(object sender, EventArgs e) { _Initializing = true; @@ -161,10 +184,11 @@ namespace VEPROMS ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; - if (_ProcedureConfig.FormatSelection != null) - ppCmbxFormat.SelectedValue = _ProcedureConfig.FormatSelection; - else - ppCmbxFormat.SelectedIndex = -1; + if (_ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat != null) _cmbxformatOriginal = _ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat.FormatID; + if (_ProcedureConfig.FormatSelection != null) + ppCmbxFormat.SelectedValue = _ProcedureConfig.FormatSelection; + else + ppCmbxFormat.SelectedIndex = -1; // Get the saved settings for this user // diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index e42d1c9e..a35db2d7 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -121,10 +121,11 @@ 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; - if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && chkoffList.MaxIndex > 1) + int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; + if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && maxindx > 1) && (ppCmbxCheckoffType.SelectedIndex != _SectionConfig.Section_CheckoffListSelection - (_hasSectionCheckoffDefault? 1:0))) _SectionConfig.Section_CheckoffListSelection = ppCmbxCheckoffType.SelectedIndex + (_hasSectionCheckoffDefault? 1:0); - if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndex > 1) + if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndexNoInherit > 1) _SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex; if (ppCmbxSectPagination.SelectedValue == null) @@ -144,6 +145,28 @@ namespace VEPROMS DocumentInfo docinfo = DocumentInfo.Get(_SectionConfig.MySection.MyContent.MyEntry.MyDocument.DocID); docinfo.RefreshDocumentEntries(); } + // if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change: + // To determine a change to the format, first see if selection changed in list and then see if the format selected does not match + // what was set on procedure, if necessary resolve for an inherited format. + if (_SectionConfig.MySection.MySectionInfo.ActiveFormat != null && + _SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID != _cmbxformatOriginal) + { + // clean up & then refresh the configs + using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByItem(_SectionConfig.MySection.ItemID, _cmbxformatOriginal, _SectionConfig.MySection.MySectionInfo.ActiveFormat.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 there was a document to delete, do it. if (_DocumentToDelete != null) { @@ -301,6 +324,7 @@ namespace VEPROMS } } private bool checkEnhancedSettings = false; + private int? _cmbxformatOriginal = null; private void frmSectionProperties_Load(object sender, EventArgs e) { _Initializing = true; @@ -310,6 +334,7 @@ namespace VEPROMS ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; + if (_SectionConfig.MySection.MySectionInfo.ActiveFormat != null) _cmbxformatOriginal = (int)_SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID; if (_SectionConfig.FormatSelection != null) ppCmbxFormat.SelectedValue = _SectionConfig.FormatSelection; else @@ -680,7 +705,8 @@ 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; - if (chkoffList != null && chkoffList.MaxIndex > 0 && + int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; + if (chkoffList != null && maxindx > 0 && (pf.FormatData.ProcData.CheckOffData.Menu == "Signoff" || chkoffList[0].MenuItem.ToUpper().Equals("{SECTION DEFAULT}"))) { if (SectionPropertyCheckOffList!=null)SectionPropertyCheckOffList.Clear(); @@ -688,10 +714,10 @@ namespace VEPROMS // Don't put up the first item in the chkoffList, it is '{Section Default}'. _hasSectionCheckoffDefault = false; //for (int i = 1; i < chkoffList.Count; i++) - for (int i = 0; i < chkoffList.MaxIndex; i++) + foreach (CheckOff co in chkoffList) { - if (!chkoffList[i].MenuItem.ToUpper().Equals("{SECTION DEFAULT}")) - SectionPropertyCheckOffList.Add(chkoffList[i]); + if (!co.MenuItem.ToUpper().Equals("{SECTION DEFAULT}")) + SectionPropertyCheckOffList.Add(co); else _hasSectionCheckoffDefault = true; } diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs index b9e63dcd..88bca276 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs @@ -28,979 +28,1115 @@ namespace VEPROMS /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSysOptions)); - this.btnCancel = new DevComponents.DotNetBar.ButtonX(); - this.btnOK = new DevComponents.DotNetBar.ButtonX(); - this.gpSystemColor = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbRibonBlack = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbRibonSilver = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbRibonBlue = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.panButtons = new DevComponents.DotNetBar.PanelEx(); - this.btnIntrFaceStngs = new DevComponents.DotNetBar.ButtonX(); - this.btnStartMsg = new DevComponents.DotNetBar.ButtonX(); - this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); - this.tcSysOpts = new DevComponents.DotNetBar.TabControl(); - this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel(); - this.gpVisioPath = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.txbxVisioPath = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.gpSeparateWindows = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbSeparateWindows = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpEnhancedDocs = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbEnhancedDocumentSync = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpPasteSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbPastePlainText = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbPasteNoReturns = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpTreeView = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbTVExpand = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpStepTypeToolTip = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbStepTypeToolTip = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpAnnotationSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbAnnotationPopup = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpTransRangeColor = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.colorPickerButton1 = new DevComponents.DotNetBar.ColorPickerButton(); - this.gpPropPageStyle = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbPropGrid = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbTabbedIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbButtonIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.tiIntrFaceStngs = new DevComponents.DotNetBar.TabItem(this.components); - this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel(); - this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); - this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel(); - this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components); - this.btnReset = new DevComponents.DotNetBar.ButtonX(); - this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); - this.gpSystemColor.SuspendLayout(); - this.panButtons.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit(); - this.tcSysOpts.SuspendLayout(); - this.tabControlPanel3.SuspendLayout(); - this.gpVisioPath.SuspendLayout(); - this.gpSeparateWindows.SuspendLayout(); - this.gpEnhancedDocs.SuspendLayout(); - this.gpPasteSettings.SuspendLayout(); - this.gpTreeView.SuspendLayout(); - this.gpStepTypeToolTip.SuspendLayout(); - this.gpAnnotationSettings.SuspendLayout(); - this.gpTransRangeColor.SuspendLayout(); - this.gpPropPageStyle.SuspendLayout(); - this.SuspendLayout(); - // - // btnCancel - // - this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(616, 492); - this.btnCancel.Margin = new System.Windows.Forms.Padding(2); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(56, 19); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "Cancel"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnOK - // - this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnOK.Location = new System.Drawing.Point(542, 492); - this.btnOK.Margin = new System.Windows.Forms.Padding(2); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(56, 19); - this.btnOK.TabIndex = 1; - this.btnOK.Text = "OK"; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // gpSystemColor - // - this.gpSystemColor.BackColor = System.Drawing.Color.Transparent; - this.gpSystemColor.CanvasColor = System.Drawing.Color.Transparent; - this.gpSystemColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpSystemColor.Controls.Add(this.cbRibonBlack); - this.gpSystemColor.Controls.Add(this.cbRibonSilver); - this.gpSystemColor.Controls.Add(this.cbRibonBlue); - this.gpSystemColor.DisabledBackColor = System.Drawing.Color.Empty; - this.gpSystemColor.Location = new System.Drawing.Point(39, 13); - this.gpSystemColor.Margin = new System.Windows.Forms.Padding(2); - this.gpSystemColor.Name = "gpSystemColor"; - this.gpSystemColor.Size = new System.Drawing.Size(82, 97); - // - // - // - this.gpSystemColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpSystemColor.Style.BackColorGradientAngle = 90; - this.gpSystemColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpSystemColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderBottomWidth = 1; - this.gpSystemColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpSystemColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderLeftWidth = 1; - this.gpSystemColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderRightWidth = 1; - this.gpSystemColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderTopWidth = 1; - this.gpSystemColor.Style.CornerDiameter = 4; - this.gpSystemColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpSystemColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpSystemColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpSystemColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpSystemColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpSystemColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpSystemColor.TabIndex = 1; - this.gpSystemColor.Text = "System Color"; - // - // cbRibonBlack - // - this.cbRibonBlack.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbRibonBlack.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbRibonBlack.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbRibonBlack.Location = new System.Drawing.Point(7, 54); - this.cbRibonBlack.Margin = new System.Windows.Forms.Padding(2); - this.cbRibonBlack.Name = "cbRibonBlack"; - this.cbRibonBlack.Size = new System.Drawing.Size(67, 19); - this.cbRibonBlack.TabIndex = 2; - this.cbRibonBlack.Text = "Black"; - this.cbRibonBlack.CheckedChanged += new System.EventHandler(this.cbRibonBlack_CheckedChanged); - // - // cbRibonSilver - // - this.cbRibonSilver.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbRibonSilver.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbRibonSilver.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbRibonSilver.Location = new System.Drawing.Point(7, 30); - this.cbRibonSilver.Margin = new System.Windows.Forms.Padding(2); - this.cbRibonSilver.Name = "cbRibonSilver"; - this.cbRibonSilver.Size = new System.Drawing.Size(67, 19); - this.cbRibonSilver.TabIndex = 1; - this.cbRibonSilver.Text = "Silver"; - this.cbRibonSilver.CheckedChanged += new System.EventHandler(this.cbRibonSilver_CheckedChanged); - // - // cbRibonBlue - // - this.cbRibonBlue.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbRibonBlue.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbRibonBlue.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbRibonBlue.Location = new System.Drawing.Point(7, 6); - this.cbRibonBlue.Margin = new System.Windows.Forms.Padding(2); - this.cbRibonBlue.Name = "cbRibonBlue"; - this.cbRibonBlue.Size = new System.Drawing.Size(67, 19); - this.cbRibonBlue.TabIndex = 0; - this.cbRibonBlue.Text = "Blue"; - this.cbRibonBlue.CheckedChanged += new System.EventHandler(this.cbRibonBlue_CheckedChanged); - // - // panButtons - // - this.panButtons.CanvasColor = System.Drawing.SystemColors.Control; - this.panButtons.Controls.Add(this.btnIntrFaceStngs); - this.panButtons.Controls.Add(this.btnStartMsg); - this.panButtons.Controls.Add(this.btnGeneral); - this.panButtons.DisabledBackColor = System.Drawing.Color.Empty; - this.panButtons.Location = new System.Drawing.Point(14, 14); - this.panButtons.Margin = new System.Windows.Forms.Padding(2); - this.panButtons.Name = "panButtons"; - this.panButtons.Size = new System.Drawing.Size(168, 460); - this.panButtons.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panButtons.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.panButtons.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.panButtons.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panButtons.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panButtons.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panButtons.Style.GradientAngle = 90; - this.panButtons.TabIndex = 2; - this.panButtons.Text = "panelEx1"; - this.panButtons.ThemeAware = true; - this.panButtons.Visible = false; - // - // btnIntrFaceStngs - // - this.btnIntrFaceStngs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnIntrFaceStngs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnIntrFaceStngs.Dock = System.Windows.Forms.DockStyle.Top; - this.btnIntrFaceStngs.Location = new System.Drawing.Point(0, 38); - this.btnIntrFaceStngs.Margin = new System.Windows.Forms.Padding(2); - this.btnIntrFaceStngs.Name = "btnIntrFaceStngs"; - this.btnIntrFaceStngs.Size = new System.Drawing.Size(168, 19); - this.btnIntrFaceStngs.TabIndex = 2; - this.btnIntrFaceStngs.Text = "My Interface Settings"; - this.btnIntrFaceStngs.Click += new System.EventHandler(this.btnIntrFaceStngs_Click); - // - // btnStartMsg - // - this.btnStartMsg.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnStartMsg.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnStartMsg.Dock = System.Windows.Forms.DockStyle.Top; - this.btnStartMsg.Location = new System.Drawing.Point(0, 19); - this.btnStartMsg.Margin = new System.Windows.Forms.Padding(2); - this.btnStartMsg.Name = "btnStartMsg"; - this.btnStartMsg.Size = new System.Drawing.Size(168, 19); - this.btnStartMsg.TabIndex = 1; - this.btnStartMsg.Text = "Startup Message"; - this.btnStartMsg.Visible = false; - this.btnStartMsg.Click += new System.EventHandler(this.btnStartMsg_Click); - // - // btnGeneral - // - this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top; - this.btnGeneral.Location = new System.Drawing.Point(0, 0); - this.btnGeneral.Margin = new System.Windows.Forms.Padding(2); - this.btnGeneral.Name = "btnGeneral"; - this.btnGeneral.Size = new System.Drawing.Size(168, 19); - this.btnGeneral.TabIndex = 0; - this.btnGeneral.Text = "General"; - this.btnGeneral.Visible = false; - this.btnGeneral.Click += new System.EventHandler(this.btnGeneral_Click); - // - // tcSysOpts - // - this.tcSysOpts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247))))); - this.tcSysOpts.CanReorderTabs = true; - this.tcSysOpts.Controls.Add(this.tabControlPanel3); - this.tcSysOpts.Controls.Add(this.tabControlPanel1); - this.tcSysOpts.Controls.Add(this.tabControlPanel2); - this.tcSysOpts.Location = new System.Drawing.Point(27, 17); - this.tcSysOpts.Margin = new System.Windows.Forms.Padding(2); - this.tcSysOpts.Name = "tcSysOpts"; - this.tcSysOpts.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold); - this.tcSysOpts.SelectedTabIndex = 2; - this.tcSysOpts.Size = new System.Drawing.Size(645, 457); - this.tcSysOpts.TabIndex = 3; - this.tcSysOpts.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox; - this.tcSysOpts.Tabs.Add(this.tiGeneral); - this.tcSysOpts.Tabs.Add(this.tiStUpMsg); - this.tcSysOpts.Tabs.Add(this.tiIntrFaceStngs); - this.tcSysOpts.TabsVisible = false; - this.tcSysOpts.Text = "tabControl1"; - this.tcSysOpts.ThemeAware = true; - // - // tabControlPanel3 - // - this.tabControlPanel3.Controls.Add(this.gpVisioPath); - this.tabControlPanel3.Controls.Add(this.gpSeparateWindows); - this.tabControlPanel3.Controls.Add(this.gpEnhancedDocs); - this.tabControlPanel3.Controls.Add(this.gpPasteSettings); - this.tabControlPanel3.Controls.Add(this.gpTreeView); - this.tabControlPanel3.Controls.Add(this.gpStepTypeToolTip); - this.tabControlPanel3.Controls.Add(this.gpAnnotationSettings); - this.tabControlPanel3.Controls.Add(this.gpTransRangeColor); - this.tabControlPanel3.Controls.Add(this.gpPropPageStyle); - this.tabControlPanel3.Controls.Add(this.gpSystemColor); - this.tabControlPanel3.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlPanel3.Location = new System.Drawing.Point(0, 27); - this.tabControlPanel3.Margin = new System.Windows.Forms.Padding(2); - this.tabControlPanel3.Name = "tabControlPanel3"; - this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel3.Size = new System.Drawing.Size(645, 430); - this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.SystemColors.Control; - this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSysOptions)); + this.btnCancel = new DevComponents.DotNetBar.ButtonX(); + this.btnOK = new DevComponents.DotNetBar.ButtonX(); + this.gpSystemColor = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbRibonBlack = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbRibonSilver = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbRibonBlue = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.panButtons = new DevComponents.DotNetBar.PanelEx(); + this.btnIntrFaceStngs = new DevComponents.DotNetBar.ButtonX(); + this.btnStartMsg = new DevComponents.DotNetBar.ButtonX(); + this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); + this.tcSysOpts = new DevComponents.DotNetBar.TabControl(); + this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel(); + this.grPanUCFImpOpt = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbUCFLForSetOnly = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFLUseAll = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFLOnlyImport = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFLNotUsed = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFIgnore = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpVisioPath = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.txbxVisioPath = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.gpSeparateWindows = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbSeparateWindows = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpEnhancedDocs = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbEnhancedDocumentSync = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpPasteSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbPastePlainText = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbPasteNoReturns = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpTreeView = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbTVExpand = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpStepTypeToolTip = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbStepTypeToolTip = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpAnnotationSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbAnnotationPopup = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpTransRangeColor = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.colorPickerButton1 = new DevComponents.DotNetBar.ColorPickerButton(); + this.gpPropPageStyle = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbPropGrid = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbTabbedIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbButtonIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.tiIntrFaceStngs = new DevComponents.DotNetBar.TabItem(this.components); + this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel(); + this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); + this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel(); + this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components); + this.btnReset = new DevComponents.DotNetBar.ButtonX(); + this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); + this.gpSystemColor.SuspendLayout(); + this.panButtons.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit(); + this.tcSysOpts.SuspendLayout(); + this.tabControlPanel3.SuspendLayout(); + this.grPanUCFImpOpt.SuspendLayout(); + this.gpVisioPath.SuspendLayout(); + this.gpSeparateWindows.SuspendLayout(); + this.gpEnhancedDocs.SuspendLayout(); + this.gpPasteSettings.SuspendLayout(); + this.gpTreeView.SuspendLayout(); + this.gpStepTypeToolTip.SuspendLayout(); + this.gpAnnotationSettings.SuspendLayout(); + this.gpTransRangeColor.SuspendLayout(); + this.gpPropPageStyle.SuspendLayout(); + this.SuspendLayout(); + // + // btnCancel + // + this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(821, 606); + this.btnCancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "Cancel"; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnOK + // + this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnOK.Location = new System.Drawing.Point(723, 606); + this.btnOK.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 1; + this.btnOK.Text = "OK"; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // gpSystemColor + // + this.gpSystemColor.BackColor = System.Drawing.Color.Transparent; + this.gpSystemColor.CanvasColor = System.Drawing.Color.Transparent; + this.gpSystemColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpSystemColor.Controls.Add(this.cbRibonBlack); + this.gpSystemColor.Controls.Add(this.cbRibonSilver); + this.gpSystemColor.Controls.Add(this.cbRibonBlue); + this.gpSystemColor.DisabledBackColor = System.Drawing.Color.Empty; + this.gpSystemColor.Location = new System.Drawing.Point(52, 16); + this.gpSystemColor.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpSystemColor.Name = "gpSystemColor"; + this.gpSystemColor.Size = new System.Drawing.Size(109, 119); + // + // + // + this.gpSystemColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpSystemColor.Style.BackColorGradientAngle = 90; + this.gpSystemColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpSystemColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderBottomWidth = 1; + this.gpSystemColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpSystemColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderLeftWidth = 1; + this.gpSystemColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderRightWidth = 1; + this.gpSystemColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderTopWidth = 1; + this.gpSystemColor.Style.CornerDiameter = 4; + this.gpSystemColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpSystemColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpSystemColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpSystemColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpSystemColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpSystemColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpSystemColor.TabIndex = 1; + this.gpSystemColor.Text = "System Color"; + // + // cbRibonBlack + // + this.cbRibonBlack.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbRibonBlack.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbRibonBlack.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbRibonBlack.Location = new System.Drawing.Point(9, 66); + this.cbRibonBlack.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbRibonBlack.Name = "cbRibonBlack"; + this.cbRibonBlack.Size = new System.Drawing.Size(89, 23); + this.cbRibonBlack.TabIndex = 2; + this.cbRibonBlack.Text = "Black"; + this.cbRibonBlack.CheckedChanged += new System.EventHandler(this.cbRibonBlack_CheckedChanged); + // + // cbRibonSilver + // + this.cbRibonSilver.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbRibonSilver.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbRibonSilver.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbRibonSilver.Location = new System.Drawing.Point(9, 37); + this.cbRibonSilver.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbRibonSilver.Name = "cbRibonSilver"; + this.cbRibonSilver.Size = new System.Drawing.Size(89, 23); + this.cbRibonSilver.TabIndex = 1; + this.cbRibonSilver.Text = "Silver"; + this.cbRibonSilver.CheckedChanged += new System.EventHandler(this.cbRibonSilver_CheckedChanged); + // + // cbRibonBlue + // + this.cbRibonBlue.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbRibonBlue.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbRibonBlue.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbRibonBlue.Location = new System.Drawing.Point(9, 7); + this.cbRibonBlue.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbRibonBlue.Name = "cbRibonBlue"; + this.cbRibonBlue.Size = new System.Drawing.Size(89, 23); + this.cbRibonBlue.TabIndex = 0; + this.cbRibonBlue.Text = "Blue"; + this.cbRibonBlue.CheckedChanged += new System.EventHandler(this.cbRibonBlue_CheckedChanged); + // + // panButtons + // + this.panButtons.CanvasColor = System.Drawing.SystemColors.Control; + this.panButtons.Controls.Add(this.btnIntrFaceStngs); + this.panButtons.Controls.Add(this.btnStartMsg); + this.panButtons.Controls.Add(this.btnGeneral); + this.panButtons.DisabledBackColor = System.Drawing.Color.Empty; + this.panButtons.Location = new System.Drawing.Point(19, 17); + this.panButtons.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panButtons.Name = "panButtons"; + this.panButtons.Size = new System.Drawing.Size(224, 566); + this.panButtons.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panButtons.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.panButtons.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.panButtons.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panButtons.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panButtons.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panButtons.Style.GradientAngle = 90; + this.panButtons.TabIndex = 2; + this.panButtons.Text = "panelEx1"; + this.panButtons.ThemeAware = true; + this.panButtons.Visible = false; + // + // btnIntrFaceStngs + // + this.btnIntrFaceStngs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnIntrFaceStngs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnIntrFaceStngs.Dock = System.Windows.Forms.DockStyle.Top; + this.btnIntrFaceStngs.Location = new System.Drawing.Point(0, 46); + this.btnIntrFaceStngs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnIntrFaceStngs.Name = "btnIntrFaceStngs"; + this.btnIntrFaceStngs.Size = new System.Drawing.Size(224, 23); + this.btnIntrFaceStngs.TabIndex = 2; + this.btnIntrFaceStngs.Text = "My Interface Settings"; + this.btnIntrFaceStngs.Click += new System.EventHandler(this.btnIntrFaceStngs_Click); + // + // btnStartMsg + // + this.btnStartMsg.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnStartMsg.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnStartMsg.Dock = System.Windows.Forms.DockStyle.Top; + this.btnStartMsg.Location = new System.Drawing.Point(0, 23); + this.btnStartMsg.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnStartMsg.Name = "btnStartMsg"; + this.btnStartMsg.Size = new System.Drawing.Size(224, 23); + this.btnStartMsg.TabIndex = 1; + this.btnStartMsg.Text = "Startup Message"; + this.btnStartMsg.Visible = false; + this.btnStartMsg.Click += new System.EventHandler(this.btnStartMsg_Click); + // + // btnGeneral + // + this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top; + this.btnGeneral.Location = new System.Drawing.Point(0, 0); + this.btnGeneral.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnGeneral.Name = "btnGeneral"; + this.btnGeneral.Size = new System.Drawing.Size(224, 23); + this.btnGeneral.TabIndex = 0; + this.btnGeneral.Text = "General"; + this.btnGeneral.Visible = false; + this.btnGeneral.Click += new System.EventHandler(this.btnGeneral_Click); + // + // tcSysOpts + // + this.tcSysOpts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247))))); + this.tcSysOpts.CanReorderTabs = true; + this.tcSysOpts.Controls.Add(this.tabControlPanel3); + this.tcSysOpts.Controls.Add(this.tabControlPanel1); + this.tcSysOpts.Controls.Add(this.tabControlPanel2); + this.tcSysOpts.Location = new System.Drawing.Point(36, 21); + this.tcSysOpts.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.tcSysOpts.Name = "tcSysOpts"; + this.tcSysOpts.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold); + this.tcSysOpts.SelectedTabIndex = 2; + this.tcSysOpts.Size = new System.Drawing.Size(860, 562); + this.tcSysOpts.TabIndex = 3; + this.tcSysOpts.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox; + this.tcSysOpts.Tabs.Add(this.tiGeneral); + this.tcSysOpts.Tabs.Add(this.tiStUpMsg); + this.tcSysOpts.Tabs.Add(this.tiIntrFaceStngs); + this.tcSysOpts.TabsVisible = false; + this.tcSysOpts.Text = "tabControl1"; + this.tcSysOpts.ThemeAware = true; + // + // tabControlPanel3 + // + this.tabControlPanel3.Controls.Add(this.grPanUCFImpOpt); + this.tabControlPanel3.Controls.Add(this.gpVisioPath); + this.tabControlPanel3.Controls.Add(this.gpSeparateWindows); + this.tabControlPanel3.Controls.Add(this.gpEnhancedDocs); + this.tabControlPanel3.Controls.Add(this.gpPasteSettings); + this.tabControlPanel3.Controls.Add(this.gpTreeView); + this.tabControlPanel3.Controls.Add(this.gpStepTypeToolTip); + this.tabControlPanel3.Controls.Add(this.gpAnnotationSettings); + this.tabControlPanel3.Controls.Add(this.gpTransRangeColor); + this.tabControlPanel3.Controls.Add(this.gpPropPageStyle); + this.tabControlPanel3.Controls.Add(this.gpSystemColor); + this.tabControlPanel3.DisabledBackColor = System.Drawing.Color.Empty; + this.tabControlPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControlPanel3.Location = new System.Drawing.Point(0, 27); + this.tabControlPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.tabControlPanel3.Name = "tabControlPanel3"; + this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1); + this.tabControlPanel3.Size = new System.Drawing.Size(860, 535); + this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tabControlPanel3.Style.GradientAngle = 90; - this.tabControlPanel3.TabIndex = 3; - this.tabControlPanel3.TabItem = this.tiIntrFaceStngs; - this.tabControlPanel3.ThemeAware = true; - // - // gpVisioPath - // - this.gpVisioPath.BackColor = System.Drawing.Color.Transparent; - this.gpVisioPath.CanvasColor = System.Drawing.SystemColors.Control; - this.gpVisioPath.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpVisioPath.Controls.Add(this.txbxVisioPath); - this.gpVisioPath.DisabledBackColor = System.Drawing.Color.Empty; - this.gpVisioPath.Location = new System.Drawing.Point(25, 343); - this.gpVisioPath.Margin = new System.Windows.Forms.Padding(2); - this.gpVisioPath.Name = "gpVisioPath"; - this.gpVisioPath.Size = new System.Drawing.Size(285, 69); - // - // - // - this.gpVisioPath.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpVisioPath.Style.BackColorGradientAngle = 90; - this.gpVisioPath.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpVisioPath.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderBottomWidth = 1; - this.gpVisioPath.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpVisioPath.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderLeftWidth = 1; - this.gpVisioPath.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderRightWidth = 1; - this.gpVisioPath.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderTopWidth = 1; - this.gpVisioPath.Style.CornerDiameter = 4; - this.gpVisioPath.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpVisioPath.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpVisioPath.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpVisioPath.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpVisioPath.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpVisioPath.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpVisioPath.TabIndex = 11; - this.gpVisioPath.Text = "Visio Path"; - // - // txbxVisioPath - // - // - // - // - this.txbxVisioPath.Border.Class = "TextBoxBorder"; - this.txbxVisioPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.txbxVisioPath.Location = new System.Drawing.Point(8, 13); - this.txbxVisioPath.Name = "txbxVisioPath"; - this.txbxVisioPath.PreventEnterBeep = true; - this.txbxVisioPath.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.txbxVisioPath.ShortcutsEnabled = false; - this.txbxVisioPath.Size = new System.Drawing.Size(263, 20); - this.superTooltip1.SetSuperTooltip(this.txbxVisioPath, new DevComponents.DotNetBar.SuperTooltipInfo("Visio Path", "", "PROMS wil use this specified path to open Visio for use with inserting the Equati" + + this.tabControlPanel3.Style.GradientAngle = 90; + this.tabControlPanel3.TabIndex = 3; + this.tabControlPanel3.TabItem = this.tiIntrFaceStngs; + this.tabControlPanel3.ThemeAware = true; + // + // grPanUCFImpOpt + // + this.grPanUCFImpOpt.CanvasColor = System.Drawing.SystemColors.Control; + this.grPanUCFImpOpt.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.grPanUCFImpOpt.Controls.Add(this.cbUCFLForSetOnly); + this.grPanUCFImpOpt.Controls.Add(this.cbUCFLUseAll); + this.grPanUCFImpOpt.Controls.Add(this.cbUCFLOnlyImport); + this.grPanUCFImpOpt.Controls.Add(this.cbUCFLNotUsed); + this.grPanUCFImpOpt.Controls.Add(this.cbUCFIgnore); + this.grPanUCFImpOpt.DisabledBackColor = System.Drawing.Color.Empty; + this.grPanUCFImpOpt.Location = new System.Drawing.Point(417, 15); + this.grPanUCFImpOpt.Name = "grPanUCFImpOpt"; + this.grPanUCFImpOpt.Size = new System.Drawing.Size(195, 170); + // + // + // + this.grPanUCFImpOpt.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.grPanUCFImpOpt.Style.BackColorGradientAngle = 90; + this.grPanUCFImpOpt.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.grPanUCFImpOpt.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.grPanUCFImpOpt.Style.BorderBottomWidth = 1; + this.grPanUCFImpOpt.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.grPanUCFImpOpt.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.grPanUCFImpOpt.Style.BorderLeftWidth = 1; + this.grPanUCFImpOpt.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.grPanUCFImpOpt.Style.BorderRightWidth = 1; + this.grPanUCFImpOpt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.grPanUCFImpOpt.Style.BorderTopWidth = 1; + this.grPanUCFImpOpt.Style.CornerDiameter = 4; + this.grPanUCFImpOpt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.grPanUCFImpOpt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.grPanUCFImpOpt.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.grPanUCFImpOpt.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.grPanUCFImpOpt.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.grPanUCFImpOpt.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.grPanUCFImpOpt.TabIndex = 12; + this.grPanUCFImpOpt.Text = "UCF Import Options"; + // + // cbUCFLForSetOnly + // + this.cbUCFLForSetOnly.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLForSetOnly.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLForSetOnly.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLForSetOnly.Location = new System.Drawing.Point(3, 110); + this.cbUCFLForSetOnly.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbUCFLForSetOnly.Name = "cbUCFLForSetOnly"; + this.cbUCFLForSetOnly.Size = new System.Drawing.Size(140, 23); + this.cbUCFLForSetOnly.TabIndex = 5; + this.cbUCFLForSetOnly.Text = "Load For Set Only"; + this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged); + // + // cbUCFLUseAll + // + this.cbUCFLUseAll.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLUseAll.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLUseAll.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLUseAll.Location = new System.Drawing.Point(3, 83); + this.cbUCFLUseAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbUCFLUseAll.Name = "cbUCFLUseAll"; + this.cbUCFLUseAll.Size = new System.Drawing.Size(140, 23); + this.cbUCFLUseAll.TabIndex = 4; + this.cbUCFLUseAll.Text = "Load Use All"; + this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged); + // + // cbUCFLOnlyImport + // + this.cbUCFLOnlyImport.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLOnlyImport.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLOnlyImport.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLOnlyImport.Location = new System.Drawing.Point(3, 56); + this.cbUCFLOnlyImport.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbUCFLOnlyImport.Name = "cbUCFLOnlyImport"; + this.cbUCFLOnlyImport.Size = new System.Drawing.Size(140, 23); + this.cbUCFLOnlyImport.TabIndex = 3; + this.cbUCFLOnlyImport.Text = "Load Only Imported"; + this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged); + // + // cbUCFLNotUsed + // + this.cbUCFLNotUsed.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLNotUsed.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLNotUsed.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLNotUsed.Location = new System.Drawing.Point(3, 29); + this.cbUCFLNotUsed.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbUCFLNotUsed.Name = "cbUCFLNotUsed"; + this.cbUCFLNotUsed.Size = new System.Drawing.Size(118, 23); + this.cbUCFLNotUsed.TabIndex = 2; + this.cbUCFLNotUsed.Text = "Load Not Used"; + this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged); + // + // cbUCFIgnore + // + this.cbUCFIgnore.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFIgnore.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFIgnore.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFIgnore.Location = new System.Drawing.Point(3, 2); + this.cbUCFIgnore.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbUCFIgnore.Name = "cbUCFIgnore"; + this.cbUCFIgnore.Size = new System.Drawing.Size(89, 23); + this.cbUCFIgnore.TabIndex = 1; + this.cbUCFIgnore.Text = "Ignore"; + this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged); + // + // gpVisioPath + // + this.gpVisioPath.BackColor = System.Drawing.Color.Transparent; + this.gpVisioPath.CanvasColor = System.Drawing.SystemColors.Control; + this.gpVisioPath.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpVisioPath.Controls.Add(this.txbxVisioPath); + this.gpVisioPath.DisabledBackColor = System.Drawing.Color.Empty; + this.gpVisioPath.Location = new System.Drawing.Point(33, 427); + this.gpVisioPath.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpVisioPath.Name = "gpVisioPath"; + this.gpVisioPath.Size = new System.Drawing.Size(380, 85); + // + // + // + this.gpVisioPath.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpVisioPath.Style.BackColorGradientAngle = 90; + this.gpVisioPath.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpVisioPath.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderBottomWidth = 1; + this.gpVisioPath.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpVisioPath.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderLeftWidth = 1; + this.gpVisioPath.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderRightWidth = 1; + this.gpVisioPath.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderTopWidth = 1; + this.gpVisioPath.Style.CornerDiameter = 4; + this.gpVisioPath.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpVisioPath.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpVisioPath.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpVisioPath.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpVisioPath.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpVisioPath.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpVisioPath.TabIndex = 11; + this.gpVisioPath.Text = "Visio Path"; + // + // txbxVisioPath + // + // + // + // + this.txbxVisioPath.Border.Class = "TextBoxBorder"; + this.txbxVisioPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txbxVisioPath.Location = new System.Drawing.Point(11, 16); + this.txbxVisioPath.Margin = new System.Windows.Forms.Padding(4); + this.txbxVisioPath.Name = "txbxVisioPath"; + this.txbxVisioPath.PreventEnterBeep = true; + this.txbxVisioPath.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; + this.txbxVisioPath.ShortcutsEnabled = false; + this.txbxVisioPath.Size = new System.Drawing.Size(351, 22); + this.superTooltip1.SetSuperTooltip(this.txbxVisioPath, new DevComponents.DotNetBar.SuperTooltipInfo("Visio Path", "", "PROMS wil use this specified path to open Visio for use with inserting the Equati" + "on sub step type.\r\n\r\nIf this is blank, then PROMS will look in the registry for " + "the path to Visio.\r\n\r\n", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(300, 115))); - this.txbxVisioPath.TabIndex = 0; - this.txbxVisioPath.WordWrap = false; - this.txbxVisioPath.Leave += new System.EventHandler(this.txbxVisioPath_Leave_1); - // - // gpSeparateWindows - // - this.gpSeparateWindows.BackColor = System.Drawing.Color.Transparent; - this.gpSeparateWindows.CanvasColor = System.Drawing.SystemColors.Control; - this.gpSeparateWindows.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpSeparateWindows.Controls.Add(this.cbSeparateWindows); - this.gpSeparateWindows.DisabledBackColor = System.Drawing.Color.Empty; - this.gpSeparateWindows.Location = new System.Drawing.Point(313, 244); - this.gpSeparateWindows.Margin = new System.Windows.Forms.Padding(2); - this.gpSeparateWindows.Name = "gpSeparateWindows"; - this.gpSeparateWindows.Size = new System.Drawing.Size(127, 81); - // - // - // - this.gpSeparateWindows.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpSeparateWindows.Style.BackColorGradientAngle = 90; - this.gpSeparateWindows.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpSeparateWindows.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderBottomWidth = 1; - this.gpSeparateWindows.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpSeparateWindows.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderLeftWidth = 1; - this.gpSeparateWindows.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderRightWidth = 1; - this.gpSeparateWindows.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderTopWidth = 1; - this.gpSeparateWindows.Style.CornerDiameter = 4; - this.gpSeparateWindows.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpSeparateWindows.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpSeparateWindows.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpSeparateWindows.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpSeparateWindows.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpSeparateWindows.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpSeparateWindows.TabIndex = 10; - this.gpSeparateWindows.Text = "Separate Windows"; - // - // cbSeparateWindows - // - // - // - // - this.cbSeparateWindows.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbSeparateWindows.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbSeparateWindows.Location = new System.Drawing.Point(8, 8); - this.cbSeparateWindows.Margin = new System.Windows.Forms.Padding(2); - this.cbSeparateWindows.Name = "cbSeparateWindows"; - this.cbSeparateWindows.Size = new System.Drawing.Size(107, 19); - this.cbSeparateWindows.TabIndex = 9; - this.cbSeparateWindows.Text = "By Procedure Set"; - this.cbSeparateWindows.CheckedChanged += new System.EventHandler(this.cbSeparateWindows_CheckedChanged); - // - // gpEnhancedDocs - // - this.gpEnhancedDocs.BackColor = System.Drawing.Color.Transparent; - this.gpEnhancedDocs.CanvasColor = System.Drawing.SystemColors.Control; - this.gpEnhancedDocs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpEnhancedDocs.Controls.Add(this.cbEnhancedDocumentSync); - this.gpEnhancedDocs.DisabledBackColor = System.Drawing.Color.Empty; - this.gpEnhancedDocs.Location = new System.Drawing.Point(167, 244); - this.gpEnhancedDocs.Margin = new System.Windows.Forms.Padding(2); - this.gpEnhancedDocs.Name = "gpEnhancedDocs"; - this.gpEnhancedDocs.Size = new System.Drawing.Size(127, 81); - // - // - // - this.gpEnhancedDocs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpEnhancedDocs.Style.BackColorGradientAngle = 90; - this.gpEnhancedDocs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpEnhancedDocs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderBottomWidth = 1; - this.gpEnhancedDocs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpEnhancedDocs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderLeftWidth = 1; - this.gpEnhancedDocs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderRightWidth = 1; - this.gpEnhancedDocs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderTopWidth = 1; - this.gpEnhancedDocs.Style.CornerDiameter = 4; - this.gpEnhancedDocs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpEnhancedDocs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpEnhancedDocs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpEnhancedDocs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpEnhancedDocs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpEnhancedDocs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpEnhancedDocs.TabIndex = 9; - this.gpEnhancedDocs.Text = "Enhanced Documents"; - // - // cbEnhancedDocumentSync - // - // - // - // - this.cbEnhancedDocumentSync.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbEnhancedDocumentSync.Checked = true; - this.cbEnhancedDocumentSync.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbEnhancedDocumentSync.CheckValue = "Y"; - this.cbEnhancedDocumentSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbEnhancedDocumentSync.Location = new System.Drawing.Point(8, 8); - this.cbEnhancedDocumentSync.Margin = new System.Windows.Forms.Padding(2); - this.cbEnhancedDocumentSync.Name = "cbEnhancedDocumentSync"; - this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(99, 19); - this.cbEnhancedDocumentSync.TabIndex = 9; - this.cbEnhancedDocumentSync.Text = "Sync Navigation"; - // - // gpPasteSettings - // - this.gpPasteSettings.BackColor = System.Drawing.Color.Transparent; - this.gpPasteSettings.CanvasColor = System.Drawing.SystemColors.Control; - this.gpPasteSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpPasteSettings.Controls.Add(this.cbPastePlainText); - this.gpPasteSettings.Controls.Add(this.cbPasteNoReturns); - this.gpPasteSettings.DisabledBackColor = System.Drawing.Color.Empty; - this.gpPasteSettings.Location = new System.Drawing.Point(25, 244); - this.gpPasteSettings.Margin = new System.Windows.Forms.Padding(2); - this.gpPasteSettings.Name = "gpPasteSettings"; - this.gpPasteSettings.Size = new System.Drawing.Size(119, 81); - // - // - // - this.gpPasteSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpPasteSettings.Style.BackColorGradientAngle = 90; - this.gpPasteSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpPasteSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderBottomWidth = 1; - this.gpPasteSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpPasteSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderLeftWidth = 1; - this.gpPasteSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderRightWidth = 1; - this.gpPasteSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderTopWidth = 1; - this.gpPasteSettings.Style.CornerDiameter = 4; - this.gpPasteSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpPasteSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpPasteSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpPasteSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpPasteSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpPasteSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpPasteSettings.TabIndex = 8; - this.gpPasteSettings.Text = "Paste Settings"; - // - // cbPastePlainText - // - // - // - // - this.cbPastePlainText.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbPastePlainText.Checked = true; - this.cbPastePlainText.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbPastePlainText.CheckValue = "Y"; - this.cbPastePlainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbPastePlainText.Location = new System.Drawing.Point(8, 8); - this.cbPastePlainText.Margin = new System.Windows.Forms.Padding(2); - this.cbPastePlainText.Name = "cbPastePlainText"; - this.cbPastePlainText.Size = new System.Drawing.Size(92, 19); - this.cbPastePlainText.TabIndex = 9; - this.cbPastePlainText.Text = "Plain Text"; - this.cbPastePlainText.CheckedChanged += new System.EventHandler(this.cbPastePlainText_CheckedChanged); - // - // cbPasteNoReturns - // - // - // - // - this.cbPasteNoReturns.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbPasteNoReturns.Checked = true; - this.cbPasteNoReturns.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbPasteNoReturns.CheckValue = "Y"; - this.cbPasteNoReturns.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbPasteNoReturns.Location = new System.Drawing.Point(8, 28); - this.cbPasteNoReturns.Margin = new System.Windows.Forms.Padding(2); - this.cbPasteNoReturns.Name = "cbPasteNoReturns"; - this.cbPasteNoReturns.Size = new System.Drawing.Size(92, 19); - this.cbPasteNoReturns.TabIndex = 10; - this.cbPasteNoReturns.Text = "No Returns"; - this.cbPasteNoReturns.CheckedChanged += new System.EventHandler(this.cbPasteNoReturns_CheckedChanged); - // - // gpTreeView - // - this.gpTreeView.BackColor = System.Drawing.Color.Transparent; - this.gpTreeView.CanvasColor = System.Drawing.SystemColors.Control; - this.gpTreeView.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpTreeView.Controls.Add(this.cbTVExpand); - this.gpTreeView.DisabledBackColor = System.Drawing.Color.Empty; - this.gpTreeView.Location = new System.Drawing.Point(312, 150); - this.gpTreeView.Margin = new System.Windows.Forms.Padding(2); - this.gpTreeView.Name = "gpTreeView"; - this.gpTreeView.Size = new System.Drawing.Size(119, 72); - // - // - // - this.gpTreeView.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpTreeView.Style.BackColorGradientAngle = 90; - this.gpTreeView.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpTreeView.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderBottomWidth = 1; - this.gpTreeView.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpTreeView.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderLeftWidth = 1; - this.gpTreeView.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderRightWidth = 1; - this.gpTreeView.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderTopWidth = 1; - this.gpTreeView.Style.CornerDiameter = 4; - this.gpTreeView.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpTreeView.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpTreeView.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpTreeView.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpTreeView.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpTreeView.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpTreeView.TabIndex = 6; - this.gpTreeView.Text = "Tree View"; - // - // cbTVExpand - // - // - // - // - this.cbTVExpand.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbTVExpand.Checked = true; - this.cbTVExpand.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbTVExpand.CheckValue = "Y"; - this.cbTVExpand.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbTVExpand.Location = new System.Drawing.Point(8, 13); - this.cbTVExpand.Margin = new System.Windows.Forms.Padding(2); - this.cbTVExpand.Name = "cbTVExpand"; - this.cbTVExpand.Size = new System.Drawing.Size(92, 19); - this.superTooltip1.SetSuperTooltip(this.cbTVExpand, new DevComponents.DotNetBar.SuperTooltipInfo("Remember Last", "", "When checked, PROMS will remember the last procedure you had seleced from the tre" + + this.txbxVisioPath.TabIndex = 0; + this.txbxVisioPath.WordWrap = false; + this.txbxVisioPath.Leave += new System.EventHandler(this.txbxVisioPath_Leave_1); + // + // gpSeparateWindows + // + this.gpSeparateWindows.BackColor = System.Drawing.Color.Transparent; + this.gpSeparateWindows.CanvasColor = System.Drawing.SystemColors.Control; + this.gpSeparateWindows.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpSeparateWindows.Controls.Add(this.cbSeparateWindows); + this.gpSeparateWindows.DisabledBackColor = System.Drawing.Color.Empty; + this.gpSeparateWindows.Location = new System.Drawing.Point(417, 310); + this.gpSeparateWindows.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpSeparateWindows.Name = "gpSeparateWindows"; + this.gpSeparateWindows.Size = new System.Drawing.Size(169, 100); + // + // + // + this.gpSeparateWindows.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpSeparateWindows.Style.BackColorGradientAngle = 90; + this.gpSeparateWindows.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpSeparateWindows.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderBottomWidth = 1; + this.gpSeparateWindows.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpSeparateWindows.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderLeftWidth = 1; + this.gpSeparateWindows.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderRightWidth = 1; + this.gpSeparateWindows.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderTopWidth = 1; + this.gpSeparateWindows.Style.CornerDiameter = 4; + this.gpSeparateWindows.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpSeparateWindows.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpSeparateWindows.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpSeparateWindows.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpSeparateWindows.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpSeparateWindows.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpSeparateWindows.TabIndex = 10; + this.gpSeparateWindows.Text = "Separate Windows"; + // + // cbSeparateWindows + // + // + // + // + this.cbSeparateWindows.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbSeparateWindows.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbSeparateWindows.Location = new System.Drawing.Point(11, 10); + this.cbSeparateWindows.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbSeparateWindows.Name = "cbSeparateWindows"; + this.cbSeparateWindows.Size = new System.Drawing.Size(143, 23); + this.cbSeparateWindows.TabIndex = 9; + this.cbSeparateWindows.Text = "By Procedure Set"; + this.cbSeparateWindows.CheckedChanged += new System.EventHandler(this.cbSeparateWindows_CheckedChanged); + // + // gpEnhancedDocs + // + this.gpEnhancedDocs.BackColor = System.Drawing.Color.Transparent; + this.gpEnhancedDocs.CanvasColor = System.Drawing.SystemColors.Control; + this.gpEnhancedDocs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpEnhancedDocs.Controls.Add(this.cbEnhancedDocumentSync); + this.gpEnhancedDocs.DisabledBackColor = System.Drawing.Color.Empty; + this.gpEnhancedDocs.Location = new System.Drawing.Point(223, 310); + this.gpEnhancedDocs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpEnhancedDocs.Name = "gpEnhancedDocs"; + this.gpEnhancedDocs.Size = new System.Drawing.Size(169, 100); + // + // + // + this.gpEnhancedDocs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpEnhancedDocs.Style.BackColorGradientAngle = 90; + this.gpEnhancedDocs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpEnhancedDocs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderBottomWidth = 1; + this.gpEnhancedDocs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpEnhancedDocs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderLeftWidth = 1; + this.gpEnhancedDocs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderRightWidth = 1; + this.gpEnhancedDocs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderTopWidth = 1; + this.gpEnhancedDocs.Style.CornerDiameter = 4; + this.gpEnhancedDocs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpEnhancedDocs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpEnhancedDocs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpEnhancedDocs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpEnhancedDocs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpEnhancedDocs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpEnhancedDocs.TabIndex = 9; + this.gpEnhancedDocs.Text = "Enhanced Documents"; + // + // cbEnhancedDocumentSync + // + // + // + // + this.cbEnhancedDocumentSync.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbEnhancedDocumentSync.Checked = true; + this.cbEnhancedDocumentSync.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbEnhancedDocumentSync.CheckValue = "Y"; + this.cbEnhancedDocumentSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbEnhancedDocumentSync.Location = new System.Drawing.Point(11, 10); + this.cbEnhancedDocumentSync.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbEnhancedDocumentSync.Name = "cbEnhancedDocumentSync"; + this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(132, 23); + this.cbEnhancedDocumentSync.TabIndex = 9; + this.cbEnhancedDocumentSync.Text = "Sync Navigation"; + // + // gpPasteSettings + // + this.gpPasteSettings.BackColor = System.Drawing.Color.Transparent; + this.gpPasteSettings.CanvasColor = System.Drawing.SystemColors.Control; + this.gpPasteSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpPasteSettings.Controls.Add(this.cbPastePlainText); + this.gpPasteSettings.Controls.Add(this.cbPasteNoReturns); + this.gpPasteSettings.DisabledBackColor = System.Drawing.Color.Empty; + this.gpPasteSettings.Location = new System.Drawing.Point(33, 310); + this.gpPasteSettings.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpPasteSettings.Name = "gpPasteSettings"; + this.gpPasteSettings.Size = new System.Drawing.Size(159, 100); + // + // + // + this.gpPasteSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpPasteSettings.Style.BackColorGradientAngle = 90; + this.gpPasteSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpPasteSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderBottomWidth = 1; + this.gpPasteSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpPasteSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderLeftWidth = 1; + this.gpPasteSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderRightWidth = 1; + this.gpPasteSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderTopWidth = 1; + this.gpPasteSettings.Style.CornerDiameter = 4; + this.gpPasteSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpPasteSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpPasteSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpPasteSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpPasteSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpPasteSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpPasteSettings.TabIndex = 8; + this.gpPasteSettings.Text = "Paste Settings"; + // + // cbPastePlainText + // + // + // + // + this.cbPastePlainText.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbPastePlainText.Checked = true; + this.cbPastePlainText.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbPastePlainText.CheckValue = "Y"; + this.cbPastePlainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbPastePlainText.Location = new System.Drawing.Point(11, 10); + this.cbPastePlainText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbPastePlainText.Name = "cbPastePlainText"; + this.cbPastePlainText.Size = new System.Drawing.Size(123, 23); + this.cbPastePlainText.TabIndex = 9; + this.cbPastePlainText.Text = "Plain Text"; + this.cbPastePlainText.CheckedChanged += new System.EventHandler(this.cbPastePlainText_CheckedChanged); + // + // cbPasteNoReturns + // + // + // + // + this.cbPasteNoReturns.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbPasteNoReturns.Checked = true; + this.cbPasteNoReturns.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbPasteNoReturns.CheckValue = "Y"; + this.cbPasteNoReturns.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbPasteNoReturns.Location = new System.Drawing.Point(11, 34); + this.cbPasteNoReturns.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbPasteNoReturns.Name = "cbPasteNoReturns"; + this.cbPasteNoReturns.Size = new System.Drawing.Size(123, 23); + this.cbPasteNoReturns.TabIndex = 10; + this.cbPasteNoReturns.Text = "No Returns"; + this.cbPasteNoReturns.CheckedChanged += new System.EventHandler(this.cbPasteNoReturns_CheckedChanged); + // + // gpTreeView + // + this.gpTreeView.BackColor = System.Drawing.Color.Transparent; + this.gpTreeView.CanvasColor = System.Drawing.SystemColors.Control; + this.gpTreeView.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpTreeView.Controls.Add(this.cbTVExpand); + this.gpTreeView.DisabledBackColor = System.Drawing.Color.Empty; + this.gpTreeView.Location = new System.Drawing.Point(416, 203); + this.gpTreeView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpTreeView.Name = "gpTreeView"; + this.gpTreeView.Size = new System.Drawing.Size(159, 89); + // + // + // + this.gpTreeView.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpTreeView.Style.BackColorGradientAngle = 90; + this.gpTreeView.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpTreeView.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderBottomWidth = 1; + this.gpTreeView.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpTreeView.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderLeftWidth = 1; + this.gpTreeView.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderRightWidth = 1; + this.gpTreeView.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderTopWidth = 1; + this.gpTreeView.Style.CornerDiameter = 4; + this.gpTreeView.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpTreeView.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpTreeView.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpTreeView.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpTreeView.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpTreeView.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpTreeView.TabIndex = 6; + this.gpTreeView.Text = "Tree View"; + // + // cbTVExpand + // + // + // + // + this.cbTVExpand.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbTVExpand.Checked = true; + this.cbTVExpand.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbTVExpand.CheckValue = "Y"; + this.cbTVExpand.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbTVExpand.Location = new System.Drawing.Point(11, 16); + this.cbTVExpand.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbTVExpand.Name = "cbTVExpand"; + this.cbTVExpand.Size = new System.Drawing.Size(123, 23); + this.superTooltip1.SetSuperTooltip(this.cbTVExpand, new DevComponents.DotNetBar.SuperTooltipInfo("Remember Last", "", "When checked, PROMS will remember the last procedure you had seleced from the tre" + "e and expand the tree to that location the next time PROMS is started.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 130))); - this.cbTVExpand.TabIndex = 7; - this.cbTVExpand.Text = "Remember Last"; - this.cbTVExpand.CheckedChanged += new System.EventHandler(this.cbTVExpand_CheckedChanged); - // - // gpStepTypeToolTip - // - this.gpStepTypeToolTip.BackColor = System.Drawing.Color.Transparent; - this.gpStepTypeToolTip.CanvasColor = System.Drawing.SystemColors.Control; - this.gpStepTypeToolTip.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpStepTypeToolTip.Controls.Add(this.cbStepTypeToolTip); - this.gpStepTypeToolTip.DisabledBackColor = System.Drawing.Color.Empty; - this.gpStepTypeToolTip.Location = new System.Drawing.Point(167, 150); - this.gpStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2); - this.gpStepTypeToolTip.Name = "gpStepTypeToolTip"; - this.gpStepTypeToolTip.Size = new System.Drawing.Size(119, 72); - // - // - // - this.gpStepTypeToolTip.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpStepTypeToolTip.Style.BackColorGradientAngle = 90; - this.gpStepTypeToolTip.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpStepTypeToolTip.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderBottomWidth = 1; - this.gpStepTypeToolTip.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpStepTypeToolTip.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderLeftWidth = 1; - this.gpStepTypeToolTip.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderRightWidth = 1; - this.gpStepTypeToolTip.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderTopWidth = 1; - this.gpStepTypeToolTip.Style.CornerDiameter = 4; - this.gpStepTypeToolTip.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpStepTypeToolTip.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpStepTypeToolTip.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpStepTypeToolTip.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpStepTypeToolTip.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpStepTypeToolTip.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpStepTypeToolTip.TabIndex = 5; - this.gpStepTypeToolTip.Text = "Step Type Tool Tip"; - // - // cbStepTypeToolTip - // - // - // - // - this.cbStepTypeToolTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbStepTypeToolTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbStepTypeToolTip.Location = new System.Drawing.Point(8, 13); - this.cbStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2); - this.cbStepTypeToolTip.Name = "cbStepTypeToolTip"; - this.cbStepTypeToolTip.Size = new System.Drawing.Size(92, 19); - this.cbStepTypeToolTip.TabIndex = 7; - this.cbStepTypeToolTip.Text = "Show Tool Tip"; - this.cbStepTypeToolTip.CheckedChanged += new System.EventHandler(this.cbStepTypeToolTip_CheckedChanged); - // - // gpAnnotationSettings - // - this.gpAnnotationSettings.BackColor = System.Drawing.Color.Transparent; - this.gpAnnotationSettings.CanvasColor = System.Drawing.SystemColors.Control; - this.gpAnnotationSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpAnnotationSettings.Controls.Add(this.cbAnnotationPopup); - this.gpAnnotationSettings.DisabledBackColor = System.Drawing.Color.Empty; - this.gpAnnotationSettings.Location = new System.Drawing.Point(25, 150); - this.gpAnnotationSettings.Margin = new System.Windows.Forms.Padding(2); - this.gpAnnotationSettings.Name = "gpAnnotationSettings"; - this.gpAnnotationSettings.Size = new System.Drawing.Size(119, 72); - // - // - // - this.gpAnnotationSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpAnnotationSettings.Style.BackColorGradientAngle = 90; - this.gpAnnotationSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpAnnotationSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderBottomWidth = 1; - this.gpAnnotationSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpAnnotationSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderLeftWidth = 1; - this.gpAnnotationSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderRightWidth = 1; - this.gpAnnotationSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderTopWidth = 1; - this.gpAnnotationSettings.Style.CornerDiameter = 4; - this.gpAnnotationSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpAnnotationSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpAnnotationSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpAnnotationSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpAnnotationSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpAnnotationSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpAnnotationSettings.TabIndex = 4; - this.gpAnnotationSettings.Text = "Annotation Settings"; - // - // cbAnnotationPopup - // - // - // - // - this.cbAnnotationPopup.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbAnnotationPopup.Checked = true; - this.cbAnnotationPopup.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbAnnotationPopup.CheckValue = "Y"; - this.cbAnnotationPopup.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbAnnotationPopup.Location = new System.Drawing.Point(8, 13); - this.cbAnnotationPopup.Margin = new System.Windows.Forms.Padding(2); - this.cbAnnotationPopup.Name = "cbAnnotationPopup"; - this.cbAnnotationPopup.Size = new System.Drawing.Size(92, 19); - this.cbAnnotationPopup.TabIndex = 7; - this.cbAnnotationPopup.Text = "Auto Popup"; - this.cbAnnotationPopup.CheckedChanged += new System.EventHandler(this.cbAnnotationPopup_CheckedChanged); - // - // gpTransRangeColor - // - this.gpTransRangeColor.BackColor = System.Drawing.Color.Transparent; - this.gpTransRangeColor.CanvasColor = System.Drawing.SystemColors.Control; - this.gpTransRangeColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpTransRangeColor.Controls.Add(this.colorPickerButton1); - this.gpTransRangeColor.DisabledBackColor = System.Drawing.Color.Empty; - this.gpTransRangeColor.Location = new System.Drawing.Point(303, 13); - this.gpTransRangeColor.Name = "gpTransRangeColor"; - this.gpTransRangeColor.Size = new System.Drawing.Size(146, 62); - // - // - // - this.gpTransRangeColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpTransRangeColor.Style.BackColorGradientAngle = 90; - this.gpTransRangeColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpTransRangeColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderBottomWidth = 1; - this.gpTransRangeColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpTransRangeColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderLeftWidth = 1; - this.gpTransRangeColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderRightWidth = 1; - this.gpTransRangeColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderTopWidth = 1; - this.gpTransRangeColor.Style.CornerDiameter = 4; - this.gpTransRangeColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpTransRangeColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpTransRangeColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpTransRangeColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpTransRangeColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpTransRangeColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpTransRangeColor.TabIndex = 3; - this.gpTransRangeColor.Text = "Transition Range Color"; - this.gpTransRangeColor.Visible = false; - // - // colorPickerButton1 - // - this.colorPickerButton1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.colorPickerButton1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.colorPickerButton1.Image = ((System.Drawing.Image)(resources.GetObject("colorPickerButton1.Image"))); - this.colorPickerButton1.Location = new System.Drawing.Point(7, 12); - this.colorPickerButton1.Name = "colorPickerButton1"; - this.colorPickerButton1.SelectedColorImageRectangle = new System.Drawing.Rectangle(2, 2, 12, 12); - this.colorPickerButton1.Size = new System.Drawing.Size(103, 23); - this.colorPickerButton1.TabIndex = 0; - this.colorPickerButton1.SelectedColorChanged += new System.EventHandler(this.colorPickerButton1_SelectedColorChanged); - // - // gpPropPageStyle - // - this.gpPropPageStyle.BackColor = System.Drawing.Color.Transparent; - this.gpPropPageStyle.CanvasColor = System.Drawing.SystemColors.Control; - this.gpPropPageStyle.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpPropPageStyle.Controls.Add(this.cbPropGrid); - this.gpPropPageStyle.Controls.Add(this.cbTabbedIntrFace); - this.gpPropPageStyle.Controls.Add(this.cbButtonIntrFace); - this.gpPropPageStyle.DisabledBackColor = System.Drawing.Color.Empty; - this.gpPropPageStyle.Location = new System.Drawing.Point(155, 12); - this.gpPropPageStyle.Margin = new System.Windows.Forms.Padding(2); - this.gpPropPageStyle.Name = "gpPropPageStyle"; - this.gpPropPageStyle.Size = new System.Drawing.Size(127, 107); - // - // - // - this.gpPropPageStyle.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpPropPageStyle.Style.BackColorGradientAngle = 90; - this.gpPropPageStyle.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpPropPageStyle.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderBottomWidth = 1; - this.gpPropPageStyle.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpPropPageStyle.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderLeftWidth = 1; - this.gpPropPageStyle.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderRightWidth = 1; - this.gpPropPageStyle.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderTopWidth = 1; - this.gpPropPageStyle.Style.CornerDiameter = 4; - this.gpPropPageStyle.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpPropPageStyle.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpPropPageStyle.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpPropPageStyle.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpPropPageStyle.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpPropPageStyle.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpPropPageStyle.TabIndex = 2; - this.gpPropPageStyle.Text = "Property Page Style"; - // - // cbPropGrid - // - // - // - // - this.cbPropGrid.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbPropGrid.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbPropGrid.Location = new System.Drawing.Point(8, 59); - this.cbPropGrid.Margin = new System.Windows.Forms.Padding(2); - this.cbPropGrid.Name = "cbPropGrid"; - this.cbPropGrid.Size = new System.Drawing.Size(97, 20); - this.cbPropGrid.TabIndex = 2; - this.cbPropGrid.Text = "Property Grid"; - this.cbPropGrid.Visible = false; - // - // cbTabbedIntrFace - // - // - // - // - this.cbTabbedIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbTabbedIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbTabbedIntrFace.Location = new System.Drawing.Point(8, 34); - this.cbTabbedIntrFace.Margin = new System.Windows.Forms.Padding(2); - this.cbTabbedIntrFace.Name = "cbTabbedIntrFace"; - this.cbTabbedIntrFace.Size = new System.Drawing.Size(111, 20); - this.cbTabbedIntrFace.TabIndex = 1; - this.cbTabbedIntrFace.Text = "Tabbed Interface"; - // - // cbButtonIntrFace - // - // - // - // - this.cbButtonIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbButtonIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbButtonIntrFace.Location = new System.Drawing.Point(8, 10); - this.cbButtonIntrFace.Margin = new System.Windows.Forms.Padding(2); - this.cbButtonIntrFace.Name = "cbButtonIntrFace"; - this.cbButtonIntrFace.Size = new System.Drawing.Size(97, 20); - this.cbButtonIntrFace.TabIndex = 0; - this.cbButtonIntrFace.Text = "Button Interface"; - // - // tiIntrFaceStngs - // - this.tiIntrFaceStngs.AttachedControl = this.tabControlPanel3; - this.tiIntrFaceStngs.Name = "tiIntrFaceStngs"; - this.tiIntrFaceStngs.Text = "My Interface Settings"; - // - // tabControlPanel1 - // - this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlPanel1.Location = new System.Drawing.Point(0, 27); - this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(2); - this.tabControlPanel1.Name = "tabControlPanel1"; - this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel1.Size = new System.Drawing.Size(645, 430); - this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.SystemColors.Control; - this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + this.cbTVExpand.TabIndex = 7; + this.cbTVExpand.Text = "Remember Last"; + this.cbTVExpand.CheckedChanged += new System.EventHandler(this.cbTVExpand_CheckedChanged); + // + // gpStepTypeToolTip + // + this.gpStepTypeToolTip.BackColor = System.Drawing.Color.Transparent; + this.gpStepTypeToolTip.CanvasColor = System.Drawing.SystemColors.Control; + this.gpStepTypeToolTip.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpStepTypeToolTip.Controls.Add(this.cbStepTypeToolTip); + this.gpStepTypeToolTip.DisabledBackColor = System.Drawing.Color.Empty; + this.gpStepTypeToolTip.Location = new System.Drawing.Point(223, 203); + this.gpStepTypeToolTip.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpStepTypeToolTip.Name = "gpStepTypeToolTip"; + this.gpStepTypeToolTip.Size = new System.Drawing.Size(159, 89); + // + // + // + this.gpStepTypeToolTip.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpStepTypeToolTip.Style.BackColorGradientAngle = 90; + this.gpStepTypeToolTip.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpStepTypeToolTip.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderBottomWidth = 1; + this.gpStepTypeToolTip.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpStepTypeToolTip.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderLeftWidth = 1; + this.gpStepTypeToolTip.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderRightWidth = 1; + this.gpStepTypeToolTip.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderTopWidth = 1; + this.gpStepTypeToolTip.Style.CornerDiameter = 4; + this.gpStepTypeToolTip.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpStepTypeToolTip.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpStepTypeToolTip.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpStepTypeToolTip.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpStepTypeToolTip.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpStepTypeToolTip.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpStepTypeToolTip.TabIndex = 5; + this.gpStepTypeToolTip.Text = "Step Type Tool Tip"; + // + // cbStepTypeToolTip + // + // + // + // + this.cbStepTypeToolTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbStepTypeToolTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbStepTypeToolTip.Location = new System.Drawing.Point(11, 16); + this.cbStepTypeToolTip.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbStepTypeToolTip.Name = "cbStepTypeToolTip"; + this.cbStepTypeToolTip.Size = new System.Drawing.Size(123, 23); + this.cbStepTypeToolTip.TabIndex = 7; + this.cbStepTypeToolTip.Text = "Show Tool Tip"; + this.cbStepTypeToolTip.CheckedChanged += new System.EventHandler(this.cbStepTypeToolTip_CheckedChanged); + // + // gpAnnotationSettings + // + this.gpAnnotationSettings.BackColor = System.Drawing.Color.Transparent; + this.gpAnnotationSettings.CanvasColor = System.Drawing.SystemColors.Control; + this.gpAnnotationSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpAnnotationSettings.Controls.Add(this.cbAnnotationPopup); + this.gpAnnotationSettings.DisabledBackColor = System.Drawing.Color.Empty; + this.gpAnnotationSettings.Location = new System.Drawing.Point(33, 203); + this.gpAnnotationSettings.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpAnnotationSettings.Name = "gpAnnotationSettings"; + this.gpAnnotationSettings.Size = new System.Drawing.Size(159, 89); + // + // + // + this.gpAnnotationSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpAnnotationSettings.Style.BackColorGradientAngle = 90; + this.gpAnnotationSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpAnnotationSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderBottomWidth = 1; + this.gpAnnotationSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpAnnotationSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderLeftWidth = 1; + this.gpAnnotationSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderRightWidth = 1; + this.gpAnnotationSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderTopWidth = 1; + this.gpAnnotationSettings.Style.CornerDiameter = 4; + this.gpAnnotationSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpAnnotationSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpAnnotationSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpAnnotationSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpAnnotationSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpAnnotationSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpAnnotationSettings.TabIndex = 4; + this.gpAnnotationSettings.Text = "Annotation Settings"; + // + // cbAnnotationPopup + // + // + // + // + this.cbAnnotationPopup.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbAnnotationPopup.Checked = true; + this.cbAnnotationPopup.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbAnnotationPopup.CheckValue = "Y"; + this.cbAnnotationPopup.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbAnnotationPopup.Location = new System.Drawing.Point(11, 16); + this.cbAnnotationPopup.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbAnnotationPopup.Name = "cbAnnotationPopup"; + this.cbAnnotationPopup.Size = new System.Drawing.Size(123, 23); + this.cbAnnotationPopup.TabIndex = 7; + this.cbAnnotationPopup.Text = "Auto Popup"; + this.cbAnnotationPopup.CheckedChanged += new System.EventHandler(this.cbAnnotationPopup_CheckedChanged); + // + // gpTransRangeColor + // + this.gpTransRangeColor.BackColor = System.Drawing.Color.Transparent; + this.gpTransRangeColor.CanvasColor = System.Drawing.SystemColors.Control; + this.gpTransRangeColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpTransRangeColor.Controls.Add(this.colorPickerButton1); + this.gpTransRangeColor.DisabledBackColor = System.Drawing.Color.Empty; + this.gpTransRangeColor.Location = new System.Drawing.Point(650, 16); + this.gpTransRangeColor.Margin = new System.Windows.Forms.Padding(4); + this.gpTransRangeColor.Name = "gpTransRangeColor"; + this.gpTransRangeColor.Size = new System.Drawing.Size(195, 76); + // + // + // + this.gpTransRangeColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpTransRangeColor.Style.BackColorGradientAngle = 90; + this.gpTransRangeColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpTransRangeColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderBottomWidth = 1; + this.gpTransRangeColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpTransRangeColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderLeftWidth = 1; + this.gpTransRangeColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderRightWidth = 1; + this.gpTransRangeColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderTopWidth = 1; + this.gpTransRangeColor.Style.CornerDiameter = 4; + this.gpTransRangeColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpTransRangeColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpTransRangeColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpTransRangeColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpTransRangeColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpTransRangeColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpTransRangeColor.TabIndex = 3; + this.gpTransRangeColor.Text = "Transition Range Color"; + this.gpTransRangeColor.Visible = false; + // + // colorPickerButton1 + // + this.colorPickerButton1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.colorPickerButton1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.colorPickerButton1.Image = ((System.Drawing.Image)(resources.GetObject("colorPickerButton1.Image"))); + this.colorPickerButton1.Location = new System.Drawing.Point(9, 15); + this.colorPickerButton1.Margin = new System.Windows.Forms.Padding(4); + this.colorPickerButton1.Name = "colorPickerButton1"; + this.colorPickerButton1.SelectedColorImageRectangle = new System.Drawing.Rectangle(2, 2, 12, 12); + this.colorPickerButton1.Size = new System.Drawing.Size(137, 28); + this.colorPickerButton1.TabIndex = 0; + this.colorPickerButton1.SelectedColorChanged += new System.EventHandler(this.colorPickerButton1_SelectedColorChanged); + // + // gpPropPageStyle + // + this.gpPropPageStyle.BackColor = System.Drawing.Color.Transparent; + this.gpPropPageStyle.CanvasColor = System.Drawing.SystemColors.Control; + this.gpPropPageStyle.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpPropPageStyle.Controls.Add(this.cbPropGrid); + this.gpPropPageStyle.Controls.Add(this.cbTabbedIntrFace); + this.gpPropPageStyle.Controls.Add(this.cbButtonIntrFace); + this.gpPropPageStyle.DisabledBackColor = System.Drawing.Color.Empty; + this.gpPropPageStyle.Location = new System.Drawing.Point(207, 15); + this.gpPropPageStyle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.gpPropPageStyle.Name = "gpPropPageStyle"; + this.gpPropPageStyle.Size = new System.Drawing.Size(169, 132); + // + // + // + this.gpPropPageStyle.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpPropPageStyle.Style.BackColorGradientAngle = 90; + this.gpPropPageStyle.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpPropPageStyle.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderBottomWidth = 1; + this.gpPropPageStyle.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpPropPageStyle.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderLeftWidth = 1; + this.gpPropPageStyle.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderRightWidth = 1; + this.gpPropPageStyle.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderTopWidth = 1; + this.gpPropPageStyle.Style.CornerDiameter = 4; + this.gpPropPageStyle.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpPropPageStyle.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpPropPageStyle.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpPropPageStyle.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpPropPageStyle.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpPropPageStyle.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpPropPageStyle.TabIndex = 2; + this.gpPropPageStyle.Text = "Property Page Style"; + // + // cbPropGrid + // + // + // + // + this.cbPropGrid.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbPropGrid.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbPropGrid.Location = new System.Drawing.Point(11, 73); + this.cbPropGrid.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbPropGrid.Name = "cbPropGrid"; + this.cbPropGrid.Size = new System.Drawing.Size(129, 25); + this.cbPropGrid.TabIndex = 2; + this.cbPropGrid.Text = "Property Grid"; + this.cbPropGrid.Visible = false; + // + // cbTabbedIntrFace + // + // + // + // + this.cbTabbedIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbTabbedIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbTabbedIntrFace.Location = new System.Drawing.Point(11, 42); + this.cbTabbedIntrFace.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbTabbedIntrFace.Name = "cbTabbedIntrFace"; + this.cbTabbedIntrFace.Size = new System.Drawing.Size(148, 25); + this.cbTabbedIntrFace.TabIndex = 1; + this.cbTabbedIntrFace.Text = "Tabbed Interface"; + // + // cbButtonIntrFace + // + // + // + // + this.cbButtonIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbButtonIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbButtonIntrFace.Location = new System.Drawing.Point(11, 12); + this.cbButtonIntrFace.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.cbButtonIntrFace.Name = "cbButtonIntrFace"; + this.cbButtonIntrFace.Size = new System.Drawing.Size(129, 25); + this.cbButtonIntrFace.TabIndex = 0; + this.cbButtonIntrFace.Text = "Button Interface"; + // + // tiIntrFaceStngs + // + this.tiIntrFaceStngs.AttachedControl = this.tabControlPanel3; + this.tiIntrFaceStngs.Name = "tiIntrFaceStngs"; + this.tiIntrFaceStngs.Text = "My Interface Settings"; + // + // tabControlPanel1 + // + this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty; + this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControlPanel1.Location = new System.Drawing.Point(0, 27); + this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.tabControlPanel1.Name = "tabControlPanel1"; + this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1); + this.tabControlPanel1.Size = new System.Drawing.Size(860, 535); + this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tabControlPanel1.Style.GradientAngle = 90; - this.tabControlPanel1.TabIndex = 1; - this.tabControlPanel1.TabItem = this.tiGeneral; - this.tabControlPanel1.ThemeAware = true; - // - // tiGeneral - // - this.tiGeneral.AttachedControl = this.tabControlPanel1; - this.tiGeneral.Name = "tiGeneral"; - this.tiGeneral.Text = "General"; - this.tiGeneral.Visible = false; - // - // tabControlPanel2 - // - this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlPanel2.Location = new System.Drawing.Point(0, 27); - this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2); - this.tabControlPanel2.Name = "tabControlPanel2"; - this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel2.Size = new System.Drawing.Size(645, 430); - this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control; - this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + this.tabControlPanel1.Style.GradientAngle = 90; + this.tabControlPanel1.TabIndex = 1; + this.tabControlPanel1.TabItem = this.tiGeneral; + this.tabControlPanel1.ThemeAware = true; + // + // tiGeneral + // + this.tiGeneral.AttachedControl = this.tabControlPanel1; + this.tiGeneral.Name = "tiGeneral"; + this.tiGeneral.Text = "General"; + this.tiGeneral.Visible = false; + // + // tabControlPanel2 + // + this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty; + this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControlPanel2.Location = new System.Drawing.Point(0, 27); + this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.tabControlPanel2.Name = "tabControlPanel2"; + this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1); + this.tabControlPanel2.Size = new System.Drawing.Size(860, 535); + this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tabControlPanel2.Style.GradientAngle = 90; - this.tabControlPanel2.TabIndex = 2; - this.tabControlPanel2.TabItem = this.tiStUpMsg; - this.tabControlPanel2.ThemeAware = true; - // - // tiStUpMsg - // - this.tiStUpMsg.AttachedControl = this.tabControlPanel2; - this.tiStUpMsg.Name = "tiStUpMsg"; - this.tiStUpMsg.Text = "Startup Message"; - this.tiStUpMsg.Visible = false; - // - // btnReset - // - this.btnReset.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnReset.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnReset.Location = new System.Drawing.Point(194, 492); - this.btnReset.Margin = new System.Windows.Forms.Padding(2); - this.btnReset.Name = "btnReset"; - this.btnReset.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.btnReset.Size = new System.Drawing.Size(79, 19); - this.superTooltip1.SetSuperTooltip(this.btnReset, new DevComponents.DotNetBar.SuperTooltipInfo("Default Settings", "", "This will reset saved user settings back to the Proms system default.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(140, 95))); - this.btnReset.TabIndex = 3; - this.btnReset.Text = "Default Settings"; - this.btnReset.Click += new System.EventHandler(this.btnReset_Click); - // - // superTooltip1 - // - this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray); - this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; - // - // frmSysOptions - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(699, 520); - this.ControlBox = false; - this.Controls.Add(this.btnReset); - this.Controls.Add(this.tcSysOpts); - this.Controls.Add(this.panButtons); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.btnCancel); - this.DoubleBuffered = true; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "frmSysOptions"; - this.Text = "Proms System Options"; - this.Load += new System.EventHandler(this.frmSysOptions_Load); - this.gpSystemColor.ResumeLayout(false); - this.panButtons.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).EndInit(); - this.tcSysOpts.ResumeLayout(false); - this.tabControlPanel3.ResumeLayout(false); - this.gpVisioPath.ResumeLayout(false); - this.gpSeparateWindows.ResumeLayout(false); - this.gpEnhancedDocs.ResumeLayout(false); - this.gpPasteSettings.ResumeLayout(false); - this.gpTreeView.ResumeLayout(false); - this.gpStepTypeToolTip.ResumeLayout(false); - this.gpAnnotationSettings.ResumeLayout(false); - this.gpTransRangeColor.ResumeLayout(false); - this.gpPropPageStyle.ResumeLayout(false); - this.ResumeLayout(false); + this.tabControlPanel2.Style.GradientAngle = 90; + this.tabControlPanel2.TabIndex = 2; + this.tabControlPanel2.TabItem = this.tiStUpMsg; + this.tabControlPanel2.ThemeAware = true; + // + // tiStUpMsg + // + this.tiStUpMsg.AttachedControl = this.tabControlPanel2; + this.tiStUpMsg.Name = "tiStUpMsg"; + this.tiStUpMsg.Text = "Startup Message"; + this.tiStUpMsg.Visible = false; + // + // btnReset + // + this.btnReset.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnReset.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnReset.Location = new System.Drawing.Point(259, 606); + this.btnReset.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.btnReset.Name = "btnReset"; + this.btnReset.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.btnReset.Size = new System.Drawing.Size(105, 23); + this.superTooltip1.SetSuperTooltip(this.btnReset, new DevComponents.DotNetBar.SuperTooltipInfo("Default Settings", "", "This will reset saved user settings back to the Proms system default.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(140, 95))); + this.btnReset.TabIndex = 3; + this.btnReset.Text = "Default Settings"; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // superTooltip1 + // + this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray); + this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; + // + // frmSysOptions + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(932, 640); + this.ControlBox = false; + this.Controls.Add(this.btnReset); + this.Controls.Add(this.tcSysOpts); + this.Controls.Add(this.panButtons); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.btnCancel); + this.DoubleBuffered = true; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "frmSysOptions"; + this.Text = "Proms System Options"; + this.Load += new System.EventHandler(this.frmSysOptions_Load); + this.gpSystemColor.ResumeLayout(false); + this.panButtons.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).EndInit(); + this.tcSysOpts.ResumeLayout(false); + this.tabControlPanel3.ResumeLayout(false); + this.grPanUCFImpOpt.ResumeLayout(false); + this.gpVisioPath.ResumeLayout(false); + this.gpSeparateWindows.ResumeLayout(false); + this.gpEnhancedDocs.ResumeLayout(false); + this.gpPasteSettings.ResumeLayout(false); + this.gpTreeView.ResumeLayout(false); + this.gpStepTypeToolTip.ResumeLayout(false); + this.gpAnnotationSettings.ResumeLayout(false); + this.gpTransRangeColor.ResumeLayout(false); + this.gpPropPageStyle.ResumeLayout(false); + this.ResumeLayout(false); } @@ -1047,6 +1183,12 @@ namespace VEPROMS private DevComponents.DotNetBar.Controls.CheckBoxX cbSeparateWindows; private DevComponents.DotNetBar.Controls.GroupPanel gpVisioPath; private DevComponents.DotNetBar.Controls.TextBoxX txbxVisioPath; + private DevComponents.DotNetBar.Controls.GroupPanel grPanUCFImpOpt; + private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLForSetOnly; + private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLUseAll; + private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLOnlyImport; + private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLNotUsed; + private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFIgnore; diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.cs b/PROMS/VEPROMS User Interface/frmSysOptions.cs index cd9f6827..102240a3 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.cs @@ -70,6 +70,25 @@ 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; + } + } private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e) { @@ -147,6 +166,7 @@ namespace VEPROMS private bool ss_SyncEnhancedDocuments; private bool ss_SeparateWindows; private string ss_VisioPath; + private int ss_UCFImportOpt; private void SaveStartingSettings() { @@ -161,6 +181,7 @@ namespace VEPROMS ss_SyncEnhancedDocuments = Settings.Default.SyncEnhancedDocuments; ss_SeparateWindows = Settings.Default.SeparateWindows; ss_VisioPath = Settings.Default.VisioPath; + ss_UCFImportOpt = Settings.Default.UCFImportOpt; } private void RestoreStartingSettings() // used with the cancel button @@ -176,6 +197,7 @@ namespace VEPROMS Settings.Default.SyncEnhancedDocuments = ss_SyncEnhancedDocuments; Settings.Default.SeparateWindows = ss_SeparateWindows; Settings.Default.VisioPath = ss_VisioPath; + Settings.Default.UCFImportOpt = ss_UCFImportOpt; } @@ -262,5 +284,45 @@ namespace VEPROMS { Settings.Default.VisioPath = txbxVisioPath.Text; } + + private void cbUCFIgnore_CheckedChanged(object sender, EventArgs e) + { + if (!_initializing) + { + Settings.Default.UCFImportOpt = 0; + } + } + + private void cbUCFLNotUsed_CheckedChanged(object sender, EventArgs e) + { + if (!_initializing) + { + Settings.Default.UCFImportOpt = 1; + } + } + + private void cbUCFLOnlyImport_CheckedChanged(object sender, EventArgs e) + { + if (!_initializing) + { + Settings.Default.UCFImportOpt = 2; + } + } + + private void cbUCFLUseAll_CheckedChanged(object sender, EventArgs e) + { + if (!_initializing) + { + Settings.Default.UCFImportOpt = 3; + } + } + + private void cbUCFLForSetOnly_CheckedChanged(object sender, EventArgs e) + { + if (!_initializing) + { + Settings.Default.UCFImportOpt = 4; + } + } } } \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmUCF.cs b/PROMS/VEPROMS User Interface/frmUCF.cs new file mode 100644 index 00000000..e347dbf1 --- /dev/null +++ b/PROMS/VEPROMS User Interface/frmUCF.cs @@ -0,0 +1,966 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Xml; +using System.IO; +using System.Windows.Forms; +using VEPROMS.CSLA.Library; +using System.Text.RegularExpressions; +using System.Xml.Xsl; + + +namespace VEPROMS +{ + // frmUCF is the main form for User Control of Format. It is accessible by Administrator & Set Administrator from the V button Administration + // menu. It uses the FormatConfig structure whose data is stored in the Config field of the Formats table. It uses XmlSerialization to + // store/retrieve the data from the database field and uses a Windows Property Grid to present the data, the data is tied to the + // Property Grid by setting the SelectedObject of the Property Grid to the FormatConfig. FormatConfig objects use TypeConverter(typeof(ExpandableObjectConverter)) on the + // fields to allow for accessing the data structures below the FormatConfig level (by default, fields are shown in the grid, Browsable(false) does + // not show the fields. NOTE that collection data uses the PropGridCollEditor, see that file for further information (in Volian.Base.Library) + // + public partial class frmUCF : Form + { + private bool _UcfForRepWords = false; + public bool UcfForRepWords // flags that UCF has changes to replace words - use for Reset button enabling + { + get { return _UcfForRepWords; } + set { _UcfForRepWords = value; } + } + private FormatConfig MyFormatConfig = new FormatConfig(); + private PlantFormat OriginalPlantFormat; + private FormatInfo OriginalFormatInfo; + public frmUCF() + { + InitializeComponent(); + } + private bool _Initializing = false; + private void frmUCF_Load(object sender, EventArgs e) + { + _Initializing = true; + PlantFormat.DoingUCFCheckOffs = true; + PlantFormat.DoingUCFCheckOffsUse = MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF ?? false; + cbxFormatList.DataSource = null; + cbxFormatList.DisplayMember = "FullName"; + cbxFormatList.ValueMember = "FullName"; + cbxFormatList.DataSource = FormatInfoList.GetFormatInfoListUsed(); + cbxFormatList.SelectedIndex = -1; + MyFormatConfig = new FormatConfig(); + PG.SelectedObject = MyFormatConfig; + PG.Enabled = false; + PG.SelectedGridItemChanged += PG_SelectedGridItemChanged; + PG.PropertyValueChanged += PG_PropertyValueChanged; + btnSaveAs.Enabled = false; + btnSaveClose.Enabled = false; + btnSave.Enabled = false; + btnReset.Enabled = false; + btnDelete.Enabled = false; + _Initializing = false; + } + void PG_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) + { + if (SelectedGridField.EndsWith("Flags:UCF CheckOffs")) + { + // when changing whether the UCF format has the UCF checkoffs (there is a list of checkoffs/headers in the base format, when this + // flag is true, they get added to the list from the starting format), refresh the checkoff header & checkoff lists + if ((bool)e.OldValue != MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF) + { + // refresh the checkoff data in myformatconfig. Need to clear the checkoff header list & checkoff list before + // getting new data. + PlantFormat.DoingUCFCheckOffsUse = (bool)MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF; + GetUCFCheckOffDataForUCFGrid((bool)MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF); + PG.Refresh(); + } + } + } + private string SelectedGridField = "Identification: Name"; // first field sectioned upon creation of form + void PG_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) + { + if (_Initializing || _formatListIndexChanging) return; + + // refresh the summary data textbox data to show summary of what is in this UCF. This occurs when move off of a field which + // actually 'stores' the change. + FormatConfig tmpfc = GetChangesUCFForSave(); + string scf = tmpfc.ConvertToString(); + scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", ""); + SetUCFSummary(scf); + + // see if data has changed, and if so, enable the Reset button. + // Upon selection of a grid item, see if the grid item has data associated with it & if so, see if there has been + // a change. Code needs added here for any value listed on the main property grid, i.e. not part of a collection, or + // if the collection is reset in its entirety (replace words is an example of this). + bool enabled = false; + btnReset.Text = "Reset"; + string previousSelectedGridField = SelectedGridField; + SelectedGridField = LabelPath(PG.SelectedGridItem); + // remove the following line before release: + lblPGItem.Text = SelectedGridField; + + if (previousSelectedGridField.EndsWith("Identification: Name") && !SelectedGridField.EndsWith("Identification: Name")) SetButtonSaveAsEnabled(); + if (previousSelectedGridField.EndsWith("Data:Plant Format:Step Settings:Replace Words List")) + { + // if moving off of the replace words, see if any changes exist so that Reset List button is enabled: + FormatConfig.ReplaceStrData rps = GetChangedReplaceListForSave(); + UcfForRepWords = (rps != null && rps.Count > 0); + } + if (SelectedGridField.EndsWith("Identification: Name")) enabled = false; + else if (SelectedGridField.EndsWith("Data:Plant Format")) enabled = false; + else if (SelectedGridField.EndsWith("Data:Plant Format:Section Type Settings")) enabled = false; + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings")) enabled = false; + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags")) enabled = false; + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Compress Steps")) + { + if (MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != null && MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps) + { + btnReset.Text = "Reset to " + OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps; + enabled = true; + } + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Partial Step Compression")) + { + if (MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != null && MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression) + { + btnReset.Text = "Reset to " + OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression; + enabled = true; + } + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:UCF CheckOffs")) + { + if (MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF != null && MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF != OriginalPlantFormat.FormatData.ProcData.CheckOffUCF) + { + btnReset.Text = "Reset to " + OriginalPlantFormat.FormatData.ProcData.CheckOffUCF; + enabled = true; + } + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Replace Words List")) + { + if (UcfForRepWords) // flags that ucf data exists for replace words. + { + btnReset.Text = "Reset List"; + enabled = true; + } + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:CheckOff XOffset")) + { + if (MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != null && MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != 0) // flags that ucf data exists for replace words. + { + btnReset.Text = "Reset to 0"; + enabled = true; + } + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Step List")) enabled = false; + else enabled = false; + + btnReset.Enabled = enabled; + } + // remove the following method for release: + private string LabelPath(GridItem gi) + { + return (gi.Parent == null ? "" : LabelPath(gi.Parent) + ":" + gi.Label); + } + private void btnSaveClose_Click(object sender, EventArgs e) + { + // get a FormatConfig structure that only has differences from the original format. This is what gets saved. + FormatConfig tmpForSave = GetChangesUCFForSave(); + string scf = tmpForSave.ConvertToString(); + scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", ""); + int fmtid = OriginalPlantFormat.MyFormat is Format ? (OriginalPlantFormat.MyFormat as Format).FormatID : (OriginalPlantFormat.MyFormat as FormatInfo).FormatID; + // for now, tell the user that changes don't take affect until reentry. This was done since the 'refresh' of FormatConfig was not + // working. + using (Format fmt = Format.Get(fmtid)) + { + FormatInfo fi = FormatInfo.GetFormatNoUCFByFormatID(OriginalFormatInfo.FormatID); + if (fi.Data == "") + { + fmt.Data = ""; + fmt.GenMac = ""; + } + fmt.Config = scf; + fmt.Name = MyFormatConfig.Name; + fmt.Description = MyFormatConfig.Description; + fmt.Save(true); + MessageBox.Show(this, "Restart PROMS to have format changes take effect.", "", MessageBoxButtons.OK); + } + OriginalPlantFormat.FormatData.ProcData.CheckOffData.ClearCheckOffAndHeaderLists(); + PlantFormat.IgnoreUCF = false; + PlantFormat.DoingUCFCheckOffs = false; + } + private void btnCancel_Click(object sender, EventArgs e) + { + if (OriginalPlantFormat != null) OriginalPlantFormat.FormatData.ProcData.CheckOffData.ClearCheckOffAndHeaderLists(); + PlantFormat.IgnoreUCF = false; + PlantFormat.DoingUCFCheckOffs = false; + } + private bool _formatListIndexChanging = false; // don't change other selections when changing this index + private void cbxFormatList_SelectedIndexChanged(object sender, EventArgs e) + { + if (_Initializing) return; + if (cbxFormatList.SelectedIndex > -1) + { + _formatListIndexChanging = true; + FormatInfoList fl = FormatInfoList.GetFormatInfoListUsed(); + // Get the format data, the query in GetFormatInfoListUsed may have null for data/genmac which causes a + // problem when reading the 'parent' data for UCF saved as formats. + int i = -1; + FormatInfo finfo = cbxFormatList.SelectedItem as FormatInfo; + if (finfo == null) finfo = fl[cbxFormatList.SelectedIndex]; + OriginalFormatInfo = FormatInfo.Get(finfo.FormatID); + OriginalPlantFormat = OriginalFormatInfo.PlantFormat; + + // get original data when accessing the plant format data (not UCF because it UCF data is being modified): + PlantFormat.IgnoreUCF = true; + int formatid = OriginalPlantFormat.MyFormat is Format ? (OriginalPlantFormat.MyFormat as Format).FormatID : (OriginalPlantFormat.MyFormat as FormatInfo).FormatID; + FormatInfo fi = FormatInfo.Get(formatid); + // if this has config data it is a UCF format, the MyFormatConfig has the config data & see if doing additional checkoffs. + // Also, put out the summary of the changes if it is a 'UCF' and if no differences just state that. + btnDetails.Visible = true; + lblSummary.Visible = true; + tbUCFSummary.Visible = true; + if (fi.Config != null && fi.Config != "") + { + MyFormatConfig = FormatConfig.Get(fi.Config); + PlantFormat.DoingUCFCheckOffsUse = MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF ?? false; + btnSaveClose.Enabled = true; // UCF formats can be modified and saved. + btnSave.Enabled = true; + SetUCFSummary(fi.Config); + } + else + { + MyFormatConfig = new FormatConfig(); + btnSaveClose.Enabled = false; + btnSave.Enabled = false; + tbUCFSummary.Text = "No differences from original"; + } + // initialize the data based on the selected format with any changes from the FormatConfig. + GetUCFDataForUCFGrid(); + PG.Enabled = true; + PG.SelectedObject = MyFormatConfig; + btnSaveAs.Enabled = false; + SetDeleteOrResetAllButton(); + + // set derived from if there is a parent: + if (OriginalFormatInfo.MyParent.FormatID == 1) + { + lblDerFrom.Visible = false; + lblDerivedFrom.Visible = false; + } + else + { + // get to top parent format: + FormatInfo p = OriginalFormatInfo; + while (p.MyParent.FormatID != 1) p = p.MyParent; + lblDerFrom.Visible = true; + lblDerivedFrom.Visible = true; + lblDerivedFrom.Text = p.Name.Replace("_UCF", "") + "->" + OriginalFormatInfo.MyParent.Name.Replace("_UCF", "") + ":" + OriginalFormatInfo.MyParent.Description; + } + _formatListIndexChanging = false; + } + + } + + private void SetUCFSummary(string formatConfig) + { + try + { + string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFSummary.xsl"); + StringWriter sw = new StringWriter(); + using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary))) + { + using (XmlReader xri = XmlReader.Create(new StringReader(formatConfig))) + { + using (XmlWriter xwo = XmlWriter.Create(sw)) + { + XslCompiledTransform xsl = new XslCompiledTransform(); + xsl.Load(xrt); + xsl.Transform(xri, null, sw); + } + if (sw == null || sw.ToString() == "") + tbUCFSummary.Text = "No differences from original"; + else + tbUCFSummary.Text = sw.ToString(); + } + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Error getting summary for UCF differences", MessageBoxButtons.OK); + } + } + // The SaveAs Button should only be enabled if the user has given this format change a unique 'Name'. + private void SetButtonSaveAsEnabled() + { + btnSaveAs.Enabled = false; + if (MyFormatConfig.Name == null || MyFormatConfig.Name == "") return; + // See if Name has been changed: + if (MyFormatConfig.Name == OriginalFormatInfo.Name) return; + + // See if the Name is unique + foreach (FormatInfo fi in FormatInfoList.SortedFormatInfoList) + { + if (MyFormatConfig.Name == fi.Name && MyFormatConfig.Name != savDBFormatConfig.Name) + { + MessageBox.Show("A format with Name " + MyFormatConfig.Name + " already exists. Name must be unique. Change the name before a Save As can be done."); + } + } + btnSaveAs.Enabled = true; + return; + } + // If the selected format is a UCF 'Save As', then possibly allow delete (if not used). Otherwise, if selected format + // has Config data, i.e. UCF data, then change button text to 'Revert to Original'. In both cases, enable button, otherwise it is disabled. + private void SetDeleteOrResetAllButton() + { + btnDelete.Enabled = false; + // See if UCF Save As, i.e. Data/Genmac are null and that the format is not used. + FormatInfo fi = FormatInfo.GetFormatNoUCFByFormatID(OriginalFormatInfo.FormatID); + if (fi.Data == "") + { + if (OriginalFormatInfo.ChildFormatCount == 0 && OriginalFormatInfo.FormatContentCount == 0 && OriginalFormatInfo.FormatDocVersionCount == 0 && OriginalFormatInfo.FormatFolderCount == 0) + { + btnDelete.Enabled = true; + btnDelete.Text = "Delete"; + } + } + else + { + if (OriginalFormatInfo.Config != null && OriginalFormatInfo.Config != "") + { + btnDelete.Enabled = true; + btnDelete.Text = "Revert to Original"; + } + } + } + // GetChangeUCFForSave compares UCF data in FormatConfig to the original PlantFormat data to see if there + // are changes that need to be saved to the database. + private FormatConfig savDBFormatConfig; + private FormatConfig GetChangesUCFForSave() + { + FormatConfig changesOnly = new FormatConfig(); + + // Flags + if (MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != null && MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps) + changesOnly.PlantFormat.FormatData.Flags.CompressSteps = MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps; + if (MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != null && MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression) + changesOnly.PlantFormat.FormatData.Flags.PartialStepCompression = MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression; + if (MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF != null && MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF == true) // save if true (original format is always false) + changesOnly.PlantFormat.FormatData.Flags.CheckOffUCF = MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF; + + // CheckOff Headers + if (MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList != null) changesOnly.PlantFormat.FormatData.CheckOffHeaderList = GetChangeCheckOffHeaderListForSave(); + + // CheckOffs + if (MyFormatConfig.PlantFormat.FormatData.CheckOffList != null) changesOnly.PlantFormat.FormatData.CheckOffList = GetChangeCheckOffListForSave(); + + // Checkoff xoffset adjustment + if (MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != null && MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != 0) // save if not zero (original format is always zero) + changesOnly.PlantFormat.FormatData.CheckOffXOffAdj = MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj; + + // steps + if (MyFormatConfig.PlantFormat.FormatData.StepData != null) changesOnly.PlantFormat.FormatData.StepData = GetChangeStepListForSave(); + + // replace words - just store them all, if there are differences... can't handle deleted unless doing this. + if (MyFormatConfig.PlantFormat.FormatData.ReplaceStrData != null) changesOnly.PlantFormat.FormatData.ReplaceStrData = GetChangedReplaceListForSave(); + + // docstyles + FormatConfig.DocStyles retds = new FormatConfig.DocStyles(); + foreach (DocStyle dsorig in OriginalPlantFormat.DocStyles.DocStyleList) + { + if (!dsorig.Inactive && dsorig.IsStepSection) + { + FormatConfig.DocStyle ds = new FormatConfig.DocStyle(); + ds.Index = dsorig.Index.ToString(); + ds.Name = dsorig.Name; + if (ds.Layout == null) ds.Layout = new FormatConfig.Layout(); + // See if in the FormatConfig, use it + FormatConfig.DocStyle found = null; + if (MyFormatConfig.PlantFormat.DocStyles != null) + { + foreach (FormatConfig.DocStyle fcds in MyFormatConfig.PlantFormat.DocStyles) + { + float? difl = Math.Abs((float)((fcds.Layout.LeftMargin * 72) - dsorig.Layout.LeftMargin)); + float? difp = Math.Abs((float)((fcds.Layout.PageLength * 72) - dsorig.Layout.PageLength)); + if (fcds.Index == dsorig.Index.ToString() && (difl > 1 || difp > 1)) + { + found = fcds; + break; + } + } + } + if (found != null) // save it values are different. + { + if ((found.Layout.LeftMargin * 72) != dsorig.Layout.LeftMargin) ds.Layout.LeftMargin = found.Layout.LeftMargin * 72; + else ds.Layout.LeftMargin = null; + if ((found.Layout.PageLength * 72) != dsorig.Layout.PageLength) ds.Layout.PageLength = found.Layout.PageLength * 72; + else ds.Layout.PageLength = null; + retds.Add(ds); + } + } + } + if (retds.Count > 0) changesOnly.PlantFormat.DocStyles = retds; + return changesOnly; + } + // Check for differences in the checkoffheaderlist & checkofflist. Only Active flag is used: + private FormatConfig.CheckOffHeaderList GetChangeCheckOffHeaderListForSave() + { + FormatConfig.CheckOffHeaderList cohlist = new FormatConfig.CheckOffHeaderList(); + foreach (FormatConfig.CheckOffHeader coh in MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList) + { + if (!(bool)coh.Active) cohlist.Add(coh); + } + return cohlist; + } + private FormatConfig.CheckOffList GetChangeCheckOffListForSave() + { + FormatConfig.CheckOffList colist = new FormatConfig.CheckOffList(); + foreach (FormatConfig.CheckOff co in MyFormatConfig.PlantFormat.FormatData.CheckOffList) + { + if (!(bool)co.Active) colist.Add(co); + } + return colist; + } + // Check for differences in the StepDataList between UCF and original data for saving of data to database: + private FormatConfig.StepData GetChangeStepListForSave() + { + FormatConfig.StepData sdlist = new FormatConfig.StepData(); + foreach (StepData sdorig in OriginalPlantFormat.FormatData.StepDataList) + { + if (!sdorig.Inactive) + { + // find this step in the config data: + foreach (FormatConfig.Step fcstp in MyFormatConfig.PlantFormat.FormatData.StepData) + { + if (fcstp.Index == sdorig.Index.ToString()) + { + // see if data is different and if so, add it to the return list: + System.Drawing.FontConverter cvt = new System.Drawing.FontConverter(); + string origFont = cvt.ConvertToString(sdorig.Font.WindowsFont); + string newFont = cvt.ConvertToString(fcstp.FontDesc.WindowsFont); + if (origFont != newFont) + { + FormatConfig.Step stp = fcstp; + sdlist.Add(stp); + } + break; + } + } + } + } + return sdlist; + } + // Check for differences in the ReplaceWords between UCF and original data for saving of data to database: + private FormatConfig.ReplaceStrData GetChangedReplaceListForSave() + { + // only saving the differences + // need to compare the original format list with the list as it is stored for UCF, i.e.working with property grid and save differences. + // Note that check for 'bad' data such as no flags, or null/empty replace with/word strings - don't use those. + // States for replacewords: 0 = no change, -1 deleted, 1 added, 2 modified + FormatConfig.ReplaceStrData retlist = new FormatConfig.ReplaceStrData(); // list of changes + foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData) + { + // Modified + foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList) + { + if (origrepstr.ReplaceWord.Replace("{Backspace}", "") == ucfrepstr.ReplaceWord.Replace("{Backspace}", "")) + { + // if deleted or if anything is different, save it + if (((E_ReplaceFlags)ucfrepstr.Flag != origrepstr.Flag || ucfrepstr.ReplaceWith != origrepstr.ReplaceWith) && ucfrepstr.Flag != 0 && ucfrepstr.ReplaceWith != "") + { + ucfrepstr.State = 2; + retlist.Add(ucfrepstr); + break; + } + } + } + } + // Added: + List origstrList = new List(); // used to find added, (see later in this method) + foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList) origstrList.Add(origrepstr.ReplaceWord); + foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData) + { + if (!origstrList.Contains(ucfrepstr.ReplaceWord)) + { + // check for valid data, i.e. flag set & both replaceword & with not blank + //if (ucfrepstr.Flag != 0 && ucfrepstr.ReplaceWith != null && ucfrepstr.ReplaceWith != "" && ucfrepstr.ReplaceWord != null && ucfrepstr.ReplaceWord != "") + if (ucfrepstr.Flag != 0 && ucfrepstr.ReplaceWith != null && ucfrepstr.ReplaceWith != "" && ucfrepstr.ReplaceWord != null && ucfrepstr.ReplaceWord != "") + { + ucfrepstr.State = 1; + retlist.Add(ucfrepstr); + } + } + } + //Deleted: + List ucfList = new List(); // used to find deleted + foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData) ucfList.Add(ucfrepstr.ReplaceWord); + foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList) + { + if (!ucfList.Contains(origrepstr.ReplaceWord)) + { + if (!((origrepstr.ReplaceWith.Contains("$1") && origrepstr.ReplaceWord.Contains("w*")) || origrepstr.ReplaceWith.Contains("{Backspace}"))) + { + // make a deleted replacestr to save + FormatConfig.ReplaceStr del = new FormatConfig.ReplaceStr(); + del.State = -1; + del.Flag = (FormatConfig.E_ReplaceFlagsUCF)origrepstr.Flag; + del.ReplaceWord = origrepstr.ReplaceWord; + del.ReplaceWith = origrepstr.ReplaceWith; + //del.ReplaceWith = origrepstr.ReplaceWith; + retlist.Add(del); + } + } + } + return retlist; + } + // The following uses the original format's ReplaceWords list and applies any changes made from the UCF ReplaceWords list. + private FormatConfig.ReplaceStrData GetMergedReplaceList() + { + // 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 inoriglist = new List(); // 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 + foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData) + { + if (ucfrepstr.ReplaceWord == origrepstr.ReplaceWord) + { + if (ucfrepstr.State == -1) deleted = true; + else usethisone = ucfrepstr; + ucfrepstr.State = 2; + inoriglist.Add(origrepstr.ReplaceWord); + UcfForRepWords = true; + break; + } + } + // don't add in the replacewords that use 'Backspace' and regular expressions: + bool supported = true; + if (!deleted && usethisone == null) + { + if ((origrepstr.ReplaceWith.Contains("$1") || origrepstr.ReplaceWord.Contains("w*")) || origrepstr.ReplaceWith.Contains("{Backspace}")) + supported = false; + else + { + 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 && supported) retlist.Add(usethisone); + } + // now add in any ucf only replacements, any that are not in the inoriglist + foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.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.ReplaceWith = ucfrepstr.ReplaceWith; + newone.ReplaceWord = ucfrepstr.ReplaceWord; + retlist.Add(newone); + UcfForRepWords = true; + } + } + return (retlist); + } + // This method reads in the format items, merging any changes from UCF into original format. It sets MyFormatConfig, which + // is the structure that gets used by the PropertyGrid + private void GetUCFDataForUCFGrid() + { + // name/description is only stored as format record fields. There are attributes in formatconfig xml that are used for defining these + // when new UCFs are defined or allowing for updates. + MyFormatConfig.Name = OriginalFormatInfo.Name; + MyFormatConfig.Description = OriginalFormatInfo.Description; + + // Store original (currently saved FormatConfig) to be used for comparison when saving. + savDBFormatConfig = MyFormatConfig; + + // Flags + if (MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps == null) MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps; + if (MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression == null) MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression; + if (MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF == null) MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF = OriginalPlantFormat.FormatData.ProcData.CheckOffUCF; + + // checkoff xoffset adjustment + if (MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj == null) MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj = 0; + + GetUCFCheckOffDataForUCFGrid((bool)MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF); + + // StepData: If there is no UCF data for steps, copy over from selected format + FormatConfig.StepData sdlMerged = new FormatConfig.StepData(); + if (MyFormatConfig.PlantFormat.FormatData.StepData == null || MyFormatConfig.PlantFormat.FormatData.StepData.Count == 0) + { + foreach (StepData sdorig in OriginalPlantFormat.FormatData.StepDataList) + { + if (!sdorig.Inactive && sdorig.Index != 0) + { + FormatConfig.Step stp = new FormatConfig.Step(); + stp.Index = sdorig.Index.ToString(); + stp.Type = sdorig.Type; + stp.FontDesc = new FormatConfig.FontDesc(); + stp.FontDesc.OrigWindowsFont = sdorig.Font.WindowsFont; + stp.FontDesc.WindowsFont = sdorig.Font.WindowsFont; + if (MyFormatConfig.PlantFormat.FormatData.StepData == null) MyFormatConfig.PlantFormat.FormatData.StepData = new FormatConfig.StepData(); + sdlMerged.Add(stp); + } + } + } + else + { + foreach (StepData sdorig in OriginalPlantFormat.FormatData.StepDataList) + { + if (!sdorig.Inactive && sdorig.Index != 0) + { + FormatConfig.Step stp = new FormatConfig.Step(); + stp.Index = sdorig.Index.ToString(); + stp.Type = sdorig.Type; + stp.FontDesc = new FormatConfig.FontDesc(); + // See if in the FormatConfig, use it + FormatConfig.Step foundinFC = null; + foreach (FormatConfig.Step fcstp in MyFormatConfig.PlantFormat.FormatData.StepData) + { + if (fcstp.Index == sdorig.Index.ToString()) + { + foundinFC = fcstp; + break; + } + } + stp.FontDesc.OrigWindowsFont = new System.Drawing.Font(sdorig.Font.Family, (float)sdorig.Font.Size, sdorig.Font.WindowsFont.Style); + if (foundinFC != null) + stp.FontDesc.WindowsFont = new System.Drawing.Font(foundinFC.FontDesc.WindowsFont.Name, foundinFC.FontDesc.WindowsFont.Size, foundinFC.FontDesc.WindowsFont.Style); + else + stp.FontDesc.WindowsFont = new System.Drawing.Font(sdorig.Font.Family, (float)sdorig.Font.Size, sdorig.Font.WindowsFont.Style); + sdlMerged.Add(stp); + } + } + } + MyFormatConfig.PlantFormat.FormatData.StepData = sdlMerged; + + // ReplacWords + // if there are no replace str entries in sc, add from the selected format: + if (MyFormatConfig.PlantFormat.FormatData.ReplaceStrData == null || MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Count == 0) + { + foreach (ReplaceStr repstrorig in OriginalPlantFormat.FormatData.SectData.ReplaceStrList) + { + if (!((repstrorig.ReplaceWith.Contains("$1") && repstrorig.ReplaceWord.Contains("w*")) || repstrorig.ReplaceWith.Contains("{Backspace}"))) + { + FormatConfig.ReplaceStr rsfc = new FormatConfig.ReplaceStr(); + rsfc.Flag = (FormatConfig.E_ReplaceFlagsUCF)repstrorig.Flag; + rsfc.State = 0; + rsfc.ReplaceWith = repstrorig.ReplaceWith; + rsfc.ReplaceWord = repstrorig.ReplaceWord; + MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Add(rsfc); + } + } + } + else + { + MyFormatConfig.PlantFormat.FormatData.ReplaceStrData = GetMergedReplaceList(); + } + // Document Style (section) Data (docstyles). Get step editor type only + if (MyFormatConfig.PlantFormat.DocStyles == null || MyFormatConfig.PlantFormat.DocStyles.Count == 0) + { + foreach (DocStyle dsorig in OriginalPlantFormat.DocStyles.DocStyleList) + { + if (!dsorig.Inactive && dsorig.IsStepSection) + { + FormatConfig.DocStyle ds = new FormatConfig.DocStyle(); + ds.Index = dsorig.Index.ToString(); + ds.Name = dsorig.Name; + if (ds.Layout == null) ds.Layout = new FormatConfig.Layout(); + ds.Layout.PageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2); + ds.Layout.OrigPageLength = ds.Layout.PageLength; + ds.Layout.LeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2); + ds.Layout.OrigLeftMargin = ds.Layout.LeftMargin; + if (MyFormatConfig.PlantFormat.DocStyles == null) MyFormatConfig.PlantFormat.DocStyles = new FormatConfig.DocStyles(); + MyFormatConfig.PlantFormat.DocStyles.Add(ds); + } + } + } + else + { + foreach (DocStyle dsorig in OriginalPlantFormat.DocStyles.DocStyleList) + { + if (!dsorig.Inactive && dsorig.IsStepSection) + { + FormatConfig.DocStyle ds = new FormatConfig.DocStyle(); + ds.Index = dsorig.Index.ToString(); + ds.Name = dsorig.Name; + if (ds.Layout == null) ds.Layout = new FormatConfig.Layout(); + // See if in the FormatConfig, use it + FormatConfig.DocStyle foundinFC = null; + foreach (FormatConfig.DocStyle fcds in MyFormatConfig.PlantFormat.DocStyles) + { + if (fcds.Index == dsorig.Index.ToString()) + { + foundinFC = fcds; + break; + } + } + if (foundinFC != null) + { + if (foundinFC.Layout.LeftMargin == null) foundinFC.Layout.LeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2); + else foundinFC.Layout.LeftMargin = (float)Math.Round((float)foundinFC.Layout.LeftMargin / 72, 2); + foundinFC.Layout.OrigLeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2); + if (foundinFC.Layout.PageLength == null) foundinFC.Layout.PageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2); + else foundinFC.Layout.PageLength = (float)Math.Round((float)foundinFC.Layout.PageLength / 72, 2); + foundinFC.Layout.OrigPageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2); + } + else + { + ds.Layout.OrigLeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2); + ds.Layout.OrigPageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2); + ds.Layout.LeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2); + ds.Layout.PageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2); + MyFormatConfig.PlantFormat.DocStyles.Add(ds); + } + } + } + } + } + + private void GetUCFCheckOffDataForUCFGrid(bool ucfcheckof) + { + OriginalPlantFormat.FormatData.ProcData.CheckOffData.ClearCheckOffAndHeaderLists(); + // CheckOffHeaders: If there is no UCF data, use from the selected format, otherwise merge: + FormatConfig.CheckOffHeaderList cohdrsMerged = new FormatConfig.CheckOffHeaderList(); + if (MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList == null || MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList.Count == 0) + { + foreach (CheckOffHeader cohorig in OriginalPlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList) + { + // do inactive:: + FormatConfig.CheckOffHeader coh = new FormatConfig.CheckOffHeader(); + coh.Index = cohorig.Index.ToString(); + coh.CheckOffHeading = cohorig.CheckOffHeading; + coh.Active = true; + coh.OrigActive = true; + cohdrsMerged.Add(coh); + } + } + else + { + foreach (CheckOffHeader cohorig in OriginalPlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList) + { + FormatConfig.CheckOffHeader coh = new FormatConfig.CheckOffHeader(); + coh.Index = cohorig.Index.ToString(); + coh.CheckOffHeading = cohorig.CheckOffHeading; + coh.Active = true; + coh.OrigActive = true; + // See if in the FormatConfig, to check its inactive flag: + foreach (FormatConfig.CheckOffHeader fccoh in MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList) + { + if (fccoh.Index == cohorig.Index.ToString()) + { + coh.Active = fccoh.Active; + coh.OrigActive = true; + break; + } + } + cohdrsMerged.Add(coh); + } + } + MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList = cohdrsMerged; + + // CheckOffs: If there is no UCF data, use from the selected format, otherwise merge: + FormatConfig.CheckOffList cosMerged = new FormatConfig.CheckOffList(); + // clear the lists so that correct lists will be initialized + foreach (CheckOff coorig in OriginalPlantFormat.FormatData.ProcData.CheckOffData.CheckOffList) + { + FormatConfig.CheckOff co = new FormatConfig.CheckOff(); + co.Index = coorig.Index.ToString(); + co.MenuItem = coorig.MenuItem; + co.Active = true; + co.OrigActive = true; + // See if in the FormatConfig, to check its inactive flag: + if (MyFormatConfig.PlantFormat.FormatData.CheckOffList != null) + { + foreach (FormatConfig.CheckOff fcco in MyFormatConfig.PlantFormat.FormatData.CheckOffList) + { + if (fcco.Index == coorig.Index.ToString()) + { + co.Active = fcco.Active; + co.OrigActive = true; + break; + } + } + } + cosMerged.Add(co); + } + MyFormatConfig.PlantFormat.FormatData.CheckOffList = cosMerged; + } + // The Reset button is used to reset a UCF change from the original data. If a field is added to UCF, code needs + // added here for the field: + private void btnReset_Click(object sender, EventArgs e) + { + // The code that enables the Reset button checks if a change (UCF) exists. So no need to check here. + if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Compress Steps")) + { + MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps; + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Partial Step Compression")) + { + MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression; + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:UCF CheckOffs")) + { + MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF = OriginalPlantFormat.FormatData.ProcData.CheckOffUCF; + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:CheckOff XOffset")) + { + MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj = 0; + } + else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Replace Words List")) + { + MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Clear(); + foreach (ReplaceStr repstrorig in OriginalPlantFormat.FormatData.SectData.ReplaceStrList) + { + if (!((repstrorig.ReplaceWith.Contains("$1") && repstrorig.ReplaceWord.Contains("w*")) || repstrorig.ReplaceWith.Contains("{Backspace}"))) + { + FormatConfig.ReplaceStr rsfc = new FormatConfig.ReplaceStr(); + rsfc.Flag = (FormatConfig.E_ReplaceFlagsUCF)repstrorig.Flag; + rsfc.State = 0; + rsfc.ReplaceWith = repstrorig.ReplaceWith; + rsfc.ReplaceWord = repstrorig.ReplaceWord; + MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Add(rsfc); + UcfForRepWords = false; + } + } + } + btnReset.Enabled = false; + btnReset.Text = "Reset"; + } + + private void btnSaveAs_Click(object sender, EventArgs e) + { + // Name must be unique - description can be null. + // Append a '_UCF' at end of all user control of format formats. + // add a format record for this: + // FormatID - next ID, db creates on new format + // ParentID - format id of the format that was used as a base for this user control of format + // Name - user defined + // Description - user defined - if none specified by user, use the original's description + // Data - null: flags that a UCF was saved as and use the parent and config from this. + // + + // check for unique name. + foreach (FormatInfo fi in FormatInfoList.SortedFormatInfoList) + { + if (MyFormatConfig.Name == fi.Name || MyFormatConfig.Name + "_UCF" == fi.Name) + { + MessageBox.Show("A format with Name " + MyFormatConfig.Name + " already exists. Name must be unique. Save As cannot be done."); + return; + } + } + using (Format tmp = Format.Get(OriginalFormatInfo.FormatID)) + { + string fname = MyFormatConfig.Name + (MyFormatConfig.Name.EndsWith("_UCF") ? "" : "_UCF"); + Format fmt = Format.MakeFormat(tmp, fname, MyFormatConfig.Description == OriginalFormatInfo.Description || MyFormatConfig.Description == "" || MyFormatConfig.Description == null ? OriginalFormatInfo.Description : MyFormatConfig.Description, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID); + FormatConfig tmpForSave = GetChangesUCFForSave(); + string scf = tmpForSave.ConvertToString(); + scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", ""); + // for now, tell the user that changes don't take affect until reentry. This was done since the 'refresh' of FormatConfig was not + // working. + fmt.Config = scf; + fmt.Description = MyFormatConfig.Description; + fmt.Save(true); + MessageBox.Show(this, "Restart PROMS to have format changes take effect.", "", MessageBoxButtons.OK); + btnSaveAs.Enabled = false; + } + } + + private void btnDelete_Click(object sender, EventArgs e) + { + // delete this format OR (the button text is set to 'delete...' if no item or version uses it) + // revert to the original + string msg = btnDelete.Text == "Revert to Original" ? "revert to the original?" : "delete this format?"; + if (MessageBox.Show(this, "Are you sure you want to " + msg, "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + PlantFormat.IgnoreUCF = true; + // the button is either 'Revert to Original' for a format that is the original and has config data, or 'Delete' for a UCF that + // was created by a 'Save As'. + // so do either a clear of the config data, or delete the format record depending on button's text + if (btnDelete.Text == "Revert to Original") + { + using (Format fmt = Format.Get(OriginalFormatInfo.FormatID)) + { + fmt.Config = ""; + fmt.Save(true); + MessageBox.Show(this, "The changes that have been made to the format will take affect after reentry to PROMS", "", MessageBoxButtons.OK); + MyFormatConfig = new FormatConfig(); + PG.SelectedObject = MyFormatConfig; + PG.Enabled = false; + btnSaveAs.Enabled = false; + btnDelete.Enabled = false; + btnSaveClose.Enabled = false; + btnSave.Enabled = false; + btnReset.Enabled = false; + } + } + else + { + try + { + Format.Delete(OriginalFormatInfo.FormatID); + } + catch (Exception ex) + { + MessageBox.Show("Could not delete the format"); + return; + } + cbxFormatList.DataSource = FormatInfoList.GetFormatInfoListUsed(); + cbxFormatList.SelectedIndex = -1; + MyFormatConfig = new FormatConfig(); + PG.SelectedObject = MyFormatConfig; + PG.Enabled = false; + btnSaveAs.Enabled = false; + btnDelete.Enabled = false; + btnSaveClose.Enabled = false; + btnSave.Enabled = false; + btnReset.Enabled = false; + } + PlantFormat.IgnoreUCF = false; + PlantFormat.DoingUCFCheckOffs = false; + } + } + + private void btnDetails_Click(object sender, EventArgs e) + { + FormatConfig tmpfc = GetChangesUCFForSave(); + string scf = tmpfc.ConvertToString(); + scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", ""); + dlgUCFDetail dtl = new dlgUCFDetail(scf, MyFormatConfig.Name, MyFormatConfig.Description); + dtl.ShowDialog(); + } + + private void btnSave_Click(object sender, EventArgs e) + { + // get a FormatConfig structure that only has differences from the original format. This is what gets saved. + FormatConfig tmpForSave = GetChangesUCFForSave(); + string scf = tmpForSave.ConvertToString(); + scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", ""); + int fmtid = OriginalPlantFormat.MyFormat is Format ? (OriginalPlantFormat.MyFormat as Format).FormatID : (OriginalPlantFormat.MyFormat as FormatInfo).FormatID; + // for now, tell the user that changes don't take affect until reentry. This was done since the 'refresh' of FormatConfig was not + // working. + using (Format fmt = Format.Get(fmtid)) + { + FormatInfo fi = FormatInfo.GetFormatNoUCFByFormatID(OriginalFormatInfo.FormatID); + if (fi.Data == "") + { + fmt.Data = ""; + fmt.GenMac = ""; + } + fmt.Config = scf; + fmt.Name = MyFormatConfig.Name; + fmt.Description = MyFormatConfig.Description; + fmt.Save(true); + } + } + } +} diff --git a/PROMS/VEPROMS User Interface/frmUCF.designer.cs b/PROMS/VEPROMS User Interface/frmUCF.designer.cs new file mode 100644 index 00000000..4c257fb0 --- /dev/null +++ b/PROMS/VEPROMS User Interface/frmUCF.designer.cs @@ -0,0 +1,287 @@ +namespace VEPROMS +{ + partial class frmUCF + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + //protected override void Dispose(bool disposing) + //{ + // if (disposing && (components != null)) + // { + // components.Dispose(); + // } + // base.Dispose(disposing); + //} + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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; + + } +} + diff --git a/PROMS/VEPROMS User Interface/frmUCF.resx b/PROMS/VEPROMS User Interface/frmUCF.resx new file mode 100644 index 00000000..7080a7d1 --- /dev/null +++ b/PROMS/VEPROMS User Interface/frmUCF.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index efe57331..4838ce7b 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -197,6 +197,7 @@ namespace VEPROMS { tc.RefreshItem(myItemInfo); } + private E_UCFImportOptions _UCFImportOptionsFromSettings; public frmVEPROMS() { // The following Try/Catch was added to protect against a problem seen by Kathy and Michelle @@ -550,7 +551,7 @@ namespace VEPROMS { int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Session); //int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, (args.Index == 0) ? CheckOutType.Folder : CheckOutType.Session); - dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter + 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) @@ -575,7 +576,7 @@ namespace VEPROMS return; } int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion); - dlgExportImport dlg = new dlgExportImport("Import", dvi, this);//Added frmVEPROMS Parameter + 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); @@ -597,7 +598,7 @@ namespace VEPROMS else { int ownerid = MySessionInfo.CheckOutItem(pi.ItemID, CheckOutType.Procedure); - dlgExportImport dlg = new dlgExportImport("Export", pi, this);//Added frmVEPROMS Parameter + dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter dlg.ShowDialog(this); MySessionInfo.CheckInItem(ownerid); } @@ -1351,6 +1352,9 @@ namespace VEPROMS private DevComponents.DotNetBar.ButtonItem btnManageSecurity; private DevComponents.DotNetBar.ButtonItem btnResetSecurity; private DevComponents.DotNetBar.ButtonItem btnAdministrativeTools; + private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormats; + private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsExport; + private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsImport; private TabItemsToClose _MyCloseTabList = new TabItemsToClose(); public TabItemsToClose MyCloseTabList { @@ -1497,6 +1501,16 @@ namespace VEPROMS { InitializeSecurity(); UpdateUser(); + + btnUserControlOfFormats = new ButtonItem("btnUserControlOfFormats", "User Control of Formats"); + btnAdmin.SubItems.Add(btnUserControlOfFormats); + btnUserControlOfFormats.Click += new EventHandler(btnUserControlOfFormats_Click); + btnUserControlOfFormatsExport = new ButtonItem("btnUserControlOfFormatsExport", "Export User Control of Formats"); + btnAdmin.SubItems.Add(btnUserControlOfFormatsExport); + btnUserControlOfFormatsExport.Click += new EventHandler(btnUserControlOfFormatsExport_Click); + btnUserControlOfFormatsImport = new ButtonItem("btnUserControlOfFormatsImport", "Import User Control of Formats"); + btnAdmin.SubItems.Add(btnUserControlOfFormatsImport); + btnUserControlOfFormatsImport.Click += new EventHandler(btnUserControlOfFormatsImport_Click); btnManageSecurity = new ButtonItem("btnManageSecurity", "Manage Security"); btnAdmin.SubItems.Add(btnManageSecurity); btnManageSecurity.Click += new EventHandler(btnManageSecurity_Click); @@ -1513,8 +1527,9 @@ namespace VEPROMS btnAdmin.SubItems.Add(btnAdministrativeTools); this.superTooltip1.SetSuperTooltip(btnPrint, new SuperTooltipInfo("Create PDF", null, null, null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnExit, new SuperTooltipInfo("Exit", null, null, null, null, eTooltipColor.Gray)); - this.superTooltip1.SetSuperTooltip(btnOptions, new SuperTooltipInfo("Options", null, null, null, null, eTooltipColor.Gray)); - this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", null, null, null, null, eTooltipColor.Gray)); + this.superTooltip1.SetSuperTooltip(btnOptions, new SuperTooltipInfo("Options", null, null, null, null, eTooltipColor.Gray)); + this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", null, null, null, null, eTooltipColor.Gray)); + this.superTooltip1.SetSuperTooltip(btnUserControlOfFormats, new SuperTooltipInfo("User Control Of Formats", null, null, null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnResetSecurity, new SuperTooltipInfo("Reset Security",null, null, null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnAdministrativeTools, new SuperTooltipInfo("Administrative Tools",null, null, null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnUpdateFormats, new SuperTooltipInfo("Update Formats",null, null, null, null, eTooltipColor.Gray)); @@ -1545,6 +1560,9 @@ namespace VEPROMS StepRTB.MyUserInfo = MyUserInfo; // set the user's security information in the StepRTB VlnFlexGrid.MyUserInfo = MyUserInfo; // set the user's security information in the VlnFlexGrid bool isVisible = MyUserInfo.IsAdministrator(); + btnUserControlOfFormats.Visible = isVisible; + btnUserControlOfFormatsExport.Visible = isVisible; + btnUserControlOfFormatsImport.Visible = isVisible; btnManageSecurity.Visible = isVisible; btnUpdateFormats.Visible = isVisible; btnResetSecurity.Visible = isVisible; @@ -2191,6 +2209,27 @@ namespace VEPROMS proxyUser = ui.UserID; } } + 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(); @@ -4022,7 +4061,7 @@ namespace VEPROMS } private void btnUpdateFormat_Click(object sender, EventArgs e) { - UpdateFormats(null); + UpdateFormats(null); } private void UpdateFormats(string mypath) diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index 5b21d886..b0a7c7d0 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -113,6 +113,26 @@ namespace VEPROMS private void btnVersionsPropOK_Click(object sender, EventArgs e) { docVersionConfigBindingSource.EndEdit(); // need to end the edit session first or any format selection chanage will not stick B2015-157 + + // 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 (_DocVersionConfig.MyDocVersion.FormatID != _cmbxformatOriginal) + { + // clean up & then refresh the configs + string strdv = _DocVersionConfig.MyDocVersion.VersionID.ToString(); + using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByDocVersion(strdv, _cmbxformatOriginal, _DocVersionConfig.MyDocVersion.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 (_DocVersionConfig.Unit_Count > 0 || (_Apples != null && _Apples.Count > 0)) { if (_DeletedApples != null && _DeletedApples.Count > 0) @@ -315,7 +335,7 @@ namespace VEPROMS _DocVersionConfig.ParentLookup = false; } - + private int? _cmbxformatOriginal = null; private void frmVersionsProperties_Load(object sender, EventArgs e) { _Initializing = true; @@ -328,6 +348,7 @@ namespace VEPROMS ppCmbxFormat.DisplayMember = "FullName"; ppCmbxFormat.ValueMember = "FullName"; ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList; + _cmbxformatOriginal = _DocVersionConfig.MyDocVersion.FormatID; if (_DocVersionConfig.FormatSelection != null) { ppCmbxFormat.SelectedValue = _DocVersionConfig.FormatSelection;