Compare commits

..

3 Commits

104 changed files with 2098 additions and 3292 deletions

View File

@@ -32,7 +32,7 @@ namespace AdjustBuildRevision
{
// Allow for setting build revision on either proms or the roeditor:
if (Directory.GetCurrentDirectory().ToUpper().Contains("REFOBJ"))
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.4.yyMM.dHH") + "\")");
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")");
else
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")");
// if (outline != line)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -59,7 +59,7 @@
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -85,7 +85,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -93,7 +92,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -104,7 +103,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -7,7 +7,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -71,7 +71,7 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -96,7 +96,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -104,7 +103,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -35,7 +35,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -45,14 +44,13 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -61,7 +59,7 @@
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -409,7 +409,7 @@ namespace RODBInterface
GetDbServerInfo(ropath);
if (!dbProviderType.Equals((int)DB_PROVIDER.SQL_SERVER))
{
strDatabaseConnectionCommand = "Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
strDatabaseConnectionCommand = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
}
}
#endregion

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -173,17 +171,6 @@
<Name>VlnStatus</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Interop.Access.Dao">
<Guid>{4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28}</Guid>
<VersionMajor>12</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE;Upgrade2005;</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -77,7 +77,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -102,7 +101,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -110,7 +108,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -121,7 +119,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -7,7 +7,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -73,7 +73,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -98,7 +97,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -106,7 +104,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -62,7 +62,6 @@
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
@@ -87,7 +86,6 @@
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@@ -95,7 +93,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseAddress>285212672</BaseAddress>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@@ -106,7 +104,7 @@
<Optimize>true</Optimize>
<DebugType>
</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

View File

@@ -229,7 +229,7 @@ namespace RoAccessToSql
if (sqlConnection.State == ConnectionState.Open)
{
// now try to open access db:
string strDatabaseConnectionCommand = "Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source=" + MSAccessPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
string strDatabaseConnectionCommand = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=" + MSAccessPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
using (OleDbConnection accessConnection = new OleDbConnection(strDatabaseConnectionCommand))
{
try

View File

@@ -100,17 +100,6 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Interop.Access.Dao">
<Guid>{4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28}</Guid>
<VersionMajor>12</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -1099,9 +1099,7 @@ namespace VEPROMS
(int)changeBarData.FixedChangeColumn :
System.Convert.ToInt32(changeBarData.DefaultCBLoc.Split(" ,".ToCharArray())[System.Convert.ToInt32(cbd.MyChangeBarLoc)]);
//cbd.MyChangeBarColumn = (int)changeBarData.FixedChangeColumn;
if (cbd.MyChangeBarText == PrintChangeBarText.UserDef && !string.IsNullOrEmpty(ppTxbxChangeBarUserMsgOne.Text))
cbd.MyChangeBarMessage = ppTxbxChangeBarUserMsgOne.Text + @"\n" + ppTxbxChangeBarUserMsgTwo.Text;
else if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
if (cbd.MyChangeBarText == PrintChangeBarText.UserDef)
cbd.MyChangeBarMessage = _DocVersionConfig.Print_UserCBMess1 + @"\n" + _DocVersionConfig.Print_UserCBMess2;
}

View File

@@ -1643,11 +1643,7 @@ Begin
Select Cast(i.LastChanged as varbinary(8)) as 'ILastChanged',
i.ItemID as 'ItemID',
zi.VersionID as 'VersionID',
CASE WHEN c.[Type] % 20000 = 6 THEN REPLACE(zi.PPath,'Note','Caution')
WHEN c.[Type] % 20000 = 7 THEN REPLACE(zi.PPath,'Caution','Note')
ELSE zi.PPath
END
+
zi.PPath +
Case (c.[Type]/10000)
When 0 Then @Delim + @UnitPrefix + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Procedure
When 1 Then @Delim + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Section
@@ -24566,8 +24562,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '02/06/2026 1:00 PM'
set @RevDescription = 'Updated Search Tool to better handle Cautions and Notes at the same level'
set @RevDate = '01/19/2026 2:40 PM'
set @RevDescription = 'Sync tree list Sort order between in RO Editor and PROMS'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription

View File

@@ -13,8 +13,6 @@ using System.Text.RegularExpressions;
using System.Globalization;
using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms;
using Volian.Controls.Library;
using System.Linq;
namespace VEPROMS
{
@@ -1323,26 +1321,6 @@ namespace VEPROMS
// Clear the change bar override for this procedure:
pi.ClearChangeBarOverrides();
//B2019-140 Change bars do not get refreshed when approval is run.
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
if (dti != null)
{
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus();
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
//since in a separate form, need to update the tree view
//so "Showing Change Bars" Content Menu Item is correct
MyFrmVEPROMS.RefreshProcedureNode(newproc);
}
else
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);

View File

@@ -28,416 +28,328 @@ namespace VEPROMS
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tcSecurity = new System.Windows.Forms.TabControl();
this.tpManageFolders = new System.Windows.Forms.TabPage();
this.label6 = new System.Windows.Forms.Label();
this.tvFolders = new System.Windows.Forms.TreeView();
this.cmFolders = new System.Windows.Forms.ContextMenuStrip(this.components);
this.createSetAdministratorGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createWriterGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createROEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createReviewerGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tpManageGroups = new System.Windows.Forms.TabPage();
this.btnAddMember = new System.Windows.Forms.Button();
this.btnRemoveMember = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.lbNonMembers = new System.Windows.Forms.Label();
this.btnDeleteGroup = new System.Windows.Forms.Button();
this.cbGroupSelection = new System.Windows.Forms.ComboBox();
this.lstNonMembers = new System.Windows.Forms.ListBox();
this.pnlMembers = new System.Windows.Forms.Panel();
this.lstMembers = new System.Windows.Forms.ListBox();
this.lblMembers = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.tpManageUsers = new System.Windows.Forms.TabPage();
this.lblUserGroups = new System.Windows.Forms.Label();
this.lstGroups = new System.Windows.Forms.ListBox();
this.lstUsers = new System.Windows.Forms.ListBox();
this.lblUsers = new System.Windows.Forms.Label();
this.tpDefault = new System.Windows.Forms.TabPage();
this.label8 = new System.Windows.Forms.Label();
this.pnlGroups = new System.Windows.Forms.Panel();
this.cmMembers = new System.Windows.Forms.ContextMenuStrip(this.components);
this.removeMemberToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cmUsers = new System.Windows.Forms.ContextMenuStrip(this.components);
this.addUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tt = new System.Windows.Forms.ToolTip(this.components);
this.tcSecurity.SuspendLayout();
this.tpManageFolders.SuspendLayout();
this.cmFolders.SuspendLayout();
this.tpManageGroups.SuspendLayout();
this.pnlMembers.SuspendLayout();
this.tpManageUsers.SuspendLayout();
this.tpDefault.SuspendLayout();
this.cmUsers.SuspendLayout();
this.SuspendLayout();
//
// tcSecurity
//
this.tcSecurity.Controls.Add(this.tpManageFolders);
this.tcSecurity.Controls.Add(this.tpManageGroups);
this.tcSecurity.Controls.Add(this.tpManageUsers);
this.tcSecurity.Controls.Add(this.tpDefault);
this.tcSecurity.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcSecurity.Location = new System.Drawing.Point(0, 0);
this.tcSecurity.Name = "tcSecurity";
this.tcSecurity.SelectedIndex = 0;
this.tcSecurity.Size = new System.Drawing.Size(784, 564);
this.tcSecurity.TabIndex = 0;
this.tcSecurity.SelectedIndexChanged += new System.EventHandler(this.changedTab);
//
// tpManageFolders
//
this.tpManageFolders.BackColor = System.Drawing.SystemColors.ButtonFace;
this.tpManageFolders.Controls.Add(this.label6);
this.tpManageFolders.Controls.Add(this.tvFolders);
this.tpManageFolders.Location = new System.Drawing.Point(4, 22);
this.tpManageFolders.Name = "tpManageFolders";
this.tpManageFolders.Padding = new System.Windows.Forms.Padding(3);
this.tpManageFolders.Size = new System.Drawing.Size(776, 538);
this.tpManageFolders.TabIndex = 2;
this.tpManageFolders.Text = "Manage Folders / Add Groups";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(8, 5);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(55, 15);
this.label6.TabIndex = 7;
this.label6.Text = "Folders";
//
// tvFolders
//
this.tvFolders.ContextMenuStrip = this.cmFolders;
this.tvFolders.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tvFolders.HideSelection = false;
this.tvFolders.Location = new System.Drawing.Point(3, 32);
this.tvFolders.Name = "tvFolders";
this.tvFolders.Size = new System.Drawing.Size(770, 503);
this.tvFolders.TabIndex = 6;
this.tvFolders.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvFolders_NodeMouseClick);
//
// cmFolders
//
this.cmFolders.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.components = new System.ComponentModel.Container();
this.tcSecurity = new System.Windows.Forms.TabControl();
this.tpGroupUsers = new System.Windows.Forms.TabPage();
this.pnlMembers = new System.Windows.Forms.Panel();
this.lstMembers = new System.Windows.Forms.ListBox();
this.lblMembers = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.tvFolders = new System.Windows.Forms.TreeView();
this.cmFolders = new System.Windows.Forms.ContextMenuStrip(this.components);
this.createSetAdministratorGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createWriterGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createROEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.createReviewerGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lstUsers = new System.Windows.Forms.ListBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lstGroups = new System.Windows.Forms.ListBox();
this.tpDefault = new System.Windows.Forms.TabPage();
this.label8 = new System.Windows.Forms.Label();
this.pnlGroups = new System.Windows.Forms.Panel();
this.cmMembers = new System.Windows.Forms.ContextMenuStrip(this.components);
this.removeMemberToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cmUsers = new System.Windows.Forms.ContextMenuStrip(this.components);
this.addUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addMemberToolStripMenuItemUser = new System.Windows.Forms.ToolStripMenuItem();
this.cmGroups = new System.Windows.Forms.ContextMenuStrip(this.components);
this.deleteGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addMemberToolStripMenuItemGroup = new System.Windows.Forms.ToolStripMenuItem();
this.tcSecurity.SuspendLayout();
this.tpGroupUsers.SuspendLayout();
this.pnlMembers.SuspendLayout();
this.cmFolders.SuspendLayout();
this.tpDefault.SuspendLayout();
this.cmMembers.SuspendLayout();
this.cmUsers.SuspendLayout();
this.cmGroups.SuspendLayout();
this.SuspendLayout();
//
// tcSecurity
//
this.tcSecurity.Controls.Add(this.tpGroupUsers);
this.tcSecurity.Controls.Add(this.tpDefault);
this.tcSecurity.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcSecurity.Location = new System.Drawing.Point(0, 0);
this.tcSecurity.Name = "tcSecurity";
this.tcSecurity.SelectedIndex = 0;
this.tcSecurity.Size = new System.Drawing.Size(784, 564);
this.tcSecurity.TabIndex = 0;
//
// tpGroupUsers
//
this.tpGroupUsers.BackColor = System.Drawing.SystemColors.ButtonFace;
this.tpGroupUsers.Controls.Add(this.pnlMembers);
this.tpGroupUsers.Controls.Add(this.label6);
this.tpGroupUsers.Controls.Add(this.tvFolders);
this.tpGroupUsers.Controls.Add(this.lstUsers);
this.tpGroupUsers.Controls.Add(this.label5);
this.tpGroupUsers.Controls.Add(this.label3);
this.tpGroupUsers.Controls.Add(this.lstGroups);
this.tpGroupUsers.Location = new System.Drawing.Point(4, 22);
this.tpGroupUsers.Name = "tpGroupUsers";
this.tpGroupUsers.Padding = new System.Windows.Forms.Padding(3);
this.tpGroupUsers.Size = new System.Drawing.Size(776, 538);
this.tpGroupUsers.TabIndex = 2;
this.tpGroupUsers.Text = "Folders, Groups and Users";
//
// pnlMembers
//
this.pnlMembers.Controls.Add(this.lstMembers);
this.pnlMembers.Controls.Add(this.lblMembers);
this.pnlMembers.Location = new System.Drawing.Point(384, 304);
this.pnlMembers.Name = "pnlMembers";
this.pnlMembers.Size = new System.Drawing.Size(386, 232);
this.pnlMembers.TabIndex = 12;
//
// lstMembers
//
this.lstMembers.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstMembers.FormattingEnabled = true;
this.lstMembers.Location = new System.Drawing.Point(0, 19);
this.lstMembers.Name = "lstMembers";
this.lstMembers.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstMembers.Size = new System.Drawing.Size(386, 212);
this.lstMembers.TabIndex = 10;
this.lstMembers.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstMembers_MouseUp);
//
// lblMembers
//
this.lblMembers.Dock = System.Windows.Forms.DockStyle.Top;
this.lblMembers.Location = new System.Drawing.Point(0, 0);
this.lblMembers.Name = "lblMembers";
this.lblMembers.Size = new System.Drawing.Size(386, 19);
this.lblMembers.TabIndex = 2;
this.lblMembers.Text = "Members";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(8, 5);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 13);
this.label6.TabIndex = 7;
this.label6.Text = "Folders";
//
// tvFolders
//
this.tvFolders.ContextMenuStrip = this.cmFolders;
this.tvFolders.HideSelection = false;
this.tvFolders.Location = new System.Drawing.Point(8, 21);
this.tvFolders.Name = "tvFolders";
this.tvFolders.Size = new System.Drawing.Size(370, 511);
this.tvFolders.TabIndex = 6;
this.tvFolders.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tvFolders_NodeMouseClick);
//
// cmFolders
//
this.cmFolders.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.createSetAdministratorGroupToolStripMenuItem,
this.createWriterGroupToolStripMenuItem,
this.createROEToolStripMenuItem,
this.createReviewerGroupToolStripMenuItem});
this.cmFolders.Name = "cmFolders";
this.cmFolders.Size = new System.Drawing.Size(249, 92);
//
// createSetAdministratorGroupToolStripMenuItem
//
this.createSetAdministratorGroupToolStripMenuItem.Name = "createSetAdministratorGroupToolStripMenuItem";
this.createSetAdministratorGroupToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createSetAdministratorGroupToolStripMenuItem.Text = "Create a Set Administrator Group";
this.createSetAdministratorGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// createWriterGroupToolStripMenuItem
//
this.createWriterGroupToolStripMenuItem.Name = "createWriterGroupToolStripMenuItem";
this.createWriterGroupToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createWriterGroupToolStripMenuItem.Text = "Create a Writer Group";
this.createWriterGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// createROEToolStripMenuItem
//
this.createROEToolStripMenuItem.Name = "createROEToolStripMenuItem";
this.createROEToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createROEToolStripMenuItem.Text = "Create a RO Editor Group";
this.createROEToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// createReviewerGroupToolStripMenuItem
//
this.createReviewerGroupToolStripMenuItem.Name = "createReviewerGroupToolStripMenuItem";
this.createReviewerGroupToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createReviewerGroupToolStripMenuItem.Text = "Create a Reviewer Group";
this.createReviewerGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// tpManageGroups
//
this.tpManageGroups.Controls.Add(this.btnAddMember);
this.tpManageGroups.Controls.Add(this.btnRemoveMember);
this.tpManageGroups.Controls.Add(this.label1);
this.tpManageGroups.Controls.Add(this.lbNonMembers);
this.tpManageGroups.Controls.Add(this.btnDeleteGroup);
this.tpManageGroups.Controls.Add(this.cbGroupSelection);
this.tpManageGroups.Controls.Add(this.lstNonMembers);
this.tpManageGroups.Controls.Add(this.pnlMembers);
this.tpManageGroups.Controls.Add(this.label3);
this.tpManageGroups.Location = new System.Drawing.Point(4, 22);
this.tpManageGroups.Name = "tpManageGroups";
this.tpManageGroups.Padding = new System.Windows.Forms.Padding(3);
this.tpManageGroups.Size = new System.Drawing.Size(776, 538);
this.tpManageGroups.TabIndex = 3;
this.tpManageGroups.Text = "Manage Groups";
this.tpManageGroups.UseVisualStyleBackColor = true;
//
// btnAddMember
//
this.btnAddMember.Location = new System.Drawing.Point(337, 190);
this.btnAddMember.Name = "btnAddMember";
this.btnAddMember.Size = new System.Drawing.Size(36, 29);
this.btnAddMember.TabIndex = 19;
this.btnAddMember.Text = "<<";
this.tt.SetToolTip(this.btnAddMember, "Add User as Members of Group");
this.btnAddMember.UseVisualStyleBackColor = true;
this.btnAddMember.Click += new System.EventHandler(this.addMember_Click);
//
// btnRemoveMember
//
this.btnRemoveMember.Location = new System.Drawing.Point(337, 254);
this.btnRemoveMember.Name = "btnRemoveMember";
this.btnRemoveMember.Size = new System.Drawing.Size(36, 29);
this.btnRemoveMember.TabIndex = 18;
this.btnRemoveMember.Text = ">>";
this.tt.SetToolTip(this.btnRemoveMember, "Remove User From Group");
this.btnRemoveMember.UseVisualStyleBackColor = true;
this.btnRemoveMember.Click += new System.EventHandler(this.removeMember_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(386, 42);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(97, 15);
this.label1.TabIndex = 17;
this.label1.Text = "Non Members";
//
// lbNonMembers
//
this.lbNonMembers.AutoSize = true;
this.lbNonMembers.Location = new System.Drawing.Point(386, 42);
this.lbNonMembers.Name = "lbNonMembers";
this.lbNonMembers.Size = new System.Drawing.Size(73, 13);
this.lbNonMembers.TabIndex = 17;
this.lbNonMembers.Text = "Non Members";
//
// btnDeleteGroup
//
this.btnDeleteGroup.ForeColor = System.Drawing.Color.Red;
this.btnDeleteGroup.Location = new System.Drawing.Point(668, 12);
this.btnDeleteGroup.Name = "btnDeleteGroup";
this.btnDeleteGroup.Size = new System.Drawing.Size(89, 23);
this.btnDeleteGroup.TabIndex = 16;
this.btnDeleteGroup.Text = "Delete Group";
this.btnDeleteGroup.UseVisualStyleBackColor = true;
this.btnDeleteGroup.Click += new System.EventHandler(this.deleteGroup_Click);
//
// cbGroupSelection
//
this.cbGroupSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbGroupSelection.FormattingEnabled = true;
this.cbGroupSelection.Location = new System.Drawing.Point(50, 9);
this.cbGroupSelection.Name = "cbGroupSelection";
this.cbGroupSelection.Size = new System.Drawing.Size(272, 21);
this.cbGroupSelection.TabIndex = 15;
this.cbGroupSelection.SelectedIndexChanged += new System.EventHandler(this.cbGroupSelection_SelectedIndexChanged);
//
// lstNonMembers
//
this.lstNonMembers.FormattingEnabled = true;
this.lstNonMembers.Location = new System.Drawing.Point(389, 61);
this.lstNonMembers.Name = "lstNonMembers";
this.lstNonMembers.Size = new System.Drawing.Size(316, 472);
this.lstNonMembers.TabIndex = 14;
//
// pnlMembers
//
this.pnlMembers.Controls.Add(this.lstMembers);
this.pnlMembers.Controls.Add(this.lblMembers);
this.pnlMembers.Location = new System.Drawing.Point(6, 42);
this.pnlMembers.Name = "pnlMembers";
this.pnlMembers.Size = new System.Drawing.Size(316, 493);
this.pnlMembers.TabIndex = 13;
//
// lstMembers
//
this.lstMembers.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstMembers.FormattingEnabled = true;
this.lstMembers.Location = new System.Drawing.Point(0, 19);
this.lstMembers.Name = "lstMembers";
this.lstMembers.Size = new System.Drawing.Size(316, 474);
this.lstMembers.TabIndex = 10;
//
// lblMembers
//
this.lblMembers.Dock = System.Windows.Forms.DockStyle.Top;
this.lblMembers.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblMembers.Location = new System.Drawing.Point(0, 0);
this.lblMembers.Name = "lblMembers";
this.lblMembers.Size = new System.Drawing.Size(316, 19);
this.lblMembers.TabIndex = 2;
this.lblMembers.Text = "Selected Group Users";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 12);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(39, 13);
this.label3.TabIndex = 3;
this.label3.Text = "Group:";
//
// tpManageUsers
//
this.tpManageUsers.Controls.Add(this.lblUserGroups);
this.tpManageUsers.Controls.Add(this.lstGroups);
this.tpManageUsers.Controls.Add(this.lstUsers);
this.tpManageUsers.Controls.Add(this.lblUsers);
this.tpManageUsers.Location = new System.Drawing.Point(4, 22);
this.tpManageUsers.Name = "tpManageUsers";
this.tpManageUsers.Size = new System.Drawing.Size(776, 538);
this.tpManageUsers.TabIndex = 4;
this.tpManageUsers.Text = "Manage Users";
this.tpManageUsers.UseVisualStyleBackColor = true;
//
// lblUserGroups
//
this.lblUserGroups.AutoSize = true;
this.lblUserGroups.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblUserGroups.Location = new System.Drawing.Point(268, 11);
this.lblUserGroups.Name = "lblUserGroups";
this.lblUserGroups.Size = new System.Drawing.Size(225, 15);
this.lblUserGroups.TabIndex = 9;
this.lblUserGroups.Text = "Groups That User Is a Member Of:";
//
// lstGroups
//
this.lstGroups.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lstGroups.FormattingEnabled = true;
this.lstGroups.Location = new System.Drawing.Point(271, 36);
this.lstGroups.Name = "lstGroups";
this.lstGroups.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstGroups.Size = new System.Drawing.Size(502, 498);
this.lstGroups.TabIndex = 8;
this.lstGroups.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstGroups_MouseUp);
//
// lstUsers
//
this.lstUsers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lstUsers.FormattingEnabled = true;
this.lstUsers.Location = new System.Drawing.Point(8, 36);
this.lstUsers.Name = "lstUsers";
this.lstUsers.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstUsers.Size = new System.Drawing.Size(217, 498);
this.lstUsers.TabIndex = 7;
this.lstUsers.SelectedIndexChanged += new System.EventHandler(this.lstUsers_SelectedIndexChanged);
this.lstUsers.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstUsers_MouseUp);
//
// lblUsers
//
this.lblUsers.AutoSize = true;
this.lblUsers.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblUsers.Location = new System.Drawing.Point(8, 11);
this.lblUsers.Name = "lblUsers";
this.lblUsers.Size = new System.Drawing.Size(44, 15);
this.lblUsers.TabIndex = 6;
this.lblUsers.Text = "Users";
//
// tpDefault
//
this.tpDefault.BackColor = System.Drawing.SystemColors.ButtonFace;
this.tpDefault.Controls.Add(this.label8);
this.tpDefault.Controls.Add(this.pnlGroups);
this.tpDefault.Location = new System.Drawing.Point(4, 22);
this.tpDefault.Name = "tpDefault";
this.tpDefault.Padding = new System.Windows.Forms.Padding(3);
this.tpDefault.Size = new System.Drawing.Size(776, 538);
this.tpDefault.TabIndex = 0;
this.tpDefault.Text = "Default Group";
//
// label8
//
this.label8.Location = new System.Drawing.Point(308, 6);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(460, 172);
this.label8.TabIndex = 5;
this.label8.Text = "label8";
//
// pnlGroups
//
this.pnlGroups.AutoScroll = true;
this.pnlGroups.Location = new System.Drawing.Point(3, 6);
this.pnlGroups.Name = "pnlGroups";
this.pnlGroups.Size = new System.Drawing.Size(299, 526);
this.pnlGroups.TabIndex = 4;
//
// cmMembers
//
this.cmMembers.Name = "cmGroupMembers";
this.cmMembers.Size = new System.Drawing.Size(61, 4);
//
// removeMemberToolStripMenuItem
//
this.removeMemberToolStripMenuItem.Name = "removeMemberToolStripMenuItem";
this.removeMemberToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
this.removeMemberToolStripMenuItem.Text = "Remove Member";
this.removeMemberToolStripMenuItem.Click += new System.EventHandler(this.removeMemberToolStripMenuItem_Click);
//
// cmUsers
//
this.cmUsers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmFolders.Name = "cmFolders";
this.cmFolders.Size = new System.Drawing.Size(249, 92);
//
// createSetAdministratorGroupToolStripMenuItem
//
this.createSetAdministratorGroupToolStripMenuItem.Name = "createSetAdministratorGroupToolStripMenuItem";
this.createSetAdministratorGroupToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createSetAdministratorGroupToolStripMenuItem.Text = "Create a Set Administrator Group";
this.createSetAdministratorGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// createWriterGroupToolStripMenuItem
//
this.createWriterGroupToolStripMenuItem.Name = "createWriterGroupToolStripMenuItem";
this.createWriterGroupToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createWriterGroupToolStripMenuItem.Text = "Create a Writer Group";
this.createWriterGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// createROEToolStripMenuItem
//
this.createROEToolStripMenuItem.Name = "createROEToolStripMenuItem";
this.createROEToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createROEToolStripMenuItem.Text = "Create a RO Editor Group";
this.createROEToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// createReviewerGroupToolStripMenuItem
//
this.createReviewerGroupToolStripMenuItem.Name = "createReviewerGroupToolStripMenuItem";
this.createReviewerGroupToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.createReviewerGroupToolStripMenuItem.Text = "Create a Reviewer Group";
this.createReviewerGroupToolStripMenuItem.Click += new System.EventHandler(this.createGroupMenuItem);
//
// lstUsers
//
this.lstUsers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lstUsers.FormattingEnabled = true;
this.lstUsers.Location = new System.Drawing.Point(630, 21);
this.lstUsers.Name = "lstUsers";
this.lstUsers.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstUsers.Size = new System.Drawing.Size(140, 277);
this.lstUsers.TabIndex = 5;
this.lstUsers.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstUsers_MouseUp);
this.lstUsers.SelectedIndexChanged += new System.EventHandler(this.lstUsers_SelectedIndexChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(630, 6);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(34, 13);
this.label5.TabIndex = 4;
this.label5.Text = "Users";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(381, 6);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Groups";
//
// lstGroups
//
this.lstGroups.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lstGroups.FormattingEnabled = true;
this.lstGroups.Location = new System.Drawing.Point(384, 21);
this.lstGroups.Name = "lstGroups";
this.lstGroups.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.lstGroups.Size = new System.Drawing.Size(240, 277);
this.lstGroups.TabIndex = 0;
this.lstGroups.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstGroups_MouseUp);
this.lstGroups.SelectedIndexChanged += new System.EventHandler(this.lstGroups_SelectedIndexChanged);
//
// tpDefault
//
this.tpDefault.BackColor = System.Drawing.SystemColors.ButtonFace;
this.tpDefault.Controls.Add(this.label8);
this.tpDefault.Controls.Add(this.pnlGroups);
this.tpDefault.Location = new System.Drawing.Point(4, 22);
this.tpDefault.Name = "tpDefault";
this.tpDefault.Padding = new System.Windows.Forms.Padding(3);
this.tpDefault.Size = new System.Drawing.Size(776, 538);
this.tpDefault.TabIndex = 0;
this.tpDefault.Text = "Default Group";
//
// label8
//
this.label8.Location = new System.Drawing.Point(308, 6);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(460, 172);
this.label8.TabIndex = 5;
this.label8.Text = "label8";
//
// pnlGroups
//
this.pnlGroups.AutoScroll = true;
this.pnlGroups.Location = new System.Drawing.Point(3, 6);
this.pnlGroups.Name = "pnlGroups";
this.pnlGroups.Size = new System.Drawing.Size(299, 526);
this.pnlGroups.TabIndex = 4;
//
// cmMembers
//
this.cmMembers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.removeMemberToolStripMenuItem});
this.cmMembers.Name = "cmGroupMembers";
this.cmMembers.Size = new System.Drawing.Size(166, 26);
//
// removeMemberToolStripMenuItem
//
this.removeMemberToolStripMenuItem.Name = "removeMemberToolStripMenuItem";
this.removeMemberToolStripMenuItem.Size = new System.Drawing.Size(165, 22);
this.removeMemberToolStripMenuItem.Text = "Remove Member";
this.removeMemberToolStripMenuItem.Click += new System.EventHandler(this.removeMemberToolStripMenuItem_Click);
//
// cmUsers
//
this.cmUsers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addUserToolStripMenuItem,
this.editUserToolStripMenuItem,
this.deleteUserToolStripMenuItem});
this.cmUsers.Name = "cmUsers";
this.cmUsers.Size = new System.Drawing.Size(145, 92);
//
// addUserToolStripMenuItem
//
this.addUserToolStripMenuItem.Name = "addUserToolStripMenuItem";
this.addUserToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.addUserToolStripMenuItem.Text = "Add User";
this.addUserToolStripMenuItem.Click += new System.EventHandler(this.addUserToolStripMenuItem_Click);
//
// editUserToolStripMenuItem
//
this.editUserToolStripMenuItem.Name = "editUserToolStripMenuItem";
this.editUserToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.editUserToolStripMenuItem.Text = "Edit User";
this.editUserToolStripMenuItem.Click += new System.EventHandler(this.editUserToolStripMenuItem_Click);
//
// deleteUserToolStripMenuItem
//
this.deleteUserToolStripMenuItem.Name = "deleteUserToolStripMenuItem";
this.deleteUserToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.deleteUserToolStripMenuItem.Text = "Delete User";
this.deleteUserToolStripMenuItem.Click += new System.EventHandler(this.deleteUserToolStripMenuItem_Click);
//
// dlgManageSecurity
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(784, 564);
this.Controls.Add(this.tcSecurity);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "dlgManageSecurity";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Manage Security";
this.Load += new System.EventHandler(this.dlgManageSecurity_Load);
this.tcSecurity.ResumeLayout(false);
this.tpManageFolders.ResumeLayout(false);
this.tpManageFolders.PerformLayout();
this.cmFolders.ResumeLayout(false);
this.tpManageGroups.ResumeLayout(false);
this.tpManageGroups.PerformLayout();
this.pnlMembers.ResumeLayout(false);
this.tpManageUsers.ResumeLayout(false);
this.tpManageUsers.PerformLayout();
this.tpDefault.ResumeLayout(false);
this.cmUsers.ResumeLayout(false);
this.ResumeLayout(false);
this.deleteUserToolStripMenuItem,
this.addMemberToolStripMenuItemUser});
this.cmUsers.Name = "cmUsers";
this.cmUsers.Size = new System.Drawing.Size(153, 114);
//
// addUserToolStripMenuItem
//
this.addUserToolStripMenuItem.Name = "addUserToolStripMenuItem";
this.addUserToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.addUserToolStripMenuItem.Text = "Add User";
this.addUserToolStripMenuItem.Click += new System.EventHandler(this.addUserToolStripMenuItem_Click);
//
// editUserToolStripMenuItem
//
this.editUserToolStripMenuItem.Name = "editUserToolStripMenuItem";
this.editUserToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.editUserToolStripMenuItem.Text = "Edit User";
this.editUserToolStripMenuItem.Click += new System.EventHandler(this.editUserToolStripMenuItem_Click);
//
// deleteUserToolStripMenuItem
//
this.deleteUserToolStripMenuItem.Name = "deleteUserToolStripMenuItem";
this.deleteUserToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.deleteUserToolStripMenuItem.Text = "Delete User";
this.deleteUserToolStripMenuItem.Click += new System.EventHandler(this.deleteUserToolStripMenuItem_Click);
//
// addMemberToolStripMenuItemUser
//
this.addMemberToolStripMenuItemUser.Name = "addMemberToolStripMenuItemUser";
this.addMemberToolStripMenuItemUser.Size = new System.Drawing.Size(152, 22);
this.addMemberToolStripMenuItemUser.Text = "Add Member";
this.addMemberToolStripMenuItemUser.Click += new System.EventHandler(this.addMemberToolStripMenuItem_Click);
//
// cmGroups
//
this.cmGroups.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteGroupToolStripMenuItem,
this.addMemberToolStripMenuItemGroup});
this.cmGroups.Name = "cmGroups";
this.cmGroups.Size = new System.Drawing.Size(145, 48);
//
// deleteGroupToolStripMenuItem
//
this.deleteGroupToolStripMenuItem.Name = "deleteGroupToolStripMenuItem";
this.deleteGroupToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.deleteGroupToolStripMenuItem.Text = "Delete Group";
this.deleteGroupToolStripMenuItem.Click += new System.EventHandler(this.deleteGroupToolStripMenuItem_Click);
//
// addMemberToolStripMenuItemGroup
//
this.addMemberToolStripMenuItemGroup.Name = "addMemberToolStripMenuItemGroup";
this.addMemberToolStripMenuItemGroup.Size = new System.Drawing.Size(144, 22);
this.addMemberToolStripMenuItemGroup.Text = "Add Member";
this.addMemberToolStripMenuItemGroup.Click += new System.EventHandler(this.addMemberToolStripMenuItem_Click);
//
// dlgManageSecurity
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(784, 564);
this.Controls.Add(this.tcSecurity);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "dlgManageSecurity";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Manage Security";
this.Load += new System.EventHandler(this.dlgManageSecurity_Load);
this.tcSecurity.ResumeLayout(false);
this.tpGroupUsers.ResumeLayout(false);
this.tpGroupUsers.PerformLayout();
this.pnlMembers.ResumeLayout(false);
this.cmFolders.ResumeLayout(false);
this.tpDefault.ResumeLayout(false);
this.cmMembers.ResumeLayout(false);
this.cmUsers.ResumeLayout(false);
this.cmGroups.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -445,14 +357,20 @@ namespace VEPROMS
private System.Windows.Forms.TabControl tcSecurity;
private System.Windows.Forms.TabPage tpDefault;
private System.Windows.Forms.TabPage tpManageFolders;
private System.Windows.Forms.TabPage tpGroupUsers;
private System.Windows.Forms.ListBox lstGroups;
private System.Windows.Forms.Label lblMembers;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ContextMenuStrip cmGroups;
private System.Windows.Forms.ListBox lstUsers;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ContextMenuStrip cmUsers;
private System.Windows.Forms.ToolStripMenuItem addUserToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editUserToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem deleteUserToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip cmMembers;
private System.Windows.Forms.ToolStripMenuItem removeMemberToolStripMenuItem;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ContextMenuStrip cmMembers;
private System.Windows.Forms.ToolStripMenuItem removeMemberToolStripMenuItem;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TreeView tvFolders;
private System.Windows.Forms.ContextMenuStrip cmFolders;
private System.Windows.Forms.ToolStripMenuItem createSetAdministratorGroupToolStripMenuItem;
@@ -461,23 +379,10 @@ namespace VEPROMS
private System.Windows.Forms.ToolStripMenuItem createReviewerGroupToolStripMenuItem;
private System.Windows.Forms.Panel pnlGroups;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TabPage tpManageGroups;
private System.Windows.Forms.TabPage tpManageUsers;
private System.Windows.Forms.Panel pnlMembers;
private System.Windows.Forms.ListBox lstMembers;
private System.Windows.Forms.Label lblMembers;
private System.Windows.Forms.ListBox lstUsers;
private System.Windows.Forms.Label lblUsers;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cbGroupSelection;
private System.Windows.Forms.ListBox lstNonMembers;
private System.Windows.Forms.Button btnDeleteGroup;
private System.Windows.Forms.Label lbNonMembers;
private System.Windows.Forms.ListBox lstGroups;
private System.Windows.Forms.Button btnAddMember;
private System.Windows.Forms.Button btnRemoveMember;
private System.Windows.Forms.ToolTip tt;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblUserGroups;
}
private System.Windows.Forms.ToolStripMenuItem deleteGroupToolStripMenuItem;
private System.Windows.Forms.Panel pnlMembers;
private System.Windows.Forms.ListBox lstMembers;
private System.Windows.Forms.ToolStripMenuItem addMemberToolStripMenuItemUser;
private System.Windows.Forms.ToolStripMenuItem addMemberToolStripMenuItemGroup;
}
}

