From 525173bc9f19c55882a34e6cd888cf91ed57ce00 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 27 Aug 2025 12:59:53 -0400 Subject: [PATCH] C2025-022-Remove-UCF-2 --- PROMS/Formats/fmtall/BASEall.xml | Bin 96090 -> 91078 bytes PROMS/VEPROMS User Interface/App.config | 14 +- .../Properties/AssemblyInfo.cs | 17 +- .../Properties/Settings.Designer.cs | 12 - .../Properties/Settings.settings | 5 - .../VEPROMS User Interface/VEPROMS_UI.csproj | 11 - .../VEPROMS_UI.csproj_bak_2 | 655 ++++++++++++++++++ .../dlgApproveProcedure.cs | 2 +- .../VEPROMS User Interface/dlgExportImport.cs | 244 +++---- .../dlgExportImportEP.cs | 6 +- .../dlgUCFDetail.Designer.cs | 61 -- PROMS/VEPROMS User Interface/dlgUCFDetail.cs | 77 -- .../VEPROMS User Interface/dlgUCFDetail.resx | 120 ---- .../frmFolderProperties.cs | 34 +- .../frmSectionProperties.cs | 4 +- .../frmSysOptions.Designer.cs | 10 +- PROMS/VEPROMS User Interface/frmSysOptions.cs | 112 +-- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 7 +- .../Config/FormatConfig.cs | 83 +-- .../Extension/ContentExt.cs | 236 +++---- .../Extension/DisplayText.cs | 24 +- .../Extension/FormatExt.cs | 124 ++-- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 40 +- .../Format/PlantFormat.cs | 119 ++-- PROMS/Volian.Controls.Library/DisplayTags.cs | 28 +- .../Volian.Controls.Library.csproj | 9 - .../dlgUCFImportOptions.Designer.cs | 397 ----------- .../dlgUCFImportOptions.cs | 183 ----- .../dlgUCFImportOptions.resx | 126 ---- PROMS/Volian.Print.Library/vlnParagraph.cs | 2 +- 30 files changed, 1159 insertions(+), 1603 deletions(-) create mode 100644 PROMS/VEPROMS User Interface/VEPROMS_UI.csproj_bak_2 delete mode 100644 PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs delete mode 100644 PROMS/VEPROMS User Interface/dlgUCFDetail.cs delete mode 100644 PROMS/VEPROMS User Interface/dlgUCFDetail.resx delete mode 100644 PROMS/Volian.Controls.Library/dlgUCFImportOptions.Designer.cs delete mode 100644 PROMS/Volian.Controls.Library/dlgUCFImportOptions.cs delete mode 100644 PROMS/Volian.Controls.Library/dlgUCFImportOptions.resx diff --git a/PROMS/Formats/fmtall/BASEall.xml b/PROMS/Formats/fmtall/BASEall.xml index 8ca3756eb07244f11ea212a94c792a3cf220be2f..bfdff426c9a08e9a9ebddb19dab2154aaa7b6dc2 100644 GIT binary patch delta 32 ocmcchj`i4a)(w2Nn=NehSSBw}V3~d(kCCPMM#%OXA&gB*0ON8E4FCWD delta 3465 zcmcInOHUI~6h4#Ct_&0ksYQuH6A~3oJB7B>D5ezAx8dEY!=XLKn-}%ntn|}K2`u4;1zIlM1 zOL$x}G)Pxi@LX&Fa= zok@(i`YA?n#uDAucB`iMTs*LBLM$7_rZg?#w@6nhMH`#Gu%?OfOSuMyFwH~K6RQwG-F6k5jo`B=JHCtW$Y9U< zUR4+rvVMBCQ#?8wcZSkkm?G5A-5C}0I?cnuqLVu^{w7!D@I;8hN{2D(Ja*z1L#)<5T#fZyMuMGD{VE3U6gi22@XX{ zAr5a!@|Oa;Ii!%cavJBXVAYOIY4a%91mLI*U_%zfydB_a1hD1+T-rVg;Apa#61XXQ zI;~?s76Gw<;asH4w27-U+N6XEw&Ph^tgjgAs8dr3FbcgwA+Uva?Qx z0N6xb77JW~u`3~dg&LC|=kaC6n#5ZmkSF`;|) zf~#0-7&x_(m>9d@ZS6WzxP~g@g2wBtJ_Zd4pNheQWx+pBxVG+(`iRqb!~@tT(a diff --git a/PROMS/VEPROMS User Interface/App.config b/PROMS/VEPROMS User Interface/App.config index 6a31a77c..14a49ac2 100644 --- a/PROMS/VEPROMS User Interface/App.config +++ b/PROMS/VEPROMS User Interface/App.config @@ -135,10 +135,10 @@ True - + - + 0.0 @@ -150,14 +150,17 @@ True - + - + True + + False + False @@ -170,6 +173,9 @@ False + + + diff --git a/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs b/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs index e3695856..5ab99892 100644 --- a/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs +++ b/PROMS/VEPROMS User Interface/Properties/AssemblyInfo.cs @@ -44,8 +44,21 @@ using System.Runtime.InteropServices; // Revision DHH (day - no leading zero, two digit hour - military time // // ********* REMEMBER TO CHECK THE AssemblyConfiguration SETTING (ABOVE) ******** -[assembly: AssemblyVersion("2.2.2508.2100")] -[assembly: AssemblyFileVersion("2.2.2508.2100")] +[assembly: AssemblyVersion("2.2.2508.2621")] +[assembly: AssemblyFileVersion("2.2.2508.2621")] + + + + + + + + + + + + + diff --git a/PROMS/VEPROMS User Interface/Properties/Settings.Designer.cs b/PROMS/VEPROMS User Interface/Properties/Settings.Designer.cs index 022d7469..91dd38c4 100644 --- a/PROMS/VEPROMS User Interface/Properties/Settings.Designer.cs +++ b/PROMS/VEPROMS User Interface/Properties/Settings.Designer.cs @@ -410,17 +410,5 @@ namespace VEPROMS.Properties { this["VisioPath"] = value; } } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int UCFImportOpt { - get { - return ((int)(this["UCFImportOpt"])); - } - set { - this["UCFImportOpt"] = value; - } - } } } diff --git a/PROMS/VEPROMS User Interface/Properties/Settings.settings b/PROMS/VEPROMS User Interface/Properties/Settings.settings index 193c02ad..761fa632 100644 --- a/PROMS/VEPROMS User Interface/Properties/Settings.settings +++ b/PROMS/VEPROMS User Interface/Properties/Settings.settings @@ -80,11 +80,9 @@ True - False - False @@ -103,8 +101,5 @@ - - 0 - \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index 184da061..8e9950ab 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -244,12 +244,6 @@ dlgTransitionReport.cs - - Form - - - dlgUCFDetail.cs - Form @@ -368,9 +362,6 @@ dlgSetChangeBarStartDate.cs - - dlgUCFDetail.cs - frmAnnotationsCleanup.cs @@ -586,8 +577,6 @@ - - diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj_bak_2 b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj_bak_2 new file mode 100644 index 00000000..ee9fe31a --- /dev/null +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj_bak_2 @@ -0,0 +1,655 @@ + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {8D1C47B4-F302-4C5A-87CC-24FDC5529872} + WinExe + Properties + VEPROMS + VEPROMS + veproms.ico + + + + + + + + + v4.8.1 + + + + + 2.0 + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + bin\Demo\ + DEBUG;TRACE + full + x86 + prompt + false + + + true + bin\Debug\ + DEBUG;TRACE + full + x86 + prompt + false + + + bin\debug\ + TRACE + true + pdbonly + x86 + prompt + false + + + true + bin\Demo\ + TRACE;DEMO + full + x86 + prompt + false + + + + + + + + False + ..\..\..\..\3rdPartyLibraries\CSLA\CSLA20cs_DLL_Net_4.8.1_Build\Csla.dll + + + False + ..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll + + + False + ..\..\..\..\3rdPartyLibraries\Ionic\Ionic.Zip.dll + + + ..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll + + + ..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Parser.dll + + + False + ..\..\..\..\3rdPartyLibraries\Log4Net\log4net.dll + + + + + True + + + + + + + + + + + + False + ..\VEPROMS.CSLA.Library\bin\Debug\VEPROMS.CSLA.Library.dll + + + + + Form + + + AboutVEPROMS.cs + + + + Form + + + dlgAnnotationsSelect.cs + + + True + True + dlgAnnotationsSelect.resx + + + Form + + + dlgApproveProcedure.cs + + + Form + + + dlgCheckedOutProcedure.cs + + + Form + + + Form + + + dlgMSWordMessage.cs + + + Form + + + dlgCheckOpenTabs.cs + + + Form + + + DlgCloseTabsOrExit.cs + + + Form + + + dlgExportImport.cs + + + Form + + + dlgImpHowToHandleROs.cs + + + Form + + + dlgManageSecurity.cs + + + Form + + + dlgPhoneList.cs + + + Form + + + dlgPickROFolder.cs + + + Form + + + DlgPrintProcedure.cs + + + Form + + + dlgSetChangeBarStartDate.cs + + + Form + + + dlgTransitionReport.cs + + + Form + + + dlgUCFDetail.cs + + + Form + + + frmAnnotationsCleanup.cs + + + Form + + + frmBatchRefresh.cs + + + Form + + + frmBatchRefreshCheckedOut.cs + + + Form + + + frmManageUser.cs + + + Form + + + frmPDFStatusForm.cs + + + Form + + + frmPSI.cs + + + Form + + + frmRODbProperties.cs + + + Form + + + frmSI.cs + + + Form + + + frmVEPROMS.cs + + + Form + + + frmFolderProperties.cs + + + Form + + + frmProcedureProperties.cs + + + Form + + + frmPropGrid.cs + + + Form + + + frmSectionProperties.cs + + + Form + + + frmSysOptions.cs + + + Form + + + frmVersionsProperties.cs + + + + Designer + AboutVEPROMS.cs + + + dlgAnnotationsSelect.cs + ResXFileCodeGenerator + + + dlgMSWordMessage.cs + + + dlgCheckOpenTabs.cs + + + DlgCloseTabsOrExit.cs + + + dlgImpHowToHandleROs.cs + + + DlgPrintProcedure.cs + Designer + + + dlgSetChangeBarStartDate.cs + + + dlgUCFDetail.cs + + + frmAnnotationsCleanup.cs + + + frmPDFStatusForm.cs + Designer + + + Designer + frmPSI.cs + + + Designer + frmRODbProperties.cs + + + frmSI.cs + + + Designer + frmVEPROMS.cs + + + frmFolderProperties.cs + Designer + + + frmProcedureProperties.cs + Designer + + + Designer + frmPropGrid.cs + + + frmSectionProperties.cs + Designer + + + Designer + frmSysOptions.cs + + + frmVersionsProperties.cs + Designer + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + ShortcutLists.cs + Designer + + + VlnWeb.cs + Designer + + + PreserveNewest + Designer + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + Form + + + ShortcutLists.cs + + + Form + + + VlnWeb.cs + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + dlgApproveProcedure.cs + Designer + PreserveNewest + + + dlgCheckedOutProcedure.cs + Designer + + + dlgExportImport.cs + Designer + + + dlgManageSecurity.cs + Designer + + + Designer + dlgPhoneList.cs + + + dlgPickROFolder.cs + Designer + + + dlgTransitionReport.cs + Designer + + + frmBatchRefresh.cs + Designer + + + frmBatchRefreshCheckedOut.cs + Designer + + + frmManageUser.cs + Designer + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + PreserveNewest + + + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + + + + + {b22ce5ad-288c-44cd-8a22-b3bcf77b7161} + FlexableMessageBox + + + {70F23722-19A3-4AC1-A900-55831C945786} + LBWordLibrary + + + {AEEE9FD1-6892-45E2-A67E-418C06D46FF9} + Volian.Base.Library + + + {8556527C-6615-487F-8AF7-22EBC3EF0268} + Volian.Controls.Library + + + {94830C07-6A3A-450E-9674-C9B4293A7726} + Volian.Print.Library + + + {62314B9C-DA84-4037-8B68-AA18C1F641F5} + Volian.Utils.Library + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + + + cmd /c "$(ProjectDir)FixRev.bat" + + \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index c50a1019..b914dad9 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -1309,7 +1309,7 @@ namespace VEPROMS pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; if (si.IsApproved == 1) { - dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0, selectedSlave); // "true tell export to convert ROs and Transitions to text + dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); dlg.ExportItem(xd, pi, "procedure"); diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index df2e4acb..2e86d280 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -75,9 +75,8 @@ namespace VEPROMS xa.InnerText = value; return xa; } - public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0) + public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int unitIndex = 0) { - UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing _MyMode = mode; MyFolder = folderInfo; @@ -97,9 +96,8 @@ namespace VEPROMS FormClosed += RemoveUnit_OnClose; } } - public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0) + public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int unitIndex = 0) { - UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing _MyMode = mode; MyDocVersion = docVersionInfo; @@ -120,9 +118,8 @@ namespace VEPROMS FormClosed += RemoveUnit_OnClose; } } - public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0) + public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int unitIndex = 0) { - UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing _MyMode = mode; MyProcedure = procedureInfo; @@ -724,28 +721,28 @@ namespace VEPROMS ImportProcedureNew(xd); isImported = true; } - if (isImported && UCFImportCase == E_UCFImportOptions.LoadForSetOnly) UpdateFormatForUCFInSet(); + //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); - } - } - } - } - } + //private void UpdateFormatForUCFInSet() + //{ + // // this gets called if the UCFImportCase == LoadForSetOnly, i.e. only items in this PROCEDURE Set whose formats point to a + // // UCF format should point to the updated (copied) UCF format. + // if (renamedUCFFormatId == null) return; + // foreach (int key in renamedUCFFormatId.Keys) + // { + // using (ContentInfoList cil = ContentInfoList.FixFormatIDAfterImport(MyDocVersion.VersionID.ToString(), renamedUCFFormatId[key], key)) + // { + // foreach (ContentInfo ci in cil) + // { + // using (Content c = ci.Get()) + // { + // ContentInfo.Refresh(c); + // } + // } + // } + // } + //} // Added Error Handling to assure that Change Manager is turned-on regardless of success or failure of the import // B2019-046: improved error handling (added return value & error message) private bool TryToLoadImportDataDocument() @@ -1014,8 +1011,8 @@ namespace VEPROMS c.Save(); } } - private E_UCFImportOptions UCFImportDefaultFromSettings; - private E_UCFImportOptions UCFImportCase = E_UCFImportOptions.LoadOnlyImported; + //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) @@ -1057,7 +1054,6 @@ namespace VEPROMS { existingFC.Add(exFI.Config); importedFC.Add(config); - conflictingUCFdata = true; fname.Add(name); } else @@ -1066,22 +1062,6 @@ namespace VEPROMS } } - // there is a difference in UCF data, see if user wants sections to use the existing or new ucf data: - if (conflictingUCFdata) - { - // Bring up dialog to allow user to choose how the UCF data is handled: - // Importing of a procedure(s) (names of UCF exist in current DB and in exported DB) - //Case 0 - ignore (don't bring in new UCF) - //Case 1 - bringing in new UCF and not using it - //Case 2 - bringing in new UCF and only using it for imported data - //Case 3 - bringing in new UCF and using it across the board - //Case 4 - bringing in new UCF and using it for the current procedure set (not applicable for procedure sets) - UCFImportCase = UCFImportDefaultFromSettings; // from the options/settings - dlgUCFImportOptions ucfoptDlg = new dlgUCFImportOptions(fname, existingFC, importedFC, UCFImportCase, xmlpath); - DialogResult dr = ucfoptDlg.ShowDialog(); - if (dr != DialogResult.OK) return false; - UCFImportCase = ucfoptDlg.UCFImportOptionsCase; // may be reset from dialog. - } // first see if any of the imported formats have different data. If so, foreach (XmlNode nd in nl) { @@ -1133,102 +1113,102 @@ namespace VEPROMS // various cases listed above: if (existingFormat.ContainsKey(name)) { - // if case 0 and this ucf already exists, ignore it: - if (UCFImportCase == E_UCFImportOptions.Ignore) continue; + //// if case 0 and this ucf already exists, ignore it: + //if (UCFImportCase == E_UCFImportOptions.Ignore) continue; - // if case 1, 2, 4 and the name exists, make a 'copy' of the newly imported format: - // need to add this format - name must be unique so add 'COPY(x) of 'original name'' where x is unique number: - if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) - { - int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count(); - if (count > 0) - { - string origname = name; - name = string.Format("Copy {0} of {1}", count.ToString(), name); - if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) - { - if (renamedUCFFormatName == null) renamedUCFFormatName = new Dictionary(); - renamedUCFFormatName.Add(origname, name); - } - } - } + //// if case 1, 2, 4 and the name exists, make a 'copy' of the newly imported format: + //// need to add this format - name must be unique so add 'COPY(x) of 'original name'' where x is unique number: + //if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) + //{ + // int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count(); + // if (count > 0) + // { + // string origname = name; + // name = string.Format("Copy {0} of {1}", count.ToString(), name); + // if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) + // { + // if (renamedUCFFormatName == null) renamedUCFFormatName = new Dictionary(); + // renamedUCFFormatName.Add(origname, name); + // } + // } + //} // if case 3, take the existing config data and create in a record whose name is Old(x) of 'original name' (the record // creation gets done below). Then modify the existing record to have the config data. The result is that any // sections that used this UCF throughout the database will have the new config data. - if (UCFImportCase == E_UCFImportOptions.LoadUseAll) - { - string savname = name; - int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count(); - if (count > 0) - { - name = string.Format("Old {0} of {1}", count.ToString(), name); - } - // update the 'old' record by getting the original config data. - string savdesc = null; - DateTime savdts = DateTime.Now; - string savuid = null; - int savpar = 0; - string savconfig = null; - using (Format origRecord = Format.Get(existingFormat[savname])) - { - savdesc = origRecord.Description; - savdts = origRecord.DTS; - savuid = origRecord.UserID; - savpar = origRecord.ParentID; - savconfig = origRecord.Config; - origRecord.Name = savname; - origRecord.Description = description; - origRecord.DTS = dts; - origRecord.UserID = userid; - origRecord.MyParent = pformat; - origRecord.Config = config; - origRecord.Save(); - description = savdesc; - dts = savdts; - userid = savuid; - pformat = Format.Get(savpar); - config = savconfig; + //if (UCFImportCase == E_UCFImportOptions.LoadUseAll) + //{ + // string savname = name; + // int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count(); + // if (count > 0) + // { + // name = string.Format("Old {0} of {1}", count.ToString(), name); + // } + // // update the 'old' record by getting the original config data. + // string savdesc = null; + // DateTime savdts = DateTime.Now; + // string savuid = null; + // int savpar = 0; + // string savconfig = null; + // using (Format origRecord = Format.Get(existingFormat[savname])) + // { + // savdesc = origRecord.Description; + // savdts = origRecord.DTS; + // savuid = origRecord.UserID; + // savpar = origRecord.ParentID; + // savconfig = origRecord.Config; + // origRecord.Name = savname; + // origRecord.Description = description; + // origRecord.DTS = dts; + // origRecord.UserID = userid; + // origRecord.MyParent = pformat; + // origRecord.Config = config; + // origRecord.Save(); + // description = savdesc; + // dts = savdts; + // userid = savuid; + // pformat = Format.Get(savpar); + // config = savconfig; - } - } + // } + //} } - if (UCFImportCase == 0) // ignore it - { + //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); + //} + //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); - } - } - } - } + // // 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; diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 07151940..5730bbe5 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -21,7 +21,7 @@ namespace VEPROMS private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]"); - public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex) + public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, ( unitIndex)) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); _ExportBothConvertedandNot = true; @@ -29,7 +29,7 @@ namespace VEPROMS FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}"; } - public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex) + public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (unitIndex)) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); _ExportBothConvertedandNot = true; @@ -37,7 +37,7 @@ namespace VEPROMS FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}"; } - public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex) + public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (unitIndex)) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); _ExportBothConvertedandNot = true; diff --git a/PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs b/PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs deleted file mode 100644 index c6ee262b..00000000 --- a/PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 18fa64f4..00000000 --- a/PROMS/VEPROMS User Interface/dlgUCFDetail.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Xml; -using System.IO; -using System.Xml.Xsl; - -namespace VEPROMS -{ - public partial class dlgUCFDetail : Form - { - private string MyFormatConfig; - private string UCFName; - private string Description; - // This brings up the dialog for displaying the details of what is contained in this User Control of Format - // as defined by the formatConfig. It uses XSL to display the xml. The XSL can be found in UCFDetails.xsl. - // The result is displayed in a web browser control on the dialog. - public dlgUCFDetail(string formatConfig, string name, string desc) - { - MyFormatConfig = formatConfig; - UCFName = name; - Description = desc; - InitializeComponent(); - } - private void AddAttribute(XmlNode xn, string name, object value) - { - XmlAttribute xa = xn.OwnerDocument.CreateAttribute(name); - xa.Value = value.ToString(); - xn.Attributes.Append(xa); - } - private void dlgUCFDetail_Load(object sender, EventArgs e) - { - try - { - //need to add the UCF name & description to this: - XmlDocument xd = new XmlDocument(); - xd.LoadXml(MyFormatConfig); - XmlNodeList xnl = xd.GetElementsByTagName("FormatConfig"); - if (xnl != null && xnl.Count > 0) - { - AddAttribute(xnl[0], "Name", UCFName); - AddAttribute(xnl[0], "Description", Description); - } - - string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFDetails.xsl"); - StringWriter sw = new StringWriter(); - StringWriter xsw = new StringWriter(); - using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary))) - { - XmlTextWriter tx = new XmlTextWriter(xsw); - xd.WriteTo(tx); - string tmp = sw.ToString(); - tmp = xd.InnerXml; - using (XmlReader xri = XmlReader.Create(new StringReader(tmp))) - { - using (XmlWriter xwo = XmlWriter.Create(sw)) - { - XslCompiledTransform xsl = new XslCompiledTransform(); - xsl.Load(xrt); - xsl.Transform(xri, xwo); // Perform Transform - } - this.wbBrDet.DocumentText = sw.ToString(); - } - } - } - catch (Exception ex) - { - MessageBox.Show("Problem occurred displaying the details.", "UCF Warning", MessageBoxButtons.OK); - } - } - } -} diff --git a/PROMS/VEPROMS User Interface/dlgUCFDetail.resx b/PROMS/VEPROMS User Interface/dlgUCFDetail.resx deleted file mode 100644 index 7080a7d1..00000000 --- a/PROMS/VEPROMS User Interface/dlgUCFDetail.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 e0d3a6e7..59d2b38d 100644 --- a/PROMS/VEPROMS User Interface/frmFolderProperties.cs +++ b/PROMS/VEPROMS User Interface/frmFolderProperties.cs @@ -338,23 +338,23 @@ namespace VEPROMS //if (btnAnnoTypeSave.Enabled) return; folderConfigBindingSource.EndEdit(); // if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change: - if (_FolderConfig.MyFolder.FormatID != _cmbxformatOriginal) - { - // clean up & then refresh the configs - using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByFolder(_FolderConfig.MyFolder.FolderID, _cmbxformatOriginal, _FolderConfig.MyFolder.FormatID)) - { - foreach (ContentInfo ci in cil) - { - using (Content c = ci.Get()) - { - // first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen - // and if configs aren't done first, the screen refresh, if based on config data, will not be correct. - foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig(); - ContentInfo.Refresh(c); - } - } - } - } + //if (_FolderConfig.MyFolder.FormatID != _cmbxformatOriginal) + //{ + // // clean up & then refresh the configs + // using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByFolder(_FolderConfig.MyFolder.FolderID, _cmbxformatOriginal, _FolderConfig.MyFolder.FormatID)) + // { + // foreach (ContentInfo ci in cil) + // { + // using (Content c = ci.Get()) + // { + // // first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen + // // and if configs aren't done first, the screen refresh, if based on config data, will not be correct. + // foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig(); + // ContentInfo.Refresh(c); + // } + // } + // } + //} // Save Default settings for User // // Save whether we should display the default values on this property page diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index 3c168a16..9d19bf66 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -120,7 +120,7 @@ namespace VEPROMS PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat; CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList; CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList; - int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; // C2020-003 use the _CheckOffIndex dictionary to get and save the index of the selected checkoff from the sorted checkoff list // B2020-039: Added the check for a valid selected index so that crash doesn't occur if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && maxindx > 1) @@ -796,7 +796,7 @@ namespace VEPROMS CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList; if (chkoffList != null) chkoffList.Sort(CompareCheckoffUsingOrderBy); // C2020-003 sort the checkoff list via the Index and/or OrderBy elements CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList; - int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; // B2019-013: was crashing on indexer of checkofflist. If there were UCF checkoffs but none in original format, the indexer // was failing for index of 0 (indexer code went through index attribute of xml and was returning null even though there // were items in list). diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs index 51e952ec..9cd396eb 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs @@ -1211,7 +1211,7 @@ namespace VEPROMS this.cbUCFLForSetOnly.Size = new System.Drawing.Size(105, 19); this.cbUCFLForSetOnly.TabIndex = 5; this.cbUCFLForSetOnly.Text = "Load For Set Only"; - this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged); + //this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged); // // cbUCFLUseAll // @@ -1227,7 +1227,7 @@ namespace VEPROMS this.cbUCFLUseAll.Size = new System.Drawing.Size(105, 19); this.cbUCFLUseAll.TabIndex = 4; this.cbUCFLUseAll.Text = "Load Use All"; - this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged); + //this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged); // // cbUCFLOnlyImport // @@ -1243,7 +1243,7 @@ namespace VEPROMS this.cbUCFLOnlyImport.Size = new System.Drawing.Size(105, 19); this.cbUCFLOnlyImport.TabIndex = 3; this.cbUCFLOnlyImport.Text = "Load Only Imported"; - this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged); + //this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged); // // cbUCFLNotUsed // @@ -1259,7 +1259,7 @@ namespace VEPROMS this.cbUCFLNotUsed.Size = new System.Drawing.Size(88, 19); this.cbUCFLNotUsed.TabIndex = 2; this.cbUCFLNotUsed.Text = "Load Not Used"; - this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged); + //this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged); // // cbUCFIgnore // @@ -1275,7 +1275,7 @@ namespace VEPROMS this.cbUCFIgnore.Size = new System.Drawing.Size(67, 19); this.cbUCFIgnore.TabIndex = 1; this.cbUCFIgnore.Text = "Ignore"; - this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged); + //this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged); // // btnReset // diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.cs b/PROMS/VEPROMS User Interface/frmSysOptions.cs index 19de065e..2d286940 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.cs @@ -75,24 +75,24 @@ namespace VEPROMS cbEnhancedDocumentSync.Checked = Settings.Default.SyncEnhancedDocuments; cbSeparateWindows.Checked = Settings.Default.SeparateWindows; txbxVisioPath.Text = Settings.Default.VisioPath; - switch (Settings.Default.UCFImportOpt) // see dlgExportImport for descripton of these options. - { - case 0: - cbUCFIgnore.Checked = true; - break; - case 1: - cbUCFLNotUsed.Checked = true; - break; - case 2: - cbUCFLOnlyImport.Checked = true; - break; - case 3: - cbUCFLUseAll.Checked = true; - break; - case 4: - cbUCFLForSetOnly.Checked = true; - break; - } + //switch (Settings.Default.UCFImportOpt) // see dlgExportImport for descripton of these options. + //{ + // case 0: + // cbUCFIgnore.Checked = true; + // break; + // case 1: + // cbUCFLNotUsed.Checked = true; + // break; + // case 2: + // cbUCFLOnlyImport.Checked = true; + // break; + // case 3: + // cbUCFLUseAll.Checked = true; + // break; + // case 4: + // cbUCFLForSetOnly.Checked = true; + // break; + //} //CSM - C2024-031 - Getting User Settings //and set checkboxes based on what they are set to @@ -193,7 +193,7 @@ namespace VEPROMS private bool ss_SyncEnhancedDocuments; private bool ss_SeparateWindows; private string ss_VisioPath; - private int ss_UCFImportOpt; + //private int ss_UCFImportOpt; private void SaveStartingSettings() { @@ -210,7 +210,7 @@ namespace VEPROMS ss_SyncEnhancedDocuments = Settings.Default.SyncEnhancedDocuments; ss_SeparateWindows = Settings.Default.SeparateWindows; ss_VisioPath = Settings.Default.VisioPath; - ss_UCFImportOpt = Settings.Default.UCFImportOpt; + //ss_UCFImportOpt = Settings.Default.UCFImportOpt; } private void RestoreStartingSettings() // used with the cancel button @@ -227,7 +227,7 @@ namespace VEPROMS Settings.Default.SyncEnhancedDocuments = ss_SyncEnhancedDocuments; Settings.Default.SeparateWindows = ss_SeparateWindows; Settings.Default.VisioPath = ss_VisioPath; - Settings.Default.UCFImportOpt = ss_UCFImportOpt; + //Settings.Default.UCFImportOpt = ss_UCFImportOpt; } @@ -315,45 +315,45 @@ namespace VEPROMS Settings.Default.VisioPath = txbxVisioPath.Text; } - private void cbUCFIgnore_CheckedChanged(object sender, EventArgs e) - { - if (!_initializing) - { - Settings.Default.UCFImportOpt = 0; - } - } + //private void cbUCFIgnore_CheckedChanged(object sender, EventArgs e) + //{ + // if (!_initializing) + // { + // Settings.Default.UCFImportOpt = 0; + // } + //} - private void cbUCFLNotUsed_CheckedChanged(object sender, EventArgs e) - { - if (!_initializing) - { - Settings.Default.UCFImportOpt = 1; - } - } + //private void cbUCFLNotUsed_CheckedChanged(object sender, EventArgs e) + //{ + // if (!_initializing) + // { + // Settings.Default.UCFImportOpt = 1; + // } + //} - private void cbUCFLOnlyImport_CheckedChanged(object sender, EventArgs e) - { - if (!_initializing) - { - Settings.Default.UCFImportOpt = 2; - } - } + //private void cbUCFLOnlyImport_CheckedChanged(object sender, EventArgs e) + //{ + // if (!_initializing) + // { + // Settings.Default.UCFImportOpt = 2; + // } + //} - private void cbUCFLUseAll_CheckedChanged(object sender, EventArgs e) - { - if (!_initializing) - { - Settings.Default.UCFImportOpt = 3; - } - } + //private void cbUCFLUseAll_CheckedChanged(object sender, EventArgs e) + //{ + // if (!_initializing) + // { + // Settings.Default.UCFImportOpt = 3; + // } + //} - private void cbUCFLForSetOnly_CheckedChanged(object sender, EventArgs e) - { - if (!_initializing) - { - Settings.Default.UCFImportOpt = 4; - } - } + //private void cbUCFLForSetOnly_CheckedChanged(object sender, EventArgs e) + //{ + // if (!_initializing) + // { + // Settings.Default.UCFImportOpt = 4; + // } + //} private void cbOTRemember_CheckedChanged(object sender, EventArgs e) { cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbShwRplWrdsColor.Checked; diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 6710d968..acabca31 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -724,7 +724,7 @@ namespace VEPROMS } else { - dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter + dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter dlg.ShowDialog(this); MySessionInfo.CheckInItem(ownerid); @@ -778,7 +778,7 @@ namespace VEPROMS else { - dlgExportImport dlg = new dlgExportImport("Import", dvi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter + dlgExportImport dlg = new dlgExportImport("Import", dvi, this);//Added frmVEPROMS Parameter dlg.MyNewProcedure = null; dlg.ExternalTransitionItem = null; dlg.ShowDialog(this); @@ -820,7 +820,7 @@ namespace VEPROMS else { - dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter + dlgExportImport dlg = new dlgExportImport("Export", pi, this);//Added frmVEPROMS Parameter dlg.ShowDialog(this); MySessionInfo.CheckInItem(ownerid); @@ -2220,7 +2220,6 @@ namespace VEPROMS // C2025-031 added tool tip messages this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", "", "Add, Modify, and Delete PROMS User Access", null, null, eTooltipColor.Gray)); - // remove commented out line below when User Control of Formats code is deleted this.superTooltip1.SetSuperTooltip(btnResetSecurity, new SuperTooltipInfo("Reset Security", "", "WARNING this will \nREMOVE ALL PROMS USERS and Reset to the\nOriginal Volian Defaults", null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnAdministrativeTools, new SuperTooltipInfo("Administrative Tools", "", "Open the PROMS Adminstration Tools Window", null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnUpdateFormats, new SuperTooltipInfo("Update Formats", "", "Install New Formats \n or Re-Install Formats", null, null, eTooltipColor.Gray)); diff --git a/PROMS/VEPROMS.CSLA.Library/Config/FormatConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/FormatConfig.cs index 004c33c7..0bca3814 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/FormatConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/FormatConfig.cs @@ -213,14 +213,14 @@ namespace VEPROMS.CSLA.Library [TypeConverter(typeof(ExpandableObjectConverter))] public class Flags { - private bool? _CheckOffUCF; - [DisplayName("UCF CheckOffs")] - [Description("Additional UCF Check Offs and Sign Offs")] - public bool? CheckOffUCF - { - get { return _CheckOffUCF; } - set { _CheckOffUCF = value; } - } + //private bool? _CheckOffUCF; + //[DisplayName("UCF CheckOffs")] + //[Description("Additional UCF Check Offs and Sign Offs")] + //public bool? CheckOffUCF + //{ + // get { return _CheckOffUCF; } + // set { _CheckOffUCF = value; } + //} private bool? _PartialStepCompression; [DisplayName("Partial Step Compression")] [Description("Automatically compress last sub-steps to fit on page")] @@ -272,41 +272,42 @@ namespace VEPROMS.CSLA.Library } #endregion ReplaceStrData #region ReplaceStr - [Flags] - public enum E_ReplaceFlagsUCF : uint - { - High = 0x0001, // Do ReplaceWords in HIGH LEVEL STEPS - RNO = 0x0002, // Do ReplaceWords in RNOS - Caution = 0x0004, // Do ReplaceWords in CAUTIONS - Note = 0x0008, // Do ReplaceWords in NOTES - Table = 0x0010, // Do ReplaceWords in TABLES - Substep = 0x0020, // Do ReplaceWords in SUBSTEPS - Attach = 0x0040, // Do ReplaceWords in ATTACHMENTS - Bkgd = 0x0080, // Do ReplaceWords in BACKGROUNDS - DiffUnit = 0x0100, // Do ReplaceWords ONLY for different UNIT # - TOC = 0x0200, // Do in auto table-of-contents - StatTree = 0x0400, - HLSSetpnt = 0x0800, // Do ReplaceWords in HighLevelStep SETPoiNTs - Trans = 0x1000, // Do ReplaceWords in TRANSITIONS - Setpoint = 0x2000, // Do ReplaceWords in SETPOINTS + //[Flags] + //public enum + //: uint + //{ + // High = 0x0001, // Do ReplaceWords in HIGH LEVEL STEPS + // RNO = 0x0002, // Do ReplaceWords in RNOS + // Caution = 0x0004, // Do ReplaceWords in CAUTIONS + // Note = 0x0008, // Do ReplaceWords in NOTES + // Table = 0x0010, // Do ReplaceWords in TABLES + // Substep = 0x0020, // Do ReplaceWords in SUBSTEPS + // Attach = 0x0040, // Do ReplaceWords in ATTACHMENTS + // Bkgd = 0x0080, // Do ReplaceWords in BACKGROUNDS + // DiffUnit = 0x0100, // Do ReplaceWords ONLY for different UNIT # + // TOC = 0x0200, // Do in auto table-of-contents + // StatTree = 0x0400, + // HLSSetpnt = 0x0800, // Do ReplaceWords in HighLevelStep SETPoiNTs + // Trans = 0x1000, // Do ReplaceWords in TRANSITIONS + // Setpoint = 0x2000, // Do ReplaceWords in SETPOINTS - // Case Sensitivity Flags - default is off (Case Sensitive Replace) - CaseInsens = 0x0000C000, // Do ReplaceWords for all words thatmatch, regardless of case, - // and replace with the ReplaceWith string as is - // B2019-022: do not support CaseInsensFirst & CaseInsensAll - there is no supporting replace word code: - //CaseInsensFirst = 0x4000, // Do ReplaceWords for all words thatexactly match the ReplaceWord, - // except the case of the first character may be different - //CaseInsensAll = 0x8000, // Do ReplaceWords for all words that match the ReplaceWord, regardless of case + // // Case Sensitivity Flags - default is off (Case Sensitive Replace) + // CaseInsens = 0x0000C000, // Do ReplaceWords for all words thatmatch, regardless of case, + // // and replace with the ReplaceWith string as is + // // B2019-022: do not support CaseInsensFirst & CaseInsensAll - there is no supporting replace word code: + // //CaseInsensFirst = 0x4000, // Do ReplaceWords for all words thatexactly match the ReplaceWord, + // // except the case of the first character may be different + // //CaseInsensAll = 0x8000, // Do ReplaceWords for all words that match the ReplaceWord, regardless of case - Partials = 0x10000, // Do replace even on partial matches - Plackeep = 0x20000, // Do replace in PlaceKeepers - InSecTitle = 0x40000, - BeforeTrans = 0x80000, // Only do replace if the string occurs immediately before a transition. - BeforeList = 0x100000, // C2021-045 Only if the text ends with a colon ":" - PageList = 0x200000, // F2021-053 Do replace words for PageList items that are ROs - FirstWord = 0x400000, // C2021-056 Do only if is the first word in the text - NotInRO = 0x800000 // B2022-015 BNPPalr: Determine whether RO text should have Replace Words applied - } + // Partials = 0x10000, // Do replace even on partial matches + // Plackeep = 0x20000, // Do replace in PlaceKeepers + // InSecTitle = 0x40000, + // BeforeTrans = 0x80000, // Only do replace if the string occurs immediately before a transition. + // BeforeList = 0x100000, // C2021-045 Only if the text ends with a colon ":" + // PageList = 0x200000, // F2021-053 Do replace words for PageList items that are ROs + // FirstWord = 0x400000, // C2021-056 Do only if is the first word in the text + // NotInRO = 0x800000 // B2022-015 BNPPalr: Determine whether RO text should have Replace Words applied + //} [Serializable] [TypeConverter(typeof(ExpandableObjectConverter))] public class ReplaceStr diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs index eefa7dfe..7f32e607 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs @@ -1755,165 +1755,88 @@ namespace VEPROMS.CSLA.Library #endregion - #region UCF Fix FormatId After Import - private class FixFormatIDAfterImportCriteria - { - private string _DocVersionList; - public string DocVersionList - { - get { return _DocVersionList; } - set { _DocVersionList = value; } - } - private int _OldFormatID; - public int OldFormatID - { - get { return _OldFormatID; } - set { _OldFormatID = value; } - } - private int _NewFormatID; - public int NewFormatID - { - get { return _NewFormatID; } - set { _NewFormatID = value; } - } - public FixFormatIDAfterImportCriteria(string dvlst, int oldfid, int newfid) - { - _DocVersionList = dvlst; - _OldFormatID = oldfid; - _NewFormatID = newfid; - } - } - private void DataPortal_Fetch(FixFormatIDAfterImportCriteria criteria) - { - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "vesp_UpdateVersionFormatForUCF"; - cm.Parameters.AddWithValue("@VersionList", criteria.DocVersionList); - cm.Parameters.AddWithValue("@OldFormatID", criteria.OldFormatID); - cm.Parameters.AddWithValue("@NewFormatID", criteria.NewFormatID); - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - IsReadOnly = false; - while (dr.Read()) - { - ContentInfo contentInfo = new ContentInfo(dr); - this.Add(contentInfo); - } - IsReadOnly = true; - } - } - } - } - catch (Exception ex) - { - Database.LogException("FixFormatIDAfterImport.DataPortal_Fetch", ex); - throw new DbCslaException("FixFormatIDAfterImport.DataPortal_Fetch", ex); - } - } + //#region UCF Clear Overwridden Formats + //private class ClearOverrideFormatsByFolderCriteria + //{ + // public ClearOverrideFormatsByFolderCriteria(int folderID, int? formatID, int? newformatID) + // { + // _FormatID = formatID; + // _FolderID = folderID; + // _NewFormatID = newformatID; + // } + // private int? _FormatID; + // public int? FormatID + // { + // get { return _FormatID; } + // set { _FormatID = value; } + // } + // private int? _NewFormatID; + // public int? NewFormatID + // { + // get { return _NewFormatID; } + // set { _NewFormatID = value; } + // } + // private int _FolderID; + // public int FolderID + // { + // get { return _FolderID; } + // set { _FolderID = value; } + // } + //} - public static ContentInfoList FixFormatIDAfterImport(string dvlst, int oldfid, int newfid) - { - try - { - ContentInfoList tmp = DataPortal.Fetch(new FixFormatIDAfterImportCriteria(dvlst, oldfid, newfid)); - return tmp; - } - catch (Exception ex) - { - throw new DbCslaException("Error on ContentInfoList.FixFormatIDAfterImport", ex); - } - } + //private void DataPortal_Fetch(ClearOverrideFormatsByFolderCriteria criteria) + //{ + // try + // { + // using (SqlConnection cn = Database.VEPROMS_SqlConnection) + // { + // using (SqlCommand cm = cn.CreateCommand()) + // { + // cm.CommandType = CommandType.StoredProcedure; + // cm.CommandText = "vesp_ClearOverrideFormatsByFolder"; + // cm.Parameters.AddWithValue("@FolderID", criteria.FolderID); + // if (criteria.FormatID == null) + // cm.Parameters.AddWithValue("@FormatID", DBNull.Value); + // else + // cm.Parameters.AddWithValue("@FormatID", criteria.FormatID); + // if (criteria.NewFormatID == null) + // cm.Parameters.AddWithValue("@NewFormatID", DBNull.Value); + // else + // cm.Parameters.AddWithValue("@NewFormatID", criteria.NewFormatID); + // cm.CommandTimeout = Database.DefaultTimeout; + // using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + // { + // IsReadOnly = false; + // while (dr.Read()) + // { + // ContentInfo contentInfo = new ContentInfo(dr); + // this.Add(contentInfo); + // } + // IsReadOnly = true; + // } + // } + // } + // } + // catch (Exception ex) + // { + // Database.LogException("ClearOverrideFormatsByFolderCriteria.DataPortal_Fetch", ex); + // throw new DbCslaException("ClearOverrideFormatsByFolderCriteria.DataPortal_Fetch", ex); + // } + //} - #endregion - - #region UCF Clear Overwridden Formats - private class ClearOverrideFormatsByFolderCriteria - { - public ClearOverrideFormatsByFolderCriteria(int folderID, int? formatID, int? newformatID) - { - _FormatID = formatID; - _FolderID = folderID; - _NewFormatID = newformatID; - } - private int? _FormatID; - public int? FormatID - { - get { return _FormatID; } - set { _FormatID = value; } - } - private int? _NewFormatID; - public int? NewFormatID - { - get { return _NewFormatID; } - set { _NewFormatID = value; } - } - private int _FolderID; - public int FolderID - { - get { return _FolderID; } - set { _FolderID = value; } - } - } - - private void DataPortal_Fetch(ClearOverrideFormatsByFolderCriteria criteria) - { - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "vesp_ClearOverrideFormatsByFolder"; - cm.Parameters.AddWithValue("@FolderID", criteria.FolderID); - if (criteria.FormatID == null) - cm.Parameters.AddWithValue("@FormatID", DBNull.Value); - else - cm.Parameters.AddWithValue("@FormatID", criteria.FormatID); - if (criteria.NewFormatID == null) - cm.Parameters.AddWithValue("@NewFormatID", DBNull.Value); - else - cm.Parameters.AddWithValue("@NewFormatID", criteria.NewFormatID); - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - IsReadOnly = false; - while (dr.Read()) - { - ContentInfo contentInfo = new ContentInfo(dr); - this.Add(contentInfo); - } - IsReadOnly = true; - } - } - } - } - catch (Exception ex) - { - Database.LogException("ClearOverrideFormatsByFolderCriteria.DataPortal_Fetch", ex); - throw new DbCslaException("ClearOverrideFormatsByFolderCriteria.DataPortal_Fetch", ex); - } - } - - public static ContentInfoList ClearOverrideFormatsByFolder(int folderID, int? formatID, int? newformatID) - { - try - { - ContentInfoList tmp = DataPortal.Fetch(new ClearOverrideFormatsByFolderCriteria(folderID, formatID, newformatID)); - return tmp; - } - catch (Exception ex) - { - throw new DbCslaException("Error on ContentInfoList.ClearOverrideFormatsByFolder", ex); - } - } + //public static ContentInfoList ClearOverrideFormatsByFolder(int folderID, int? formatID, int? newformatID) + //{ + // try + // { + // ContentInfoList tmp = DataPortal.Fetch(new ClearOverrideFormatsByFolderCriteria(folderID, formatID, newformatID)); + // return tmp; + // } + // catch (Exception ex) + // { + // throw new DbCslaException("Error on ContentInfoList.ClearOverrideFormatsByFolder", ex); + // } + //} private class ClearOverrideFormatsByDocVersionCriteria { @@ -2077,7 +2000,6 @@ namespace VEPROMS.CSLA.Library } } - #endregion #region Enhanced diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index b8798d29..58136b8e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs @@ -2195,12 +2195,12 @@ namespace VEPROMS.CSLA.Library //int profileDepth = ProfileTimer.Push(">>>> DoReplaceWords2.ForLoop"); foreach (FormatConfig.ReplaceStr rs in rsl) { - bool dopartial = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.Partials) == E_ReplaceFlags.Partials; + bool dopartial = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.Partials; if (!dopartial) // F2021-093: Partials moved into their own method and done first { - bool onlyDoList = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.BeforeList) == E_ReplaceFlags.BeforeList; // C2021-045 - bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.FirstWord) == E_ReplaceFlags.FirstWord; // C2021-056 - bool doInPagelist = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.PageList) == E_ReplaceFlags.PageList; // B2021-132 + bool onlyDoList = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.BeforeList; // C2021-045 + bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.FirstWord; // C2021-056 + bool doInPagelist = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.PageList; // B2021-132 //B2021-132 only do replacewords in paglist if the replaceword pagelist flag is set if (_DoReplWordInPageList && !doInPagelist) continue; @@ -2228,7 +2228,7 @@ namespace VEPROMS.CSLA.Library { if (!dicReplaceRegex.ContainsKey(rs)) { - RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None; + RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None; //int profileDepth3 = ProfileTimer.Push(">>>> DoReplaceWords2.BuildMatch"); // CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is //RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline; @@ -2274,12 +2274,12 @@ namespace VEPROMS.CSLA.Library Dictionary shouldReplace = new Dictionary(); foreach (FormatConfig.ReplaceStr rs in rsl) { - bool dopartial = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.Partials) == E_ReplaceFlags.Partials; + bool dopartial = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.Partials; if (dopartial) { - bool onlyDoList = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.BeforeList) == E_ReplaceFlags.BeforeList; // C2021-045 - bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.FirstWord) == E_ReplaceFlags.FirstWord; // C2021-056 - bool doInPagelist = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.PageList) == E_ReplaceFlags.PageList; // B2021-132 + bool onlyDoList = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.BeforeList; // C2021-045 + bool onlyIfFirstWord = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.FirstWord; // C2021-056 + bool doInPagelist = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.PageList; // B2021-132 //B2021-132 only do replacewords in paglist if the replaceword pagelist flag is set if (_DoReplWordInPageList && !doInPagelist) continue; @@ -2304,7 +2304,7 @@ namespace VEPROMS.CSLA.Library { if (!dicReplaceRegex.ContainsKey(rs)) { - RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag & FormatConfig.E_ReplaceFlagsUCF.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None; + RegexOptions myOptions = (E_ReplaceFlags)(rs.Flag) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase : RegexOptions.None; dicReplaceRegex.Add(rs, new Regex(rs.ReplaceWord, myOptions)); } try @@ -2563,12 +2563,12 @@ namespace VEPROMS.CSLA.Library { // B2022-015 BNPPalr: Determine whether RO text should have Replace Words applied. InLinkAndNotInRoFlag checks // for flag on replace word item & checks that it is within and RO link - bool InLinkAndNotInRoFlag = ((foundMatch.MyWord.Flag & FormatConfig.E_ReplaceFlagsUCF.NotInRO) != 0) ? VerifyWithinLink(text, foundMatch, offset) : false; + bool InLinkAndNotInRoFlag = ((foundMatch.MyWord.Flag) != 0) ? VerifyWithinLink(text, foundMatch, offset) : false; if (!InLinkAndNotInRoFlag && VerifyNoHardSpace(text, foundMatch, offset) && VerifyNoLink(text, foundMatch, offset)) { //if(offset != 0 || foundMatch.MyMatch.Index != 0 || !foundMatch.MyWord.ReplaceWith.StartsWith(@"{\par}")) //{ - if (((foundMatch.MyWord.Flag & FormatConfig.E_ReplaceFlagsUCF.DiffUnit) == 0) || DiffUnit(foundMatch.MyWord.ReplaceWord, _MyItemInfo, "UNIT ")) + if (((foundMatch.MyWord.Flag) == 0) || DiffUnit(foundMatch.MyWord.ReplaceWord, _MyItemInfo, "UNIT ")) { string with = foundMatch.MyWord.ReplaceWith; if (offset == 0 && with.StartsWith(@"{\par}")) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs index a4e5383a..635186d5 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/FormatExt.cs @@ -596,68 +596,68 @@ public partial class FormatInfo : IFormatOrFormatInfo } // Get format data, but do not resolve the 'Data' and 'Genmac' fields, i.e. keep empty if they are // empty. - public static FormatInfo GetFormatNoUCFByFormatID(int formatID) - { - try - { - FormatInfo tmp = DataPortal.Fetch(new FormatIDNoUCFCriteria(formatID)); - if (tmp.ErrorMessage == "No Record Found") - { - tmp.Dispose(); // Clean-up FormatInfo - tmp = null; - } - return tmp; - } - catch (Exception ex) - { - throw new DbCslaException("Error on FormatInfo.GetFormatNoUCFByFormatID", ex); - } - } - protected class FormatIDNoUCFCriteria - { - private int _FormatID; - public int FormatID { get { return _FormatID; } } - public FormatIDNoUCFCriteria(int formatID) - { - _FormatID = formatID; - } - } - private void DataPortal_Fetch(FormatIDNoUCFCriteria criteria) - { - if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] FormatInfo.DataPortal_Fetch", GetHashCode()); - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - ApplicationContext.LocalContext["cn"] = cn; - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "getFormatNoUCF"; - cm.Parameters.AddWithValue("@FormatID", criteria.FormatID); - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - if (!dr.Read()) - { - _ErrorMessage = "No Record Found"; - return; - } - ReadData(dr); - } - } - // removing of item only needed for local data portal - if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) - ApplicationContext.LocalContext.Remove("cn"); - } - } - catch (Exception ex) - { - if (_MyLog.IsErrorEnabled) _MyLog.Error("FormatInfo.DataPortal_Fetch", ex); - _ErrorMessage = ex.Message; - throw new DbCslaException("FormatInfo.DataPortal_Fetch", ex); - } - } + //public static FormatInfo GetFormatNoUCFByFormatID(int formatID) + //{ + // try + // { + // FormatInfo tmp = DataPortal.Fetch(new FormatIDNoUCFCriteria(formatID)); + // if (tmp.ErrorMessage == "No Record Found") + // { + // tmp.Dispose(); // Clean-up FormatInfo + // tmp = null; + // } + // return tmp; + // } + // catch (Exception ex) + // { + // throw new DbCslaException("Error on FormatInfo.GetFormatNoUCFByFormatID", ex); + // } + //} + //protected class FormatIDNoUCFCriteria + //{ + // private int _FormatID; + // public int FormatID { get { return _FormatID; } } + // public FormatIDNoUCFCriteria(int formatID) + // { + // _FormatID = formatID; + // } + //} + //private void DataPortal_Fetch(FormatIDNoUCFCriteria criteria) + //{ + // if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] FormatInfo.DataPortal_Fetch", GetHashCode()); + // try + // { + // using (SqlConnection cn = Database.VEPROMS_SqlConnection) + // { + // ApplicationContext.LocalContext["cn"] = cn; + // using (SqlCommand cm = cn.CreateCommand()) + // { + // cm.CommandType = CommandType.StoredProcedure; + // cm.CommandText = "getFormatNoUCF"; + // cm.Parameters.AddWithValue("@FormatID", criteria.FormatID); + // cm.CommandTimeout = Database.DefaultTimeout; + // using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + // { + // if (!dr.Read()) + // { + // _ErrorMessage = "No Record Found"; + // return; + // } + // ReadData(dr); + // } + // } + // // removing of item only needed for local data portal + // if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) + // ApplicationContext.LocalContext.Remove("cn"); + // } + // } + // catch (Exception ex) + // { + // if (_MyLog.IsErrorEnabled) _MyLog.Error("FormatInfo.DataPortal_Fetch", ex); + // _ErrorMessage = ex.Message; + // throw new DbCslaException("FormatInfo.DataPortal_Fetch", ex); + // } + //} #region PlantFormat [NonSerialized] private PlantFormat _PlantFormat; diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 9caea004..5d00c57b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -6067,7 +6067,7 @@ namespace VEPROMS.CSLA.Library // To determine if the section has a checkoff... // Section won't have checkoffs if there is no checkofflist, or ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData; - int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit; if (pd.CheckOffData == null || pd.CheckOffData.CheckOffList == null || maxindx <= 0) return false; if (pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.MaxIndex <= 1) return true; //if (pd.CheckOffData == null || pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.Count <= 1) return false; @@ -6099,7 +6099,7 @@ namespace VEPROMS.CSLA.Library private int SectionDefaultCheckOffIndex() { ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData; - int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit; if (pd.CheckOffData != null && pd.CheckOffData.CheckOffList != null && maxindx == 2) return 0; // if only two items, first is macro - use it. SectionConfig sc = ActiveSection.MyConfig as SectionConfig; return sc.Section_CheckoffListSelection; @@ -6111,23 +6111,23 @@ namespace VEPROMS.CSLA.Library if (!SectionHasCheckOffs()) return null; int stpCoIndx = CheckOffIndex(); // this step has a checkoff defined if (stpCoIndx == -1) return null; - if (stpCoIndx > 1) - { - if (ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF && stpCoIndx >= 100) - { - // get index, if greater than 100, store that - otherwise store index down list. - // if this format does not have ucf signoffs, indx is just the selected index from the combo box. - foreach (CheckOff co in ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList) - { - if (stpCoIndx == co.Index) - { - stpCoIndx = (int)co.Index; - break; - } - } - } - return ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList[stpCoIndx]; // DO override of CheckOffList[] to get ucf - } + //if (stpCoIndx > 1) + //{ + // if (ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF && stpCoIndx >= 100) + // { + // // get index, if greater than 100, store that - otherwise store index down list. + // // if this format does not have ucf signoffs, indx is just the selected index from the combo box. + // foreach (CheckOff co in ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList) + // { + // if (stpCoIndx == co.Index) + // { + // stpCoIndx = (int)co.Index; + // break; + // } + // } + // } + // return ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList[stpCoIndx]; // DO override of CheckOffList[] to get ucf + //} int sectCoIndx = SectionDefaultCheckOffIndex(); // no checkoff on step, see if there is a section default. if (sectCoIndx == -1) return null; if ((ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffOnHLSOnly && IsHigh) @@ -6161,7 +6161,7 @@ namespace VEPROMS.CSLA.Library get { ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData; - int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit; if (pd.CheckOffData != null && pd.CheckOffData.CheckOffList != null && maxindx == 2 && pd.CheckOffData.CheckOffList[0].MenuItem == "Enabled") return true; // if only two items, first is macro - use it. return false; diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 6703b87c..78941586 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -126,19 +126,19 @@ namespace VEPROMS.CSLA.Library XmlNodeList nl = XmlDoc.SelectNodes(xpath); return nl.Count > 0; } - private FormatConfig.ReplaceStrData _UCFandOrigReplaceStrData = null; + private FormatConfig.ReplaceStrData _UCFandOrigReplaceStrData = null; // This will return a complete list of ReplaceWords, combining those in the original plant format // with the ones added by the user via User Control of Format (UCF) - public FormatConfig.ReplaceStrData UCFandOrigReplaceStrData - { - get - { - if (_UCFandOrigReplaceStrData != null) return _UCFandOrigReplaceStrData; - _UCFandOrigReplaceStrData = GetMergedReplaceList(this); - return _UCFandOrigReplaceStrData; - } - } - private FormatConfig.ReplaceStrData GetMergedReplaceList(PlantFormat OriginalPlantFormat) + public FormatConfig.ReplaceStrData UCFandOrigReplaceStrData + { + get + { + if (_UCFandOrigReplaceStrData != null) return _UCFandOrigReplaceStrData; + _UCFandOrigReplaceStrData = GetMergedReplaceList(this); + return _UCFandOrigReplaceStrData; + } + } + private FormatConfig.ReplaceStrData GetMergedReplaceList(PlantFormat OriginalPlantFormat) { // need to compare the original format list with the list as it is stored for working with property grid. FormatConfig.ReplaceStrData retlist = new FormatConfig.ReplaceStrData(); // merged list @@ -1579,25 +1579,6 @@ namespace VEPROMS.CSLA.Library return _PSI == null ? _PSI = new PSI(SelectSingleNode("PSI")) : _PSI; } } - private LazyLoad _CheckOffUCF; - public bool CheckOffUCF - { - get - { - // The following line is used in UCF (User Control of Format). - // This needs to be able to control a change in setting in UCF versus its use: - // - This is a special case since the original format, using the value in BaseAll, is always 'false'. And the value - // should never be set in original volian plant format files, if the additional UCF checkoffs are to be used, this must - // be set in the UCF user interface. - if (PlantFormat.DoingUCFCheckOffs) return PlantFormat.DoingUCFCheckOffsUse; - - if (PlantFormat.IgnoreUCF) return LazyLoad(ref _CheckOffUCF, "@CheckOffUCF"); - bool? localvalue = null; // comes to here if in edit or print - use any UCF data before going to original format. - FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat); - if (fc != null) localvalue = fc.PlantFormat.FormatData.Flags.CheckOffUCF; - return localvalue ?? LazyLoad(ref _CheckOffUCF, "@CheckOffUCF"); - } - } // specifies the maxiumn length of the procedure title before PROMS considers to wrap the title // this is used with the {PROCTITLE} PageStyle toekn @@ -1955,25 +1936,25 @@ namespace VEPROMS.CSLA.Library // UseCheckOffUCF is false or there is no FormatConfig (UCF) data: FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat); - if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc==null) - { - _CheckOffList = new CheckOffList(SelectNodes("CheckOffList/CheckOff"), MyFormat); - // B2019-100: If Ignoring the UCF data, just return the entire list. Also, return entire list if there is no UCF data (fc == null) - if (PlantFormat.IgnoreUCF || fc == null) return _CheckOffList; - // If not ignoring UCF settings, only return those that are active - foreach (FormatConfig.CheckOff co in fc.PlantFormat.FormatData.CheckOffList) - { - foreach (CheckOff coo in _CheckOffList) - { - if ((int)coo.Index == Convert.ToInt32(co.Index) && !(bool)co.Active) - { - _CheckOffList.Remove(coo); - break; - } - } - } - return _CheckOffList; - } + //if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc==null) + //{ + // _CheckOffList = new CheckOffList(SelectNodes("CheckOffList/CheckOff"), MyFormat); + // // B2019-100: If Ignoring the UCF data, just return the entire list. Also, return entire list if there is no UCF data (fc == null) + // if (PlantFormat.IgnoreUCF || fc == null) return _CheckOffList; + // // If not ignoring UCF settings, only return those that are active + // foreach (FormatConfig.CheckOff co in fc.PlantFormat.FormatData.CheckOffList) + // { + // foreach (CheckOff coo in _CheckOffList) + // { + // if ((int)coo.Index == Convert.ToInt32(co.Index) && !(bool)co.Active) + // { + // _CheckOffList.Remove(coo); + // break; + // } + // } + // } + // return _CheckOffList; + //} // UseCheckOfffUCF is true: // merge the checkoff list from the current format and the checkoff list from the base format _CheckOffList = new CheckOffList(SelectNodes("CheckOffList/CheckOff"), MyFormat); @@ -2008,26 +1989,26 @@ namespace VEPROMS.CSLA.Library { if (_CheckOffHeaderList != null) return _CheckOffHeaderList; FormatConfig fc = PlantFormat.GetFormatConfig(MyFormat); - if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc == null) - { - _CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat); - // Depending on the IgnoreUCF flag, either return this list with UCF Inactive flags set or return the - // list as is. - if (PlantFormat.IgnoreUCF || fc == null) return _CheckOffHeaderList; - // If not ignoring UCF settings, only return those that are active - foreach (FormatConfig.CheckOffHeader coh in fc.PlantFormat.FormatData.CheckOffHeaderList) - { - foreach (CheckOffHeader coo in _CheckOffHeaderList) - { - if ((int)coo.Index == Convert.ToInt32(coh.Index) && !(bool)coh.Active) - { - _CheckOffHeaderList.Remove(coo); - break; - } - } - } - return _CheckOffHeaderList; - } + //if (!MyFormat.PlantFormat.FormatData.ProcData.CheckOffUCF || fc == null) + //{ + // _CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat); + // // Depending on the IgnoreUCF flag, either return this list with UCF Inactive flags set or return the + // // list as is. + // if (PlantFormat.IgnoreUCF || fc == null) return _CheckOffHeaderList; + // // If not ignoring UCF settings, only return those that are active + // foreach (FormatConfig.CheckOffHeader coh in fc.PlantFormat.FormatData.CheckOffHeaderList) + // { + // foreach (CheckOffHeader coo in _CheckOffHeaderList) + // { + // if ((int)coo.Index == Convert.ToInt32(coh.Index) && !(bool)coh.Active) + // { + // _CheckOffHeaderList.Remove(coo); + // break; + // } + // } + // } + // return _CheckOffHeaderList; + //} // merge the checkoff header lists from the current format and the list from the base _CheckOffHeaderList = new CheckOffHeaderList(SelectNodes("CheckOffHeaderList/CheckOffHeader"), MyFormat); CheckOffHeaderList retlist2 = new CheckOffHeaderList(SelectNodes("../CheckOffDataUCF/CheckOffHeaderList/CheckOffHeader"), MyFormat); diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 9761ae85..a6674a8a 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -367,7 +367,7 @@ namespace Volian.Controls.Library if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly) _checkoffsAllowed = cmbCheckoff.Enabled = CurItemInfo.IsType("Substep"); - int maxindx = fmtdata.ProcData.CheckOffUCF ? fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndex : fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(maxindx == 0)) { CheckOffList chkoffList = fmtdata.ProcData.CheckOffData.CheckOffList; @@ -858,19 +858,19 @@ namespace Volian.Controls.Library int indx = _CheckOffIndex[cmbCheckoff.SelectedIndex]; // C2020-003 get the non-sorted index from the sorted index // get index, if greater than 100, store that - otherwise store index down list. // if this format does not have ucf signoffs, indx is just the selected index from the combo box. - if (CurItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF) - { - // get index, if greater than 100, store that - otherwise store index down list. - // if this format does not have ucf signoffs, indx is just the selected index from the combo mobx. - foreach (CheckOff co in CurItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList) - { - if (cmbCheckoff.SelectedItem == co.MenuItem) - { - if ((int)co.Index >= 100) indx = (int)co.Index; - break; - } - } - } + //if (CurItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF) + //{ + // // get index, if greater than 100, store that - otherwise store index down list. + // // if this format does not have ucf signoffs, indx is just the selected index from the combo mobx. + // foreach (CheckOff co in CurItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList) + // { + // if (cmbCheckoff.SelectedItem == co.MenuItem) + // { + // if ((int)co.Index >= 100) indx = (int)co.Index; + // break; + // } + // } + //} StepConfig sc = CurItemInfo.MyConfig as StepConfig; sc.Step_CheckOffIndex = indx; //using (Content cnt = Content.Get(CurItemInfo.MyContent.ContentID)) diff --git a/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj b/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj index ae6f5783..a6afdbca 100644 --- a/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj +++ b/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj @@ -218,12 +218,6 @@ dlgEnhMissingItem.cs - - Form - - - dlgUCFImportOptions.cs - UserControl @@ -479,9 +473,6 @@ dlgEnhMissingItem.cs - - dlgUCFImportOptions.cs - FindReplace.cs Designer diff --git a/PROMS/Volian.Controls.Library/dlgUCFImportOptions.Designer.cs b/PROMS/Volian.Controls.Library/dlgUCFImportOptions.Designer.cs deleted file mode 100644 index 9a850948..00000000 --- a/PROMS/Volian.Controls.Library/dlgUCFImportOptions.Designer.cs +++ /dev/null @@ -1,397 +0,0 @@ -namespace Volian.Controls.Library -{ - partial class dlgUCFImportOptions - { - /// - /// 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.btnOk = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - this.pnlOptions = new System.Windows.Forms.Panel(); - this.pnlChoices = new System.Windows.Forms.Panel(); - this.cmbFNames = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.grPnlLoad = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.grPnlUse = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.rbOnlyImported = new System.Windows.Forms.RadioButton(); - this.rbAll = new System.Windows.Forms.RadioButton(); - this.rbSetOnly = new System.Windows.Forms.RadioButton(); - this.cbUse = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.lblLoadFormat = new DevComponents.DotNetBar.LabelX(); - this.sBtnLoad = new DevComponents.DotNetBar.Controls.SwitchButton(); - this.lblFmt = new System.Windows.Forms.Label(); - this.pnlXmlDiff = new System.Windows.Forms.Panel(); - this.wbBrwsExisting = new System.Windows.Forms.WebBrowser(); - this.splitterWebBrowsers = new System.Windows.Forms.Splitter(); - this.pnlWbBrwsImp = new System.Windows.Forms.Panel(); - this.wbBrwsImporting = new System.Windows.Forms.WebBrowser(); - this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); - this.pnlChoices.SuspendLayout(); - this.grPnlLoad.SuspendLayout(); - this.grPnlUse.SuspendLayout(); - this.pnlXmlDiff.SuspendLayout(); - this.pnlWbBrwsImp.SuspendLayout(); - this.SuspendLayout(); - // - // btnOk - // - this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOk.Location = new System.Drawing.Point(31, 356); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(65, 23); - this.btnOk.TabIndex = 5; - this.btnOk.Text = "OK"; - this.btnOk.UseVisualStyleBackColor = true; - this.btnOk.Click += new System.EventHandler(this.btnOk_Click); - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(121, 356); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(65, 23); - this.btnCancel.TabIndex = 6; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // pnlOptions - // - this.pnlOptions.Location = new System.Drawing.Point(0, 0); - this.pnlOptions.Name = "pnlOptions"; - this.pnlOptions.Size = new System.Drawing.Size(200, 100); - this.pnlOptions.TabIndex = 0; - // - // pnlChoices - // - this.pnlChoices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pnlChoices.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlChoices.Controls.Add(this.cmbFNames); - this.pnlChoices.Controls.Add(this.grPnlLoad); - this.pnlChoices.Controls.Add(this.lblLoadFormat); - this.pnlChoices.Controls.Add(this.sBtnLoad); - this.pnlChoices.Controls.Add(this.lblFmt); - this.pnlChoices.Controls.Add(this.btnCancel); - this.pnlChoices.Controls.Add(this.btnOk); - this.pnlChoices.Location = new System.Drawing.Point(0, 0); - this.pnlChoices.Name = "pnlChoices"; - this.pnlChoices.Size = new System.Drawing.Size(250, 606); - this.pnlChoices.TabIndex = 7; - // - // cmbFNames - // - this.cmbFNames.DisplayMember = "Text"; - this.cmbFNames.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.cmbFNames.FormattingEnabled = true; - this.cmbFNames.ItemHeight = 16; - this.cmbFNames.Location = new System.Drawing.Point(26, 48); - this.cmbFNames.Name = "cmbFNames"; - this.cmbFNames.Size = new System.Drawing.Size(191, 22); - this.cmbFNames.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.cmbFNames.TabIndex = 15; - this.cmbFNames.SelectedIndexChanged += new System.EventHandler(this.cmbFNames_SelectedIndexChanged); - // - // grPnlLoad - // - this.grPnlLoad.CanvasColor = System.Drawing.SystemColors.Control; - this.grPnlLoad.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.grPnlLoad.Controls.Add(this.grPnlUse); - this.grPnlLoad.Controls.Add(this.cbUse); - this.grPnlLoad.DisabledBackColor = System.Drawing.Color.Empty; - this.grPnlLoad.Location = new System.Drawing.Point(11, 130); - this.grPnlLoad.Name = "grPnlLoad"; - this.grPnlLoad.Size = new System.Drawing.Size(224, 184); - // - // - // - this.grPnlLoad.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.grPnlLoad.Style.BackColorGradientAngle = 90; - this.grPnlLoad.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.grPnlLoad.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlLoad.Style.BorderBottomWidth = 1; - this.grPnlLoad.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.grPnlLoad.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlLoad.Style.BorderLeftWidth = 1; - this.grPnlLoad.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlLoad.Style.BorderRightWidth = 1; - this.grPnlLoad.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlLoad.Style.BorderTopWidth = 1; - this.grPnlLoad.Style.CornerDiameter = 4; - this.grPnlLoad.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.grPnlLoad.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.grPnlLoad.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.grPnlLoad.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.grPnlLoad.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.grPnlLoad.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.grPnlLoad.TabIndex = 14; - this.grPnlLoad.Text = "Load Options"; - // - // grPnlUse - // - this.grPnlUse.BackColor = System.Drawing.Color.Transparent; - this.grPnlUse.CanvasColor = System.Drawing.SystemColors.Control; - this.grPnlUse.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.grPnlUse.Controls.Add(this.rbOnlyImported); - this.grPnlUse.Controls.Add(this.rbAll); - this.grPnlUse.Controls.Add(this.rbSetOnly); - this.grPnlUse.DisabledBackColor = System.Drawing.Color.Empty; - this.grPnlUse.Location = new System.Drawing.Point(15, 39); - this.grPnlUse.Name = "grPnlUse"; - this.grPnlUse.Size = new System.Drawing.Size(181, 119); - // - // - // - this.grPnlUse.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.grPnlUse.Style.BackColorGradientAngle = 90; - this.grPnlUse.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.grPnlUse.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlUse.Style.BorderBottomWidth = 1; - this.grPnlUse.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.grPnlUse.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlUse.Style.BorderLeftWidth = 1; - this.grPnlUse.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlUse.Style.BorderRightWidth = 1; - this.grPnlUse.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.grPnlUse.Style.BorderTopWidth = 1; - this.grPnlUse.Style.CornerDiameter = 4; - this.grPnlUse.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.grPnlUse.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.grPnlUse.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.grPnlUse.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.grPnlUse.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.grPnlUse.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.grPnlUse.TabIndex = 1; - this.grPnlUse.Text = "In Procedure(s)"; - // - // rbOnlyImported - // - this.rbOnlyImported.AutoSize = true; - this.rbOnlyImported.BackColor = System.Drawing.Color.Transparent; - this.rbOnlyImported.Location = new System.Drawing.Point(12, 6); - this.rbOnlyImported.Name = "rbOnlyImported"; - this.rbOnlyImported.Size = new System.Drawing.Size(142, 21); - this.superTooltip1.SetSuperTooltip(this.rbOnlyImported, new DevComponents.DotNetBar.SuperTooltipInfo("For Imported Only", "", "The changed UCF will only be used by the procedure(s) that are being imported.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); - this.rbOnlyImported.TabIndex = 5; - this.rbOnlyImported.TabStop = true; - this.rbOnlyImported.Text = "For Imported Only"; - this.rbOnlyImported.UseVisualStyleBackColor = false; - // - // rbAll - // - this.rbAll.AutoSize = true; - this.rbAll.BackColor = System.Drawing.Color.Transparent; - this.rbAll.Location = new System.Drawing.Point(12, 33); - this.rbAll.Name = "rbAll"; - this.rbAll.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.rbAll.Size = new System.Drawing.Size(69, 21); - this.superTooltip1.SetSuperTooltip(this.rbAll, new DevComponents.DotNetBar.SuperTooltipInfo("For All ", "", "The changed UCF will be used in all procedure(s) and section(s) within the databa" + - "se that referenced this UCF. The one that existed in the database will be renam" + - "ed to \'Old N of UCFname\'.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); - this.rbAll.TabIndex = 6; - this.rbAll.TabStop = true; - this.rbAll.Text = "For All"; - this.rbAll.UseVisualStyleBackColor = false; - // - // rbSetOnly - // - this.rbSetOnly.AutoSize = true; - this.rbSetOnly.BackColor = System.Drawing.Color.Transparent; - this.rbSetOnly.Location = new System.Drawing.Point(12, 60); - this.rbSetOnly.Name = "rbSetOnly"; - this.rbSetOnly.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.rbSetOnly.Size = new System.Drawing.Size(108, 21); - this.superTooltip1.SetSuperTooltip(this.rbSetOnly, new DevComponents.DotNetBar.SuperTooltipInfo("For Set Only", "", "The changed UCF will only be used by the procedure(s)/sections(s) within the proc" + - "edure set that this procedure belongs.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); - this.rbSetOnly.TabIndex = 7; - this.rbSetOnly.TabStop = true; - this.rbSetOnly.Text = "For Set Only"; - this.rbSetOnly.UseVisualStyleBackColor = false; - // - // cbUse - // - this.cbUse.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbUse.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbUse.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbUse.Location = new System.Drawing.Point(17, 5); - this.cbUse.Name = "cbUse"; - this.cbUse.Size = new System.Drawing.Size(125, 28); - this.cbUse.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.cbUse, new DevComponents.DotNetBar.SuperTooltipInfo("Use", "", "If checked, the changes will be used as defined In Procedure(s) below. Otherwise," + - " the format is loaded but not used. ", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); - this.cbUse.TabIndex = 0; - this.cbUse.Text = "Use"; - this.cbUse.CheckedChanged += new System.EventHandler(this.cbUse_CheckedChanged); - // - // lblLoadFormat - // - // - // - // - this.lblLoadFormat.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.lblLoadFormat.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblLoadFormat.Location = new System.Drawing.Point(124, 89); - this.lblLoadFormat.Name = "lblLoadFormat"; - this.lblLoadFormat.Size = new System.Drawing.Size(94, 24); - this.superTooltip1.SetSuperTooltip(this.lblLoadFormat, new DevComponents.DotNetBar.SuperTooltipInfo("Load Format", "", "The User Control of Format changes will be loaded (imported) into the database. O" + - "therwise it will be ignored and the existing User Control of Format will be used" + - ".", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); - this.lblLoadFormat.TabIndex = 13; - this.lblLoadFormat.Text = "Load Format"; - // - // sBtnLoad - // - this.sBtnLoad.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.sBtnLoad.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.sBtnLoad.Location = new System.Drawing.Point(13, 88); - this.sBtnLoad.Name = "sBtnLoad"; - this.sBtnLoad.Size = new System.Drawing.Size(102, 26); - this.sBtnLoad.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.sBtnLoad.TabIndex = 12; - this.sBtnLoad.ValueChanged += new System.EventHandler(this.sBtnLoad_ValueChanged); - // - // lblFmt - // - this.lblFmt.AutoSize = true; - this.lblFmt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblFmt.Location = new System.Drawing.Point(16, 19); - this.lblFmt.Name = "lblFmt"; - this.lblFmt.Size = new System.Drawing.Size(140, 18); - this.lblFmt.TabIndex = 8; - this.lblFmt.Text = "Changes to Format:"; - // - // pnlXmlDiff - // - this.pnlXmlDiff.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlXmlDiff.Controls.Add(this.wbBrwsExisting); - this.pnlXmlDiff.Controls.Add(this.splitterWebBrowsers); - this.pnlXmlDiff.Controls.Add(this.pnlWbBrwsImp); - this.pnlXmlDiff.Location = new System.Drawing.Point(255, 0); - this.pnlXmlDiff.Name = "pnlXmlDiff"; - this.pnlXmlDiff.Size = new System.Drawing.Size(548, 601); - this.pnlXmlDiff.TabIndex = 8; - // - // wbBrwsExisting - // - this.wbBrwsExisting.Dock = System.Windows.Forms.DockStyle.Fill; - this.wbBrwsExisting.Location = new System.Drawing.Point(0, 0); - this.wbBrwsExisting.MinimumSize = new System.Drawing.Size(20, 20); - this.wbBrwsExisting.Name = "wbBrwsExisting"; - this.wbBrwsExisting.Size = new System.Drawing.Size(548, 298); - this.wbBrwsExisting.TabIndex = 0; - // - // splitterWebBrowsers - // - this.splitterWebBrowsers.Dock = System.Windows.Forms.DockStyle.Bottom; - this.splitterWebBrowsers.Location = new System.Drawing.Point(0, 298); - this.splitterWebBrowsers.Name = "splitterWebBrowsers"; - this.splitterWebBrowsers.Size = new System.Drawing.Size(548, 3); - this.splitterWebBrowsers.TabIndex = 2; - this.splitterWebBrowsers.TabStop = false; - // - // pnlWbBrwsImp - // - this.pnlWbBrwsImp.Controls.Add(this.wbBrwsImporting); - this.pnlWbBrwsImp.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlWbBrwsImp.Location = new System.Drawing.Point(0, 301); - this.pnlWbBrwsImp.Name = "panel1"; - this.pnlWbBrwsImp.Size = new System.Drawing.Size(548, 300); - this.pnlWbBrwsImp.TabIndex = 3; - // - // wbBrwsImporting - // - this.wbBrwsImporting.Dock = System.Windows.Forms.DockStyle.Fill; - this.wbBrwsImporting.Location = new System.Drawing.Point(0, 0); - this.wbBrwsImporting.MinimumSize = new System.Drawing.Size(20, 20); - this.wbBrwsImporting.Name = "wbBrwsImporting"; - this.wbBrwsImporting.Size = new System.Drawing.Size(548, 300); - this.wbBrwsImporting.TabIndex = 0; - // - // superTooltip1 - // - this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray); - this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; - // - // dlgUCFImportOptions - // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(803, 606); - this.Controls.Add(this.pnlXmlDiff); - this.Controls.Add(this.pnlChoices); - this.Name = "dlgUCFImportOptions"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "User Control Of Format - Import Options"; - this.pnlChoices.ResumeLayout(false); - this.pnlChoices.PerformLayout(); - this.grPnlLoad.ResumeLayout(false); - this.grPnlUse.ResumeLayout(false); - this.grPnlUse.PerformLayout(); - this.pnlXmlDiff.ResumeLayout(false); - this.pnlWbBrwsImp.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Button btnOk; - private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.Panel pnlOptions; - private System.Windows.Forms.Panel pnlXmlDiff; - private System.Windows.Forms.WebBrowser wbBrwsExisting; - private System.Windows.Forms.Panel pnlChoices; - private System.Windows.Forms.Label lblFmt; - private DevComponents.DotNetBar.LabelX lblLoadFormat; - private DevComponents.DotNetBar.Controls.SwitchButton sBtnLoad; - private DevComponents.DotNetBar.Controls.GroupPanel grPnlLoad; - private DevComponents.DotNetBar.Controls.GroupPanel grPnlUse; - private DevComponents.DotNetBar.Controls.CheckBoxX cbUse; - private System.Windows.Forms.RadioButton rbOnlyImported; - private System.Windows.Forms.RadioButton rbAll; - private System.Windows.Forms.RadioButton rbSetOnly; - private DevComponents.DotNetBar.SuperTooltip superTooltip1; - private DevComponents.DotNetBar.Controls.ComboBoxEx cmbFNames; - private System.Windows.Forms.Splitter splitterWebBrowsers; - private System.Windows.Forms.Panel pnlWbBrwsImp; - private System.Windows.Forms.WebBrowser wbBrwsImporting; - } -} \ No newline at end of file diff --git a/PROMS/Volian.Controls.Library/dlgUCFImportOptions.cs b/PROMS/Volian.Controls.Library/dlgUCFImportOptions.cs deleted file mode 100644 index 8b411f48..00000000 --- a/PROMS/Volian.Controls.Library/dlgUCFImportOptions.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Xml; -using System.Xml.Linq; -using System.Xml.Xsl; -using System.IO; -using VEPROMS.CSLA.Library; - -namespace Volian.Controls.Library -{ - // This dialog is used when the imported UCF is different than one existing in the database. It allows the user to - // select whether to overwrite, copy, etc. See the user interface project/dlgExportImport.cs for the options. - public partial class dlgUCFImportOptions : Form - { - ListExistingFC; - ListImportedFC; - private bool _Initializing = false; - public E_UCFImportOptions UCFImportOptionsCase = E_UCFImportOptions.LoadOnlyImported; - public dlgUCFImportOptions(List name, List existingFC, List importedFC, E_UCFImportOptions defImpOpt, string xmlpath) - { - _Initializing = true; - InitializeComponent(); - InitializeFNamesCombo(name); - ExistingFC = existingFC; - ImportedFC = importedFC; - cmbFNames.SelectedIndex = 0; // this displays the web browser differences for first name in the combo box. - - // initialize the import of UCF option radio buttons: - UCFImportOptionsCase = defImpOpt; - rbSetOnly.Visible = !xmlpath.ToLower().Contains("folder"); - if (defImpOpt == E_UCFImportOptions.Ignore) - { - sBtnLoad.Value = false; - grPnlLoad.Enabled = false; - grPnlUse.Enabled = false; - } - else if (defImpOpt == E_UCFImportOptions.LoadNotUsed) - { - sBtnLoad.Value = true; - grPnlLoad.Enabled = true; - cbUse.Checked = false; - grPnlUse.Enabled = false; - } - else if (defImpOpt == E_UCFImportOptions.LoadOnlyImported) - { - sBtnLoad.Value = true; - grPnlLoad.Enabled = true; - cbUse.Checked = true; - grPnlUse.Enabled = true; - rbOnlyImported.Checked = true; - } - else if (defImpOpt == E_UCFImportOptions.LoadUseAll) - { - sBtnLoad.Value = true; - grPnlLoad.Enabled = true; - cbUse.Checked = true; - grPnlUse.Enabled = true; - rbAll.Checked = true; - } - else if (defImpOpt == E_UCFImportOptions.LoadForSetOnly) - { - sBtnLoad.Value = true; - grPnlLoad.Enabled = true; - cbUse.Checked = true; - grPnlUse.Enabled = true; - rbSetOnly.Checked = true; - } - _Initializing = false; - return; - } - - private void InitializeFNamesCombo(List name) - { - foreach (string str in name) - cmbFNames.Items.Add(str); - } - - private void DisplayXmlDiff(string existingFC, string importedFC) - { - XmlDocument xd = new XmlDocument(); - xd.LoadXml(existingFC); - XmlNodeList xnl = xd.GetElementsByTagName("FormatConfig"); - if (xnl != null && xnl.Count > 0) AddAttribute(xnl[0], "Version", "Existing"); - string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFImpDetails.xsl"); - StringWriter sw = new StringWriter(); - StringWriter xsw = new StringWriter(); - using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary))) - { - XmlTextWriter tx = new XmlTextWriter(xsw); - xd.WriteTo(tx); - string tmp = sw.ToString(); - tmp = xd.InnerXml; - using (XmlReader xri = XmlReader.Create(new StringReader(tmp))) - { - using (XmlWriter xwo = XmlWriter.Create(sw)) - { - XslCompiledTransform xsl = new XslCompiledTransform(); - xsl.Load(xrt); - xsl.Transform(xri, xwo); // Perform Transform - } - wbBrwsExisting.DocumentText = sw.ToString(); - } - } - StringWriter sw1 = new StringWriter(); - StringWriter xsw1 = new StringWriter(); - XmlDocument xd1 = new XmlDocument(); - xd1.LoadXml(importedFC); - xnl = xd1.GetElementsByTagName("FormatConfig"); - if (xnl != null && xnl.Count > 0) AddAttribute(xnl[0], "Version", "Importing"); - using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary))) - { - XmlTextWriter tx = new XmlTextWriter(xsw1); - xd1.WriteTo(tx); - string tmp = xd1.InnerXml; - using (XmlReader xri = XmlReader.Create(new StringReader(tmp))) - { - using (XmlWriter xwo = XmlWriter.Create(sw1)) - { - XslCompiledTransform xsl = new XslCompiledTransform(); - xsl.Load(xrt); - xsl.Transform(xri, xwo); // Perform Transform - } - wbBrwsImporting.DocumentText = sw1.ToString(); - } - } - } - - private void AddAttribute(XmlNode xn, string name, string value) - { - XmlAttribute xa = xn.OwnerDocument.CreateAttribute(name); - xa.Value = value.ToString(); - xn.Attributes.Append(xa); - } - private void btnOk_Click(object sender, EventArgs e) - { - if (!sBtnLoad.Value) UCFImportOptionsCase = E_UCFImportOptions.Ignore; - else if (!cbUse.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadNotUsed; - else if (rbOnlyImported.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadOnlyImported; - else if (rbAll.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadUseAll; - else if (rbSetOnly.Checked) UCFImportOptionsCase = E_UCFImportOptions.LoadForSetOnly; - this.Close(); - } - - private void sBtnLoad_ValueChanged(object sender, EventArgs e) // Import options for UCF Change: Load switch button - { - if (_Initializing) return; - if (sBtnLoad.Value) - { - grPnlLoad.Enabled = true; // Import the ucf change. let user select whether to use it. - grPnlUse.Enabled = false; - cbUse.Checked = false; - } - else - { - grPnlLoad.Enabled = false; // Don't import the ucf change. - grPnlUse.Enabled = false; - } - } - - private void cbUse_CheckedChanged(object sender, EventArgs e) // Import options for UCF Change: use checkbox - { - if (_Initializing) return; - if (cbUse.Checked) - grPnlUse.Enabled = true; // Use the change. enable the load group & select for imported only - else - grPnlUse.Enabled = false; // Don't use the change. - } - - private void cmbFNames_SelectedIndexChanged(object sender, EventArgs e) - { - int indx = cmbFNames.SelectedIndex; - string existingFC = ExistingFC[indx]; - string importedFC = ImportedFC[indx]; - DisplayXmlDiff(existingFC, importedFC); - } - } -} diff --git a/PROMS/Volian.Controls.Library/dlgUCFImportOptions.resx b/PROMS/Volian.Controls.Library/dlgUCFImportOptions.resx deleted file mode 100644 index 2e5faf21..00000000 --- a/PROMS/Volian.Controls.Library/dlgUCFImportOptions.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - 17, 17 - - - True - - \ No newline at end of file diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 68a13f7a..deb8468c 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -5215,7 +5215,7 @@ namespace Volian.Print.Library // First see if there is any checkoff data in the format file and that there // is a pagelist item for the checkoff header. - int maxindx = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF ? itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; + int maxindx = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; if (maxindx <= 0) return; if (MyPageHelper.PageListCheckOffHeader == null) return;