View File

@@ -7,500 +7,30 @@ using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using Volian.Controls.Library;
using System.Linq;
namespace VEPROMS
{
//C2024-047 Redesign PROMS Security Dialog
public partial class dlgManageSecurity : Form
{
#region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
#region Main Form / Shared Code
private GroupInfoList myGroupInfoList;
private UserInfoList myUserInfoList;
private List<MembershipInfo> myMembershipInfoList;
private Folder myFolder;
public dlgManageSecurity()
{
InitializeComponent();
}
private void dlgManageSecurity_Load(object sender, EventArgs e)
{
//load all folders
myFolder = Folder.Get(1);
//Default to Users Tab
tcSecurity.SelectedIndex = 2;
SetupSecurity();
SetupGroups();
}
//This is called when the Index Changes for main tab Control
//it loads info for the current tab
private void changedTab(object sender, EventArgs e)
{
LoadRefreshGroupUsers();
switch (tcSecurity.SelectedIndex)
{
//Manage Folders
case 0:
SetupFolderOptions();
break;
//Manage Groups
case 1:
SetupGroups();
break;
//Manage Users (note that this is the default)
case 2:
SetupUserOptions();
break;
//Default Options tab
case 3:
SetupDefaultGroupOptions();
break;
}
}
//Loads a refreshed list of Groups and Users
private void LoadRefreshGroupUsers()
{
GroupInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
UserInfoList.Reset();
myUserInfoList = UserInfoList.Get();
}
#endregion
#region Manage Folders
//Sets up Folders
private void SetupFolderOptions()
{
if (tvFolders.Nodes.Count == 0)
{
FolderInfo fi = FolderInfo.Get(1);
LoadChildFolders(fi, null);
}
}
//loads child folders in tree view
private void LoadChildFolders(FolderInfo fi, TreeNode tn)
{
if (tn == null)
{
tn = tvFolders.Nodes.Add(fi.Name);
tn.Tag = fi;
}
else
{
tn = tn.Nodes.Add(fi.Name);
tn.Tag = fi;
}
if (fi.ChildFolderCount > 0)
{
foreach (FolderInfo fic in fi.SortedChildFolders)
{
LoadChildFolders(fic, tn);
}
}
}
//Handles Creating a New Group
private void createGroupMenuItem(object sender, EventArgs e)
{
try
{
ToolStripDropDownItem tsddi = sender as ToolStripDropDownItem;
TreeNode tn = tvFolders.SelectedNode;
FolderInfo fi = tn.Tag as FolderInfo;
AddNewGroup(tsddi.Text, fi);
}
catch (Exception ex)
{
_MyLog.Warn("createGroupMenuItem", ex);
}
}
private void AddNewGroup(string txt, FolderInfo fi)
{
txt = txt.Replace("Create", "").Replace(" a ", "").Replace("Group", "").Trim();
RoleInfoList ril = RoleInfoList.Get();
// B2022-080: cannot add a new group in Proms security. if the sql database's 'Roles' table was not initialized with the default roles, such as Set Administrator,
// Writer, Reviewer, RO Editor, the Adding of new groups won't work. Databases should have this loaded by default.
// Promsfixes has queries that insert these, but only gets run if there are no assignments (see commands under --define Roles)
if (ril == null || ril.Count < 2)
{
MessageBox.Show("Roles table is missing entries.\r\nPlease contact Volian to create other groups.", "Cannot create groups", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
foreach (var ri in ril.Where(ri => ri.Name == txt))
{
string gin = string.Format("{0}s - {1}", ri.Name, fi.Name);
if (!myGroupInfoList.Any(gi => gi.GroupName == gin))
{
Group group = Group.MakeGroup(gin, null, null);
Assignment.MakeAssignment(group, Role.Get(ri.RID), Folder.Get(fi.FolderID), null);
}
}
LoadRefreshGroupUsers();
// C2026-004 - messagebox when create group
MessageBox.Show($"{txt} group successfully created.", "Create group", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void tvFolders_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
tvFolders.SelectedNode = e.Node;
}
#endregion
#region Manage Groups
//Sets up Group Options
private void SetupGroups()
{
cbGroupSelection.Items.Clear();
foreach (GroupInfo gi in myGroupInfoList)
cbGroupSelection.Items.Add(gi.GroupName);
cbGroupSelection.SelectedIndex = 0;
}
private void cbGroupSelection_SelectedIndexChanged(object sender, EventArgs e) => updateMembershipLists();
//Updates the lists of members / nonMembers
private void updateMembershipLists()
{
myMembershipInfoList = new List<MembershipInfo>();
if (cbGroupSelection.SelectedIndex > -1)
{
GroupInfo gi = myGroupInfoList[cbGroupSelection.SelectedIndex];
gi.RefreshGroupMemberships();
if (gi.GroupMembershipCount > 0)
myMembershipInfoList.AddRange(gi.GroupMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty).OrderBy(x => x.MyUserUserID));
}
lstMembers.DataSource = myMembershipInfoList;
lstMembers.ValueMember = "UID";
lstMembers.DisplayMember = "MyUserUserID";
//set NonMembers to Users that are not in Members
lstNonMembers.DataSource = myUserInfoList.Select(x => x.UserID).Except(myMembershipInfoList.Select(x => x.MyUser.UserID)).ToList();
}
//Add a Member to a Group
private void addMember_Click(object sender, EventArgs e)
{
// B2026-007 PROMS Security - don't error when add a user to a group but no group selected
if (lstNonMembers.SelectedValue != null)
{
int groupIndex = cbGroupSelection.SelectedIndex;
string selectedUserID = lstNonMembers.SelectedValue.ToString();
int selectedUID = UserInfo.GetByUserID(selectedUserID).UID;
GroupInfo gi = myGroupInfoList[groupIndex];
User selectedUser = User.Get(selectedUID);
Membership.MakeMembership(selectedUser, Group.Get(gi.GID), null, "");
updateMembershipLists();
lstNonMembers.SelectedIndex = -1;
int index = lstMembers.FindString(selectedUserID);
lstMembers.SetSelected(index, true);
}
}
//Remove a Member From a Group
private void removeMember_Click(object sender, EventArgs e)
{
if (lstMembers.SelectedIndex > -1)
{
MembershipInfo mi = (MembershipInfo)lstMembers.SelectedItem;
string selectedUserID = mi.MyUserUserID;
string msg = "Are you sure you want to remove this Group Member?";
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
{
MessageBox.Show("You must have at least 1 user assigned to the Administrators group", "One Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
Membership m = Membership.Get(mi.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
updateMembershipLists();
lstMembers.SelectedIndex = -1;
lstNonMembers.SelectedItem = selectedUserID;
}
}
}
//Deletes the Currently Selected Group
private void deleteGroup_Click(object sender, EventArgs e)
{
if (cbGroupSelection.SelectedIndex < 0)
{
MessageBox.Show("You must select a group to delete", "No Group Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
GroupInfo gi = myGroupInfoList[cbGroupSelection.SelectedIndex];
if(myFolder.FolderConfig.Security_Group == gi.GID)
{
MessageBox.Show("Cannot Delete Default Group", "Attempt to Delete Default", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
bool deleteOK = true;
if (gi.GroupMembershipCount > 0 && gi.GroupMemberships.Any(mi => mi.EndDate == null || mi.EndDate == string.Empty))
deleteOK = false;
if (!deleteOK)
{
MessageBox.Show("There are still users who are members of this group. You need to delete all members in order to delete this group.", "Group Has Members", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (MessageBox.Show("Are you sure you want to delete this group?", "Confirm Deleting Group", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Group.Delete(gi.GID);
LoadRefreshGroupUsers();
SetupGroups();
}
}
#endregion
#region Manage Users
//Sets up UserOptions
private void SetupUserOptions()
{
lstUsers.Items.Clear();
foreach (UserInfo ui in myUserInfoList)
lstUsers.Items.Add(ui.UserID);
lstUsers.SelectedIndex = -1;
lstGroups.DataSource = null;
}
#region Manage Users - User Options
//Build Membership list based on selected user
private void lstUsers_SelectedIndexChanged(object sender, EventArgs e)
{
myMembershipInfoList = new List<MembershipInfo>();
if (lstUsers.SelectedIndex > -1)
{
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
if (ui.UserMembershipCount > 0)
{
myMembershipInfoList.AddRange(ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty));
}
}
lstGroups.DataSource = myMembershipInfoList;
lstGroups.ValueMember = "UGID";
lstGroups.DisplayMember = "MyGroupName";
}
//Select User and set up Mouse Click Menus based on
//where click in User Box
private void lstUsers_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
int k = lstUsers.IndexFromPoint(e.Location);
if (k >= 0)
{
lstUsers.SelectedIndex = k;
editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = true;
}
else
{
addUserToolStripMenuItem.Visible = true;
editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = false;
}
cmUsers.Show(lstUsers, e.Location);
}
else if (e.Button == MouseButtons.Left)
{
int k = lstUsers.IndexFromPoint(e.Location);
if (k >= 0)
{
lstUsers.SelectedIndex = k;
}
}
}
//Adds a new User
private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
{
User u = User.MakeUser("[Enter New UserID]", "", "", "", "", "", "", "", "", "", "", DateTime.Now, "");
frmManageUser frm = new frmManageUser("add");
frm.MyUser = u;
frm.Text = "Enter New UserID"; //C2026-002 Change Title bar on Add/Edit User
if (frm.ShowDialog(this) == DialogResult.OK)
{
u = frm.MyUser;
u.Save();
Membership.MakeMembership(u, Group.Get(myFolder.FolderConfig.Security_Group), "", "");
//Update the User list to reflect the added user
LoadRefreshGroupUsers();
SetupUserOptions();
lstUsers.SelectedItem = u.UserID;
}
else
{
u.Delete();
}
}
//Edit a User's details
private void editUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to edit", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
using (User u = User.Get(ui.UID))
{
frmManageUser frm = new frmManageUser("edit");
frm.MyUser = u;
if (frm.ShowDialog(this) == DialogResult.OK)
{
frm.MyUser.Save();
//Update the User list to reflect the edited user
//this is done in case the UserID is updated so the list updates to reflect that
LoadRefreshGroupUsers();
SetupUserOptions();
lstUsers.SelectedItem = u.UserID;
}
}
}
//Delete a User
private void deleteUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to delete", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
SessionInfoList sil = SessionInfoList.Get();
foreach (SessionInfo si in sil)
{
if (si.UserID == ui.UserID && (si.DTSEnd == null))
{
MessageBox.Show("The user selected has an active session. You may not delete the user at this time.", "User Active Session", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
int nummemberships = ui.UserMemberships.Count(mi => mi.EndDate == null || mi.EndDate == string.Empty);
string mem_text = nummemberships > 0 ? "\r\nNote that this will remove all memberships that this user has." : "";
if (MessageBox.Show($"Are you sure you want to delete this user?{mem_text}", "Confirm Deleting User", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
foreach (MembershipInfo minfo in ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty))
{
Membership m = Membership.Get(minfo.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
}
User.Delete(ui.UID);
//Update the User list to reflect the deleted user
LoadRefreshGroupUsers();
SetupUserOptions();
lstUsers.SelectedIndex = -1;
lstGroups.DataSource = null;
}
}
#endregion
#region Manage Users - Member Options
//Adds Context Menu for when a Group is selected
private void lstGroups_MouseUp(object sender, MouseEventArgs e)
{
cmMembers.Items.Clear();
lstGroups.SelectedIndex = -1;
//shouldnt be bringing up a menu in the Group box unless a user is 1st selected in the Users box.
if (e.Button == MouseButtons.Right && lstUsers.SelectedIndex > -1)
{
int k = lstGroups.IndexFromPoint(e.Location);
if (k >= 0)
{
lstGroups.SelectedIndex = k;
cmMembers.Items.Add(this.removeMemberToolStripMenuItem);
}
var groupsCanAddTo = myGroupInfoList.Select(x => new { x.GroupName, x.GID }).Except(myMembershipInfoList.Select(x => new { x.MyGroup.GroupName, x.GID }));
foreach (var possiblegroup in groupsCanAddTo)
{
ToolStripMenuItemwithValue AddToMenuItem = new ToolStripMenuItemwithValue($"Add as Member to Group: {possiblegroup.GroupName}", possiblegroup.GID);
AddToMenuItem.Click += addMemberToolStripMenuItem_Click;
cmMembers.Items.Add(AddToMenuItem);
}
cmMembers.Show(lstGroups, e.Location);
}
else if (e.Button == MouseButtons.Left)
{
int k = lstGroups.IndexFromPoint(e.Location);
if (k >= 0)
{
lstGroups.SelectedIndex = k;
}
}
}
//Adds a User to a Group
private void addMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
ToolStripMenuItemwithValue item = (ToolStripMenuItemwithValue)sender;
int userIndex = lstUsers.SelectedIndex;
UserInfo ui = myUserInfoList[userIndex];
Membership.MakeMembership(User.Get(ui.UID), Group.Get((int) item.Value), null, "");
//Update the Group list to reflect the added group
LoadRefreshGroupUsers();
lstUsers_SelectedIndexChanged(sender, e);
}
//Removes a User from a Group
private void removeMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
MembershipInfo mi = (MembershipInfo)lstGroups.SelectedItem;
string msg = "Are you sure you want to remove this Group Member?";
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
{
MessageBox.Show("You must have at least 1 user assigned to the Administrators group", "One Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
Membership m = Membership.Get(mi.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
//Update the Group list to reflect the removed group
LoadRefreshGroupUsers();
lstUsers_SelectedIndexChanged(sender, e);
}
}
#endregion
#endregion
#region Default Options
//Sets up Default Group options for Default Tab
private void SetupDefaultGroupOptions()
{
pnlGroups.Controls.Clear();
foreach (GroupInfo gi in myGroupInfoList)
@@ -526,7 +56,6 @@ namespace VEPROMS
}
}
}
//Handles changing the default group
private void rb_CheckedChanged(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
@@ -535,7 +64,446 @@ namespace VEPROMS
myFolder.FolderConfig.Security_Group = gi.GID;
myFolder.Save();
}
#endregion
private void SetupSecurity()
{
if (tvFolders.Nodes.Count == 0)
{
FolderInfo fi = FolderInfo.Get(1);
LoadChildFolders(fi, null);
}
lstMembers.Items.Clear();
lstUsers.Items.Clear();
lstGroups.Items.Clear();
GroupInfoList.Reset();
UserInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
myUserInfoList = UserInfoList.Get();
foreach (GroupInfo gi in myGroupInfoList)
lstGroups.Items.Add(gi.GroupName);
lstGroups.SelectedIndex = 0;
foreach (UserInfo ui in myUserInfoList)
lstUsers.Items.Add(ui.UserID);
lstGroups.SelectedIndex = -1;
lstUsers.SelectedIndex = -1;
}
private void LoadChildFolders(FolderInfo fi, TreeNode tn)
{
if (tn == null)
{
tn = tvFolders.Nodes.Add(fi.Name);
tn.Tag = fi;
}
else
{
tn = tn.Nodes.Add(fi.Name);
tn.Tag = fi;
}
if (fi.ChildFolderCount > 0)
{
foreach (FolderInfo fic in fi.SortedChildFolders)
{
LoadChildFolders(fic, tn);
}
}
}
private void lstGroups_SelectedIndexChanged(object sender, EventArgs e)
{
lblMembers.Text = "Selected Group Users";
myMembershipInfoList = new List<MembershipInfo>();
lstMembers.Items.Clear();
if (lstGroups.SelectedIndex > -1)
{
GroupInfo gi = myGroupInfoList[lstGroups.SelectedIndex];
if (gi.GroupMembershipCount > 0)
foreach (MembershipInfo mi in gi.GroupMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
{
myMembershipInfoList.Add(mi);
lstMembers.Items.Add(mi.MyUser.UserID);
}
}
}
}
private void addMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
int groupIndex = lstGroups.SelectedIndex;
int userIndex = lstUsers.SelectedIndex;
GroupInfo gi = myGroupInfoList[groupIndex];
UserInfo ui = myUserInfoList[userIndex];
Membership.MakeMembership(User.Get(ui.UID), Group.Get(gi.GID), null, "");
SetupSecurity();
if ((sender as ToolStripMenuItem).Name.EndsWith("Group"))
{
lstUsers.SelectedIndex = userIndex;
lstGroups.SelectedIndex = groupIndex;
}
else
{
lstGroups.SelectedIndex = groupIndex;
lstUsers.SelectedIndex = userIndex;
}
}
private void removeMemberToolStripMenuItem_Click(object sender, EventArgs e)
{
MembershipInfo mi = myMembershipInfoList[lstMembers.SelectedIndex];
string msg = "Are you sure you want to remove this Group Member?";
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
int groupIndex = lstGroups.SelectedIndex;
int userIndex = lstUsers.SelectedIndex;
if (mi.MyGroup.GroupName == "Administrators")
{
int k = 0;
foreach(MembershipInfo mm in mi.MyGroup.GroupMemberships)
if(mm.EndDate == null || mm.EndDate == string.Empty)
k++;
if (k == 1)
{
MessageBox.Show("You must have at least 1 user assigned to the Adminstrators group", "One Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
Membership m = Membership.Get(mi.UGID);
m.EndDate = DateTime.Now.ToShortDateString();
m.Save();
SetupSecurity();
lstGroups.SelectedIndex = groupIndex;
lstUsers.SelectedIndex = userIndex;
}
// foreach (int gg in lstGroups.SelectedIndices)
// {
// GroupInfo gi = myGroupInfoList[gg];
// if (gi.GroupName == "Administrators" && gi.GroupMembershipCount == 1)
// {
// MessageBox.Show("You must have at least 1 user assigned to the Adminstrators group", "Can Not Delete User", MessageBoxButtons.OK, MessageBoxIcon.Warning);
// return;
// }
// foreach (MembershipInfo mi in gi.GroupMemberships)
// {
// foreach (int mm in lstGroupUsers.SelectedIndices)
// {
// MembershipInfo mig = myMembershipInfoList[mm];
// if (mi.MyUser.UID == mig.MyUser.UID)
// {
// Membership m = Membership.Get(mi.UGID);
// m.EndDate = DateTime.Now.ToShortDateString();
// m.Save();
// }
// }
// }
// }
// SetupSecurity();
//}
}
private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
{
User u = User.MakeUser("[Enter New UserID]","", "", "", "", "", "", "", "", "", "",DateTime.Now,"");
frmManageUser frm = new frmManageUser("add");
frm.MyUser = u;
if (frm.ShowDialog(this) == DialogResult.OK)
{
u = frm.MyUser;
u.Save();
Membership.MakeMembership(u, Group.Get(myFolder.FolderConfig.Security_Group), "", "");
SetupSecurity();
}
else
{
u.Delete();
}
}
private void editUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to edit", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
using (User u = User.Get(ui.UID))
{
frmManageUser frm = new frmManageUser("edit");
frm.MyUser = u;
if (frm.ShowDialog(this) == DialogResult.OK)
{
frm.MyUser.Save();
SetupSecurity();
}
}
}
private void deleteUserToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstUsers.SelectedIndex == -1)
{
MessageBox.Show("You must select a user to delete", "No User Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
SessionInfoList sil = SessionInfoList.Get();
foreach (SessionInfo si in sil)
{
if (si.UserID == ui.UserID && (si.DTSEnd == null))
{
MessageBox.Show("The user selected has an active session. You may not delete the user at this time.", "User Active Session", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
int k = 0;
if (ui.UserMembershipCount > 0)
{
foreach (MembershipInfo mi in ui.UserMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
k++;
}
}
if (k > 0)
{
MessageBox.Show("You must remove user from all groups that user is a member of in order to delete user", "User Has Memberships", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (MessageBox.Show("Are you sure you want to delete this user?", "Confirm Deleting User", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
User.Delete(ui.UID);
SetupSecurity();
}
//to do delete user
//end date user memberships
//delete user
}
private void createGroupMenuItem(object sender, EventArgs e)
{
try
{
ToolStripDropDownItem tsddi = sender as ToolStripDropDownItem;
TreeNode tn = tvFolders.SelectedNode;
FolderInfo fi = tn.Tag as FolderInfo;
AddNewGroup(tsddi.Text, fi);
SetupSecurity();
}
catch (Exception ex)
{
_MyLog.Warn("createGroupMenuItem", ex);
}
}
private void AddNewGroup(string txt, FolderInfo fi)
{
txt = txt.Replace("Create", "").Replace(" a ", "").Replace("Group", "").Trim();
RoleInfoList ril = RoleInfoList.Get();
// B2022-080: cannot add a new group in Proms security. if the sql database's 'Roles' table was not initialized with the default roles, such as Set Administrator,
// Writer, Reviewer, RO Editor, the Adding of new groups won't work. Databases should have this loaded by default.
// Promsfixes has queries that insert these, but only gets run if there are no assignments (see commands under --define Roles)
if (ril == null || ril.Count < 2)
{
MessageBox.Show("Roles table is missing entries.\r\nPlease contact Volian to create other groups.", "Cannot create groups", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
foreach(RoleInfo ri in ril)
{
if (ri.Name == txt)
{
string gin = string.Format("{0}s - {1}", ri.Name, fi.Name);
bool addOK = true;
foreach (GroupInfo gi in myGroupInfoList)
{
if (gin == gi.GroupName)
{
addOK = false;
break;
}
}
if (addOK)
{
Group group = Group.MakeGroup(gin, null, null);
Assignment.MakeAssignment(group, Role.Get(ri.RID), Folder.Get(fi.FolderID), null);
}
}
}
GroupInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
SetupGroups();
}
private void lstUsers_SelectedIndexChanged(object sender, EventArgs e)
{
lblMembers.Text = "Selected User Groups";
myMembershipInfoList = new List<MembershipInfo>();
lstMembers.Items.Clear();
if (lstUsers.SelectedIndex > -1)
{
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
if (ui.UserMembershipCount > 0)
{
foreach (MembershipInfo mi in ui.UserMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
{
myMembershipInfoList.Add(mi);
lstMembers.Items.Add(mi.MyGroup.GroupName);
}
}
}
}
}
private void tvFolders_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
tvFolders.SelectedNode = e.Node;
}
private void deleteGroupToolStripMenuItem_Click(object sender, EventArgs e)
{
if (lstGroups.SelectedIndex < 0)
{
MessageBox.Show("You must select a group to delete", "No Group Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
GroupInfo gi = myGroupInfoList[lstGroups.SelectedIndex];
if(myFolder.FolderConfig.Security_Group == gi.GID)
{
MessageBox.Show("Cannot Delete Default Group", "Attempt to Delete Default", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
bool deleteOK = true;
if(gi.GroupMembershipCount > 0)
{
foreach (MembershipInfo mi in gi.GroupMemberships)
{
if (mi.EndDate == null || mi.EndDate == string.Empty)
{
deleteOK = false;
break;
}
}
}
if (!deleteOK)
{
MessageBox.Show("There are still users who are members of this group. You need to delete all members in order to delete this group.", "Group Has Members", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (MessageBox.Show("Are you sure you want to delete this group?", "Confirm Deleting Group", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
Group.Delete(gi.GID);
GroupInfoList.Reset();
myGroupInfoList = GroupInfoList.Get();
SetupGroups();
SetupSecurity();
}
}
private void lstGroups_MouseUp(object sender, MouseEventArgs e)
{
lstGroups.SelectedIndex = -1;
if (e.Button == MouseButtons.Right)
{
int k = lstGroups.IndexFromPoint(e.Location);
if (k >= 0)
{
lstGroups.SelectedIndex = k;
if (lstUsers.SelectedIndex >= 0)
{
GroupInfo gi = myGroupInfoList[k];
if (gi.GroupMembershipCount > 0)
{
addMemberToolStripMenuItemGroup.Visible = true;
UserInfo ui = myUserInfoList[lstUsers.SelectedIndex];
foreach (MembershipInfo mi in gi.GroupMemberships)
{
if (mi.MyUser.UserID == ui.UserID && (mi.EndDate == null || mi.EndDate == string.Empty))
{
addMemberToolStripMenuItemGroup.Visible = false;
break;
}
}
}
}
else
addMemberToolStripMenuItemGroup.Visible = false;
cmGroups.Show(lstGroups, e.Location);
}
}
else if (e.Button == MouseButtons.Left)
{
int k = lstGroups.IndexFromPoint(e.Location);
if (k >= 0)
{
lstGroups.SelectedIndex = k;
}
}
}
private void lstUsers_MouseUp(object sender, MouseEventArgs e)
{
lstUsers.SelectedIndex = -1;
if (e.Button == MouseButtons.Right)
{
int k = lstUsers.IndexFromPoint(e.Location);
if (k >= 0)
{
lstUsers.SelectedIndex = k;
//addUserToolStripMenuItem.Visible = false;
editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = true;
if (lstGroups.SelectedIndex >= 0)
{
UserInfo ui = myUserInfoList[k];
if(ui.UserMembershipCount > 0)
{
addMemberToolStripMenuItemUser.Visible = true;
GroupInfo gi = myGroupInfoList[lstGroups.SelectedIndex];
foreach(MembershipInfo mi in ui.UserMemberships)
{
if (mi.MyGroup.GroupName == gi.GroupName && (mi.EndDate == null || mi.EndDate == string.Empty))
{
addMemberToolStripMenuItemUser.Visible = false;
break;
}
}
}
}
else
addMemberToolStripMenuItemUser.Visible = false;
cmUsers.Show(lstUsers, e.Location);
}
else
{
addUserToolStripMenuItem.Visible = true;
editUserToolStripMenuItem.Visible = deleteUserToolStripMenuItem.Visible = addMemberToolStripMenuItemUser.Visible = false;
cmUsers.Show(lstUsers, e.Location);
}
}
else if (e.Button == MouseButtons.Left)
{
int k = lstUsers.IndexFromPoint(e.Location);
if (k >= 0)
{
lstUsers.SelectedIndex = k;
}
}
}
private void lstMembers_MouseUp(object sender, MouseEventArgs e)
{
lstMembers.SelectedIndex = -1;
if (e.Button == MouseButtons.Right)
{
int k = lstMembers.IndexFromPoint(e.Location);
if (k >= 0)
{
lstMembers.SelectedIndex = k;
addMemberToolStripMenuItemUser.Visible = false;
removeMemberToolStripMenuItem.Visible = true;
cmMembers.Show(lstMembers, e.Location);
}
else
{
addMemberToolStripMenuItemUser.Visible = true;
removeMemberToolStripMenuItem.Visible = false;
cmMembers.Show(lstMembers, e.Location);
}
}
else if (e.Button == MouseButtons.Left)
{
int k = lstMembers.IndexFromPoint(e.Location);
if (k >= 0)
{
lstMembers.SelectedIndex = k;
}
}
}
}
}

View File

@@ -112,27 +112,21 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="cmFolders.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>234, 17</value>
</metadata>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="cmFolders.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>341, 17</value>
</metadata>
<metadata name="cmMembers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="cmMembers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="cmUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="cmUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>243, 17</value>
</metadata>
<metadata name="cmGroups.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>136, 17</value>
</metadata>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>341, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>58</value>
</metadata>
</root>

View File

@@ -30,7 +30,6 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBatchRefresh));
this.myTV = new System.Windows.Forms.TreeView();
this.myTV_RO_DBs = new System.Windows.Forms.TreeView();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.panelEx3 = new DevComponents.DotNetBar.PanelEx();
this.txtResults = new System.Windows.Forms.TextBox();
@@ -53,16 +52,13 @@
this.expandableSplitter1 = new DevComponents.DotNetBar.ExpandableSplitter();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.sideNav1 = new DevComponents.DotNetBar.Controls.SideNav();
this.sideNavPanel5 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.itemPanel1 = new DevComponents.DotNetBar.PanelEx();
this.btnPurgeChange = new DevComponents.DotNetBar.ButtonX();
this.dtePurge = new System.Windows.Forms.DateTimePicker();
this.warningBox3 = new DevComponents.DotNetBar.Controls.WarningBox();
this.warningBox6 = new DevComponents.DotNetBar.Controls.WarningBox();
this.itemPanel2 = new DevComponents.DotNetBar.PanelEx();
this.btnIndexMaint = new DevComponents.DotNetBar.ButtonX();
this.itemPanel3 = new DevComponents.DotNetBar.PanelEx();
this.btnROsNotUsed = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel4 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.swDeleteFolder = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX13 = new DevComponents.DotNetBar.LabelX();
this.swDeleteAnnotations = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX14 = new DevComponents.DotNetBar.LabelX();
this.myTVdel = new System.Windows.Forms.TreeView();
this.btnDeleteItems = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel3 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.swCheckROLinks = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX12 = new DevComponents.DotNetBar.LabelX();
@@ -74,13 +70,6 @@
this.labelX6 = new DevComponents.DotNetBar.LabelX();
this.warningBox1 = new DevComponents.DotNetBar.Controls.WarningBox();
this.btnFixLinks = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel4 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.swDeleteFolder = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX13 = new DevComponents.DotNetBar.LabelX();
this.swDeleteAnnotations = new DevComponents.DotNetBar.Controls.SwitchButton();
this.labelX14 = new DevComponents.DotNetBar.LabelX();
this.myTVdel = new System.Windows.Forms.TreeView();
this.btnDeleteItems = new DevComponents.DotNetBar.ButtonX();
this.sideNavPanel2 = new DevComponents.DotNetBar.Controls.SideNavPanel();
this.swRefreshTblsForSrch = new DevComponents.DotNetBar.Controls.SwitchButton();
this.lblRefreshTblForSrch = new DevComponents.DotNetBar.LabelX();
@@ -101,7 +90,6 @@
this.separator1 = new DevComponents.DotNetBar.Separator();
this.sideNavItmRepair = new DevComponents.DotNetBar.Controls.SideNavItem();
this.sideNavItmLinks = new DevComponents.DotNetBar.Controls.SideNavItem();
this.sideNavItmMaint = new DevComponents.DotNetBar.Controls.SideNavItem();
this.sideNavItmDelete = new DevComponents.DotNetBar.Controls.SideNavItem();
this.sideNavItmExit = new DevComponents.DotNetBar.Controls.SideNavItem();
this.panelEx4 = new DevComponents.DotNetBar.PanelEx();
@@ -124,12 +112,8 @@
this.pnlLater.SuspendLayout();
this.panelEx1.SuspendLayout();
this.sideNav1.SuspendLayout();
this.sideNavPanel5.SuspendLayout();
this.itemPanel1.SuspendLayout();
this.itemPanel2.SuspendLayout();
this.itemPanel3.SuspendLayout();
this.sideNavPanel3.SuspendLayout();
this.sideNavPanel4.SuspendLayout();
this.sideNavPanel3.SuspendLayout();
this.sideNavPanel2.SuspendLayout();
this.panelEx4.SuspendLayout();
this.SuspendLayout();
@@ -140,20 +124,10 @@
this.myTV.Dock = System.Windows.Forms.DockStyle.Bottom;
this.myTV.Location = new System.Drawing.Point(0, 230);
this.myTV.Name = "myTV";
this.myTV.Size = new System.Drawing.Size(268, 310);
this.myTV.Size = new System.Drawing.Size(291, 310);
this.myTV.TabIndex = 4;
this.myTV.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck);
//
// myTV_RO_DBs
//
this.myTV_RO_DBs.CheckBoxes = true;
this.myTV_RO_DBs.Dock = System.Windows.Forms.DockStyle.Bottom;
this.myTV_RO_DBs.Location = new System.Drawing.Point(0, 50);
this.myTV_RO_DBs.Name = "myTV_RO_DBs";
this.myTV_RO_DBs.Size = new System.Drawing.Size(267, 250);
this.myTV_RO_DBs.TabIndex = 4;
this.myTV_RO_DBs.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.TreeView_AfterCheck);
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -476,10 +450,9 @@
// sideNav1
//
this.sideNav1.BackColor = System.Drawing.SystemColors.Control;
this.sideNav1.Controls.Add(this.sideNavPanel5);
this.sideNav1.Controls.Add(this.sideNavPanel3);
this.sideNav1.Controls.Add(this.sideNavPanel4);
this.sideNav1.Controls.Add(this.sideNavPanel2);
this.sideNav1.Controls.Add(this.sideNavPanel4);
this.sideNav1.Controls.Add(this.sideNavPanel3);
this.sideNav1.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNav1.EnableClose = false;
this.sideNav1.EnableMaximize = false;
@@ -488,7 +461,6 @@
this.separator1,
this.sideNavItmRepair,
this.sideNavItmLinks,
this.sideNavItmMaint,
this.sideNavItmDelete,
this.sideNavItmExit});
this.sideNav1.Location = new System.Drawing.Point(0, 0);
@@ -498,138 +470,109 @@
this.sideNav1.TabIndex = 3;
this.sideNav1.Text = "sideNav1";
//
// sideNavPanel5
// sideNavPanel4
//
this.sideNavPanel5.Controls.Add(this.itemPanel1);
this.sideNavPanel5.Controls.Add(this.itemPanel2);
this.sideNavPanel5.Controls.Add(this.itemPanel3);
this.sideNavPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel5.Location = new System.Drawing.Point(112, 31);
this.sideNavPanel5.MinimumSize = new System.Drawing.Size(0, 493);
this.sideNavPanel5.Name = "sideNavPanel5";
this.sideNavPanel5.Size = new System.Drawing.Size(268, 493);
this.sideNavPanel5.TabIndex = 26;
this.sideNavPanel4.Controls.Add(this.swDeleteFolder);
this.sideNavPanel4.Controls.Add(this.labelX13);
this.sideNavPanel4.Controls.Add(this.swDeleteAnnotations);
this.sideNavPanel4.Controls.Add(this.labelX14);
this.sideNavPanel4.Controls.Add(this.myTVdel);
this.sideNavPanel4.Controls.Add(this.btnDeleteItems);
this.sideNavPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel4.Location = new System.Drawing.Point(81, 31);
this.sideNavPanel4.MinimumSize = new System.Drawing.Size(0, 493);
this.sideNavPanel4.Name = "sideNavPanel4";
this.sideNavPanel4.Size = new System.Drawing.Size(299, 493);
this.sideNavPanel4.TabIndex = 27;
this.sideNavPanel4.Visible = false;
//
// itemPanel1
// swDeleteFolder
//
this.itemPanel1.Controls.Add(this.btnPurgeChange);
this.itemPanel1.Controls.Add(this.dtePurge);
this.itemPanel1.Controls.Add(this.warningBox3);
this.itemPanel1.Controls.Add(this.warningBox6);
this.itemPanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.itemPanel1.Location = new System.Drawing.Point(0, -2);
this.itemPanel1.Name = "itemPanel1";
this.itemPanel1.Size = new System.Drawing.Size(267, 148);
this.itemPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.DoubleLine;
this.itemPanel1.Style.BorderColor.Color = System.Drawing.Color.DarkGray;
this.itemPanel1.TabIndex = 0;
//
// btnPurgeChange
//
this.btnPurgeChange.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnPurgeChange.Checked = true;
this.btnPurgeChange.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnPurgeChange.Location = new System.Drawing.Point(18, 32);
this.btnPurgeChange.Name = "btnPurgeChange";
this.btnPurgeChange.Size = new System.Drawing.Size(227, 23);
this.btnPurgeChange.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnPurgeChange.TabIndex = 1;
this.btnPurgeChange.Text = "Purge Change History";
this.btnPurgeChange.Tooltip = resources.GetString("btnPurgeChange.Tooltip");
this.btnPurgeChange.Click += new System.EventHandler(this.btnPurgeChange_Click);
//
// dtePurge
this.swDeleteFolder.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swDeleteFolder.Location = new System.Drawing.Point(10, 43);
this.swDeleteFolder.Name = "swDeleteFolder";
this.swDeleteFolder.Size = new System.Drawing.Size(69, 22);
this.swDeleteFolder.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swDeleteFolder, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Folders", "", resources.GetString("swDeleteFolder.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 140)));
this.swDeleteFolder.SwitchClickTogglesValue = true;
this.swDeleteFolder.TabIndex = 39;
this.swDeleteFolder.ValueChanged += new System.EventHandler(this.swDeleteFolder_ValueChanged);
//
this.dtePurge.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dtePurge.Location = new System.Drawing.Point(92, 7);
this.dtePurge.Name = "dtePurge";
this.dtePurge.Size = new System.Drawing.Size(87, 20);
this.dtePurge.TabIndex = 0;
// labelX13
//
// warningBox3
this.labelX13.BackColor = System.Drawing.Color.Transparent;
//
this.warningBox3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
this.warningBox3.CloseButtonVisible = false;
this.warningBox3.Image = ((System.Drawing.Image)(resources.GetObject("warningBox3.Image")));
this.warningBox3.Location = new System.Drawing.Point(1, 61);
this.warningBox3.Margin = new System.Windows.Forms.Padding(4);
this.warningBox3.Name = "warningBox3";
this.warningBox3.OptionsButtonVisible = false;
this.warningBox3.Size = new System.Drawing.Size(264, 32);
this.warningBox3.TabIndex = 32;
this.warningBox3.Text = "<b>NOTE</b> These tools can take a long time to run";
//
// warningBox6
//
this.warningBox6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
this.warningBox6.CloseButtonVisible = false;
this.warningBox6.Image = ((System.Drawing.Image)(resources.GetObject("warningBox6.Image")));
this.warningBox6.Location = new System.Drawing.Point(1, 97);
this.warningBox6.Margin = new System.Windows.Forms.Padding(4);
this.warningBox6.Name = "warningBox6";
this.warningBox6.OptionsButtonVisible = false;
this.warningBox6.Size = new System.Drawing.Size(264, 43);
this.warningBox6.TabIndex = 31;
this.warningBox6.Text = " Be sure there is a current backup of the \r\n database prior to running these func" +
"tions";
this.labelX13.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX13.Location = new System.Drawing.Point(85, 42);
this.labelX13.Name = "labelX13";
this.labelX13.Size = new System.Drawing.Size(168, 22);
this.superTooltip1.SetSuperTooltip(this.labelX13, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Folders", "", resources.GetString("labelX13.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 140)));
this.labelX13.TabIndex = 38;
this.labelX13.Text = "Delete Folders";
//
// itemPanel2
// swDeleteAnnotations
//
this.itemPanel2.Controls.Add(this.btnIndexMaint);
this.itemPanel2.DisabledBackColor = System.Drawing.Color.Empty;
this.itemPanel2.Location = new System.Drawing.Point(0, 145);
this.itemPanel2.Name = "itemPanel2";
this.itemPanel2.Size = new System.Drawing.Size(267, 73);
this.itemPanel2.Style.BackgroundImagePosition = DevComponents.DotNetBar.eBackgroundImagePosition.Tile;
this.itemPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.DoubleLine;
this.itemPanel2.Style.BorderColor.Color = System.Drawing.Color.DarkGray;
this.itemPanel2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.itemPanel2.Style.GradientAngle = 90;
this.itemPanel2.TabIndex = 8;
//
// btnIndexMaint
//
this.btnIndexMaint.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnIndexMaint.Checked = true;
this.btnIndexMaint.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnIndexMaint.Location = new System.Drawing.Point(19, 24);
this.btnIndexMaint.Name = "btnIndexMaint";
this.btnIndexMaint.Size = new System.Drawing.Size(227, 23);
this.btnIndexMaint.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnIndexMaint.TabIndex = 4;
this.btnIndexMaint.Text = "Perform Index Maintenance";
this.btnIndexMaint.Tooltip = resources.GetString("btnIndexMaint.Tooltip");
this.btnIndexMaint.Click += new System.EventHandler(this.btnIndexMaint_Click);
//
// itemPanel3
this.swDeleteAnnotations.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swDeleteAnnotations.Location = new System.Drawing.Point(10, 15);
this.swDeleteAnnotations.Name = "swDeleteAnnotations";
this.swDeleteAnnotations.Size = new System.Drawing.Size(69, 22);
this.swDeleteAnnotations.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swDeleteAnnotations, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Annotations", "", resources.GetString("swDeleteAnnotations.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 155)));
this.swDeleteAnnotations.SwitchClickTogglesValue = true;
this.swDeleteAnnotations.TabIndex = 37;
this.swDeleteAnnotations.Value = true;
this.swDeleteAnnotations.ValueObject = "Y";
this.swDeleteAnnotations.ValueChanged += new System.EventHandler(this.swDeleteAnnotations_ValueChanged);
//
this.itemPanel3.Controls.Add(this.btnROsNotUsed);
this.itemPanel3.Controls.Add(this.myTV_RO_DBs);
this.itemPanel3.DisabledBackColor = System.Drawing.Color.Empty;
this.itemPanel3.Location = new System.Drawing.Point(0, 218);
this.itemPanel3.Name = "itemPanel3";
this.itemPanel3.Size = new System.Drawing.Size(267, 300);
this.itemPanel3.Style.BackgroundImagePosition = DevComponents.DotNetBar.eBackgroundImagePosition.Tile;
this.itemPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.DoubleLine;
this.itemPanel3.Style.BorderColor.Color = System.Drawing.Color.DarkGray;
this.itemPanel3.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.itemPanel3.Style.GradientAngle = 90;
this.itemPanel3.TabIndex = 12;
// labelX14
//
// btnROsNotUsed
this.labelX14.BackColor = System.Drawing.Color.Transparent;
//
this.btnROsNotUsed.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnROsNotUsed.Checked = true;
this.btnROsNotUsed.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnROsNotUsed.Location = new System.Drawing.Point(19, 11);
this.btnROsNotUsed.Name = "btnROsNotUsed";
this.btnROsNotUsed.Size = new System.Drawing.Size(227, 26);
this.btnROsNotUsed.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnROsNotUsed, new DevComponents.DotNetBar.SuperTooltipInfo("ROs Not Used Snapshot", "", "This will Generate an image detailing ROs that exist but are not currently utiliz" +
"ed in any steps in PROMS.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnROsNotUsed.TabIndex = 2;
this.btnROsNotUsed.Text = "Generate Snapshot of ROs Not Used";
this.btnROsNotUsed.Click += new System.EventHandler(this.btnROsNotUsed_Click);
//
//
this.labelX14.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX14.Location = new System.Drawing.Point(85, 14);
this.labelX14.Name = "labelX14";
this.labelX14.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX14, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Annotations", "", resources.GetString("labelX14.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 155)));
this.labelX14.TabIndex = 36;
this.labelX14.Text = "Delete Annotations";
//
// myTVdel
//
this.myTVdel.CheckBoxes = true;
this.myTVdel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.myTVdel.Location = new System.Drawing.Point(0, 126);
this.myTVdel.Name = "myTVdel";
this.myTVdel.Size = new System.Drawing.Size(299, 367);
this.myTVdel.TabIndex = 34;
this.myTVdel.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck);
//
// btnDeleteItems
//
this.btnDeleteItems.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnDeleteItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDeleteItems.Checked = true;
this.btnDeleteItems.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnDeleteItems.Location = new System.Drawing.Point(39, 98);
this.btnDeleteItems.Name = "btnDeleteItems";
this.btnDeleteItems.Size = new System.Drawing.Size(220, 23);
this.btnDeleteItems.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnDeleteItems, new DevComponents.DotNetBar.SuperTooltipInfo("Process Deletions", "", resources.GetString("btnDeleteItems.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
this.btnDeleteItems.TabIndex = 35;
this.btnDeleteItems.Text = "Process Deletions";
this.btnDeleteItems.Click += new System.EventHandler(this.btnDeleteItems_Click);
//
// sideNavPanel3
//
@@ -645,10 +588,10 @@
this.sideNavPanel3.Controls.Add(this.myTV);
this.sideNavPanel3.Controls.Add(this.btnFixLinks);
this.sideNavPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel3.Location = new System.Drawing.Point(112, 31);
this.sideNavPanel3.Location = new System.Drawing.Point(89, 31);
this.sideNavPanel3.MinimumSize = new System.Drawing.Size(0, 540);
this.sideNavPanel3.Name = "sideNavPanel3";
this.sideNavPanel3.Size = new System.Drawing.Size(268, 540);
this.sideNavPanel3.Size = new System.Drawing.Size(291, 540);
this.sideNavPanel3.TabIndex = 10;
this.sideNavPanel3.Visible = false;
//
@@ -796,110 +739,6 @@
this.btnFixLinks.Text = "Process Links";
this.btnFixLinks.Click += new System.EventHandler(this.btnFixLinks_Click);
//
// sideNavPanel4
//
this.sideNavPanel4.Controls.Add(this.swDeleteFolder);
this.sideNavPanel4.Controls.Add(this.labelX13);
this.sideNavPanel4.Controls.Add(this.swDeleteAnnotations);
this.sideNavPanel4.Controls.Add(this.labelX14);
this.sideNavPanel4.Controls.Add(this.myTVdel);
this.sideNavPanel4.Controls.Add(this.btnDeleteItems);
this.sideNavPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel4.Location = new System.Drawing.Point(112, 31);
this.sideNavPanel4.MinimumSize = new System.Drawing.Size(0, 493);
this.sideNavPanel4.Name = "sideNavPanel4";
this.sideNavPanel4.Size = new System.Drawing.Size(268, 493);
this.sideNavPanel4.TabIndex = 27;
this.sideNavPanel4.Visible = false;
//
// swDeleteFolder
//
//
//
//
this.swDeleteFolder.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swDeleteFolder.Location = new System.Drawing.Point(10, 43);
this.swDeleteFolder.Name = "swDeleteFolder";
this.swDeleteFolder.Size = new System.Drawing.Size(69, 22);
this.swDeleteFolder.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swDeleteFolder, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Folders", "", resources.GetString("swDeleteFolder.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 140)));
this.swDeleteFolder.SwitchClickTogglesValue = true;
this.swDeleteFolder.TabIndex = 39;
this.swDeleteFolder.ValueChanged += new System.EventHandler(this.swDeleteFolder_ValueChanged);
//
// labelX13
//
this.labelX13.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX13.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX13.Location = new System.Drawing.Point(85, 42);
this.labelX13.Name = "labelX13";
this.labelX13.Size = new System.Drawing.Size(168, 22);
this.superTooltip1.SetSuperTooltip(this.labelX13, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Folders", "", resources.GetString("labelX13.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 140)));
this.labelX13.TabIndex = 38;
this.labelX13.Text = "Delete Folders";
//
// swDeleteAnnotations
//
//
//
//
this.swDeleteAnnotations.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.swDeleteAnnotations.Location = new System.Drawing.Point(10, 15);
this.swDeleteAnnotations.Name = "swDeleteAnnotations";
this.swDeleteAnnotations.Size = new System.Drawing.Size(69, 22);
this.swDeleteAnnotations.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.swDeleteAnnotations, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Annotations", "", resources.GetString("swDeleteAnnotations.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 155)));
this.swDeleteAnnotations.SwitchClickTogglesValue = true;
this.swDeleteAnnotations.TabIndex = 37;
this.swDeleteAnnotations.Value = true;
this.swDeleteAnnotations.ValueObject = "Y";
this.swDeleteAnnotations.ValueChanged += new System.EventHandler(this.swDeleteAnnotations_ValueChanged);
//
// labelX14
//
this.labelX14.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.labelX14.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX14.Location = new System.Drawing.Point(85, 14);
this.labelX14.Name = "labelX14";
this.labelX14.Size = new System.Drawing.Size(186, 22);
this.superTooltip1.SetSuperTooltip(this.labelX14, new DevComponents.DotNetBar.SuperTooltipInfo("Delete Annotations", "", resources.GetString("labelX14.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(250, 155)));
this.labelX14.TabIndex = 36;
this.labelX14.Text = "Delete Annotations";
//
// myTVdel
//
this.myTVdel.CheckBoxes = true;
this.myTVdel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.myTVdel.Location = new System.Drawing.Point(0, 126);
this.myTVdel.Name = "myTVdel";
this.myTVdel.Size = new System.Drawing.Size(268, 367);
this.myTVdel.TabIndex = 34;
this.myTVdel.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.myTV_AfterCheck);
//
// btnDeleteItems
//
this.btnDeleteItems.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnDeleteItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDeleteItems.Checked = true;
this.btnDeleteItems.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnDeleteItems.Location = new System.Drawing.Point(39, 98);
this.btnDeleteItems.Name = "btnDeleteItems";
this.btnDeleteItems.Size = new System.Drawing.Size(189, 23);
this.btnDeleteItems.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.superTooltip1.SetSuperTooltip(this.btnDeleteItems, new DevComponents.DotNetBar.SuperTooltipInfo("Process Deletions", "", resources.GetString("btnDeleteItems.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 175)));
this.btnDeleteItems.TabIndex = 35;
this.btnDeleteItems.Text = "Process Deletions";
this.btnDeleteItems.Click += new System.EventHandler(this.btnDeleteItems_Click);
//
// sideNavPanel2
//
this.sideNavPanel2.Controls.Add(this.swRefreshTblsForSrch);
@@ -918,11 +757,10 @@
this.sideNavPanel2.Controls.Add(this.line2);
this.sideNavPanel2.Controls.Add(this.btnRunRepair);
this.sideNavPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.sideNavPanel2.Location = new System.Drawing.Point(112, 31);
this.sideNavPanel2.Location = new System.Drawing.Point(81, 31);
this.sideNavPanel2.Name = "sideNavPanel2";
this.sideNavPanel2.Size = new System.Drawing.Size(268, 493);
this.sideNavPanel2.Size = new System.Drawing.Size(299, 493);
this.sideNavPanel2.TabIndex = 6;
this.sideNavPanel2.Visible = false;
//
// swRefreshTblsForSrch
//
@@ -1169,6 +1007,7 @@
//
// sideNavItmRepair
//
this.sideNavItmRepair.Checked = true;
this.sideNavItmRepair.Name = "sideNavItmRepair";
this.sideNavItmRepair.Panel = this.sideNavPanel2;
this.sideNavItmRepair.Symbol = "";
@@ -1183,16 +1022,6 @@
this.sideNavItmLinks.Text = "Links";
this.sideNavItmLinks.Click += new System.EventHandler(this.sideNavItmLinks_Click);
//
// sideNavItmMaint
//
this.sideNavItmMaint.Checked = true;
this.sideNavItmMaint.Name = "sideNavItmMaint";
this.sideNavItmMaint.Panel = this.sideNavPanel5;
this.sideNavItmMaint.Symbol = "58154";
this.sideNavItmMaint.SymbolSet = DevComponents.DotNetBar.eSymbolSet.Material;
this.sideNavItmMaint.Text = "Maintenance";
this.sideNavItmMaint.Click += new System.EventHandler(this.sideNavItmMaint_Click);
//
// sideNavItmDelete
//
this.sideNavItmDelete.Name = "sideNavItmDelete";
@@ -1332,12 +1161,8 @@
this.panelEx1.ResumeLayout(false);
this.sideNav1.ResumeLayout(false);
this.sideNav1.PerformLayout();
this.sideNavPanel5.ResumeLayout(false);
this.itemPanel1.ResumeLayout(false);
this.itemPanel2.ResumeLayout(false);
this.itemPanel3.ResumeLayout(false);
this.sideNavPanel3.ResumeLayout(false);
this.sideNavPanel4.ResumeLayout(false);
this.sideNavPanel3.ResumeLayout(false);
this.sideNavPanel2.ResumeLayout(false);
this.panelEx4.ResumeLayout(false);
this.ResumeLayout(false);
@@ -1347,8 +1172,7 @@
#endregion
private System.Windows.Forms.TreeView myTV;
private System.Windows.Forms.TreeView myTV_RO_DBs;
private System.Windows.Forms.SplitContainer splitContainer3;
private System.Windows.Forms.SplitContainer splitContainer3;
private DevComponents.DotNetBar.PanelEx panelEx3;
private System.Windows.Forms.TextBox txtResults;
private System.Windows.Forms.Panel panel1;
@@ -1385,8 +1209,7 @@
private DevComponents.DotNetBar.Separator separator1;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmRepair;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmLinks;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmMaint;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmExit;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmExit;
private DevComponents.DotNetBar.LabelX lblAdmToolProgressType;
private DevComponents.DotNetBar.ProgressSteps progressSteps1;
private DevComponents.DotNetBar.StepItem stepItem1;
@@ -1413,24 +1236,14 @@
private DevComponents.DotNetBar.LabelX labelX12;
private DevComponents.DotNetBar.ButtonItem buttonItem1;
private DevComponents.DotNetBar.Controls.SideNavPanel sideNavPanel4;
private DevComponents.DotNetBar.Controls.SideNavPanel sideNavPanel5;
private DevComponents.DotNetBar.Controls.SwitchButton swDeleteFolder;
private DevComponents.DotNetBar.Controls.SwitchButton swDeleteFolder;
private DevComponents.DotNetBar.LabelX labelX13;
private DevComponents.DotNetBar.Controls.SwitchButton swDeleteAnnotations;
private DevComponents.DotNetBar.LabelX labelX14;
private System.Windows.Forms.TreeView myTVdel;
private DevComponents.DotNetBar.ButtonX btnDeleteItems;
private DevComponents.DotNetBar.Controls.SideNavItem sideNavItmDelete;
private DevComponents.DotNetBar.PanelEx itemPanel1;
private DevComponents.DotNetBar.ButtonX btnPurgeChange;
private System.Windows.Forms.DateTimePicker dtePurge;
private DevComponents.DotNetBar.Controls.WarningBox warningBox3;
private DevComponents.DotNetBar.Controls.WarningBox warningBox6;
private DevComponents.DotNetBar.ButtonX btnIndexMaint;
private DevComponents.DotNetBar.PanelEx itemPanel2;
private DevComponents.DotNetBar.PanelEx itemPanel3;
private DevComponents.DotNetBar.ButtonX btnROsNotUsed;
}
}
}

View File

@@ -9,7 +9,6 @@ using Volian.Controls.Library;
using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms;
using System.Linq;
using System.Data;
namespace VEPROMS
{
@@ -63,13 +62,7 @@ namespace VEPROMS
swRmOrphanDataRecs.Enabled = false;
swRefreshWordAttmts.Enabled = false;
swStandardHypenChars.Enabled = false;
//if not full admin, disable Purge Change History
btnPurgeChange.Enabled = false;
}
//default to 10 years back
dtePurge.Value = DateTime.Now.AddYears(-10);
}
// Make txtProcess text box available to frmAnnotationsClean form.
internal TextBox GettxtProcess()
@@ -149,28 +142,7 @@ namespace VEPROMS
return false;
}
//C2026-002 Enhancements to new admin Tool for ROs not used.
private void ResetmyTV_RO_DBs()
{
this.Cursor = Cursors.WaitCursor;
myTV_RO_DBs.Nodes.Clear();
TreeNode tn = myTV_RO_DBs.Nodes.Add("Select All");
tn.Tag = 0;
tn.Checked = true;
foreach (DataRow rw in GeneralReports.GetRODBs().Rows)
{
TreeNode tn_db = tn.Nodes.Add(rw["dbiTitle"].ToString());
tn_db.Tag = rw["dbiID"].ToString();
tn_db.Checked = true;
}
tn.Expand();
this.Cursor = Cursors.Default;
}
private void ResetTV(bool noProcs)
private void ResetTV(bool noProcs)
{
btnFixLinks.Enabled = false;
this.Cursor = Cursors.WaitCursor;
@@ -1046,70 +1018,7 @@ namespace VEPROMS
}
}
//C2021-058 Admin Tool Purge Change History
private void btnPurgeChange_Click(object sender, EventArgs e)
{
if (AreOtherUserSessionsInProgress() || !CheckProcessLater()) return; // delay processing if set
//check any users have active sessions
//if they do, do not continue
if (!AreOtherUserSessionsInProgress())
{
DialogResult dr = MessageBox.Show("Are you sure you wish to Perform this action. This will remove all audit records before the specified date above, as well as the ability to restore deleted items from before the above date. It is recommended that you perform a database backup prior to performing this action.", "Purge Change History", MessageBoxButtons.OKCancel);
if (dr == DialogResult.OK)
{
//Purge Change History
string statmsg = $"Purging all Change History before {dtePurge.Value.Date.ToString("MM/dd/yyyy")}";
InitialProgressBarMessage = statmsg;
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine);
Maintenance.PurgeChangeHistory(dtePurge.Value);
//update status
statmsg = $"Finished Purging all Change History before {dtePurge.Value.Date.ToString("MM/dd/yyyy")}. Updating indexes to reflect cleaned data.";
DoProgressBarRefresh(50, 100, statmsg);
txtProcess.AppendText(statmsg);
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine);
//Perform Index Maintenance
Maintenance.IndexMaintenance();
statmsg = "Finished Purging Change History and Updating indexes to reflect cleaned data.";
FinalProgressBarMessage = statmsg;
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine);
MessageBox.Show("Purge Change History Completed", "Purge Change History");
}
}
}
private void myTV_AfterCheck(object sender, TreeViewEventArgs e)
{
//B2025 - 013 Admin Tool Tree Behavior
//only want to perform this if
// not an unknown action
// aka is a mouse click
// if this is fire-ing because clicked a parent or a child of an item
// want this to only fire once - for the item clicked - not for parents/children
if (e.Action != TreeViewAction.Unknown)
{
TreeView_AfterCheck(sender, e);
btnFixLinks.Enabled = btnDeleteItems.Enabled = AtLeastOneNodeChecked(((TreeView)sender).Nodes); // C2017-030 support for Refresh Transitions/Update RO Values
}
}
//C2026-002 Enhancements to new admin Tool for ROs not used.
private void TreeView_AfterCheck(object sender, TreeViewEventArgs e)
{
//B2025 - 013 Admin Tool Tree Behavior
//only want to perform this if
@@ -1131,9 +1040,12 @@ namespace VEPROMS
DiselectParentNodes(e.Node.Parent);
DiselectChildNodes(e.Node.Nodes);
}
btnFixLinks.Enabled = btnDeleteItems.Enabled = AtLeastOneNodeChecked(((TreeView)sender).Nodes); // C2017-030 support for Refresh Transitions/Update RO Values
}
}
private void DiselectParentNodes(TreeNode parent)
{
while (parent != null)
@@ -1274,21 +1186,6 @@ namespace VEPROMS
ResetDelTV(false);
}
//C2021-058 Admin Tool Purge Change History
//new Maintenance tab
private void sideNavItmMaint_Click(object sender, EventArgs e)
{
AdminToolType = E_AdminToolType.Maintenance;
setupProgessSteps1();
ResetmyTV_RO_DBs(); //C2026-002 Enhancements to new admin Tool for ROs not used.
//notify Set Admin user that only Full Admins can run maintenance tools
if (!IsAdministratorUser)
{
MessageBox.Show("Note: Only Full PROMS Administrator Users can run Purge Change History", "Maintenance Tools", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
#region On/Off Swiches
// C2017-030 new Admin Tools user interface
@@ -1296,8 +1193,7 @@ namespace VEPROMS
{
Repair = 1,
Links = 2,
Delete = 4,
Maintenance = 10
Delete = 4
};
private E_AdminToolType AdminToolType = E_AdminToolType.Repair;
@@ -1331,7 +1227,6 @@ namespace VEPROMS
break;
case E_AdminToolType.Links:
case E_AdminToolType.Maintenance:
splitContainer3.Panel2Collapsed = true;
progressSteps1.Visible = false;
break;
@@ -1766,106 +1661,7 @@ namespace VEPROMS
//clears the stack to help with memory - should never need to undo text changes to this.
txtResults.ClearUndo();
}
//C2025-052 Admin Tool Index Maintenance
private void btnIndexMaint_Click(object sender, EventArgs e)
{
if (!CheckProcessLater()) return; // delay processing if set
//check any users have active sessions
if (!AreOtherUserSessionsInProgress())
{
string statmsg = "Updating Indexes (this may take a few minutes to complete)...";
InitialProgressBarMessage = statmsg;
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
Maintenance.IndexMaintenance();
statmsg = "Finished Updating indexes.";
FinalProgressBarMessage = statmsg;
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
MessageBox.Show("Index Maintenance Completed", "Index Maintenance");
}
}
//C2021-058 Admin Tool Purge Change History/C2025-052 Admin Tool Index Maintenance
// If any other users have active sessions, stop and write
// out list of users
private bool AreOtherUserSessionsInProgress()
{
DataTable dt = Maintenance.GetOtherUserSessionsInProgress(MySessionInfo.UserID);
if (dt.Rows.Count == 0) return false;
txtProcess.AppendText("The following Users are currently in PROMS:");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText("Userid, Computer Name, last login");
txtProcess.AppendText(Environment.NewLine);
foreach (DataRow r in dt.Rows)
{
txtProcess.AppendText($"{r["UserID"]}, {r["MachineName"]}, {r["DTSDtart"]}");
txtProcess.AppendText(Environment.NewLine);
}
MessageBox.Show("Certain Maintenance functions cannot be run if other users are currently in PROMS. Please see the output Results text for a list of other users with active PROMS sessions.", "Active PROMS Sessions", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return true;
}
//CSM - C2025-043 report RO's that are not used in any of the PROMS data.
private void btnROsNotUsed_Click(object sender, EventArgs e)
{
//Get the path to save the Image to
SaveFileDialog sfd = new SaveFileDialog();
sfd.DefaultExt = "bmp";
sfd.AddExtension = true;
sfd.Filter = "Image Files (*.bmp)|*.bmp";
sfd.FileName = string.Format("ROsNotUsed_{0}", DateTime.Now.ToString("yyyyMMdd_HHmm"));
sfd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS";
DialogResult dr = sfd.ShowDialog();
if (dr == DialogResult.OK)
{
//Initial messaging
string statmsg = "Generating Snapshot (this may take a few minutes to complete)...";
InitialProgressBarMessage = statmsg;
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
//C2026-002 Enhancements to new admin Tool for ROs not used.
//Get the selected nodes
DataTable dtIDs = new DataTable();
dtIDs.Columns.Add("ID");
foreach (TreeNode tn in myTV_RO_DBs.Nodes[0].Nodes)
if (tn.Checked)
{
DataRow dtrw = dtIDs.NewRow();
dtrw["ID"] = int.Parse(tn.Tag.ToString());
dtIDs.Rows.Add(dtrw);
}
//Generate the data for ROs Not Used and save it to a TreeView
TreeView tv = TreeViewExtensions.GetROTree(GeneralReports.GetROsNotUsedInPROMS(dtIDs), true);
//Output the TreeView as an Image
if (tv.Nodes.Count != 0)
tv.SaveTreeViewAsImage(sfd.FileName);
//Give Messaging demonstrating finished and open file if requested
statmsg = "Finished Generating Snapshot of ROs Not Used.";
FinalProgressBarMessage = statmsg;
txtResults.AppendText(statmsg);
txtResults.AppendText(Environment.NewLine);
if (tv.Nodes.Count != 0 && MessageBox.Show($"{statmsg}\r\n\r\nDo you wish to open the snapshot now?", "ROs Not Used", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
System.Diagnostics.Process.Start(sfd.FileName);
else if (tv.Nodes.Count == 0)
MessageBox.Show("All ROs are currently in use.", "ROs Not Used", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
}

View File

@@ -117,96 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnPurgeChange.Tooltip" xml:space="preserve">
<value>Purges all audit information and change history older than the above date.
It is recommended that you perform a database backup before performing this action.
Note after purging the information, this will automatically perform the Index
Maintenance function to realign indexes with the cut down audit data.
Only Full PROMS Administrator Users can perform this action.</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value>
</data>
<data name="warningBox6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value>
</data>
<data name="btnIndexMaint.Tooltip" xml:space="preserve">
<value>This will perform Index Maintenance to realign indexes to optimize performance.
This function will cause no change to data or records in PROMS.
It should however be performed when other users are not in PROMS, as it could
cause slowdown or errors for other users while it is running.</value>
</data>
<data name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing">
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</data>
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
<value>This allows the user to remove folders and sub folders as well as their contents.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX13.SuperTooltip" xml:space="preserve">
<value>This allows the user to remove folders and sub folders as well as their contents.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve">
<value>This function will allow the user to remove annotations from the selected working drafts.
Be sure a current backup of the database exists prior to running this function.
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="labelX14.SuperTooltip" xml:space="preserve">
<value>This function will allow the user to remove annotations from the selected working drafts.
Be sure a current backup of the database exists prior to running this function.
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="btnDeleteItems.SuperTooltip" xml:space="preserve">
<value>This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete.
Click on the on/off switches to turn on/off each tool.
Note that only one of these tools can be run at a time.</value>
</data>
</metadata>
<data name="swRefreshTblsForSrch.SuperTooltip" xml:space="preserve">
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
@@ -219,6 +132,7 @@ This function will remove all of the saved attachment PDFS stored in the databas
This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
@@ -302,24 +216,63 @@ Should an item become orphaned (disconnected) from the rest of the data, it will
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool removes any orphaned items from the database.
</value>
</data>
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
<value>This allows the user to remove folders and sub folders as well as their contents.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX13.SuperTooltip" xml:space="preserve">
<value>This allows the user to remove folders and sub folders as well as their contents.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve">
<value>This function will allow the user to remove annotations from the selected working drafts.
Be sure a current backup of the database exists prior to running this function.
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="labelX14.SuperTooltip" xml:space="preserve">
<value>This function will allow the user to remove annotations from the selected working drafts.
Be sure a current backup of the database exists prior to running this function.
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
</data>
<data name="btnDeleteItems.SuperTooltip" xml:space="preserve">
<value>This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete.
Click on the on/off switches to turn on/off each tool.
Note that only one of these tools can be run at a time.</value>
</data>
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced object links in procedure step data for multiple working drafts in a batch mode.
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced object links will be identified with a Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior to performing this function.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX12.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced object links in procedure step data for multiple working drafts in a batch mode.
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced object links will be identified with a Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior to performing this function.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
@@ -388,8 +341,7 @@ If more than one procedure is selected, it is recommended that this be performed
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.TrayHeight" type="System.Int32, mscorlib">
<value>25</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>46</value>
</metadata>
</root>

View File

@@ -20,27 +20,7 @@ namespace VEPROMS
_MyUser = value;
SimpleUser su = new SimpleUser(_MyUser);
pgUser.SelectedObject = su;
//C2026-002 Change Title bar on Add/Edit User
string tmp;
if (!string.IsNullOrEmpty(su.FirstName) && !string.IsNullOrEmpty(su.LastName))
{
tmp = $"{su.UserID} ({su.FirstName} {su.LastName}) Information";
}
else if (!string.IsNullOrEmpty(su.LastName))
{
tmp = $"{su.UserID} ({su.LastName}) Information";
}
else if (!string.IsNullOrEmpty(su.FirstName))
{
tmp = $"{su.UserID} ({su.FirstName}) Information";
}
else
{
tmp = $"{su.UserID} Information";
}
this.Text = tmp;
this.Text = string.Format("{0} ({1} {2}) Information",su.UserID,su.FirstName,su.LastName);
}
}
private string _Mode;

View File

@@ -284,15 +284,6 @@ namespace VEPROMS
cachePartInfo = PartInfo.CacheList;
}
//B2025-048 Problem with Printing CAS Steps
// skip doing section titles if printing CAS or CTAS
// - was causing it to
// skip/overwrite data
if (OnlyShowContinuousActionSummary)
{ MyPromsPrinter.PromsPrinterPrintType = PromsPrinterPrintType.CAS_Only; }
if (OnlyShowTimeCriticalActionSummary)
{ MyPromsPrinter.PromsPrinterPrintType = PromsPrinterPrintType.TCAS_only; }
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary, PrtSectID);
ProfileTimer.Pop(profileDepth);

View File

@@ -30,6 +30,7 @@ namespace VEPROMS
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSysOptions));
//this.btnCancel = new DevComponents.DotNetBar.ButtonX();
this.btnOK = new DevComponents.DotNetBar.ButtonX();
this.gpSystemColor = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbRibonBlack = new DevComponents.DotNetBar.Controls.CheckBoxX();
@@ -49,7 +50,6 @@ namespace VEPROMS
this.gpShwRplWords = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbShwRplWrdsColor = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.gpAnnoTypeFilter = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbShwAnnoFilter = new DevComponents.DotNetBar.ButtonX();
this.gpVisioPath = new DevComponents.DotNetBar.Controls.GroupPanel();
this.txbxVisioPath = new DevComponents.DotNetBar.Controls.TextBoxX();
this.gpSeparateWindows = new DevComponents.DotNetBar.Controls.GroupPanel();
@@ -72,10 +72,10 @@ namespace VEPROMS
this.cbTabbedIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbButtonIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.tiIntrFaceStngs = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel();
this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components);
this.cbUCFLForSetOnly = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbUCFLUseAll = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbUCFLOnlyImport = new DevComponents.DotNetBar.Controls.CheckBoxX();
@@ -83,6 +83,7 @@ namespace VEPROMS
this.cbUCFIgnore = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.btnReset = new DevComponents.DotNetBar.ButtonX();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.cbShwAnnoFilter = new DevComponents.DotNetBar.ButtonX();
this.gpSystemColor.SuspendLayout();
this.panButtons.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit();
@@ -102,6 +103,18 @@ namespace VEPROMS
this.gpTransRangeColor.SuspendLayout();
this.gpPropPageStyle.SuspendLayout();
this.SuspendLayout();
////
//// btnCancel
////
//this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
//this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
//this.btnCancel.Location = new System.Drawing.Point(616, 591);
//this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
//this.btnCancel.Name = "btnCancel";
//this.btnCancel.Size = new System.Drawing.Size(56, 19);
//this.btnCancel.TabIndex = 0;
//this.btnCancel.Text = "Cancel";
//this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
@@ -551,18 +564,6 @@ namespace VEPROMS
this.gpAnnoTypeFilter.TabIndex = 13;
this.gpAnnoTypeFilter.Text = "Filter Annotation Types";
//
// cbShwAnnoFilter
//
this.cbShwAnnoFilter.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.cbShwAnnoFilter.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.cbShwAnnoFilter.Location = new System.Drawing.Point(25, 13);
this.cbShwAnnoFilter.Name = "cbShwAnnoFilter";
this.cbShwAnnoFilter.Size = new System.Drawing.Size(91, 23);
this.cbShwAnnoFilter.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbShwAnnoFilter.TabIndex = 0;
this.cbShwAnnoFilter.Text = "Open";
this.cbShwAnnoFilter.Click += new System.EventHandler(this.cbShwAnnoFilter_Click);
//
// gpVisioPath
//
this.gpVisioPath.BackColor = System.Drawing.Color.Transparent;
@@ -740,7 +741,6 @@ namespace VEPROMS
this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(99, 19);
this.cbEnhancedDocumentSync.TabIndex = 9;
this.cbEnhancedDocumentSync.Text = "Sync Navigation";
this.cbEnhancedDocumentSync.CheckedChanged += new System.EventHandler(this.cbEnhancedDocumentSync_CheckedChanged);
//
// gpPasteSettings
//
@@ -1147,31 +1147,6 @@ namespace VEPROMS
this.tiIntrFaceStngs.Name = "tiIntrFaceStngs";
this.tiIntrFaceStngs.Text = "My Interface Settings";
//
// tabControlPanel2
//
this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty;
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 27);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(645, 528);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control;
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel2.Style.GradientAngle = 90;
this.tabControlPanel2.TabIndex = 2;
this.tabControlPanel2.TabItem = this.tiStUpMsg;
this.tabControlPanel2.ThemeAware = true;
//
// tiStUpMsg
//
this.tiStUpMsg.AttachedControl = this.tabControlPanel2;
this.tiStUpMsg.Name = "tiStUpMsg";
this.tiStUpMsg.Text = "Startup Message";
this.tiStUpMsg.Visible = false;
//
// tabControlPanel1
//
this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty;
@@ -1197,6 +1172,31 @@ namespace VEPROMS
this.tiGeneral.Text = "General";
this.tiGeneral.Visible = false;
//
// tabControlPanel2
//
this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty;
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 27);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(645, 528);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control;
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel2.Style.GradientAngle = 90;
this.tabControlPanel2.TabIndex = 2;
this.tabControlPanel2.TabItem = this.tiStUpMsg;
this.tabControlPanel2.ThemeAware = true;
//
// tiStUpMsg
//
this.tiStUpMsg.AttachedControl = this.tabControlPanel2;
this.tiStUpMsg.Name = "tiStUpMsg";
this.tiStUpMsg.Text = "Startup Message";
this.tiStUpMsg.Visible = false;
//
// cbUCFLForSetOnly
//
this.cbUCFLForSetOnly.BackColor = System.Drawing.Color.Transparent;
@@ -1291,17 +1291,31 @@ namespace VEPROMS
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// cbShwAnnoFilter
//
this.cbShwAnnoFilter.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.cbShwAnnoFilter.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.cbShwAnnoFilter.Location = new System.Drawing.Point(25, 13);
this.cbShwAnnoFilter.Name = "cbShwAnnoFilter";
this.cbShwAnnoFilter.Size = new System.Drawing.Size(91, 23);
this.cbShwAnnoFilter.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbShwAnnoFilter.TabIndex = 0;
this.cbShwAnnoFilter.Text = "Open";
this.cbShwAnnoFilter.Click += new System.EventHandler(this.cbShwAnnoFilter_Click);
//
// frmSysOptions
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
//this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(699, 620);
this.ControlBox = false;
this.Controls.Add(this.btnReset);
this.Controls.Add(this.tcSysOpts);
this.Controls.Add(this.panButtons);
this.Controls.Add(this.btnOK);
//this.Controls.Add(this.btnCancel);
this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);

View File

@@ -270,7 +270,7 @@ namespace VEPROMS
private void cbStepTypeToolTip_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.StepTypeToolTip = cbStepTypeToolTip.Checked;
VlnSettings.StepTypeToolTip = cbStepTypeToolTip.Checked;
VlnSettings.StepTypeToolType = cbStepTypeToolTip.Checked;
}
private void cbTVExpand_CheckedChanged(object sender, EventArgs e)
{

View File

@@ -98,8 +98,6 @@ namespace VEPROMS
_SelectedStepTabPanel.MyStepTabRibbon.ContActionSummaryRequest += MyStepTabRibbon_ContActionSummaryRequest;
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree -= new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree += new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
_SelectedStepTabPanel.MyStepTabRibbon.EnableDisableStepProperties -= EnableDisableStepProperties;
_SelectedStepTabPanel.MyStepTabRibbon.EnableDisableStepProperties += new StepTabRibbonEvent(EnableDisableStepProperties);
// F2022-024 Time Critical Action Summary
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest -= MyStepTabRibbon_TimeCriticalActionSummaryRequest;
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest += MyStepTabRibbon_TimeCriticalActionSummaryRequest;
@@ -121,7 +119,7 @@ namespace VEPROMS
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
@@ -374,12 +372,12 @@ namespace VEPROMS
cmbFont.SelectedIndex = -1;
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
string db = Volian.Base.Library.VlnSettings.GetDB();
if (db != null)
Database.SelectedDatabase = db;
//B2018-129 Most Recently Used list was being cleared. Needed to remove a (string) type case in the IF statement
if (!string.IsNullOrEmpty((string)Properties.Settings.Default["DefaultDB"]))
if (!string.IsNullOrEmpty((string)Properties.Settings.Default["DefaultDB"]))
Database.LastDatabase = Properties.Settings.Default.DefaultDB;
// Setup the Context menu for DisplaySearch including the symbols
@@ -418,7 +416,7 @@ namespace VEPROMS
// B2019-107 Error Log message for inconsistent PromsFixes
_MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>{5}"
, Application.ProductVersion, Database.RevDate, Environment.UserDomainName, Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt"), FormatInfo.Failed ?? "");
// C2022-030 Notify the user if the stored procedure in the database are not update to date
// with those in the PROMSFixes.sql delivered with the PROMS executable
string pfVersion = ExeInfo.GetAssocicatedPROMSFixesVersion();
@@ -526,7 +524,7 @@ namespace VEPROMS
this.Activated += new EventHandler(frmVEPROMS_Activated);
VlnSettings.StepTypeToolTip = Settings.Default.StepTypeToolTip;
VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip;
VlnSettings.cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest);
ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory);
@@ -548,7 +546,7 @@ namespace VEPROMS
tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo);
tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF);
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets);
tv.PrintTransitionReport += new vlnTreeViewEvent(tv_PrintTransitionReport);
tv.ProcessingComplete += tv_ProcessingComplete;
@@ -556,23 +554,10 @@ namespace VEPROMS
tv.CreateContinuousActionSummary += new vlnTreeViewEvent(tv_CreateContinuousActionSummary);
tv.SelectDateToStartChangeBars += tv_SelectDateToStartChangeBars;
tv.CreateTimeCriticalActionSummary += new vlnTreeViewEvent(tv_CreateTimeCriticalActionSummary);
tv.RefreshFormats += new vlnTreeViewStatusEvent(RefreshFormats);
displayBookMarks.ResetBookMarksInPROMSWindows += displayBookMarks_ResetBookMarksInPROMSWindows;
}
//C2021-035 Add Refresh Tree Option at highest level
void RefreshFormats(object sender, vlnTreeStatusEventArgs args)
{
Format.ClearFormatCache();
FormatInfo.ClearFormatInfoCache();
FormatInfo.Reset();
FormatInfoList.Reset();
Format.Reset();
FormatList.Reset();
displaySearch1.SetupContextMenu();
}
// Part of Separate Windows upgrade C2015-022
// Extend Changes to BookMark information to all of the child windows
void displayBookMarks_ResetBookMarksInPROMSWindows(object sender, EventArgs args)
@@ -589,26 +574,7 @@ namespace VEPROMS
}
}
//B2019-140 Change bars do not get refreshed when approval is run.
// Get the displaytab containing the procedure
// if none exists, return null
public DisplayTabItem GetTabContainingProcedure(int procid) => tc?.MyBar?.Items?.OfType<DisplayTabItem>().FirstOrDefault(x => x.MyItemInfo?.ItemID == procid);
// Refresh Node in Tree
// Used for when Change Bar Updates as part of approval.
public void RefreshProcedureNode(ProcedureInfo itm)
{
VETreeNode tn = tv.FindNode(itm, tv.Nodes);
var tmp = (ProcedureInfo)tn?.VEObject;
if (tmp != null)
{
tmp.ChangeBarDate = itm.ChangeBarDate;
tmp.MyConfig = itm.MyConfig;
}
tn?.RefreshNode();
}
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
{
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
if (pi == null) return;
@@ -625,23 +591,6 @@ namespace VEPROMS
itm.MyContent.Config = pc.ToString();
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
itm.Save();
//B2019-140 Change bars do not get refreshed when approval is run.
// Reset a Procedure and sub items in the cache
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
if (dti != null)
{
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus();
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
}
}
}
@@ -1234,7 +1183,6 @@ namespace VEPROMS
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref message))
{
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
@@ -1377,17 +1325,12 @@ namespace VEPROMS
prnDlg.SetupForProcedure(); // Setup filename
if (quickprint)
{
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs B2025-051
prnDlg.QPCreatePDF(); // Create Print report
}
else
{
prnDlg.ShowDialog(this); // Create Print report
}
else
prnDlg.ShowDialog(this); // Create Print report
//B2025-032 Fix Section not Printing Applicability Properly
si2.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
//B2025-032 Fix Section not Printing Applicability Properly
si2.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
}
}
@@ -1859,15 +1802,14 @@ namespace VEPROMS
// Deactivate previous procedure tab state by user
VEPROMS.CSLA.Library.Item.DeactivateStateDisplayTabTmp(MySessionInfo.UserID);
// Save current procedure tab state
//B2024-082 Remember Tabs Not opening in correct order
foreach (DisplayTabItem dti in tc.MyBar.Items)
foreach (KeyValuePair<string, DisplayTabItem> pgTab in tc._MyDisplayTabItems)
{
cnt++;
DisplayTabID = dti.MyKey;
TabItemID = dti.MyItemInfo.ItemID;
DisplayTabName = dti.ToString();
Item.AddDisplayTabsState(TabItemID, DisplayTabID, DisplayTabName, MySessionInfo.UserID, cnt);
DisplayTabID = pgTab.Key;
TabItemID = Int32.Parse(DisplayTabID.Substring(DisplayTabID.IndexOf("Item - ") + 7));
DisplayTabName = pgTab.Value.ToString();
//tc.SelectedDisplayTabItem.MyStepTabPanel.ToString()
VEPROMS.CSLA.Library.Item.AddDisplayTabsState(TabItemID, DisplayTabID, DisplayTabName, MySessionInfo.UserID, cnt);
}
}
@@ -2124,10 +2066,7 @@ namespace VEPROMS
{
foreach (DisplayTabItem dti in tc.MyBar.Items)
{
//C2019-036 View Only mode work with Checked Out Procedures
// View Only Mode is no longer checked out, so no longer has an OwnerID
// This will keep those tabs from auto-closing based on the timer
if (!myList.Contains(dti.OwnerID) && dti.MyStepTabPanel.MyStepPanel.VwMode != E_ViewMode.View)
if (!myList.Contains(dti.OwnerID))
{
MyCloseTabList.PushDTI(dti);
}
@@ -2533,7 +2472,7 @@ namespace VEPROMS
//and set checkboxes based on what they are set to
UserSettings usersettings = new UserSettings(VlnSettings.UserID);
if (!Settings.Default.SeparateWindows && DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
if (DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
{
//will open tabs by default / ask by default
DialogResult result = DialogResult.Yes;
@@ -2557,7 +2496,6 @@ namespace VEPROMS
// Open procedure in the editor.
if (_Procedure == null) continue; //skip and continue with foreach
OpenItem(_Procedure);
if (tc.MyEditItem == null) continue; // skip and continue with foreach
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
@@ -2569,7 +2507,6 @@ namespace VEPROMS
{
SelectedStepTabPanel.Select();
dlgFindReplace.MyEditItem = tc.MyEditItem;
SpellChecker.MyEditItem = tc.MyEditItem; //B2025-043 Remember Tabs is not setting the EditItem for the active window causing a PROMS crash when Spell Check
}
}
}
@@ -3968,7 +3905,6 @@ namespace VEPROMS
string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(args.ProcedureConfig.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
{
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.Cursor = Cursors.Default;
return DialogResult.None;
@@ -3992,7 +3928,6 @@ namespace VEPROMS
string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(args.SectionConfig.MySection.MySectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
{
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.Cursor = Cursors.Default;
return DialogResult.None;
@@ -4793,11 +4728,6 @@ namespace VEPROMS
// B2022-026 RO Memory reduction coding (Jakes Merge)
displayRO.SetFindDocROButton(false);
displayRO.LoadTree();
//C2019-036 View Only mode work with Checked Out Procedures
//In View Only Mode - Step Properties should be disabled
EnableDisableStepProperties(sender, new StepTabRibbonEventArgs(args.MyEditItem.MyItemInfo, 0, args.MyEditItem.MyStepPanel.VwMode));
}
else
{
@@ -4829,22 +4759,6 @@ namespace VEPROMS
}
//C2019-036 View Only mode work with Checked Out Procedures
//In View Only Mode - Step Properties should be disabled
public void EnableDisableStepProperties(object sender, StepTabRibbonEventArgs args)
{
if (args.ViewMode == E_ViewMode.View && (infoTabs.Enabled || infoTabs.SelectedTab != infotabTags))
{
infoTabs.Enabled = true;
infoTabs.SelectedTab = infotabTags;
infoTabs.Enabled = false;
}
else if (args.ViewMode != E_ViewMode.View && !infoTabs.Enabled)
{
infoTabs.Enabled = true;
}
}
void _LastStepRTB_EditModeChanged(object sender, EventArgs args)
{
if (_LastStepRTB.EditMode) // going into edit mode in a cell of the grid.
@@ -5380,8 +5294,6 @@ namespace VEPROMS
private void btnUpdateFormat_Click(object sender, EventArgs e)
{
UpdateFormats(null);
//C2025-060 When format is updated in PROMS, auto-update the format cache so it doesn't require exiting PROMS and going back in.
RefreshFormats(sender, null);
}
private void UpdateFormats(string mypath)

View File

@@ -2098,15 +2098,6 @@ namespace VEPROMS.CSLA.Library
{
string resstr = rtnstr.Substring(0, indx);
int endHsp = rtnstr.IndexOf(")", indx);
//B2026 - 002 handle if parens inside a HSP
int startpos = indx + 5;
while (rtnstr.Substring(startpos, endHsp - startpos).Contains("("))
{
startpos = rtnstr.IndexOf("(", startpos + 1, endHsp - startpos) + 1;
endHsp = rtnstr.IndexOf(")", endHsp + 1);
}
string tmpstr = rtnstr.Substring(indx + 5, endHsp - indx - 5);
// B2017-012 Don't convert space to hard spaces for XY Plots.

View File

@@ -394,33 +394,6 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_ChangeID");
}
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
// was last change made in editorial mode and thus change bars should be disabled?
// will contain userid of user that made last change if it was in Editorial Mode
// if there was not a previous change that would have caused change bars
// will be blank/empty by default
// will get overwritten every time a change is made
public string Step_ChangeIDEditorialMode
{
get
{
string s = _Xp["Step", "ChangeIDEMode"];
if (s == string.Empty) return null;
return s;
}
set
{
string s = _Xp["Step", "ChangeIDEMode"];
if (value != null && value.ToString() == s) return;
if (value == null && s != null) _Xp["Step", "ChangeIDEMode"] = null;
else _Xp["Step", "ChangeIDEMode"] = value.ToString();
OnPropertyChanged("Step_ChangeIDEMode");
}
}
public string Step_Responsibility
{
get

View File

@@ -2647,8 +2647,8 @@ namespace VEPROMS.CSLA.Library
with = with.Replace(@"\ul ", "");
with = with.Replace(@"\ulnone ", "");
}
// B2025-050 use VlnSettings so we don't need to restart PROMS
if (VlnSettings.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
//if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
{
with = $@"\cf2{with}\cf0 ";
}

View File

@@ -765,19 +765,6 @@ namespace VEPROMS.CSLA.Library
foreach (DocVersionInfo dvi in _CacheByPrimaryKey[key])
dvi.ResetProcedures();
}
//C2021-035 Add Refresh Tree Option at highest level
public static void ResetAllProcedures()
{
foreach (string key in _CacheByPrimaryKey.Keys)
{
foreach (DocVersionInfo dvi in _CacheByPrimaryKey[key])
dvi.ResetProcedures();
}
foreach (DocVersionInfo dvi in _CacheList)
dvi.ResetProcedures();
}
#region IVEReadOnlyItem
public System.Collections.IList GetChildren()
{

View File

@@ -1363,14 +1363,9 @@ namespace VEPROMS.CSLA.Library
// An X/Y Plot RO type might have text preceding the Plot Commands
int pstart = roValue.IndexOf("<<G"); // find the starting Plot Command
//B2025-065 When Printing a Word Section containing XY Plot ROs - when there is a title on the XY Plot, only the first line is indented.
//get x-offset
float fx1 = (float)MyApp.ActiveDocument.Range(sel.Start, sel.Start).get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
fx1 -= (float)MyApp.ActiveDocument.Range(0, 0).get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
// B2017-217 Added logic so that underscores are not converted to underline
// C2018-003 fixed use of getting the active section
AddPrecedingText(sel, roValue.Substring(0, pstart), fx1, (sect.ActiveSection != null) ? sect.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertUnderscoreToUnderline : false);// replace the RO token with what's in front of the X/Y Plot
AddPrecedingText(sel, roValue.Substring(0, pstart), 0.0F, (sect.ActiveSection != null) ? sect.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertUnderscoreToUnderline : false);// replace the RO token with what's in front of the X/Y Plot
roValue = roValue.Substring(pstart); // set rovalue to the start of the plot commands
pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png";
@@ -1391,10 +1386,6 @@ namespace VEPROMS.CSLA.Library
float yAdjust = sel.Font.Size;
float yyy = yAdjust + y + plotRect.Y;
//B2025-065 When Printing a Word Section containing XY Plot ROs - when there is a title on the XY Plot, only the first line is indented.
xxx += fx1; //shift by x-offset
LBShape shape = myDoc.Shapes.AddPicture(pngFile, xxx, yyy, sel.Range);
try

View File

@@ -275,14 +275,6 @@ namespace VEPROMS.CSLA.Library
}
}
//C2021-035 Add Refresh Tree Option at highest level
public static void Reset()
{
_LookupFormats?.Clear();
_LookupFormats = null;
_ = LookupFormats;
}
private static Format AddFormatToDB(Format parent, string format, bool issub, DateTime Dts, string Userid, string fmtPath, string genmacPath)
{
string fmtdata = null;
@@ -517,12 +509,7 @@ public partial class FormatInfo : IFormatOrFormatInfo
return _PROMSBaseFormat;
}
}
public static void Reset()
{
_PROMSBaseFormat = null;
}
public static FormatInfo Get(string name)
public static FormatInfo Get(string name)
{
try
{

View File

@@ -3312,26 +3312,7 @@ namespace VEPROMS.CSLA.Library
return retval;
}
}
//B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
// for enhanced documents, when copying content, need to not resolve the
//unit designators until print time
public string DisplayTextKeepSpecialCharsKeepUnitSpecific
{
get
{
string str = MyContent.Text;
foreach (string key in SpecialCharacters.Keys)
str = str.Replace(key, SpecialCharacters[key]);
string retval = ConvertToDisplayText(str);
foreach (string key in SpecialCharacters.Keys)
retval = retval.Replace(SpecialCharacters[key], key);
return retval;
}
}
public string DisplayNumber
public string DisplayNumber
{
get
{
@@ -3838,51 +3819,6 @@ namespace VEPROMS.CSLA.Library
_Tables = null;
_SupInfos = null;
}
//B2019-140 Change bars do not get refreshed when approval is run.
// Reset a Procedure and sub items in the cache
public static ProcedureInfo ResetProcedure(int procID)
{
// The following lines reload the procedure info cache
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);
newproc.RefreshConfig();
//the following is needed to force the ProcedureConfig to reload
#pragma warning disable S1656 // Variables should not be self-assigned
newproc.MyConfig = newproc.MyConfig;
#pragma warning restore S1656 // Variables should not be self-assigned
//reload the Content Cache for the procedure
ContentInfo.Refresh(Content.Get(newproc.MyContent.ContentID, true));
// The following line actually reloads the item info cache
ItemInfo newprocitem = Get(procID, true);
newprocitem.RefreshConfig();
//Reload all the child/sub items
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
List<int> itemIDs = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.ActiveParent != null && (t.ActiveParent is ItemInfo) && t.MyProcedure.ItemID == procID).Select(x => (x.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
#pragma warning restore S2971 // LINQ expressions should be simplified
for (int index = 0; index < itemIDs.Count; index++)
{
ResetParts(itemIDs[index]);
}
//reset the procedure config for all items attached to current procedure
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
List<ItemInfo> pconfigrefresh_items = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.MyProcedure?.ItemID == procID).Distinct().ToList();
#pragma warning restore S2971 // LINQ expressions should be simplified
for (int index = 0; index < pconfigrefresh_items.Count; index++)
{
pconfigrefresh_items[index].MyProcedure = newproc;
}
//return the changed procedure info
return newproc;
}
private ItemInfoList _Procedures;
public ItemInfoList Procedures
{ get { return Lookup(E_FromType.Procedure, ref _Procedures); } }
@@ -3997,7 +3933,9 @@ namespace VEPROMS.CSLA.Library
get
{
bool chg = HasChanges;
StepConfig sc = this.MyConfig as StepConfig;
StepInfo si = this as StepInfo;
if (si == null) return false;
StepConfig sc = si.MyConfig as StepConfig;
if (sc == null) return false;
// if there is no override & return whether there was a change to the text.
if (chg && ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds &&
@@ -4005,21 +3943,6 @@ namespace VEPROMS.CSLA.Library
return false; // No Change ID - No Change Bar
if ((sc.Step_SpellCheckerChangedText ?? "") == "NoChangeBar")
return false; // Spell Checker, in editorial mode (format flag EditoralSpellCheck) , made the change and there was no change bar prior to that change B2015-024
// C2015-028 Add Editorial Mode to PROMS Step Editor
// last change was in editorial mode, so ignore it
if (!string.IsNullOrEmpty(sc.Step_ChangeIDEditorialMode))
return false;
// C2015-028 Add Editorial Mode to PROMS Step Editor
// Add Check for enhanced docs
// If enhanced docs, need to check the step_config for the master
if (sc.MyEnhancedDocuments != null && sc.MyEnhancedDocuments.Count == 1 && sc.MyEnhancedDocuments[0].Type == 0)
{
ItemInfo ii = ItemInfo.Get(sc.MyEnhancedDocuments[0].ItemID, true);
if (ii == null) return false; // when deleting a source step, this was causing a crash (null ii)
return ii.HasChangeBar;
}
if (sc.Step_CBOverride == null)
return chg;
return (sc.Step_CBOverride == "On");
@@ -4030,7 +3953,9 @@ namespace VEPROMS.CSLA.Library
get
{
if (this.IsAccPages || this.IsProcedure || this.IsSection) return false;
StepConfig sc = this.MyConfig as StepConfig;
StepInfo si = this as StepInfo;
if (si == null) return false;
StepConfig sc = si.MyConfig as StepConfig;
if (sc == null) return false;
// go back to source & see what date it has:
if (sc.MyEnhancedDocuments != null && sc.MyEnhancedDocuments.Count == 1 && sc.MyEnhancedDocuments[0].Type == 0)
@@ -4764,26 +4689,6 @@ namespace VEPROMS.CSLA.Library
{
_MyTab.Text = _MyTab.Text.Substring(1);
}
// C2026-003 Vogtle Continuous Action high level RNO (AER is not continuous action)
if (ActiveFormat.MyStepSectionLayoutData.AddContActTagToHighLevelRNOWhenIncludedOnCAS &&
IsInRNO && !MyParent.IsInRNO && FormatStepData.TabData.CASPrintMacro != null)
{
// B2026-009 needed to make sure parent wasn't a continuous action step type
// the ExcludeFromContActSum is set to False for continuous action
// step types and True for all others
StepConfig psc = MyParent.MyConfig as StepConfig;
if (MyParent.FormatStepData.ExcludeFromContActSum && psc != null && psc.Step_CAS != "True")
{
StepConfig sc = MyConfig as StepConfig;
if (sc != null && sc.Step_CAS == "True")
{
if (FormatStepData.TabData.CASPrintMacro != null)
_MyTab.Text = FormatStepData.TabData.CASPrintMacro + _MyTab.Text;
if (FormatStepData.TabData.CASEditTag != null)
_MyTab.CleanText = FormatStepData.TabData.CASEditTag + _MyTab.CleanText;
}
}
}
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize ?? 0;
if (((ItemInfo)ActiveParent).MyTab.Offset != 0) _MyTab.Offset = ((ItemInfo)ActiveParent).MyTab.Offset;
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
@@ -8068,20 +7973,12 @@ namespace VEPROMS.CSLA.Library
public ProcedureInfo(SafeDataReader dr) : base(dr) { }
#endif
private ProcedureInfo() : base() { ;}
public new static ProcedureInfo Get(int itemID, bool forcerefresh = false)
public new static ProcedureInfo Get(int itemID)
{
//if (!CanGetObject())
// throw new System.Security.SecurityException("User not authorized to view a Item");
try
{
//C2019-036 View Only mode work with Checked Out Procedures
// fixes caching issue
// so this forces a refresh of the cache
if (forcerefresh)
{
_CacheByPrimaryKey.Remove(itemID.ToString());
}
ProcedureInfo tmp = GetCachedByPrimaryKey(itemID);
if (tmp == null)
{
@@ -8376,11 +8273,8 @@ namespace VEPROMS.CSLA.Library
if (seds != null && seds.Count != 0)
{
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced. Null reference check
//B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
// for enhanced documents, when copying content, need to not resolve the
//unit designators until print time
if (srcItem != null && srcItem.DisplayTextKeepSpecialCharsKeepUnitSpecific != ii.DisplayTextKeepSpecialCharsKeepUnitSpecific)
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced. Null reference check
if (srcItem != null && srcItem.DisplayTextKeepSpecialChars != ii.DisplayTextKeepSpecialChars)
{
if (retiil == null) retiil = new ItemInfoList(ii);
else retiil.AddItem(ii);
@@ -8406,10 +8300,7 @@ namespace VEPROMS.CSLA.Library
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
using (Item enhItem = Item.Get(ii.ItemID))
{
//B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
// for enhanced documents, when copying content, need to not resolve the
//unit designators until print time
enhItem.MyContent.Text = srcItem.DisplayTextKeepSpecialCharsKeepUnitSpecific;
enhItem.MyContent.Text = srcItem.DisplayTextKeepSpecialChars;
enhItem.Save();
}
}

View File

@@ -1638,7 +1638,7 @@ namespace VEPROMS.CSLA.Library
// get the first enhanced section, there may be non-linked sections before first linked section:
SectionConfig firstEnhSectionConfig = pastedEnhancedProc.Sections == null ? null : pastedEnhancedProc.Sections[0].MyConfig as SectionConfig;
ItemInfo pastedEnhancedCurrentSection = null;
if (firstEnhSectionConfig?.MyEnhancedDocuments.Count > 0) pastedEnhancedCurrentSection = pastedEnhancedProc.Sections[0];
if (firstEnhSectionConfig.MyEnhancedDocuments.Count > 0) pastedEnhancedCurrentSection = pastedEnhancedProc.Sections[0];
else pastedEnhancedCurrentSection = GetNextEnhancedSection(pastedEnhancedProc.Sections[0]);
// newly pasted procedure has sections/steps, need to adjust 'MyEnhancedDocuments' config items to point to correct
@@ -1647,7 +1647,7 @@ namespace VEPROMS.CSLA.Library
foreach (ItemInfo sourceSect in Sections)
{
SectionConfig srcCfg = sourceSect.MyConfig as SectionConfig;
if (srcCfg != null && (srcCfg.Section_LnkEnh != "N") && srcCfg.MyEnhancedDocuments != null && srcCfg.MyEnhancedDocuments.Count > 0)
if (srcCfg != null && (srcCfg.Section_LnkEnh=="Y" || srcCfg.Section_LnkEnh=="T") && srcCfg.MyEnhancedDocuments != null && srcCfg.MyEnhancedDocuments.Count > 0)
{
// use pastedEnhancedCurrentSection to link to:
foreach (EnhancedDocument ed in srcCfg.MyEnhancedDocuments)
@@ -1664,7 +1664,7 @@ namespace VEPROMS.CSLA.Library
enhSectCfg.MyEnhancedDocuments[0].ItemID = sourceSect.ItemID;
enhSectCfg.SaveEnhancedDocuments();
pastedEnhancedCurrentSection.SaveConfig(enhSectCfg.ToString());
if (srcCfg.Section_LnkEnh != "T") EnhancedSetStepLinks(sourceSect, enhProc.Type); //if steps, do them for this type
if (srcCfg.Section_LnkEnh == "Y") EnhancedSetStepLinks(sourceSect, enhProc.Type); //if steps, do them for this type
pastedEnhancedCurrentSection = GetNextEnhancedSection(pastedEnhancedCurrentSection);
}
}

View File

@@ -186,7 +186,7 @@ namespace VEPROMS.CSLA.Library
if (string.IsNullOrEmpty(name))
{ name = tmpproc.DisplayText; }
message = string.Format("The procedure {0} is already checked out to {1}.\r\nWould You like to open the procedure in View Only Mode?", name, si.UserID);
message = string.Format("The procedure {0} is already checked out to {1}", name, si.UserID);
rv = rv && false;
}
else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document)

View File

@@ -97,12 +97,6 @@ namespace VEPROMS.CSLA.Library
if (formatInfo != null && formatInfo.ToString() == formatName) return formatInfo.Get();
return null;
}
//C2021-035 Add Refresh Tree Option at highest level
public static void Reset()
{
_MyFormatInfoList?.Clear();
_MyFormatInfoList = null;
}
}
public class DocStyleListConverter : System.ComponentModel.StringConverter
{

View File

@@ -1145,12 +1145,8 @@ namespace VEPROMS.CSLA.Library
{
//string thisTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText;
string thisTab = pitem.MyTab.CleanText;// StepInfo.Get(pitem.ItemID).MyTab.CleanText;
//B2025-058 remove continuous action indicator
string medittag = pitem.FormatStepData.TabData.MacroEditTag;
if (medittag != null && thisTab.StartsWith(medittag))
thisTab = thisTab.Substring(medittag.Length);
// remove delimiters of '.' and ')' in tab.
if (!hasDelim)
if (!hasDelim)
{
// get list of delimiters to remove from the format:
foreach (string rmvDelim in DelimList) thisTab = thisTab.Replace(rmvDelim, "");

View File

@@ -1148,15 +1148,6 @@ namespace VEPROMS.CSLA.Library
}
}
private LazyLoad<bool> _DontIncludeRNOTabIfHasAERParent;
public bool DontIncludeRNOTabIfHasAERParent // F2026-002: Vogtle Units 3&4 Top Continue Message.
{
get
{
return LazyLoad(ref _DontIncludeRNOTabIfHasAERParent, "@DontIncludeRNOTabIfHasAERParent");
}
}
private LazyLoad<string> _Message;
[Category("Continue Msg")]
[DisplayName("Top Continue Msg")]

View File

@@ -37,7 +37,7 @@ namespace VEPROMS.CSLA.Library
// Variables in this region are not set in the format files. They are used only in the C# code
// when IgnoreUCF is true, get the original data, i.e.don't apply any UCF changes to it
private static bool _IgnoreUCF = true; // turn off reading in UCF values when getting format information
private static bool _IgnoreUCF = false;
public static bool IgnoreUCF
{
get { return PlantFormat._IgnoreUCF; }
@@ -3814,18 +3814,6 @@ namespace VEPROMS.CSLA.Library
}
}
// C2026-003 (for Vogtle Units 3&4) Adds the continuous action tag to a high level RNO
// only when it as a tab and the parent is an AER step that is not tagged as a continuous action
// Use this with the setting of CASPrintMacro and CASEditTag on the RNO step type TabData definition
private LazyLoad<bool> _AddContActTagToHighLevelRNOWhenIncludedOnCAS;
public bool AddContActTagToHighLevelRNOWhenIncludedOnCAS
{
get
{
return LazyLoad(ref _AddContActTagToHighLevelRNOWhenIncludedOnCAS, "@AddContActTagToHighLevelRNOWhenIncludedOnCAS");
}
}
// treat sub-sections and High Level Steps as if they are at the same procedure structure level. This is used with the TieTabToLevel flag
private LazyLoad<bool> _SubSectAndHighSameLevel;
public bool SubSectAndHighSameLevel
@@ -4353,26 +4341,6 @@ public LeftJustifyList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
return LazyLoad(ref _IncludeSectionNumAndTitle, "@IncludeSectionNumAndTitle");
}
}
//F2025-038 default (in base format) is True. The lable "SECTION" will precede the section number an title
private LazyLoad<bool> _IncludeSectionLabel;
public bool IncludeSectionLabel
{
get
{
return LazyLoad(ref _IncludeSectionLabel, "@IncludeSectionLabel");
}
}
//F2026-001 default (in base format) is False. Put in for Vogtle Units 3 & 4.
// this will add the parent sub-step tab if the parent is not identified as a continueous action step
private LazyLoad<bool> _AddParentTabToSubStepTab;
public bool AddParentTabToSubStepTab
{
get
{
return LazyLoad(ref _AddParentTabToSubStepTab, "@AddParentTabToSubStepTab");
}
}
// the font and font styles to use for the continuous action summary
private VE_Font _Font;
public VE_Font Font
@@ -5720,30 +5688,6 @@ public StepData Equation // equation has a parent of embedded object.
return LazyLoad(ref _RNOIdentPrint, "TabData/@RNOIdent");
}
}
// Adds a print macro for the high level RNO when the user want it to be a Continuous Action
// while the corresponding AER is not a continuous action
// C2026-003 used in RNO step definition for Vogtle 3&4 two column format
// use with AddContActTagToHighLevelRNOWhenIncludedOnCAS set to True in the format file's StpSectLayData
private LazyLoad<string> _CASPrintMacro;
public string CASPrintMacro
{
get
{
return LazyLoad(ref _CASPrintMacro, "TabData/@CASPrintMacro");
}
}
// Adds a character indicator in the step editor for the high level RNO when the user want it to be a Continuous Action
// while the corresponding AER is not a continuous action
// C2026-003 used in RNO step definition for Vogtle 3&4 two colmn format
// use with AddContActTagToHighLevelRNOWhenIncludedOnCAS set to True in the format file's StpSectLayData
private LazyLoad<string> _CASEditTag;
public string CASEditTag
{
get
{
return LazyLoad(ref _CASEditTag, "TabData/@CASEditTag");
}
}
// don't use the defined macro when creating a step tab for the step type's RNO
private LazyLoad<bool> _RNOExcludeMacros;

View File

@@ -990,21 +990,12 @@ namespace VEPROMS.CSLA.Library
}
return tmp;
}
public static Content Get(int contentID, bool forcerefresh = false)
public static Content Get(int contentID)
{
if (!CanGetObject())
throw new System.Security.SecurityException("User not authorized to view a Content");
try
{
//C2019-036 View Only mode work with Checked Out Procedures
// fixes caching issue
// this forces a refresh of the cache for a case when need to do a hard refresh
if (forcerefresh)
{
ConvertListToDictionary();
_CacheByPrimaryKey.Remove(contentID.ToString());
}
Content tmp = GetCachedByPrimaryKey(contentID);
if (tmp == null)
{

View File

@@ -502,15 +502,6 @@ namespace VEPROMS.CSLA.Library
_FolderInfoExtension.Refresh(this);
OnChange();// raise an event
}
//C2021-035 Add Refresh Tree Option at highest level
public static void ClearFolderInfoCache()
{
_CacheByPrimaryKey.Clear();
while (_CacheList.Count > 0)
{ _CacheList[0].Dispose(); }
}
public static FolderInfo Get(int folderID)
{
//if (!CanGetObject())

View File

@@ -143,14 +143,6 @@ namespace VEPROMS.CSLA.Library
if (_CacheByParentID_Name.ContainsKey(key)) return _CacheByParentID_Name[key][0];
return null;
}
//C2021-035 Add Refresh Tree Option at highest level
public static void ClearFormatCache()
{
_CacheByPrimaryKey.Clear();
while (_CacheList.Count > 0)
{ _CacheList[0].Dispose(); }
}
#endregion
#region Business Methods
private string _ErrorMessage = string.Empty;

View File

@@ -71,13 +71,6 @@ namespace VEPROMS.CSLA.Library
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null;
}
//C2021-035 Add Refresh Tree Option at highest level
public static void ClearFormatInfoCache()
{
_CacheByPrimaryKey.Clear();
while (_CacheList.Count > 0)
{ _CacheList[0].Dispose(); }
}
#endregion
#region Business Methods
private string _ErrorMessage = string.Empty;

View File

@@ -606,20 +606,12 @@ namespace VEPROMS.CSLA.Library
_ItemInfoExtension.Refresh(this);
OnChange();// raise an event
}
public static ItemInfo Get(int itemID, bool forcerefresh = false)
public static ItemInfo Get(int itemID)
{
//if (!CanGetObject())
// throw new System.Security.SecurityException("User not authorized to view a Item");
try
{
// C2015-028 Add Editorial Mode to PROMS Step Editor
// fixes caching issue
// item.myconfig was cached not containing the bypass changebar info
// so this forces a refresh of the cache
if (forcerefresh)
{
_CacheByPrimaryKey.Remove(itemID.ToString());
}
ItemInfo tmp = GetCachedByPrimaryKey(itemID);
if (tmp == null)
{

View File

@@ -119,15 +119,6 @@ namespace VEPROMS.CSLA.Library
return _MyUser;
}
}
public string MyUserUserID
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
if (_MyUser == null && _UID != 0) _MyUser = UserInfo.Get(_UID);
return _MyUser?.UserID;
}
}
private int _GID;
public int GID
{
@@ -148,15 +139,6 @@ namespace VEPROMS.CSLA.Library
return _MyGroup;
}
}
public string MyGroupName
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
if (_MyGroup == null && _GID != 0) _MyGroup = GroupInfo.Get(_GID);
return _MyGroup?.GroupName;
}
}
private string _StartDate = string.Empty;
public string StartDate
{

View File

@@ -1,76 +0,0 @@
using System;
using Csla.Data;
using System.Data;
using System.Data.SqlClient;
//CSM - C2025-043 - Minimal Class for General Reports
namespace VEPROMS.CSLA.Library
{
public static class GeneralReports
{
#region Get General Reports
//CSM - C2025-043 report RO's that are not used in any of the PROMS data.
public static DataTable GetROsNotUsedInPROMS(DataTable dtDBids)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_GetROsNotUsed";
cm.CommandTimeout = 0;
//Pass table Valued parameter to Store Procedure
SqlParameter sqlParam = cm.Parameters.AddWithValue("@dbIDs", dtDBids);
sqlParam.SqlDbType = SqlDbType.Structured;
using (SqlDataAdapter da = new SqlDataAdapter(cm))
{
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
}
}
catch (Exception ex)
{
throw new DbCslaException("Error in GetROsNotUsedInPROMS Report: retrieving data failed", ex);
}
}
//C2026-002 Enhancements to new admin Tool for ROs not used.
//used to build checkboxes of dbs to include
public static DataTable GetRODBs()
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.Text;
cm.CommandText = "select RofstDatabase.*, RODbID FROM RofstDatabase INNER JOIN (Select FSTID = max(RoFSTID), RODbID from ROFsts GROUP BY RODbID) fsts ON fsts.FSTID = RofstDatabase.RofstID ORDER BY RofstID, RODbID, dbiTitle";
cm.CommandTimeout = 0;
using (SqlDataAdapter da = new SqlDataAdapter(cm))
{
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
}
}
catch (Exception ex)
{
throw new DbCslaException("Error in GetROsNotUsedInPROMS Report - GetRODBs: retrieving data failed", ex);
}
}
#endregion
}
}

View File

@@ -1,92 +0,0 @@
using System;
using Csla.Data;
using System.Data;
using System.Data.SqlClient;
//CSM - C2021-058 - Minimal Class for User Maintenance
namespace VEPROMS.CSLA.Library
{
public static class Maintenance
{
#region Get User Reports - Admin Tool Purge Change History
//CSM - C2021-058 Maintenance Purge Change History
public static void PurgeChangeHistory(DateTime dte)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_PurgeChangeHistory";
cm.Parameters.AddWithValue("@dte", dte);
cm.CommandTimeout = 0;
cm.ExecuteNonQuery();
}
}
}
catch (Exception ex)
{
throw new DbCslaException("Error in PurgeChangeHistory: ", ex);
}
}
//CSM - C2025-052 Rebuild all Indexes
public static void IndexMaintenance()
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_IndexMaintenance";
cm.CommandTimeout = 0;
cm.ExecuteNonQuery();
}
}
}
catch (Exception ex)
{
throw new DbCslaException("Error in IndexMaintenance: ", ex);
}
}
#endregion
#region Get Other User Sessions In Progress
//returns all users, machine names, login date
//except current user (user supplied)
public static DataTable GetOtherUserSessionsInProgress(string userid)
{
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "vesp_GetOtherActiveSessions";
cm.Parameters.AddWithValue("@UsrID", userid);
cm.CommandTimeout = Database.DefaultTimeout;
using (SqlDataAdapter da = new SqlDataAdapter(cm))
{
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
}
}
}
catch (Exception ex)
{
throw new DbCslaException("Error in vesp_GetOtherActiveSessions: retrieving data failed", ex);
}
}
#endregion
}
}

View File

@@ -389,8 +389,6 @@
<Compile Include="Generated\ZTransition.cs" />
<Compile Include="Generated\ZTransitionInfo.cs" />
<Compile Include="Minimal\AnnotationstypeSections.cs" />
<Compile Include="Minimal\Maintenance.cs" />
<Compile Include="Minimal\GeneralReports.cs" />
<Compile Include="Minimal\UserReports.cs" />
<Compile Include="Minimal\UserSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

View File

@@ -42,7 +42,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RoAccessToSql", "..\RoAcces
{AEEE9FD1-6892-45E2-A67E-418C06D46FF9} = {AEEE9FD1-6892-45E2-A67E-418C06D46FF9}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VlnStatus", "..\ReferencedObjects\LibSource\VlnStatus\VlnStatus.csproj", "{551CB7B3-00B1-11D7-8590-482B59000000}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VlnStatus64", "VlnStatus64\VlnStatus64.csproj", "{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -550,38 +550,38 @@ Global
{1EC96BDA-01E7-4153-A95D-6A4A36FA278E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1EC96BDA-01E7-4153-A95D-6A4A36FA278E}.Release|Win32.ActiveCfg = Release|Any CPU
{1EC96BDA-01E7-4153-A95D-6A4A36FA278E}.Release|x86.ActiveCfg = Release|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|Mixed Platforms.Build.0 = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|Win32.ActiveCfg = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|Win32.Build.0 = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|x86.ActiveCfg = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug|x86.Build.0 = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|Any CPU.Build.0 = Debug|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|Mixed Platforms.ActiveCfg = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|Mixed Platforms.Build.0 = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|Win32.ActiveCfg = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|Win32.Build.0 = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|x86.ActiveCfg = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Demo|x86.Build.0 = Debug|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|Any CPU.ActiveCfg = Release|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|Any CPU.Build.0 = Release|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|Mixed Platforms.ActiveCfg = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|Mixed Platforms.Build.0 = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|Win32.ActiveCfg = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|Win32.Build.0 = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|x86.ActiveCfg = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release_PreRegistered|x86.Build.0 = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|Any CPU.Build.0 = Release|Any CPU
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|Mixed Platforms.ActiveCfg = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|Mixed Platforms.Build.0 = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|Win32.ActiveCfg = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|Win32.Build.0 = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|x86.ActiveCfg = Release|x86
{551CB7B3-00B1-11D7-8590-482B59000000}.Release|x86.Build.0 = Release|x86
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|Win32.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|Win32.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|x86.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Debug|x86.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|Any CPU.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|Mixed Platforms.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|Mixed Platforms.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|Win32.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|Win32.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|x86.ActiveCfg = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Demo|x86.Build.0 = Debug|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|Any CPU.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|Any CPU.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|Mixed Platforms.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|Mixed Platforms.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|Win32.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|Win32.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|x86.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release_PreRegistered|x86.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|Any CPU.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|Win32.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|Win32.Build.0 = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|x86.ActiveCfg = Release|Any CPU
{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -0,0 +1,232 @@
/*********************************************************************************************
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: StatusBarFrm.cs $ $Revision: 3 $
* $Author: Jsj $ $Date: 4/08/04 9:50a $
*
* $History: StatusBarFrm.cs $
*
* ***************** Version 3 *****************
* User: Jsj Date: 4/08/04 Time: 9:50a
* Updated in $/LibSource/VlnStatus
* added profile code and try to optimize
*
* ***************** Version 2 *****************
* User: Jsj Date: 11/26/02 Time: 3:38p
* Updated in $/LibSource/VlnStatus
* Added overbounds check
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
//using ROProfiler; //don't forget to add VlnProfiler to the reference list
namespace VlnStatus
{
/// <summary>
/// Create a status window with a progress bar
/// </summary>
public class StatusBarFrm : System.Windows.Forms.Form
{
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label lblBar;
private System.Windows.Forms.Label StatMsg;
// private string strLblLast="";
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public StatusBarFrm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
Text = "Status";
}
public StatusBarFrm(string StatusBoxTitle)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
Text = StatusBoxTitle;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.lblBar = new System.Windows.Forms.Label();
this.StatMsg = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(29, 83);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(297, 27);
this.progressBar1.TabIndex = 0;
//
// lblBar
//
this.lblBar.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblBar.Location = new System.Drawing.Point(29, 136);
this.lblBar.Name = "lblBar";
this.lblBar.Size = new System.Drawing.Size(297, 16);
this.lblBar.TabIndex = 1;
this.lblBar.Text = "% Complete";
this.lblBar.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// StatMsg
//
this.StatMsg.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.StatMsg.Location = new System.Drawing.Point(29, 18);
this.StatMsg.Name = "StatMsg";
this.StatMsg.Size = new System.Drawing.Size(307, 56);
this.StatMsg.TabIndex = 2;
this.StatMsg.Text = "Progress Bar";
this.StatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// StatusBarFrm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(350, 171);
this.ControlBox = false;
this.Controls.Add(this.StatMsg);
this.Controls.Add(this.lblBar);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "StatusBarFrm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Status";
this.TopMost = true;
this.Load += new System.EventHandler(this.StatusBarFrm_Load);
this.ResumeLayout(false);
}
#endregion
private void StatusBarFrm_Load(object sender, System.EventArgs e)
{
}
public int Value
{
get
{
return progressBar1.Value;
}
set
{
if (value >= progressBar1.Maximum)
progressBar1.Value = progressBar1.Maximum;
else
progressBar1.Value = value;
UpateLabel();
}
}
public int Maximum
{
get
{
return progressBar1.Maximum;
}
set
{
progressBar1.Maximum = value;
}
}
public int Step
{
get
{
return progressBar1.Step;
}
set
{
progressBar1.Step = value;
}
}
public void PerformStep()
{
progressBar1.PerformStep();
}
private void UpateLabel()
{
lblBar.Text = (Math.Round((decimal)(progressBar1.Value * 100) / progressBar1.Maximum)).ToString();
lblBar.Text += "% Complete";
// if( lblBar.Text != strLblLast)
// {
// Profiler.Start("UpdateLabel");
lblBar.Refresh();
// lblBar.Update();
// Profiler.End("UpdateLabel");
// }
// strLblLast = lblBar.Text;
}
public string StatusMessage
{
get
{
return StatMsg.Text;
}
set
{
StatMsg.Text = value;
// Profiler.Start("StatusMessage");
StatMsg.Refresh();
// StatMsg.Update();
// Profiler.End("StatusMessage");
}
}
public string StatusBoxTitle
{
get
{
return Text;
}
set
{
Text = value;
}
}
}
}

View File

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

View File

@@ -0,0 +1,140 @@
/*********************************************************************************************
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: StatusMessageFrm.cs $ $Revision: 3 $
* $Author: Jsj $ $Date: 5/11/04 9:30a $
*
* $History: StatusMessageFrm.cs $
*
* ***************** Version 3 *****************
* User: Jsj Date: 5/11/04 Time: 9:30a
* Updated in $/LibSource/VlnStatus
*
* ***************** Version 2 *****************
* User: Jsj Date: 11/26/02 Time: 3:38p
* Updated in $/LibSource/VlnStatus
* Added overbounds check
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VlnStatus
{
/// <summary>
/// Create status message window.
/// </summary>
public class StatusMessageFrm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblStatMsg;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public StatusMessageFrm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
public StatusMessageFrm(string StatTitle)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
Text = StatTitle;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblStatMsg = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblStatMsg
//
this.lblStatMsg.Location = new System.Drawing.Point(19, 20);
this.lblStatMsg.Name = "lblStatMsg";
this.lblStatMsg.Size = new System.Drawing.Size(420, 81);
this.lblStatMsg.TabIndex = 0;
this.lblStatMsg.Text = "Put Status Message Here";
this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// StatusMessageFrm
//
this.AutoScaleBaseSize = new System.Drawing.Size(7, 19);
this.ClientSize = new System.Drawing.Size(457, 117);
this.ControlBox = false;
this.Controls.Add(this.lblStatMsg);
this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "StatusMessageFrm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Status";
this.TopMost = true;
this.Load += new System.EventHandler(this.StatusMessageFrm_Load);
this.ResumeLayout(false);
}
#endregion
private void StatusMessageFrm_Load(object sender, System.EventArgs e)
{
}
public string StatusMessage
{
get
{
return lblStatMsg.Text;
}
set
{
lblStatMsg.Text = value;
lblStatMsg.Refresh();
}
}
public string StatusBoxTitle
{
get
{
return Text;
}
set
{
Text = value;
}
}
}
}

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
@@ -14,17 +14,16 @@
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
@@ -36,7 +35,7 @@
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
@@ -46,7 +45,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,37 +59,18 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -109,12 +89,51 @@
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblStatMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblStatMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblStatMsg.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>(Default)</value>
</data>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="$this.Name">
<value>StatusMessageFrm</value>
</data>
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>80</value>
</data>
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
</root>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{797DE52C-278C-41D4-8B65-B9CFC02DDCD9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VlnStatus64</RootNamespace>
<AssemblyName>VlnStatus64</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StatusBarFrm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="StatusMessageFrm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="VlnStatusBar.cs" />
<Compile Include="VlnStatusMessage.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="StatusBarFrm.resx" />
<EmbeddedResource Include="StatusMessageFrm.resx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,148 @@
/*********************************************************************************************
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VlnStatusBar.cs $ $Revision: 4 $
* $Author: Jsj $ $Date: 11/26/02 4:25p $
*
* $History: VlnStatusBar.cs $
*
* ***************** Version 4 *****************
* User: Jsj Date: 11/26/02 Time: 4:25p
* Updated in $/LibSource/VlnStatus
* fixed problem with counter
*
* ***************** Version 3 *****************
* User: Jsj Date: 11/26/02 Time: 3:38p
* Updated in $/LibSource/VlnStatus
* Added overbounds check
*********************************************************************************************/
using System;
namespace VlnStatus
{
/// <summary>
/// Creates a Status Window with a progression bar control.
///
/// This class has two constructors. One allows you to pass in the title
/// of the Status Box. The Other provides a default title of "Status".
/// The Status Box Title can also be set/changed via the StatusBoxTitle
/// property.
///
///
/// </summary>
public class VlnStatusBar
{
StatusBarFrm StatBar;
private int Cnt;
// Create a status window with the default title of "Status"
public VlnStatusBar()
{
StatBar = new StatusBarFrm();
StatBar.Show();
}
// Create a status window with the passed in title
public VlnStatusBar(string Title)
{
StatBar = new StatusBarFrm(Title);
StatBar.Show();
}
// Increament the the status bar by the passed in value.
public void PerformStep(int val)
{
// StatBar.Value = val;
// Cnt = val;
BarValue = val;
StatBar.PerformStep();
}
// Increament the the status bar by one
public void PerformStep()
{
// StatBar.Value = StatBar.Value + 1;
Cnt++;
BarValue = Cnt;
StatBar.PerformStep();
}
// This property gets or sets the current status bar value.
public int BarValue
{
get
{
return StatBar.Value;
}
set
{
StatBar.Value = value;
Cnt = value;
}
}
// This property sets or gets the maximum value that the
// BarValue property can be. i.e. when BarValue reaches this
// number, the status bar is completely displayed.
public int BarMax
{
get
{
return StatBar.Maximum;
}
set
{
StatBar.Maximum = value;
}
}
// This property sets or gets the increamenting value used to
// move the status bar. For example, if set to 5, each tick of
// the status bar represents a value of 5.
public int BarStepValue
{
get
{
return StatBar.Step;
}
set
{
StatBar.Step = value;
}
}
// This property sets or gets the message above the status bar.
public string StatMsg
{
get
{
return StatBar.StatusMessage;
}
set
{
StatBar.StatusMessage = value;
}
}
// This property sets or gets the Status Window Title
public string StatusBoxTitle
{
get
{
return StatBar.StatusBoxTitle;
}
set
{
StatBar.StatusBoxTitle = value;
}
}
public void Dispose()
{
StatBar.Dispose();
}
}
}

View File

@@ -0,0 +1,79 @@
/*********************************************************************************************
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VlnStatusMessage.cs $ $Revision: 3 $
* $Author: Jsj $ $Date: 11/26/02 3:38p $
*
* $History: VlnStatusMessage.cs $
*
* ***************** Version 3 *****************
* User: Jsj Date: 11/26/02 Time: 3:38p
* Updated in $/LibSource/VlnStatus
* Added overbounds check
*********************************************************************************************/
using System;
namespace VlnStatus
{
/// <summary>
/// Creates a Status Window to display a status message.
///
/// This class has two constructors. One allows you to pass in the title
/// of the Status Box. The Other provides a default title of "Status".
/// The Status Box Title can also be set/changed via the StatusBoxTitle
/// property.
///
/// </summary>
public class VlnStatusMessage
{
StatusMessageFrm StatusMessageBox;
// Create a status window with the default title of "Status"
public VlnStatusMessage()
{
StatusMessageBox = new StatusMessageFrm();
StatusMessageBox.Show();
}
// Create a status window with the passed in title.
public VlnStatusMessage(string StatusBoxTitle)
{
StatusMessageBox = new StatusMessageFrm(StatusBoxTitle);
StatusMessageBox.Show();
}
// This property gets or sets the current status message
public string StatusMessage
{
get
{
return StatusMessageBox.StatusMessage;
}
set
{
StatusMessageBox.StatusMessage = value;
}
}
// This property gets or sets the status box title
public string StatusBoxTitle
{
get
{
return StatusMessageBox.StatusBoxTitle;
}
set
{
StatusMessageBox.StatusBoxTitle = value;
}
}
public void Dispose()
{
StatusMessageBox.Dispose();
}
}
}

View File

@@ -197,7 +197,7 @@ namespace Volian.Base.Library
set { VlnSettings._UserID = value; }
}
private static bool _StepTypeToolTip = false;
public static bool StepTypeToolTip
public static bool StepTypeToolType
{
get { return VlnSettings._StepTypeToolTip; }
set { VlnSettings._StepTypeToolTip = value; }

View File

@@ -1,89 +0,0 @@
namespace Volian.Controls.Library
{
partial class CustomMessageBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btn1 = new System.Windows.Forms.Button();
this.btn2 = new System.Windows.Forms.Button();
this.lblMessage = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btn1
//
this.btn1.AutoSize = true;
this.btn1.Location = new System.Drawing.Point(12, 99);
this.btn1.Name = "btn1";
this.btn1.Size = new System.Drawing.Size(75, 23);
this.btn1.TabIndex = 0;
this.btn1.UseVisualStyleBackColor = true;
this.btn1.Click += new System.EventHandler(this.Btn1_Click);
//
// btn2
//
this.btn2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn2.AutoSize = true;
this.btn2.Location = new System.Drawing.Point(322, 99);
this.btn2.Name = "btn2";
this.btn2.Size = new System.Drawing.Size(75, 23);
this.btn2.TabIndex = 1;
this.btn2.UseVisualStyleBackColor = true;
this.btn2.Click += new System.EventHandler(this.Btn2_Click);
//
// lblMessage
//
this.lblMessage.AutoSize = true;
this.lblMessage.Location = new System.Drawing.Point(33, 41);
this.lblMessage.Name = "lblMessage";
this.lblMessage.Size = new System.Drawing.Size(0, 13);
this.lblMessage.TabIndex = 2;
this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// CustomMessageBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(419, 130);
this.Controls.Add(this.lblMessage);
this.Controls.Add(this.btn2);
this.Controls.Add(this.btn1);
this.Name = "CustomMessageBox";
this.ShowIcon = false;
this.Text = "CustomMessageBox";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btn1;
private System.Windows.Forms.Button btn2;
private System.Windows.Forms.Label lblMessage;
}
}

View File

@@ -1,58 +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.Threading.Tasks;
using System.Windows.Forms;
namespace Volian.Controls.Library
{
public partial class CustomMessageBox : Form
{
//Custome Message Box Class to allow renaming of buttons
// originally devleoped for use with
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
// in order to allow the user to decide if they wanted to search on the selected step or the selected procedure
public CustomMessageBox(string message, string title, string button1Text = "OK", string button2Text = "")
{
InitializeComponent();
this.Text = title;
lblMessage.Text = message;
btn1.Text = button1Text;
if (!string.IsNullOrEmpty(button2Text))
{
btn2.Text = button2Text;
btn2.Visible = true;
}
else
{
btn2.Visible = false;
}
}
private void Btn1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Yes;
Close();
}
private void Btn2_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.No;
Close();
}
//static method for calling custommessagebox directly
public static DialogResult Show(string message, string title, string button1Text = "OK", string button2Text = "")
{
using (var messageBox = new CustomMessageBox(message, title, button1Text, button2Text))
{
return messageBox.ShowDialog();
}
}
}
}

View File

@@ -11,7 +11,7 @@ using System.Text.RegularExpressions;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
using System.Linq;
namespace Volian.Controls.Library
{
public partial class DisplayHistory : UserControl

View File

@@ -112,13 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="myVFG.MyBorderDetailString" xml:space="preserve">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;
<value>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;VlnBorders Rows="4" Columns="3"&gt;
&lt;VerticalLines Rows="4" Columns="4"&gt;
&lt;Lines&gt;
@@ -160,32 +160,8 @@
&lt;/Lines&gt;
&lt;/HorizontalLines&gt;
&lt;/VlnBorders&gt;</value>
</data>
<data name="myVFG.MyShadingDetailString" xml:space="preserve">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;VlnGridCellShading Rows="4" Columns="3"&gt;
&lt;TableShadingInfo Rows="4" Columns="3"&gt;
&lt;CellShadingColor&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;string&gt;[A=255, R=255, G=255, B=255]&lt;/string&gt;
&lt;/CellShadingColor&gt;
&lt;/TableShadingInfo&gt;
&lt;/VlnGridCellShading&gt;</value>
</data>
<data name="myVFG.StyleInfo" xml:space="preserve">
<value>Normal{Font:Microsoft Sans Serif, 8.25pt;BackColor:White;TextAlign:LeftTop;Border:Flat,1,Black,Both;} Alternate{BackColor:White;} Fixed{BackColor:Control;ForeColor:ControlText;Border:Flat,1,ControlDark,Both;BackgroundImageLayout:Hide;} Highlight{BackColor:LightCyan;ForeColor:Black;} Focus{BackColor:LightCyan;} Editor{} Search{BackColor:Highlight;ForeColor:HighlightText;} Frozen{BackColor:Beige;} FrozenAlternate{} NewRow{ForeColor:GrayText;} EmptyArea{BackColor:Transparent;Border:None,1,Black,Both;} SelectedColumnHeader{} SelectedRowHeader{} GrandTotal{BackColor:Black;ForeColor:White;} Subtotal0{BackColor:ControlDarkDark;ForeColor:White;} Subtotal1{BackColor:ControlDarkDark;ForeColor:White;} Subtotal2{BackColor:ControlDarkDark;ForeColor:White;} Subtotal3{BackColor:ControlDarkDark;ForeColor:White;} Subtotal4{BackColor:ControlDarkDark;ForeColor:White;} Subtotal5{BackColor:ControlDarkDark;ForeColor:White;} FilterEditor{} FirstCustomStyle{} </value>
<value>Normal{Font:Microsoft Sans Serif, 8.25pt;BackColor:White;TextAlign:LeftTop;Border:Flat,1,Black,Both;} Alternate{BackColor:White;} Fixed{BackColor:Control;ForeColor:ControlText;Border:Flat,1,ControlDark,Both;BackgroundImageLayout:Hide;} Highlight{BackColor:LightCyan;ForeColor:Black;} Focus{BackColor:LightCyan;} Editor{} Search{BackColor:Highlight;ForeColor:HighlightText;} Frozen{BackColor:Beige;} NewRow{ForeColor:GrayText;} EmptyArea{BackColor:Transparent;Border:None,1,Black,Both;} SelectedColumnHeader{} SelectedRowHeader{} GrandTotal{BackColor:Black;ForeColor:White;} Subtotal0{BackColor:ControlDarkDark;ForeColor:White;} Subtotal1{BackColor:ControlDarkDark;ForeColor:White;} Subtotal2{BackColor:ControlDarkDark;ForeColor:White;} Subtotal3{BackColor:ControlDarkDark;ForeColor:White;} Subtotal4{BackColor:ControlDarkDark;ForeColor:White;} Subtotal5{BackColor:ControlDarkDark;ForeColor:White;} FilterEditor{} FirstCustomStyle{} </value>
</data>
<metadata name="myTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -614,7 +614,7 @@ namespace Volian.Controls.Library
AddDummyGroup(db, tn);
}
_currRofstID = (IsRofstValid) ? (int?)_myROFST.ROFstID : null;
_currRofstID = (int?)MyROFST.ROFstID;
_currDocVersionID = null;
if(_docVersionInfo != null) _currDocVersionID = (int?)_docVersionInfo.VersionID;
@@ -789,7 +789,7 @@ namespace Volian.Controls.Library
private void AddDummyGroup(ROFSTLookup.rodbi rodbi, TreeNode tn)
{
if (IsRofstValid && MyROFSTLookup.HasChildren(ref rodbi))
if (MyROFSTLookup.HasChildren(ref rodbi))
{
TreeNode tmp = new TreeNode(DummyNodeText);
tn.Nodes.Add(tmp);

View File

@@ -188,6 +188,7 @@ namespace Volian.Controls.Library
this.tabSearchTypes.Controls.Add(this.tabControlPanel5);
this.tabSearchTypes.Controls.Add(this.tabControlPanel2);
this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
this.tabSearchTypes.Controls.Add(this.tabControlPanel1);
this.tabSearchTypes.Controls.Add(this.contextMenuBar1);
this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top;
this.tabSearchTypes.Location = new System.Drawing.Point(0, 0);
@@ -982,6 +983,7 @@ namespace Volian.Controls.Library
this.tabControlPanel1.Controls.Add(this.lblSrchIncTran);
this.tabControlPanel1.Controls.Add(this.groupBox1);
this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel1.Location = new System.Drawing.Point(0, 34);
this.tabControlPanel1.Name = "tabControlPanel1";
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
@@ -995,8 +997,6 @@ namespace Volian.Controls.Library
this.tabControlPanel1.Style.GradientAngle = 90;
this.tabControlPanel1.TabIndex = 17;
this.tabControlPanel1.TabItem = this.tabIncTrans;
this.tabControlPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.tabControlPanel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
//
// btnTranCvtSelToTxt
//
@@ -1732,12 +1732,6 @@ namespace Volian.Controls.Library
this.Controls.Add(this.xpStepTypes);
this.Controls.Add(this.xpSetToSearch);
this.Controls.Add(this.tabSearchTypes);
this.Controls.Add(this.tabControlPanel1);
//B2025-056 Click on Incoming Transitions
// This needs to be part of overall control
// since if it is part of tabSearchTypes,
// then when that is disabled, buttons on
// this will be also
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "DisplaySearch";
this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;

View File

@@ -414,15 +414,6 @@ namespace Volian.Controls.Library
lbSrchResults.Visible = true;
lbSrchResultsIncTrans.Visible = false;
cbxRnoOnly.Visible = true;
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
//don't allow changing the Style for Incoming Transitions
//but allow them to change it if there are search results and it is another tab
if (_SearchResults != null && _SearchResults.Count > 0)
{
cmbResultsStyle.Enabled = true;
}
if (e.NewTab == tabIncTrans) // C2020-033: Incoming transitions
{
xpSetToSearch.Enabled = false;
@@ -431,7 +422,7 @@ namespace Volian.Controls.Library
lbSrchResultsIncTrans.Visible = true;
lbSrchResultsIncTrans.CheckBoxesVisible = true;
lbSrchResultsIncTrans.AutoScroll = true;
cmbResultsStyle.Enabled = false;
btnSearch.Enabled = false; // C2021 - 002: disable search button - no functionality for Incoming Transitions
cbxRnoOnly.Visible = false;
}
else if (e.NewTab == tabROSearch)
@@ -657,6 +648,7 @@ namespace Volian.Controls.Library
}
btnTranCvtAllToTxt.Enabled = IncTransCvtAllToTextPerm();
btnTranCvtSelToTxt.Enabled = false;
btnSearch.Enabled = false; // C2021 - 002: disable search button - no functionality for Incoming Transitions
}
public bool IncTranCvtPerm()
@@ -1773,8 +1765,7 @@ namespace Volian.Controls.Library
btnClearSearchResults.Enabled = true;
btnCopySearchResults.Enabled = true;
btnSaveSearchResults.Enabled = true;
if (tabSearchTypes.SelectedTab != tabIncTrans)
cmbResultsStyle.Enabled = true;
cmbResultsStyle.Enabled = true;
}
else
{
@@ -1866,15 +1857,14 @@ namespace Volian.Controls.Library
lbSrchResultsIncTrans.Enabled = false;
lbSrchResultsIncTrans.UseWaitCursor = true;
}
//B2025-056 Click on Incoming Transitions
// Clicking on Incoming Transitions
// will now open that item
ListBox mylb_lbSrchResults = sender as ListBox;
ListBoxAdv mylb_lbSrchResultsIncTrans = sender as ListBoxAdv;
ListBox mylb = sender as ListBox;
// If the list is being refreshed, then set the selection index to -1 (no selection)
// B2022-044: don't set selection to top of list (commented out/changed if)
if ((mylb_lbSrchResults != null || mylb_lbSrchResultsIncTrans != null) && !_SearchResults.RefreshingList)
//if (mylb != null && _SearchResults.RefreshingList && mylb.SelectedIndex != -1)
// //mylb.SelectedIndex = -1;
//else
if (mylb != null && !_SearchResults.RefreshingList)
{
_ItemInfo = (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[4]) ? lbSrchResultsIncTrans.SelectedValue as ItemInfo : lbSrchResults.SelectedValue as ItemInfo;
if ((tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]) && (_ItemInfo != null))
@@ -2197,39 +2187,21 @@ namespace Volian.Controls.Library
// C2019-001: Search in RNO steps only
if (cbxRnoOnlyTrans.Checked) GetInRNOResults();
}
else if (tabSearchTypes.SelectedTab == tabIncTrans)
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[4])
{
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
if (_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure != null)
// C2020-033: Incoming Transitions: Make an iteminfolist from the list returned from
// GetExternalTransitionsToChildren (also gets transitions to the item itself)
// B2021-010: Use IncomingTranGetMergedTranList to get a complete list of incoming transitions (transitions to procedure
// were only included if there were NO transitions to items within procedure)
ReportTitle = string.Format("Search For Incoming Transitions to {0}: ", SearchIncTransII.Path);
SearchResults = IncomingTranGetMergedTranList();
cmbResultsStyleIndex = 1; //display step locations in results
if (SearchResults == null || SearchResults.Count == 0)
{
if (_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure.ItemID == _TabControl?.MyEditItem?.MyItemInfo?.ItemID)
{
_ = _TabControl.OnSearchIncTrans(this, new vlnTreeItemInfoEventArgs(_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure));
}
else
{
//if on a step, check if the user wants to load incoming transitions for that step or the entire procedure
switch (CustomMessageBox.Show("Would you like to load incoming transitions for this procedure or this step?", "Load Incoming Transitions", "This Procedure", "This Step"))
{
case DialogResult.Yes:
_ = _TabControl.OnSearchIncTrans(this, new vlnTreeItemInfoEventArgs(_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure));
break;
case DialogResult.No:
_ = _TabControl.OnSearchIncTrans(this, new vlnTreeItemInfoEventArgs(_TabControl?.MyEditItem?.MyItemInfo));
break;
default: //Cancel was pressed
break;
}
}
}
else
{
FlexibleMessageBox.Show("Please open a procedure before selecting this option to load incoming transitions for that procedure.", "Search");
FlexibleMessageBox.Show("No Matches Found.", "Search");
}
}
if (SearchResults != null && tabSearchTypes.SelectedTab != tabIncTrans)
if (SearchResults != null)
{
AddMessageForEmptyAnnotations();
if (cmbResultsStyleIndex == 3 && cmbResultsStyle.Items.Count == 3) cmbResultsStyleIndex--;
@@ -2330,18 +2302,7 @@ namespace Volian.Controls.Library
cmbResultsStyle.Items.Add(comboItem2);
if (hasAnnot) cmbResultsStyle.Items.Add(comboItem3);
cmbResultsStyle.Items.Add(comboItem4);
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
if (tabSearchTypes.SelectedTab == tabIncTrans)
{
cmbResultsStyle.SelectedIndex = -1;
cmbResultsStyle.Enabled = false;
}
else
{
cmbResultsStyle.Enabled = true;
}
}
}
private void cbxTextSearchText_Leave(object sender, EventArgs e)
{

View File

@@ -11,7 +11,6 @@ using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
using Microsoft.Win32;
using System.Linq;
namespace Volian.Controls.Library
{
@@ -262,45 +261,24 @@ namespace Volian.Controls.Library
get { return _ChgId; }
set { _ChgId = value; }
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
public bool EditorialChange
{
get
{
if (_ChgId == null) return true;
if (_ChgId == "") return true;
if (_ChgId.ToUpper() == "EC") { return true;}
return IsInEditorialMode;
}
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
// property to hold if button in ribbon is toggled on or off
public bool IsInEditorialMode { get; set; } = false;
// C2015-028 Add Editorial Mode to PROMS Step Editor
// This is used when button in the ribbon is toggled on/off
// It iterates through all previously opened tabs
// and updates the "Editorial Mode" button
// and background color to match those of the current tab
public void SetEdititorialModeForAllTabs(bool mode)
{
foreach (DisplayTabItem tabItem in _MyDisplayTabItems.Values.Where(tabItem => tabItem.MyStepTabPanel != null))
{
tabItem.MyStepTabPanel.MyStepTabRibbon.SetEditorialMode(mode);
}
}
#endregion
#region Events
/// <summary>
/// This event is raised when a the "Tab" of a DisplayItem is clicked with a mouse.
/// So far this has just been used for demo purposes. It could be used to select a
/// step and it's children for the purpose of copying.
/// </summary>
public event StepPanelEvent ItemClick;
if (_ChgId.ToUpper() == "EC") return true;
return false;
}
}
#endregion
#region Events
/// <summary>
/// This event is raised when a the "Tab" of a DisplayItem is clicked with a mouse.
/// So far this has just been used for demo purposes. It could be used to select a
/// step and it's children for the purpose of copying.
/// </summary>
public event StepPanelEvent ItemClick;
/// <summary>
/// Checks to see if the ItemClick event is handled and launches it
/// </summary>
@@ -603,10 +581,7 @@ namespace Volian.Controls.Library
{
ItemInfo myItemInfo = myItemInfo2;
bool viewonlymode = false;
//B2025-046 Remember Tabs failing when swapping versions of PROMS
if (myItemInfo?.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion
if (myItemInfo.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion
{
FlexibleMessageBox.Show(this, "Possible disconnected item", "Item Not Found");
return null;
@@ -622,20 +597,8 @@ namespace Volian.Controls.Library
{
if (!MySessionInfo.CanCheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
{
DisplayTabItem dti = MyBar?.Items?.OfType<DisplayTabItem>().FirstOrDefault(x => x.MyItemInfo?.ItemID == myItemInfo.MyProcedure.ItemID);
//C2019-036 View Only mode work with Checked Out Procedures
//shouldn't prompt - should just auto put in view only if already in open tab
//in view only
if (
(dti != null && dti.MyStepTabPanel.MyStepPanel.VwMode == E_ViewMode.View)
||
(SeparateWindows && VersionID == myItemInfo.MyDocVersion.VersionID)
|| //to handle special case where item will be opened in a separate window
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
viewonlymode = true;
else
return null;
FlexibleMessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return null;
}
}
else
@@ -696,7 +659,7 @@ namespace Volian.Controls.Library
// C2023-016 if a Word section and doing Find/Replace don't open Word section, position to section title in step editor instead
if (myItemInfo.MyContent.MyEntry == null || doingFindReplace) // If it is not a Word document open in step editor
{
return OpenStepTabPage(myItemInfo, setFocus, viewonlymode);
return OpenStepTabPage(myItemInfo, setFocus);
}
else // Otherwise open it in the Word editor
{
@@ -1192,7 +1155,7 @@ namespace Volian.Controls.Library
//}
//public Dictionary<DocVersionInfo, frmEnhanced> dicEnhancedDocuments = new Dictionary<DocVersionInfo, frmEnhanced>();
private DisplayTabItem OpenStepTabPage(ItemInfo myItemInfo, bool setFocus, bool viewonlymode = false)
private DisplayTabItem OpenStepTabPage(ItemInfo myItemInfo, bool setFocus)
{
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
string key = "Item - " + proc.ItemID.ToString();
@@ -1211,7 +1174,7 @@ namespace Volian.Controls.Library
}
else // If not already open, create a new Page
{
pg = new DisplayTabItem(this.components, this, proc, key, viewonlymode); // Open a new Procedure Tab
pg = new DisplayTabItem(this.components, this, proc, key); // Open a new Procedure Tab
_MyDisplayTabItems.Add(key, pg);
if (setFocus)
{

View File

@@ -98,18 +98,13 @@ namespace Volian.Controls.Library
}
#endregion
#region Constructors
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey, bool viewonlymode = false)
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey)
{
_MyItemInfo = myItemInfo;
//C2019-036 View Only mode work with Checked Out Procedures
//don't want to check out if opening in View Only Mode Due to someone else having it checked out
if (!viewonlymode)
{
if (MyItemInfo.MyContent.MyEntry == null)
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
else
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document);
}
if (MyItemInfo.MyContent.MyEntry == null)
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
else
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document);
//Console.WriteLine("DisplayTabItem");
_MyKey = myKey;
_MyDisplayTabControl = myDisplayTabControl;
@@ -117,7 +112,7 @@ namespace Volian.Controls.Library
InitializeComponent();
this.Click += new EventHandler(DisplayTabItem_Click);
if (myItemInfo.MyContent.MyEntry == null)
SetupStepTabPanel(viewonlymode);
SetupStepTabPanel();
else
SetupDSOTabPanel();
SetupSecurity(myItemInfo);
@@ -133,37 +128,7 @@ namespace Volian.Controls.Library
private bool MesssageShown = false;
public void SetupSecurity(ItemInfo myItem)
{
//C2019-036 View Only mode work with Checked Out Procedures
//is in View Only Mode, so do not set up the Security
if (OwnerID == 0)
{
UserInfo uiViewOnly = UserInfo.GetByUserID(Base.Library.VlnSettings.UserID);
if (uiViewOnly.IsAdministrator())
{
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Administrator";
}
else if (uiViewOnly.IsSetAdministrator(myItem.MyDocVersion))
{
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Set Administrator";
}
else if (uiViewOnly.IsWriter(myItem.MyDocVersion))
{
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Writer";
}
else if (uiViewOnly.IsROEditor(myItem.MyDocVersion))
{
MyUserRole = $"{Base.Library.VlnSettings.UserID} - RO Editor";
}
else
{
MyUserRole = $"{Base.Library.VlnSettings.UserID} - Reviewer";
}
return;
}
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
if (ui == null)
{
@@ -281,7 +246,7 @@ namespace Volian.Controls.Library
/// <summary>
/// Creates and sets-up a StepTabPanel
/// </summary>
private void SetupStepTabPanel(bool viewonlymode = false)
private void SetupStepTabPanel()
{
((System.ComponentModel.ISupportInitialize)(_MyDisplayTabControl.MyBar)).BeginInit();
_MyDisplayTabControl.MyBar.SuspendLayout();
@@ -311,7 +276,7 @@ namespace Volian.Controls.Library
_MyDisplayTabControl.MyBar.ResumeLayout(false);
DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
if (dvi == null) return;
if (dvi.VersionType > 127 || viewonlymode)
if (dvi.VersionType > 127)
MyStepTabPanel.MyStepPanel.VwMode = E_ViewMode.View;
// C2021 - 027: Procedure level PC/PC - add _MyIteminfo to argument list
if (dvi.MultiUnitCount > 1)

View File

@@ -647,10 +647,6 @@ namespace Volian.Controls.Library
MyEditItem.ChangeBarForConfigItemChange = false;
sc.Step_CAS = (cbCAS.Checked) ? "True" : "False";
MyEditItem.ChangeBarForConfigItemChange = true;
// C2026-003 (put in for Vogtle 3&4) refresh the RNO step tab if including it on the Continuous Action Summary
if (MyEditItem.MyItemInfo.ActiveFormat.MyStepSectionLayoutData.AddContActTagToHighLevelRNOWhenIncludedOnCAS &&
MyEditItem.MyItemInfo.IsInRNO && !MyEditItem.MyItemInfo.MyParent.IsInRNO)
MyEditItem.RefreshTab();
}
private void cbTCAS_CheckedChanged(object sender, EventArgs e)
{

View File

@@ -201,15 +201,11 @@ namespace Volian.Controls.Library
/// </summary>
public ItemInfo MyItemInfo
{
get
{
ToolTipOnOff(); //B2025-050 Show the tooltip based on User Options Settings
return _MyItemInfo;
}
get { return _MyItemInfo; }
set
{
_MyItemInfo = value;
SetToolTip(_MyItemInfo.ToolTip); // B2025-050 always set tooltip text. This method will also show the tooltip based on User Options Settings
if (VlnSettings.StepTypeToolType) SetToolTip(_MyItemInfo.ToolTip);
ChangeBar = _MyItemInfo.HasChangeBar;
CheckOff co = _MyItemInfo.GetCheckOffStep();
if (co != null && co.UIMark != null)
@@ -2981,8 +2977,6 @@ namespace Volian.Controls.Library
public abstract void SetText();
public abstract void SetExpandAndExpander(ItemInfo itemInfo);
public abstract void SaveCurrentAndContents();
public abstract void ToolTipOnOff();
#endregion
private int SupInfoTopOffset
{

View File

@@ -462,12 +462,8 @@ namespace Volian.Controls.Library
DevComponents.DotNetBar.SuperTooltipInfo tpi = new DevComponents.DotNetBar.SuperTooltipInfo("", "", tip, null, null, DevComponents.DotNetBar.eTooltipColor.Lemon);
_MyToolTip.MinimumTooltipSize = new Size(0, 24);
_MyToolTip.TooltipDuration = 3;
//_MyToolTip.SetSuperTooltip(MyStepRTB, tpi);
_MyToolTip.SetSuperTooltip(MyFlexGrid, tpi);
ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings
}
public override void ToolTipOnOff()
{
_MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings
}
private bool DoNotRefresh = false;
public override void RefreshContent()
@@ -537,10 +533,6 @@ namespace Volian.Controls.Library
// if it is a modify and there will be no usages if it is new (the usage gets created on the save)
if (!MyFlexGrid.IsRoTable)
{
// B2026-003 we where using a string.format on this inside the while loop - allocating memory each time
// so I move it outside the while loop and did a simple assigment of text
string lookForLinks = @"<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v '?{{}}~\\]+)*\\v(\\[^v \\]+)* #Link:(ReferencedObject|Transition[^:]*?):.*?\[END>";
while (r < h)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
@@ -550,7 +542,8 @@ namespace Volian.Controls.Library
{
// see if there are any links and save these so that any deleted ROs or transitions in the
// steprtb can have associated usages/transitions records removed from the database.
MatchCollection matches = Regex.Matches((string)MyFlexGrid[r, c], lookForLinks);
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v '?{{}}~\\]+)*\\v(\\[^v \\]+)* #Link:(ReferencedObject|Transition[^:]*?):.*?\[END>");
MatchCollection matches = Regex.Matches((string)MyFlexGrid[r, c], lookFor);
for (int i = matches.Count - 1; i >= 0; i--)
{
Match m = matches[i];
@@ -572,15 +565,15 @@ namespace Volian.Controls.Library
{
int tid = int.Parse(myMatch.Groups[2].Value);
RtfTransList.Add(tid);
int myIndex = m.Groups[4].Index;
int myLength = m.Groups[4].Length;
if (m.Groups[3].Value != " ")
{
myIndex = m.Groups[3].Index;
myLength += m.Groups[3].Length;
}
string gg = ((string)MyFlexGrid[r, c]).Substring(myIndex, myLength);
if (gg.ToUpper().Contains("(PAGE ~)")) RtfTransPageNumList.Add(tid); // B2020-089, check for upper case Page ~ in case step was upper cased
int myIndex = m.Groups[4].Index;
int myLength = m.Groups[4].Length;
if (m.Groups[3].Value != " ")
{
myIndex = m.Groups[3].Index;
myLength += m.Groups[3].Length;
}
string gg = ((string)MyFlexGrid[r, c]).Substring(myIndex, myLength);
if (gg.ToUpper().Contains("(PAGE ~)")) RtfTransPageNumList.Add(tid); // B2020-089, check for upper case Page ~ in case step was upper cased
}
}
}

View File

@@ -9,7 +9,6 @@ using System.IO;
using System.Text.RegularExpressions;
using VEPROMS.CSLA.Library;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
namespace Volian.Controls.Library
{
@@ -79,7 +78,7 @@ namespace Volian.Controls.Library
/// <summary>
/// Left edge of the PictureBox
/// </summary>
override public int ContentLeft
public override int ContentLeft
{
get { return Left + _MyPictureBox.Left; }
}
@@ -96,14 +95,8 @@ namespace Volian.Controls.Library
_MyToolTip.MinimumTooltipSize = new Size(0, 24);
_MyToolTip.TooltipDuration = 3;
_MyToolTip.SetSuperTooltip(MyPictureBox, tpi);
ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings
}
public override void ToolTipOnOff()
{
_MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings
}
override public void RefreshContent()
public override void RefreshContent()
{
IdentifyMe(false);
RefreshDisplay(false);

View File

@@ -7,7 +7,6 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
namespace Volian.Controls.Library
{
@@ -134,11 +133,6 @@ namespace Volian.Controls.Library
_MyToolTip.MinimumTooltipSize = new Size(0, 24);
_MyToolTip.TooltipDuration = 3;
_MyToolTip.SetSuperTooltip(MyStepRTB, tpi);
ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings
}
public override void ToolTipOnOff()
{
_MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings
}
public override void RefreshContent()
{
@@ -799,41 +793,27 @@ namespace Volian.Controls.Library
// if the plant has the change id option, the change id was entered when the program started.
// this should be saved for every piece of edited data. Note that the set of config
// item Step_MultipleChangeID has the save built in to it.
if (sc == null) sc = new StepConfig();
if (MyStepRTB.MyItemInfo.IsStep &&
MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds
&& !this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange)
{
//StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig;
if (sc == null) sc = new StepConfig();
sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId;
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
// if in Editorial Mode, treat it the same as if the ChangeIds are set in the Format file
if (MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode && !existingChangeBar)
{
sc.Step_ChangeIDEditorialMode = Volian.Base.Library.VlnSettings.UserID;
}
else
{
sc.Step_ChangeIDEditorialMode = null;
//if (MyStepRTB.MyItemInfo.MyConfig == null) itm.MyContent.Config = sc.ToString();
}
// B2020-017: If making an editorial change, clear the Change id. Having the change id on
// was adding/printing a change bar.
// C2015-028 Add Editorial Mode to PROMS Step Editor
// if in Editorial Mode, treat it the same as if the ChangeIds are set in the Format file
if (MyStepRTB.MyItemInfo.IsStep &&
(MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds
|| MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode
)
&& MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange
&& !hasChangeBar)
MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds
&& this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange
&& hasChangeBar == false)
{
if (sc == null) sc = new StepConfig();
sc.Step_ChangeID = null;
}
// B2015-024 Have Spell Checker text changes be an editorial change (not assign a change bar but keep existing change bar)
// C2015-028 Add Editorial Mode to PROMS Step Editor
// if in Editorial Mode, treat it the same as if the Rditorial SprllCheck flag is set in the Format file
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck || this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode)
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck)
{
if (StepRTB.DidEditorialSpellCheck)
{

View File

@@ -97,11 +97,6 @@ namespace Volian.Controls.Library
_MyToolTip.MinimumTooltipSize = new Size(0, 24);
_MyToolTip.TooltipDuration = 3;
_MyToolTip.SetSuperTooltip(MyStepRTB, tpi);
ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings
}
public override void ToolTipOnOff()
{
_MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings
}
public override void RefreshContent()
{

View File

@@ -9,7 +9,6 @@ using System.Drawing;
using System.Text.RegularExpressions;
using Volian.Base.Library;
using JR.Utils.GUI.Forms;
using System.Linq;
namespace Volian.Controls.Library
{
@@ -387,26 +386,6 @@ namespace Volian.Controls.Library
// The following line expands the items needed to display SelectedItemInfo
ExpandAsNeeded(myItemInfo);
}
//C2019-036 View Only mode work with Checked Out Procedures
public void ResetAll()
{
List<int> itemIDs = Controls.OfType<RTBItem>().Where(t => t?.MyItemInfo?.ActiveParent != null && t.MyItemInfo.ActiveParent.GetType() == typeof(ItemInfo)).Select(x => (x.MyItemInfo.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
foreach (int itemID in itemIDs)
{
ItemInfo.ResetParts(itemID);
}
// The following line actually reloads the procedure item
MyProcedureItemInfo = ItemInfo.Get(MyProcedureItemInfo.ItemID, true);
MyProcedureItemInfo.RefreshConfig();
ContentInfo.Refresh(Content.Get(MyProcedureItemInfo.MyContent.ContentID, true));
// The following line expands the items needed to display SelectedItemInfo
ExpandAsNeeded(SelectedItemInfo);
}
/// <summary>
/// Currently selected StepRTB
/// </summary>
@@ -671,13 +650,8 @@ namespace Volian.Controls.Library
/// </summary>
public Color ActiveColor
{
get {
// C2015-028 Add Editorial Mode to PROMS Step Editor
// if in Editorial Mode, use LightGreen background
_ActiveColor = MyStepTabPanel != null && MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode ? Color.LightGreen : Color.SkyBlue;
return _ActiveColor;
}
set { _ActiveColor = value; }
get { return _ActiveColor; }
set { _ActiveColor = value; }
}
/// <summary>
/// Gets or Sets the Annotation backcolor for StepRTBs in the Panel

View File

@@ -3760,12 +3760,7 @@ namespace Volian.Controls.Library
public bool SpellCheckNext()
{
int nBad = C1SpellChecker2.CheckControl(this, false, MySpellCheckDlg);
// C2015-028 Add Editorial Mode to PROMS Step Editor
// if in Editorial Mode, treat it the same as if the EditorialSpellCheck flag is set in the Format file
bool editorialmode = (this.Parent.Parent.Parent as StepTabPanel).MyDisplayTabControl.IsInEditorialMode;
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck || editorialmode)
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck)
DidEditorialSpellCheck = MySpellCheckDlg.DidCorrectSpelling; // B2015-024 spell checker in editoral mode
return (nBad >= 0); // nBad = -1 means user pressed Cancel button
}

View File

@@ -120,7 +120,7 @@ namespace Volian.Controls.Library
/// </summary>
private void SetupStepTabRibbon()
{
_MyStepTabRibbon = new StepTabRibbon(_MyDisplayTabControl.IsInEditorialMode);
_MyStepTabRibbon = new StepTabRibbon();
_MyStepTabRibbon.Dock = System.Windows.Forms.DockStyle.Top;
_MyStepTabRibbon.Location = new System.Drawing.Point(0, 0);
_MyStepTabRibbon.Name = "displayTabRibbon1";

View File

@@ -16,8 +16,6 @@ using DevComponents.DotNetBar;
using Microsoft.Win32;
using System.Diagnostics;
using JR.Utils.GUI.Forms;
using System.Collections.Concurrent;
using System.Threading.Tasks;
namespace Volian.Controls.Library
{
@@ -908,11 +906,6 @@ namespace Volian.Controls.Library
// //SetButtonAndMenuEnabling(false);
//}
private Bitmap createTextBitmap(char ch)
{
return createTextBitmap(ch, new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel));
}
private Bitmap createTextBitmap(char ch, Font objFont)
{
string txt = string.Format("{0}", ch);
Bitmap objBmpImage = new Bitmap(1, 1);
@@ -923,6 +916,8 @@ namespace Volian.Controls.Library
// Create the Font object for the image text drawing.
// later on, we could add logic to use either FreeMono or Arial Unicode MS based on the format being used
// but for now, we are going to use FreeMono to create the symbol list
Font objFont = new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
//Font objFont = new Font("Arial Unicode MS", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
// Create a graphics object to measure the text's width and height.
Graphics objGraphics = Graphics.FromImage(objBmpImage);
@@ -942,6 +937,7 @@ namespace Volian.Controls.Library
objGraphics.SmoothingMode = SmoothingMode.AntiAlias;
objGraphics.TextContrast = 0;
objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
//objGraphics.DrawString(txt, objFont, new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0);
objGraphics.DrawString(txt, objFont, new SolidBrush(Color.Black),0,0);
objGraphics.Flush();
return (objBmpImage);
@@ -999,7 +995,7 @@ namespace Volian.Controls.Library
// SetButtonAndMenuEnabling(true);
//}
#region Constructor
public StepTabRibbon(bool? IsInEditorialMode = false)
public StepTabRibbon()
{
InitializeComponent();
this.btnInsSupInfo.Tag = string.Format("{0} {1}", (int)E_FromTypes.SupInfos, 1040); // Make type of rno (40) & special case 1000
@@ -1025,16 +1021,8 @@ namespace Volian.Controls.Library
// hide the import from Word file if not running in Debug mode
if (!VlnSettings.DebugMode)
rbnImpWrd.Visible = false;
// C2015-028 Add Editorial Mode to PROMS Step Editor
// default Editorial Mode to what is set in the DisplayTabControl
SetEditorialMode(IsInEditorialMode != null && (bool) IsInEditorialMode);
}
public void SetEditorialMode(bool mode) => btnEditorialMode.Checked = btnCMEditorialMode.Checked = mode;
void _RibbonControl_SizeChanged(object sender, EventArgs e)
}
void _RibbonControl_SizeChanged(object sender, EventArgs e)
{
this.Size = _RibbonControl.Size;
}
@@ -1667,7 +1655,6 @@ namespace Volian.Controls.Library
}
}
Clipboard.Clear();
Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard
}
iData = Clipboard.GetDataObject();
@@ -2072,9 +2059,6 @@ namespace Volian.Controls.Library
rtabHome.Select();
rtabTableGridTools.Visible = false;
SetButtonMenuEnabledDisabledOnStepType(false);
//C2019-036 View Only mode work with Checked Out Procedures
//Is in View Only Mode so show button as selected
btnEditMode.Checked = btnCMEditMode1.Checked = true;
this.Refresh();
return;
}
@@ -3141,7 +3125,7 @@ namespace Volian.Controls.Library
btnCMRedo.Enabled = btnRedo.Enabled = _MyStepRTB.CanRedo;
btnCMUndo.Enabled = btnUndo.Enabled = _MyStepRTB.CanUndo;
}
private void btnGoTo_Click(object sender, EventArgs e)
private void btnGoTo_Click(object sender, EventArgs e)
{
// if on a transition, go to the selected transition 'to'. If on
// a referenced object, bring up ReferencedObject Editor (for now, just put up a message box.
@@ -3227,29 +3211,7 @@ namespace Volian.Controls.Library
System.Diagnostics.Process.Start(roapp, args);
}
}
// C2015-028 Add Editorial Mode to PROMS Step Editor
private void btnEditorialMode_Click(object sender, EventArgs e)
{
//toggle button is selected
SetEditorialMode(!btnEditorialMode.Checked);
//set the overall flag in the displaytabcontrol
StepTabPanel tmp = Parent as StepTabPanel;
tmp.MyDisplayTabControl.IsInEditorialMode = btnEditorialMode.Checked;
//refresh the current item so the background color changes (LightGreen=Editorial Mode, SkyBlue=Normal Selected)
if (MyEditItem != null)
{
_MyEditItem.RefreshContent();
Application.DoEvents();
}
//set other preciously opened tabs to match the state of Editorial Mode in the current tab
tmp.MyDisplayTabControl.SetEdititorialModeForAllTabs(btnEditorialMode.Checked);
}
private void btnChgTyp_Click(object sender, EventArgs e)
private void btnChgTyp_Click(object sender, EventArgs e)
{
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Change Step Type");
MyEditItem.MyStepPanel.OnTabDisplay(sender, args);
@@ -3317,8 +3279,7 @@ namespace Volian.Controls.Library
rtabInsert.Visible = false;
rtabAdmin.Visible = false;
rtabReview.Select();
btnCMEditMode1.Enabled = btnEditMode.Enabled = btnCMEditorialMode.Enabled = false; // don't allow reviewer toggle out of view mode
btnCMEditorialMode.Visible = false;
btnCMEditMode1.Enabled = btnEditMode.Enabled = false; // don't allow reviewer toggle out of view mode
}
}
public void SetupROEditorMode()
@@ -3346,43 +3307,10 @@ namespace Volian.Controls.Library
public void SetupAdminMode()
{
}
//C2019-036 View Only mode work with Checked Out Procedures
public event StepTabRibbonEvent EnableDisableStepProperties;
private void OnEnableDisableStepProperties(StepTabRibbonEventArgs args)
{
if (EnableDisableStepProperties != null)
EnableDisableStepProperties(this, args);
}
private void btnToggleEditView_Click(object sender, EventArgs e)
{
if (MyEditItem == null) return;
//C2019-036 View Only mode work with Checked Out Procedures
string message = string.Empty;
if (MyEditItem.MyStepPanel.VwMode == E_ViewMode.View && !MySessionInfo.CanCheckOutItem(MyEditItem.MyItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
{
//someone else has the procedure checked out so cannot swap out of view only mode
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "\r\n\r\nYou will be unable to turn off View Only Mode for this procedure until it is checked in by the user specified above.");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else if (MyEditItem.MyStepPanel.VwMode == E_ViewMode.View)
{
//swapping into edit mode, so check out procedure and Setup Security
(this.Parent as StepTabPanel).MyDisplayTabItem.OwnerID = MySessionInfo.CheckOutItem(MyEditItem.MyItemInfo.MyProcedure.ItemID, 0);
(this.Parent as StepTabPanel).MyDisplayTabItem.SetupSecurity(MyItemInfo);
}
else
{
//swapping into View Only mode, so check in procedure
OwnerInfo oi = OwnerInfo.GetByItemID(MyEditItem.MyItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
MySessionInfo.CheckInItem(oi.OwnerID);
}
MyEditItem.MyStepPanel.VwMode = MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? E_ViewMode.View : E_ViewMode.Edit;
//enable / disable the Step Properties Panel based on the ViewMode
OnEnableDisableStepProperties(new StepTabRibbonEventArgs(MyEditItem.MyItemInfo, 0, MyEditItem.MyStepPanel.VwMode));
MyEditItem.ToggleEditView(MyEditItem.MyStepPanel.VwMode);
SetButtonAndMenuEnabling(true);
SetStepButtonAndMenuEnabling(true);
@@ -3396,62 +3324,7 @@ namespace Volian.Controls.Library
// btnEnhancedDocSync.Checked = !btnEnhancedDocSync.Checked;
//}
//C2019-036 View Only mode work with Checked Out Procedures
// using a blocking collection to make it thread safe in case someone
// spams hitting the refresh button
private BlockingCollection<bool> blockingRefreshProcedure = new BlockingCollection<bool>();
//C2019-036 View Only mode work with Checked Out Procedures
private void btnRefreshProcedure_Click(object sender, EventArgs e)
{
//Consumer
Task.Run(() =>
{
//Blocks until a newRefresh Procedure Run is available
while (!blockingRefreshProcedure.IsCompleted)
{
_ = blockingRefreshProcedure.Take();
RefreshProcedure();
}
});
//Producer
Task.Run(() => { blockingRefreshProcedure.Add(true); });
}
public void RefreshProcedure()
{
StepTabPanel stab_Panel = Parent as StepTabPanel;
if (MyEditItem != null)
{
if (!MyEditItem.MyStepPanel.ContainsFocus)
this.Invoke((Action)(() => { MyEditItem.MyStepPanel.Focus(); }));
E_ViewMode mode = MyEditItem.MyStepPanel.VwMode;
Application.DoEvents();
this.Invoke((Action)(() => {MyEditItem.MyStepPanel.ResetAll();}));
Application.DoEvents();
this.Invoke((Action)(() => {MyEditItem.MyStepPanel.Refresh();}));
Application.DoEvents();
MyEditItem.MyStepPanel.VwMode = mode;
Application.DoEvents();
}
else if (stab_Panel != null)
{
if (!stab_Panel.MyStepPanel.ContainsFocus)
this.Invoke((Action)(() => {stab_Panel.MyStepPanel.Focus();}));
E_ViewMode mode = stab_Panel.MyStepPanel.VwMode;
Application.DoEvents();
this.Invoke((Action)(() => {stab_Panel.MyStepPanel.ResetAll();}));
Application.DoEvents();
this.Invoke((Action)(() => {stab_Panel.MyStepPanel.Refresh();}));
Application.DoEvents();
stab_Panel.MyStepPanel.VwMode = mode;
Application.DoEvents();
}
}
private void btnROEdit_Click(object sender, EventArgs e)
{
if (VlnSettings.ReleaseMode.Equals("DEMO"))
@@ -4286,19 +4159,15 @@ namespace Volian.Controls.Library
if (oring == eEventSource.Keyboard)
_OringFlg = 1;
int selectedSlave = MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave;
if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return;
if (MyEditItem != null) MyEditItem.SaveCurrentAndContents();
MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = selectedSlave;
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 0);
}
private void btnPdfQuickCreate_Click(object sender, EventArgs e)
{
int selectedSlave = MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave;
if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return;
if (MyEditItem != null) MyEditItem.SaveCurrentAndContents();
MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = selectedSlave;
OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 1);
}
@@ -4961,11 +4830,10 @@ namespace Volian.Controls.Library
public class StepTabRibbonEventArgs : EventArgs
{
public StepTabRibbonEventArgs() { ; }
public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0, E_ViewMode viewMode = E_ViewMode.Edit)
public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0)
{
_Proc = proc;
OringFlg = oringFlg;
ViewMode = viewMode;
}
private ItemInfo _Proc;
@@ -4981,9 +4849,6 @@ namespace Volian.Controls.Library
get { return _OringFlg; }
set { _OringFlg = value; }
}
//C2019-036 View Only mode work with Checked Out Procedures
public E_ViewMode ViewMode { get; set; }
}
public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args);

View File

@@ -1,16 +0,0 @@
using System.Windows.Forms;
namespace Volian.Controls.Library
{
//ToolStripMenuItem with Added Value Property
public class ToolStripMenuItemwithValue : ToolStripMenuItem
{
public readonly object Value;
public ToolStripMenuItemwithValue(string text, object value)
{
Value = value;
Text = text;
}
}
}

View File

@@ -1,115 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
namespace Volian.Controls.Library
{
//CSM - C2025-043 report RO's that are not used in any of the PROMS data.
// extend the TreeView class with a couple added functions
// to allow support for what is needed for ROs
public static class TreeViewExtensions
{
#region public functions
//Returns a ROTreeView based on the data in the datatable dt
// builds tree based on the following:
// ParentID = 0 is top level
// links (defined parent) based on same dbID and ID = ParentID
// nodes will have the text of the title
public static TreeView GetROTree(DataTable dt, bool isExpanded = false)
{
TreeView tv = new TreeView();
var tempnodes = GetTreeNodes(
dt.AsEnumerable(),
(r) => r.Field<int?>("ParentID") == 0, //top level of tree
(r, s) => s.Where(x => r["ID"].Equals(x["ParentID"]) && r["dbID"].Equals(x["dbID"])), //how to match parents and children
(r) => new TreeNode { Text = r.Field<string>("title") } //what to display in the tree
);
tv.Nodes.AddRange(tempnodes.ToArray());
//if set to expand, sets the height to the combined height of all nodes + 20
//so will show whole tree
if (isExpanded)
{
tv.ExpandAll();
tv.SetTreeViewHeighttoFull();
tv.Width = 1200;
}
//sorts the tree in alphabetical order to match the way the tree is sorted in the RO Editor
tv.Sorted = true;
return tv;
}
//Saves the Tree to an Image at the specified path
public static void SaveTreeViewAsImage(this TreeView tv, string filePath)
{
// Create a Bitmap with the size of the TreeView
Bitmap bitmap = new Bitmap(tv.Width, tv.Height);
// Draw the TreeView onto the Bitmap
tv.DrawToBitmap(bitmap, new Rectangle(0, 0, bitmap.Width, bitmap.Height));
// Save the Bitmap as an image file
bitmap.Save(filePath, System.Drawing.Imaging.ImageFormat.Png);
}
#endregion
#region height functions
//This is a function to calculate and set the TreeView Height based
//on the height of all sub nodes + 20
public static void SetTreeViewHeighttoFull(this TreeView tv)
{
int totalHeight = 0;
foreach (TreeNode node in tv.Nodes)
{
totalHeight += GetNodeHeight(node);
}
tv.Height = totalHeight + 20;
}
//This function recursively adds the height of sub nodes to the running total
private static int GetNodeHeight(TreeNode node)
{
int curheight = node.Bounds.Height;
foreach (TreeNode child in node.Nodes)
{
curheight += GetNodeHeight(child);
}
return curheight;
}
#endregion
#region generic private tree structure functions
//This is a Generic Function to help build the Tree Structure
private static IEnumerable<TreeNode> GetTreeNodes<T>(
IEnumerable<T> source,
Func<T, Boolean> isRoot,
Func<T, IEnumerable<T>, IEnumerable<T>> getChilds,
Func<T, TreeNode> getItem)
{
IEnumerable<T> roots = source.Where(x => isRoot(x));
foreach (T root in roots)
yield return ConvertEntityToTreeNode(root, source, getChilds, getItem); ;
}
//This is a Generic Function to help build the Tree Structure
private static TreeNode ConvertEntityToTreeNode<T>(
T entity,
IEnumerable<T> source,
Func<T, IEnumerable<T>, IEnumerable<T>> getChilds,
Func<T, TreeNode> getItem)
{
TreeNode node = getItem(entity);
var childs = getChilds(entity, source);
foreach (T child in childs)
node.Nodes.Add(ConvertEntityToTreeNode(child, source, getChilds, getItem));
return node;
}
#endregion
}
}

View File

@@ -272,24 +272,21 @@ namespace Volian.Controls.Library
for (int i = 0; i < rows * cols; i++)
datum.Add("|");
XmlNodeList nl = xd.SelectNodes("C1FlexGrid/Cells/Cell/Data");
// B2026-003 use StringBuilder a "using" statement around the RichTextBox for better mememory management
StringBuilder data = new StringBuilder();
string data = string.Empty;
foreach (XmlNode xn in nl)
{
using (RichTextBox rtb = new RichTextBox())
{
rtb.Rtf = xn.InnerText;
XmlAttribute xa = xn.ParentNode.Attributes.GetNamedItem("index") as XmlAttribute;
string[] rc = xa.InnerText.Split(',');
int r = int.Parse(rc[0]);
int c = int.Parse(rc[1]);
int index = r * cols + c;
datum[index] = "|" + (rtb.Text == "" ? "" : rtb.Text);
}
RichTextBox rtb = new RichTextBox();
rtb.Rtf = xn.InnerText;
XmlAttribute xa = xn.ParentNode.Attributes.GetNamedItem("index") as XmlAttribute;
string[] rc = xa.InnerText.Split(',');
int r = int.Parse(rc[0]);
int c = int.Parse(rc[1]);
int index = r * cols + c;
datum[index] = "|" + (rtb.Text == "" ? "" : rtb.Text);
}
foreach (string s in datum)
data.Append(s);
return data.ToString();
data += s;
return data;
}
private string GetCellFormatString(XmlDocument xd)
{

View File

@@ -27,26 +27,10 @@ namespace Volian.Controls.Library
while (MyEditItem.SpellCheckNext())
{
ItemInfo next = MyEditItem.MyItemInfo.SearchNext;
//C2025-037 Evaluate the way that Spell Check (in step editor sections) is currently closing after one section.
if (next == null || next.IsProcedure) // B2016-063 check if next is not a step type instead of specifically a section
{
return; // spell check only current procedure
}
//If it is a word document, find the next non-word document
while (next.HasWordContent)
{
next = next.SearchNext;
if (next == null || next.IsProcedure) // B2016-063 check if next is not a step type instead of specifically a section
{
return; // spell check only current procedure
}
}
MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
}
if (next == null || !next.IsStep) // B2016-063 check if next is not a step type instead of specifically a section
return; // spell check only current section
MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
}
MyEditItem.SetFocus();
}

View File

@@ -118,7 +118,6 @@
<HintPath>..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
@@ -154,12 +153,6 @@
<Compile Include="ConvertTable.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CustomMessageBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CustomMessageBox.Designer.cs">
<DependentUpon>CustomMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="DisplayApplicability.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -302,7 +295,6 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="TreeViewExtensions.cs" />
<Compile Include="RTBItem.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -392,9 +384,6 @@
<Compile Include="TablePropertiesControl.Designer.cs">
<DependentUpon>TablePropertiesControl.cs</DependentUpon>
</Compile>
<Compile Include="ToolStripMenuItemwithValue.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TransPanel.cs">
<SubType>Component</SubType>
</Compile>
@@ -460,16 +449,12 @@
<DependentUpon>AnnotationSearch.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="CustomMessageBox.resx">
<DependentUpon>CustomMessageBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DisplayBookMarks.resx">
<DependentUpon>DisplayBookMarks.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DisplayHistory.resx">
<DependentUpon>DisplayHistory.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DisplayLibDocs.resx">
<DependentUpon>DisplayLibDocs.cs</DependentUpon>

View File

@@ -1269,11 +1269,6 @@ namespace Volian.Controls.Library
if (ok)
if (pia == null && tn.VEObject as StepInfo == null) cm.MenuItems.Add("Properties...", new EventHandler(mi_Click));
#endregion
#region Refresh_Tree
//C2021-035 Add Refresh Tree Option at highest level
if (tn == (VETreeNode)Nodes[0])
cm.MenuItems.Add("Refresh Tree", new EventHandler(mi_Click));
#endregion
//_MyLog.WarnFormat("Context Menu 7 - {0}", GC.GetTotalMemory(true));
if (fi != null && fi.HasWorkingDraft)
@@ -2357,10 +2352,6 @@ namespace Volian.Controls.Library
case "Print All Approved Procedures": //C2025-017 print all approved procedures
OnPrintAllApprovedProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
break;
//C2021-035 Add Refresh Tree Option at highest level
case "Refresh Tree":
RefreshTree();
break;
default:
if (mi.Text.StartsWith("Showing Change Bars Starting"))
OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
@@ -3935,13 +3926,6 @@ namespace Volian.Controls.Library
if (Processing != null)
Processing(this, new vlnTreeStatusEventArgs(status, message));
}
//C2021-035 Add Refresh Tree Option at highest level
public event vlnTreeViewStatusEvent RefreshFormats;
private void OnRefreshFormats(bool status, string message)
{
if (RefreshFormats != null)
RefreshFormats(this, new vlnTreeStatusEventArgs(status, message));
}
#endregion
#region SetLastValuesAndSaveIfChangedStuff
private void SetLastValues(VETreeNode node)
@@ -4664,36 +4648,6 @@ namespace Volian.Controls.Library
if (myFolder.FolderID == ((FolderInfo)obj2).FolderID) return true;
return false;
}
//C2021-035 Add Refresh Tree Option at highest level
public void RefreshTree()
{
//reload the base node
VETreeNode tbase = (VETreeNode) Nodes[0];
tbase.ChildrenLoaded = false;
//Refresh the formats
OnRefreshFormats(true, "Refreshing Formats");
//reset the procedure lists so db is re-queried in case they changed
//also clear other caches in case added steps / sections / etc...
PartInfo.ClearPartInfoCache();
ItemInfo.ClearItemInfoCache();
DocVersionInfo.ResetAllProcedures();
FolderInfo.ClearFolderInfoCache();
//Refresh the base VEPROMS object
var fldr = tbase.VEObject as FolderInfo;
if (fldr != null)
{
Invoke((Action)(() => { tbase.VEObject = FolderInfo.Get(fldr.FolderID); }));
}
//refresh the tree
Invoke((Action)(() => { tbase.RefreshNode(); }));
this.Invoke((Action)(() => { this.Update(); }));
}
}
#region DragHelper
public class DragHelper

Some files were not shown because too many files have changed in this diff Show More