Commit for development environment setup

This commit is contained in:
2023-06-19 16:12:33 -04:00
parent be72063a3c
commit bbce2ad0a6
2209 changed files with 1171775 additions and 625 deletions

View File

@@ -0,0 +1,175 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace CvtFont
{
// <Font Family="Prestige Elite Tall" Size="10" Style="NONE" />
public static class CvtFont
{
private static string [] OldNames = {
"ELITE",
"PICA",
"LN_PRN",
"CONDENSE",
"SANSERIF",
"PICA12",
"PROPORTIONAL",
"PROPT12",
"HVLPT18",
"HVLPT25",
"SPECIALCHARS",
"PT14",
"SANSERIF14",
"SANSERIF17",
"HVLPT12",
"NARRATOR",
"MEDUPUNIVERS",
"LGUPMED16",
"PROPT10",
"LG1275HP4SI",
"HVLPT10",
"HVLPT8",
"HVLPT14",
"SANSERIF25",
"EYECHART",
"TIMES11",
"SANSCOND",
"BIGSCRIPT"
};
private static string[] NewXML = {
"<Font Family=\"Prestige Elite Tall\" Size=\"10\"/>",
"<Font Family=\"Courier New\" Size=\"12\"/>",
"<Font Family=\"Times New Roman\" Size=\"7\"/>",
"<Font Family=\"Times New Roman\" Size=\"7\"/>",
"<Font Family=\"Letter Gothic\" Size=\"10\"/>",
"<Font Family=\"Courier New\" Size=\"12\"/>",
"<Font Family=\"Arial\" Size=\"18\"/>",
"<Font Family=\"Arial\" Size=\"11\"/>",
"<Font Family=\"Times New Roman\" Size=\"18\"/>",
"<Font Family=\"Times New Roman\" Size=\"25\"/>",
"<Font Family=\"VolianDraw XXXXXX\" Size=\"12\"/>",
"<Font Family=\"Letter Gothic\" Size=\"12\"/>",
"<Font Family=\"Arial\" Size=\"14\"/>",
"<Font Family=\"Arial\" Size=\"17\"/>",
"<Font Family=\"Times New Roman\" Size=\"12\"/>",
"<Font Family=\"Gothic Ultra\" Size=\"12\"/>",
"<Font Family=\"NA\" Size=\"na\"/>",
"<Font Family=\"Letter Gothic Tall\" Size=\"7\"/>",
"<Font Family=\"Arial\" Size=\"0\"/>",
"<Font Family=\"Letter Gothic Tall\" Size=\"10\"/>",
"<Font Family=\"Times New Roman\" Size=\"10\"/>",
"<Font Family=\"Times New Roman\" Size=\"8\"/>",
"<Font Family=\"Times New Roman\" Size=\"14\"/>",
"<Font Family=\"Arial\" Size=\"25\"/>",
"<Font Family=\"Gothic Ultra\" Size=\"14\"/>",
"<Font Family=\"Times New Roman\" Size=\"11\"/>",
"<Font Family=\"Letter Gothic\" Size=\"7\"/>",
"<Font Family=\"VolianScript\" Size=\"32\"/>"
};
private static string[] NewFamily = {
"Prestige Elite Tall",
"Courier New",
"Times New Roman",
"Times New Roman",
"Letter Gothic",
"Courier New",
"Arial",
"Arial",
"Times New Roman",
"Times New Roman",
"VolianDraw XXXXXX",
"Letter Gothic",
"Arial",
"Arial",
"Times New Roman",
"Gothic Ultra",
"NA",
"Letter Gothic Tall",
"Arial",
"Letter Gothic Tall",
"Times New Roman",
"Times New Roman",
"Times New Roman",
"Arial",
"Gothic Ultra",
"Times New Roman",
"Letter Gothic",
"VolianScript"
};
private static int[] NewSize = {
10,
12,
7,
7,
10,
12,
18,
11,
18,
25,
12,
12,
14,
17,
12,
12,
0,
7,
0,
10,
10,
8,
14,
25,
14,
11,
7,
32
};
private static Dictionary<string, string> OldToNewStrings=null;
public static string ConvertToString(string oldstr)
{
if (OldToNewStrings == null) InitializeDictionary();
return OldToNewStrings[oldstr];
}
public static string ConvertToFamily(string oldstr)
{
int i = 0;
foreach (string str in OldNames)
{
if (str == oldstr) return NewFamily[i];
i++;
}
return null;
}
public static int ConvertToSize(string oldstr)
{
int i = 0;
foreach (string str in OldNames)
{
if (str == oldstr) return NewSize[i];
i++;
}
return -1;
}
//public static XmlElement ConvertToXML(string oldstr)
//{
// if (OldToNewStrings == null) InitializeDictionary();
// XmlElement xml = new XmlElement();
// xml.InnerXml = OldToNewStrings[oldstr];
// return xml;
//}
private static void InitializeDictionary()
{
int i = 0;
foreach (string str in OldNames)
OldToNewStrings.Add(str, NewXML[i]);
}
}
}

View File

@@ -0,0 +1,47 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{652EB5F6-18DD-4F22-9C0B-62EB46613C4D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CvtFont</RootNamespace>
<AssemblyName>CvtFont</AssemblyName>
</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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CvtFont.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CvtFont")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Volian Enterprises, Inc.")]
[assembly: AssemblyProduct("CvtFont")]
[assembly: AssemblyCopyright("Copyright © Volian Enterprises, Inc. 2006")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d2266793-0f12-4f71-bbd4-0a1617554b27")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,58 @@
#include "stdafx.h"
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute("")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("")];
[assembly:AssemblyProductAttribute("")];
[assembly:AssemblyCopyrightAttribute("")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project directory.
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly:AssemblyDelaySignAttribute(false)];
[assembly:AssemblyKeyFileAttribute("E:\\proms.net\\Public Key\\vlnkey.snk")];
[assembly:AssemblyKeyNameAttribute("")];

View File

@@ -0,0 +1,69 @@
// This is the main DLL file.
#include "stdafx.h"
#include "DirectoryAndFileAPI.h"
using namespace DirectoryAndFileAPI;
char *DirAndFileFuncts::StringToCharStr(String *InStr)
{
int len = (InStr->get_Length)();
char *rtnstr = new char [len+1];
ZeroMemory(rtnstr,len+1);
for (int i=0; i<len; i++)
rtnstr[i] = (InStr->get_Chars)(i);
return rtnstr;
}
String *DirAndFileFuncts::GetLongName(String *NameIn)
{
char *tmpNameIn;
char *tmpNameOut;
char *fnPtr = NULL;
int rtnval;
tmpNameIn = StringToCharStr(NameIn);
tmpNameOut = new char[1];
memset(tmpNameOut,0,1);
// This will get the buffer size we need
rtnval = GetFullPathName(tmpNameIn,1,tmpNameOut,&fnPtr);
if (rtnval > 1)
{
delete tmpNameOut;
tmpNameOut = new char[rtnval+1];
memset(tmpNameOut,0,rtnval+1);
rtnval = GetFullPathName(tmpNameIn,rtnval,tmpNameOut,&fnPtr);
}
NameOut = new String(tmpNameOut);
return NameOut;
}
String *DirAndFileFuncts::GetShortName(String *NameIn)
{
char *tmpNameIn;
char *tmpNameOut;
int rtnval;
tmpNameIn = StringToCharStr(NameIn);
tmpNameOut = new char[1];
memset(tmpNameOut,0,1);
rtnval = GetShortPathName(tmpNameIn,tmpNameOut,1);
if (rtnval > 1)
{
delete tmpNameOut;
tmpNameOut = new char[rtnval+1];
memset(tmpNameOut,0,rtnval+1);
rtnval = GetShortPathName(tmpNameIn,tmpNameOut,rtnval);
}
NameOut = new String(tmpNameOut);
return NameOut;
}

View File

@@ -0,0 +1,24 @@
// DirectoryAndFileAPI.h
#pragma once
#include <Windows.h>
#include <atlstr.h>
#include <string.h>
using namespace System;
namespace DirectoryAndFileAPI
{
public __gc class DirAndFileFuncts
{
public:
String *NameOut;
DirAndFileFuncts() {};
// TODO: Add your methods for this class here.
String *GetLongName(String *NameIn);
String *GetShortName(String *NameIn);
private:
char *StringToCharStr(String *InStr);
};
}

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectoryAndFileAPI", "DirectoryAndFileAPI.vcproj", "{A20EE163-393A-11D7-85C8-92B997000000}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{A20EE163-393A-11D7-85C8-92B997000000}.Debug.ActiveCfg = Debug|Win32
{A20EE163-393A-11D7-85C8-92B997000000}.Debug.Build.0 = Debug|Win32
{A20EE163-393A-11D7-85C8-92B997000000}.Release.ActiveCfg = Release|Win32
{A20EE163-393A-11D7-85C8-92B997000000}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,136 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="DirectoryAndFileAPI"
ProjectGUID="{A20EE163-393A-11D7-85C8-92B997000000}"
Keyword="ManagedCProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="E:\VE-PROMS.NET\BIN"
IntermediateDirectory="Debug"
ConfigurationType="2"
CharacterSet="2"
ManagedExtensions="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG"
MinimalRebuild="FALSE"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
UsePrecompiledHeader="3"
WarningLevel="3"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DirectoryAndFileAPI.dll"
LinkIncremental="2"
GenerateDebugInformation="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
CharacterSet="2"
ManagedExtensions="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG"
MinimalRebuild="FALSE"
UsePrecompiledHeader="3"
WarningLevel="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/DirectoryAndFileAPI.dll"
LinkIncremental="1"
GenerateDebugInformation="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="AssemblyInfo.cpp">
</File>
<File
RelativePath="DirectoryAndFileAPI.cpp">
</File>
<File
RelativePath="Stdafx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc">
<File
RelativePath="DirectoryAndFileAPI.h">
</File>
<File
RelativePath="Stdafx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;r">
</Filter>
<File
RelativePath="ReadMe.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,31 @@
========================================================================
DYNAMIC LINK LIBRARY : DirectoryAndFileAPI Project Overview
========================================================================
AppWizard has created this DirectoryAndFileAPI DLL for you.
This file contains a summary of what you will find in each of the files that
make up your DirectoryAndFileAPI application.
DirectoryAndFileAPI.vcproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
DirectoryAndFileAPI.cpp
This is the main DLL source file.
DirectoryAndFileAPI.h
This file contains a class declaration.
AssemblyInfo.cpp
Contains custom attributes for modifying assembly metadata.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,5 @@
// stdafx.cpp : source file that includes just the standard includes
// DirectoryAndFileAPI.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@@ -0,0 +1,8 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#using <mscorlib.dll>

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,105 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{6A525742-00CA-450B-ABE7-F52991AEA0F7}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "FMTformat"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "stepformat"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "FmtFileVars.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FMTformat", "FMTformat.csproj", "{6A525742-00CA-450B-ABE7-F52991AEA0F7}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{6A525742-00CA-450B-ABE7-F52991AEA0F7}.Debug.ActiveCfg = Debug|.NET
{6A525742-00CA-450B-ABE7-F52991AEA0F7}.Debug.Build.0 = Debug|.NET
{6A525742-00CA-450B-ABE7-F52991AEA0F7}.Release.ActiveCfg = Release|.NET
{6A525742-00CA-450B-ABE7-F52991AEA0F7}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,143 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ArcData.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 3/08/05 1:44p $
*
* $History: ArcData.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:44p
* Created in $/LibSource/GUI_Utils
* Approval
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:40p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:33p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:32p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:30p
* Created in $/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:16p
* Created in $/EXE/GUI_Utils
* Approval
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace GUI_Utils
{
/// <summary>
/// Summary description for ArcData.
/// </summary>
public class ArcData : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblPrompt;
private System.Windows.Forms.Button btnYes;
private System.Windows.Forms.Button btnNo;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ArcData(string Caption, string Message)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.Text = Caption;
this.lblPrompt.Text = Message;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ArcData));
this.lblPrompt = new System.Windows.Forms.Label();
this.btnYes = new System.Windows.Forms.Button();
this.btnNo = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblPrompt
//
this.lblPrompt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblPrompt.Location = new System.Drawing.Point(40, 16);
this.lblPrompt.Name = "lblPrompt";
this.lblPrompt.Size = new System.Drawing.Size(224, 56);
this.lblPrompt.TabIndex = 0;
this.lblPrompt.Text = "Do you want to save the current data to an archive file before proceeding with th" +
"e Approval or Revise?";
//
// btnYes
//
this.btnYes.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.btnYes.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnYes.Location = new System.Drawing.Point(56, 88);
this.btnYes.Name = "btnYes";
this.btnYes.Size = new System.Drawing.Size(80, 24);
this.btnYes.TabIndex = 1;
this.btnYes.Text = "Yes";
//
// btnNo
//
this.btnNo.DialogResult = System.Windows.Forms.DialogResult.No;
this.btnNo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnNo.Location = new System.Drawing.Point(176, 88);
this.btnNo.Name = "btnNo";
this.btnNo.Size = new System.Drawing.Size(72, 24);
this.btnNo.TabIndex = 2;
this.btnNo.Text = "No";
//
// ArcData
//
this.AutoScale = false;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 126);
this.Controls.Add(this.btnNo);
this.Controls.Add(this.btnYes);
this.Controls.Add(this.lblPrompt);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ArcData";
this.Text = "Archive Data";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@@ -0,0 +1,174 @@
<?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="lblPrompt.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblPrompt.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblPrompt.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnYes.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnYes.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnYes.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnNo.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnNo.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnNo.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>ArcData</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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,135 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{0D980CD1-0EFF-4E46-8501-E9DF31A41AC3}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "GUI_Utils"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "GUI_Utils"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "ArcData.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "ArcData.resx"
DependentUpon = "ArcData.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ReadWord.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "ReadWord.resx"
DependentUpon = "ReadWord.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "TreeViewMultiSelect.cs"
SubType = "Component"
BuildAction = "Compile"
/>
<File
RelPath = "TreeViewMultiSelect.resx"
DependentUpon = "TreeViewMultiSelect.cs"
BuildAction = "EmbeddedResource"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUI_Utils", "GUI_Utils.csproj", "{0D980CD1-0EFF-4E46-8501-E9DF31A41AC3}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{0D980CD1-0EFF-4E46-8501-E9DF31A41AC3}.Debug.ActiveCfg = Debug|.NET
{0D980CD1-0EFF-4E46-8501-E9DF31A41AC3}.Debug.Build.0 = Debug|.NET
{0D980CD1-0EFF-4E46-8501-E9DF31A41AC3}.Release.ActiveCfg = Release|.NET
{0D980CD1-0EFF-4E46-8501-E9DF31A41AC3}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,161 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ReadWord.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 5/17/05 11:45a $
*
* $History: ReadWord.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 5/17/05 Time: 11:45a
* Updated in $/LibSource/GUI_Utils
* position in center of screen
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:45p
* Created in $/LibSource/GUI_Utils
* Approval
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:40p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:33p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:32p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:30p
* Created in $/GUI_Utils/GUI_Utils
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace GUI_Utils
{
/// <summary>
/// Summary description for ReadWord.
/// </summary>
public class frmReadWord : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox tbInput;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Label lblInput;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public frmReadWord(string inpText,string caption)
{
InitializeComponent();
this.lblInput.Text = caption;
this.tbInput.Text = inpText;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmReadWord));
this.lblInput = new System.Windows.Forms.Label();
this.tbInput = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblInput
//
this.lblInput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblInput.Location = new System.Drawing.Point(19, 9);
this.lblInput.Name = "lblInput";
this.lblInput.Size = new System.Drawing.Size(451, 28);
this.lblInput.TabIndex = 0;
//
// tbInput
//
this.tbInput.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.tbInput.Location = new System.Drawing.Point(10, 46);
this.tbInput.Name = "tbInput";
this.tbInput.Size = new System.Drawing.Size(460, 24);
this.tbInput.TabIndex = 1;
this.tbInput.Text = "textBox1";
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(125, 92);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(96, 28);
this.btnOK.TabIndex = 2;
this.btnOK.Text = "OK";
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(259, 92);
this.btnCancel.Name = "btnCancel";
this.btnCancel.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.btnCancel.Size = new System.Drawing.Size(96, 28);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
//
// frmReadWord
//
this.AutoScale = false;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(489, 136);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.tbInput);
this.Controls.Add(this.lblInput);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmReadWord";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "VE-PROMS";
this.TopMost = true;
this.ResumeLayout(false);
}
#endregion
public string ReadWordText
{
get
{
return this.tbInput.Text;
}
}
}
}

View File

@@ -0,0 +1,183 @@
<?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="lblInput.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblInput.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblInput.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbInput.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbInput.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbInput.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.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.Name">
<value>frmReadWord</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.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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,439 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: TreeViewMultiSelect.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 3/08/05 1:45p $
*
* $History: TreeViewMultiSelect.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:45p
* Created in $/LibSource/GUI_Utils
* Approval
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:40p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:33p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:32p
* Created in $/LibSource/GUI_Utils/GUI_Utils
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:30p
* Created in $/GUI_Utils/GUI_Utils
*********************************************************************************************/
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace MultiSelectTreeView
{
/// <summary>
/// Summary description for MultiSelectTreeView.
/// The MultiSelectTreeView inherits from System.Windows.Forms.TreeView to
/// allow user to select multiple nodes.
/// The underlying comctl32 TreeView doesn't support multiple selection.
/// Hence this MultiSelectTreeView listens for the BeforeSelect && AfterSelect
/// events to dynamically change the BackColor of the individual treenodes to
/// denote selection.
/// It then adds the TreeNode to the internal arraylist of currently
/// selectedNodes after validation checks.
///
/// The MultiSelectTreeView supports
/// 1) Select + Control will add the current node to list of SelectedNodes
/// 2) Select + Shift will add the current node and all the nodes between the two
/// (if the start node and end node is at the same level)
/// 3) Control + A when the MultiSelectTreeView has focus will select all Nodes.
///
///
/// </summary>
public class MultiSelectTreeView : System.Windows.Forms.TreeView
{
/// <summary>
/// This is private member which caches the last treenode user clicked
/// </summary>
private TreeNode lastNode;
private TreeNode ParentNode;
private int SelectNodes_ImageId;
/// <summary>
/// This is private member stores the list of SelectedNodes
/// </summary>
private ArrayList selectedNodes;
/// <summary>
/// This is private member which caches the first treenode user clicked
/// </summary>
private TreeNode firstNode;
/// <summary>
/// The constructor which initialises the MultiSelectTreeView.
/// </summary>
public MultiSelectTreeView(int imgid)
{
SelectNodes_ImageId=imgid;
selectedNodes = new ArrayList();
}
/// <summary>
/// The constructor which initialises the MultiSelectTreeView.
/// </summary>
[
Category("Selection"),
Description("Gets or sets the selected nodes as ArrayList")
]
public ArrayList SelectedNodes
{
get
{
return selectedNodes;
}
set
{
DeselectNodes();
selectedNodes.Clear();
selectedNodes = value;
SelectNodes();
}
}
#region overrides
/// <summary>
/// If the user has pressed "Control+A" keys then select all nodes.
/// </summary>
/// <param name="e"></param>
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyDown (e);
bool Pressed = (e.Control && ((e.KeyData & Keys.A) == Keys.A));
if (Pressed)
{
// SelectAllNodes(this.Nodes); //we won't allow selection of all.
}
}
/// <summary>
/// This Function starts the multiple selection.
/// </summary>
/// <param name="e"></param>
protected override void OnBeforeSelect(TreeViewCancelEventArgs e)
{
base.OnBeforeSelect(e);
//if (e.Node.SelectedImageIndex!=SelectNodes_ImageId)return;
//if (selectedNodes.Count>1 && e.Node.Parent != ParentNode) return;
//ParentNode=e.Node.Parent;
//Check for the current keys press..
bool isControlPressed = (ModifierKeys==Keys.Control);
bool isShiftPressed = (ModifierKeys==Keys.Shift);
bool isRightMouse = (Control.MouseButtons==MouseButtons.Right);
if (isRightMouse)return;
//If control is pressed and the selectedNodes contains current Node
//Deselect that node...
//Remove from the selectedNodes Collection...
if (isControlPressed && selectedNodes.Contains(e.Node))
{
DeselectNodes();
selectedNodes.Remove( e.Node );
SelectNodes();
//MultiSelectTreeView has handled this event ....
//Windows.Forms.TreeView should eat this event.
e.Cancel = true;
return;
}
//else (if Shift key is pressed)
//Start the multiselection ...
//Since Shift is pressed we would "SELECT"
///all nodes from first node - to last node
lastNode = e.Node;
//If Shift not pressed...
//Remember this Node to be the Start Node .. in case user presses Shift to
//select multiple nodes.
if (!isShiftPressed&&!isControlPressed&&(e.Node.ImageIndex==this.SelectNodes_ImageId))
firstNode = e.Node;
}
/// <summary>
/// This function ends the multi selection. Also adds and removes the node to
/// the selectedNodes depending upon the keys pressed.
/// </summary>
/// <param name="e"></param>
protected override void OnAfterSelect(TreeViewEventArgs e)
{
base.OnAfterSelect(e);
//if (e.Node.SelectedImageIndex!=SelectNodes_ImageId)return;
//if (selectedNodes.Count>1 && e.Node.Parent != ParentNode) return;
ParentNode=e.Node.Parent;
//Check for the current keys press..
bool isControlPressed = (ModifierKeys==Keys.Control);
bool isShiftPressed = (ModifierKeys==Keys.Shift);
bool isRightMouse = (Control.MouseButtons==MouseButtons.Right);
if (isRightMouse)return;
if (isControlPressed)
{
if ((!selectedNodes.Contains(e.Node ))&& (e.Node.SelectedImageIndex==SelectNodes_ImageId) && (selectedNodes.Count==0 || e.Node.Parent == ParentNode))
{
//This is a new Node, so add it to the list.
selectedNodes.Add(e.Node);
ParentNode = e.Node.Parent;
SelectNodes();
}
else if (selectedNodes.Contains(e.Node))
{
//If control is pressed and the selectedNodes contains current Node
//Deselect that node...
//Remove from the selectedNodes Collection...
DeselectNodes();
selectedNodes.Remove( e.Node );
if (selectedNodes.Count==0)ParentNode=null;
SelectNodes();
}
else
{
//If control is pressed and this is not at the level of multi
// select, clear selectetdNodes.
if (selectedNodes!=null && selectedNodes.Count>0)
{
DeselectNodes();
selectedNodes.Clear();
ParentNode=null;
}
selectedNodes.Add( e.Node );
}
}
else
{
// SHIFT is pressed
if (isShiftPressed && e.Node.SelectedImageIndex==SelectNodes_ImageId)
{
if (firstNode==null)
firstNode=e.Node;
else
{
//Start Looking for the start and end nodes to select all the nodes between them.
TreeNode uppernode = firstNode;
TreeNode bottomnode = e.Node;
//Check Parenting Upper ---> Bottom
//Is Upper Node parent (direct or indirect) of Bottom Node
bool bParent = CheckIfParent(uppernode, bottomnode);
if (!bParent)
{
//Check Parenting the other way round
bParent = CheckIfParent(bottomnode, uppernode);
if (bParent) // SWAPPING
{
TreeNode temp = uppernode;
uppernode = bottomnode;
bottomnode = temp;
}
}
if (bParent)
{
TreeNode n = bottomnode;
while ( n != uppernode.Parent)
{
if ( !selectedNodes.Contains( n ) )
selectedNodes.Add( n );
n = n.Parent;
}
}
// Parenting Fails ... but check if the NODES are on the same LEVEL.
else
{
if ( (uppernode.Parent==null && bottomnode.Parent==null) || (uppernode.Parent!=null && uppernode.Parent.Nodes.Contains( bottomnode )) ) // are they siblings ?
{
int nIndexUpper = uppernode.Index;
int nIndexBottom = bottomnode.Index;
//Need to SWAP if the order is reversed...
if (nIndexBottom < nIndexUpper)
{
TreeNode temp = uppernode;
uppernode = bottomnode;
bottomnode = temp;
nIndexUpper = uppernode.Index;
nIndexBottom = bottomnode.Index;
}
TreeNode n = uppernode;
selectedNodes.Clear();
while (nIndexUpper < nIndexBottom)
{
//Add all the nodes if nodes not present in the current
//SelectedNodes list...
if (!selectedNodes.Contains( n ))
{
selectedNodes.Add(n);
SelectAllNodesInNode(n.Nodes, n);
}
n = n.NextNode;
nIndexUpper++;
}
//Add the Last Node.
selectedNodes.Add(n);
}
else
{
if ( !selectedNodes.Contains( uppernode ) ) selectedNodes.Add( uppernode );
if ( !selectedNodes.Contains( bottomnode ) )selectedNodes.Add( bottomnode );
}
}
ParentNode = e.Node.Parent;
SelectNodes();
//Reset the firstNode counter for subsequent "SHIFT" keys.
firstNode = e.Node;
}
}
else
{
// If Normal selection then add this to SelectedNodes Collection.
if (selectedNodes!=null && selectedNodes.Count>0)
{
DeselectNodes();
selectedNodes.Clear();
}
selectedNodes.Add( e.Node );
}
}
}
/// <summary>
/// Overriden OnLostFocus to mimic TreeView's behavior of de-selecting nodes.
/// </summary>
/// <param name="e"></param>
protected override void OnLostFocus(EventArgs e)
{
base.OnLostFocus (e);
DeselectNodes();
}
/// <summary>
/// Overriden OnGotFocus to mimic TreeView's behavior of selecting nodes.
/// </summary>
/// <param name="e"></param>
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus (e);
SelectNodes();
}
#endregion overrides
/// <summary>
/// Private function to check the parenting of the two nodes passed.
/// </summary>
/// <param name="parentNode"></param>
/// <param name="childNode"></param>
/// <returns></returns>
private bool CheckIfParent(TreeNode parentNode, TreeNode childNode)
{
if (parentNode == childNode)
return true;
TreeNode node = childNode;
bool parentFound = false;
while (!parentFound && node != null)
{
node = node.Parent;
parentFound = (node == parentNode);
}
return parentFound;
}
/// <summary>
/// This function provides the user feedback that the node is selected
/// Basically the BackColor and the ForeColor is changed for all
/// the nodes in the selectedNodes collection.
/// </summary>
private void SelectNodes()
{
foreach ( TreeNode n in selectedNodes )
{
n.BackColor = SystemColors.Highlight;
n.ForeColor = SystemColors.HighlightText;
}
}
/// <summary>
/// This function provides the user feedback that the node is de-selected
/// Basically the BackColor and the ForeColor is changed for all
/// the nodes in the selectedNodes collection.
/// </summary>
private void DeselectNodes()
{
if (selectedNodes.Count==0) return;
TreeNode node = (TreeNode) selectedNodes[0];
if (node.TreeView==null) return; // on dispose, at end of program
Color backColor = node.TreeView.BackColor;
Color foreColor= node.TreeView.ForeColor;
foreach ( TreeNode n in selectedNodes )
{
n.BackColor = backColor;
n.ForeColor = foreColor;
}
}
/// <summary>
/// This function selects all the Nodes in the MultiSelectTreeView..
/// </summary>
private void SelectAllNodes(TreeNodeCollection nodes)
{
foreach (TreeNode n in this.Nodes)
{
selectedNodes.Add(n);
if (n.Nodes.Count > 1)
{
SelectAllNodesInNode(n.Nodes, n);
}
}
SelectNodes();
}
/// <summary>
/// Recursive function selects all the Nodes in the MultiSelectTreeView's Node
/// </summary>
private void SelectAllNodesInNode(TreeNodeCollection nodes, TreeNode node)
{
foreach (TreeNode n in node.Nodes)
{
selectedNodes.Add(n);
if (n.Nodes.Count > 1)
{
SelectAllNodesInNode(n.Nodes, n);
}
}
SelectNodes();
}
public bool MultiSelectActive()
{
if (selectedNodes.Count>1)return true;
return false;
}
}
}

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<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" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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.0.0.0</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>
</root>

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,249 @@
/*********************************************************************************************
* Copyright 2003 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: EopToErgRelations.cs $ $Revision: 1 $
* $Author: Jsj $ $Date: 11/12/04 10:33a $
*
* $History: EopToErgRelations.cs $
*
* ***************** Version 1 *****************
* User: Jsj Date: 11/12/04 Time: 10:33a
* Created in $/LibSource/VDB
* Class to support translation table maintenance.
*********************************************************************************************/
using System;
using System.IO;
using System.Collections;
using VDB;
namespace VDB_Set
{
/// <summary>
/// Support for the maintenance of the EOP ot ERG translation table
/// (TRANSL.TBL) which holds the relationships between the EOPs and ERGs
/// </summary>
public class EopToErgRelations
{
static string RelationshipFile = "TRANSL.TBL";
private ArrayList _aryTransTable = null;
public ArrayList aryTransTable
{
get
{
return _aryTransTable;
}
set
{
_aryTransTable = value;
}
}
public EopToErgRelations()
{
_aryTransTable = new ArrayList();
ReadTranslationTableFile();
}
private void ReadTranslationTableFile()
{
string inbuf;
TransFileRecord TranTblRec;
if (!File.Exists(RelationshipFile))
return; // file not there to read
StreamReader sr = new StreamReader(RelationshipFile);
while ((inbuf = sr.ReadLine()) != null)
{
TranTblRec = new TransFileRecord(inbuf);
_aryTransTable.Add(TranTblRec);
}
sr.Close();
}
public void WriteTranslationTableFile()
{
StreamWriter sw = new StreamWriter(RelationshipFile,false);
foreach (TransFileRecord tfr in _aryTransTable)
{
sw.Write(tfr.StringForFile());
}
sw.Close();
}
// Add to the end of the passed in list either info from the read-in
// translation file (TRANSL.TBL) or a new (empty) record.
public void AddToTranslationList(SetRecordObj SetRecObj, ArrayList NewList)
{
bool found = false;
for (int i = 0; !found && i < _aryTransTable.Count; i++)
{
TransFileRecord tfr = (TransFileRecord)_aryTransTable[i];
string tfrUpper = tfr.EOPFile.ToUpper();
string NewUpper = SetRecObj.DatabaseTable.ToUpper();
if (tfrUpper.Equals(NewUpper))
{
NewList.Add(tfr);
found=true;
}
}
if (!found)
{
TransFileRecord newrec = new TransFileRecord();
newrec.EOPFile = SetRecObj.DatabaseTable;
NewList.Add(newrec);
}
}
// Assign the ERG information (passed in as RecObj) to the currently
// slected EOP
public bool ChangeTranslationListItem(int EOPidx, object RecObj)
{
bool changedFlag = false;
SetRecordObj SetRecObj = (SetRecordObj)RecObj;
TransFileRecord tfr = (TransFileRecord)_aryTransTable[EOPidx];
if (tfr.ERGFile == null ||
!tfr.ERGFile.Equals(SetRecObj.DatabaseTable) ||
!tfr.ERGProcNum.Equals(SetRecObj.ProcNumber))
{
changedFlag = true;
tfr.ERGFile = SetRecObj.DatabaseTable;
tfr.ERGProcNum = SetRecObj.ProcNumber;
_aryTransTable[EOPidx] = tfr;
}
return changedFlag;
}
// For a given procecure number, find the position in the translation
// table list.
public int FindEOPInList(String EopFileName)
{
bool found = false;
int rtval = -1;
int cnt = _aryTransTable.Count;
TransFileRecord tfr;
string uEopFileName = EopFileName.ToUpper();
for (int i = 0; !found && i < cnt; i++)
{
tfr = (TransFileRecord)_aryTransTable[i];
string uListEopName = tfr.EOPFile.ToString().ToUpper();
if (uListEopName.Equals(uEopFileName))
{
rtval = i;
found = true;
}
}
return rtval;
}
// For a given position in the Translation table, get the corresponding
// position in the ERGList array
public int FindInERGList(int idx, ArrayList ERGList)
{
int rtval = 0;
bool found = false;
TransFileRecord tfr = (TransFileRecord)_aryTransTable[idx];
if (tfr.ERGFile == null)
return 0; // return not selected
string uERGFileName = tfr.ERGFile.ToUpper();
SetRecordObj SetRec;
string uErgListFName;
int cnt = ERGList.Count;
for (int i=0; !found && i < cnt; i++)
{
SetRec = (SetRecordObj)ERGList[i];
uErgListFName = SetRec.DatabaseTable.ToUpper();
if (uErgListFName.Equals(uERGFileName))
{
rtval = i;
found = true;
}
}
return rtval;
}
}
// This class is used to hold the information of a record in the
// Translation table (TRANSL.TBL)
class TransFileRecord
{
private string _EOPFile;
private string _ERGFile;
private string _ERGProcNum;
public string EOPFile
{
get
{
return _EOPFile;
}
set
{
_EOPFile = value;
}
}
public string ERGFile
{
get
{
return _ERGFile;
}
set
{
_ERGFile = value;
}
}
public string ERGProcNum
{
get
{
return _ERGProcNum;
}
set
{
_ERGProcNum = value;
}
}
public TransFileRecord()
{
_EOPFile = null;
_ERGFile = null;
_ERGProcNum = null;
}
// "inbuf" is a line read from the TRANSL.TBL file.
// parse out the the EOP's database file name, the ERG's
// database file name, and the ERG's procedure number
public TransFileRecord(string inbuf)
{
int stidx, len;
stidx = 0;
len = inbuf.IndexOf(",");
_EOPFile = inbuf.Substring(stidx,len);
stidx = len+1;
len = inbuf.IndexOf(",",stidx) - stidx;
_ERGFile = inbuf.Substring(stidx,len);
stidx = stidx + len +1;
_ERGProcNum = inbuf.Substring(stidx);
}
// Create a string of the EOP database name, ERG database name, and
// ERG procedure number for saving in the TRANSL.TBL file
public string StringForFile()
{
string outbuf;
outbuf = _EOPFile + "," + _ERGFile + "," + _ERGProcNum + "\n";
return outbuf;
}
}
}

View File

@@ -0,0 +1,193 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ProcedureSelectionList.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:39a $
*
* $History: ProcedureSelectionList.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:39a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text;
using VDB;
namespace VDB_Set
{
/// <summary>
/// Summary description for ProcedureSelectionList.
/// </summary>
public class ProcedureSelectionList : System.Windows.Forms.Form
{
private System.Windows.Forms.CheckedListBox checkedListBox1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ProcedureSelectionList()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
// Changes the selection mode from double-click to single click.
checkedListBox1.CheckOnClick = true;
}
public void Add(DataRow rw)
{
SetRecordObj SetRec = new SetRecordObj(rw);
checkedListBox1.Items.Add(SetRec);
}
/// <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.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// checkedListBox1
//
this.checkedListBox1.Location = new System.Drawing.Point(16, 8);
this.checkedListBox1.Name = "checkedListBox1";
this.checkedListBox1.Size = new System.Drawing.Size(528, 274);
this.checkedListBox1.TabIndex = 0;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(136, 296);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(80, 32);
this.btnOK.TabIndex = 1;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(272, 296);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(96, 32);
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// ProcedureSelectionList
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(560, 342);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.checkedListBox1);
this.Name = "ProcedureSelectionList";
this.Text = "Select Procedures";
this.Load += new System.EventHandler(this.ProcedureSelectionList_Load);
this.ResumeLayout(false);
}
#endregion
private void ProcedureSelectionList_Load(object sender, System.EventArgs e)
{
}
public StringCollection GetListOfSelectedProcs_Files()
{
StringCollection RtnStrings = new StringCollection();
for (int i=0; i< checkedListBox1.CheckedItems.Count; i++)
{
SetRecordObj tmpObj = (SetRecordObj)checkedListBox1.CheckedItems[i];
RtnStrings.Add(tmpObj.DatabaseTable);
}
return RtnStrings;
}
private void btnOK_Click(object sender, System.EventArgs e)
{
DialogResult=DialogResult.OK;
this.Close();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
DialogResult=DialogResult.Cancel;
this.Close();
}
}
public class SetRecordObj
{
public string ProcTitle;
public string ProcNumber;
public string RECID;
public string DatabaseTable;
public string Format;
public string ApprvDate;
public string ApprvTime;
public string Initials;
public DataRow ProcSetRow;
public SetRecordObj(DataRow Rw)
{
ProcSetRow = Rw;
ProcTitle = ProcSetRow.ItemArray[0].ToString();
ProcNumber = ProcSetRow.ItemArray[1].ToString();
Format = ProcSetRow.ItemArray[2].ToString();
DatabaseTable = ProcSetRow.ItemArray[4].ToString();
RECID = ProcSetRow.ItemArray[5].ToString();
ApprvDate = ProcSetRow.ItemArray[7].ToString();
ApprvTime = ProcSetRow.ItemArray[8].ToString();
Initials = ProcSetRow.ItemArray[9].ToString();
}
public override string ToString()
{
StringBuilder rtnStr = new StringBuilder();
rtnStr.Append(ProcNumber);
rtnStr.Append(" ");
rtnStr.Append(ProcTitle);
return rtnStr.ToString();
}
}
}

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="checkedListBox1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="checkedListBox1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="checkedListBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.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>ProcedureSelectionList</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,868 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VDB.cs $ $Revision: 9 $
* $Author: Kathy $ $Date: 8/16/05 2:53p $
*
* $History: VDB.cs $
*
* ***************** Version 9 *****************
* User: Kathy Date: 8/16/05 Time: 2:53p
* Updated in $/LibSource/VDB
* B2005-030: error if missing ndx
*
* ***************** Version 8 *****************
* User: Kathy Date: 5/19/05 Time: 11:05a
* Updated in $/LibSource/VDB
* speed up approve
*
* ***************** Version 7 *****************
* User: Jsj Date: 5/17/05 Time: 11:54a
* Updated in $/LibSource/VDB
* cleanup
*
* ***************** Version 6 *****************
* User: Kathy Date: 5/11/05 Time: 9:28a
* Updated in $/LibSource/VDB
* add selectinto method
*
* ***************** Version 5 *****************
* User: Kathy Date: 4/21/05 Time: 10:18a
* Updated in $/LibSource/VDB
* if dbt is < 512, make it 512
*
* ***************** Version 4 *****************
* User: Kathy Date: 3/08/05 Time: 1:47p
* Updated in $/LibSource/VDB
* Approval
*
* ***************** Version 3 *****************
* User: Jsj Date: 8/20/04 Time: 4:44p
* Updated in $/LibSource/VDB
* backed out previous change
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/20/04 Time: 1:14p
* Updated in $/LibSource/VDB
* Added logic to handle a single quote in a string that is in an SQL
* statement.
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Data.OleDb;
using System.Collections.Specialized;
using System.IO;
using System.Windows.Forms;
using System.Text;
using VDB_ConnType;
namespace VDB
{
/// <summary>
/// This the base class for a VE-PROMS database (table)
/// The vdbDBConnType class allows us to setup a default database type (ex dBase)
/// and gives us a cential place to add logic that would allow the end user select
/// the type of database (engine) to use via a configuration file (for example).
/// The virtual functions requires the class, that inherits this base class,
/// to define the SQL statements needed for its database operations.
/// </summary>
public abstract class VDB_Base
{
private vdb_DBConnType databaseType;
// made this public so that abstract functions that define SQL statements
// can check the type of database (if needed).
public int databaseTypeValue;
private OleDbConnection dbConn;
private string strDBPath = ""; //database directory path
private string strDBFile = ""; // database file name with extension
private string strDBTable = ""; // database file name without extension
private string strSelectCommand;
private string[] DBExtensions={"DBF","DBT"};
public VDB_Base(string strPath)
{
ParsePathAndFile(strPath);
databaseType = new vdb_DBConnType(); // currently defaults to dBase
databaseTypeValue = databaseType.dbType;
// check if dbt is at least 512, if not append 508 bytes. This is to fix
// a problem where dbts were created with only 4 bytes in the 16-bit code.
if ( isdBaseFile() && File.Exists(strDBTable+".dbt") )
{
FileInfo fi = new FileInfo(strDBTable + ".dbt");
if (fi.Length<512)
{
FileStream fs = new FileStream(strDBTable+".dbt",FileMode.Open,FileAccess.Write,FileShare.ReadWrite);
BinaryWriter bw = new BinaryWriter(fs);
bw.Seek(0,SeekOrigin.End);
byte []wrBytes = new byte[512-fi.Length];
for (int i=0; i<512-fi.Length; i++) wrBytes[i]=0;
wrBytes[4]=0x02;
bw.Write(wrBytes);
bw.Close();
}
fi = null;
}
dbConn = new OleDbConnection(databaseType.ConnectionString(strDBPath,""));
// if needed, create an INF file with index file names listed or if
// index file(s) don't exist, create them (B2005-030)
if ( isdBaseFile() && File.Exists(strDBFile))
CheckIndxAndINF();
}
private void ParsePathAndFile(string strInPath)
{
// do we have a file name with the path?
if (File.Exists(strInPath))
{
// Get the Path
int lastSlash = strInPath.LastIndexOf("\\");
if (lastSlash > 0)
{
strDBPath = strInPath.Substring(0,lastSlash);
lastSlash++; // move past slash
}
else // current directory path
{
strDBPath = ".\\";
lastSlash=0;
}
// Get the file (with extension)
strDBFile = strInPath.Substring(lastSlash);
//Get the file (without extension)
strDBTable = strDBFile;
int lastDot = strDBFile.LastIndexOf(".");
if (lastDot >0 ) // trim off the extension
strDBTable = strDBFile.Substring(0,lastDot);
}
else // no file name, just a path to database directory
{
strDBPath = strInPath;
if (strDBPath.Length == 0) // empty string for path
strDBPath = ".\\"; // current directory path
strDBFile = "";
strDBTable = "";
}
}
public string DBPath //database directory path
{
get
{
return strDBPath;
}
set
{
strDBPath = value.ToString();
}
}
public string DBFile // database file name with extension
{
get
{
return strDBFile;
}
// I don't think was want to set the file name
// set
// {
// strDBFile = value.ToString();
// }
}
public string DBTable // also dBase file name without extension
{
get
{
return strDBTable;
}
set
{
string tmp = value.ToString();
// If a path was passed in inore it. The connection already
// has a path associated with it and we don't want to get it angry.
int j = tmp.LastIndexOf("\\");
if ((j>0) && tmp[j] == '\\')
tmp = tmp.Substring(j+1);
tmp = tmp.ToUpper();
// if there is a file extension, chop it off but save it to assign
// to the strDBFile property
j = tmp.LastIndexOf(".");
if ((j>0) && tmp[j] == '.') // got an extension
{
strDBFile = tmp;
strDBTable = tmp.Substring(0,j);
}
else // no extension, assign the table name
{
strDBTable = tmp;
// if we're connected to dBase, then Tables are Files,
// So create a strDBFile by added .DBF to the table name
if (isdBaseFile())
strDBFile = tmp + ".DBF";
}
// We assigned the strDBTable (DBTable property) with a table name.
// Now we need to make sure there is a corresponding INF file
// for dBase index file information.
CreateINF();
}
}
/***
// To have single quote in a sql command string, you need to
// represent it as '' (two single quotes)
private string FixSingleQuotes(string sqlcmd)
{
string tmpstr1 = "(,= ";
string tmpstr2 = "), ";
string rtnstr = "";
int idx = 0;
int st = 0;
bool twoquotes;
int len = sqlcmd.Length;
while ((idx = sqlcmd.IndexOf("'",st)) >= 0)
{
twoquotes = true;
// is there a "(", comma , "=", or a space before the quote?
// if so then we do not want to add another quote
// because it part of the sql command, not the string
if (idx > 0 && (tmpstr1.IndexOf(sqlcmd[idx-1]) >= 0))
twoquotes = false;
// is there a ")", comma, or a space after the quote?
// if so then we do not want to add another quote
// because it part of the sql command, not the string
if (twoquotes)
if (idx > 0 && (idx == len) || (tmpstr2.IndexOf(sqlcmd[idx+1]) >= 0))
twoquotes = false;
// If there is already a second quote, then increment idx past
// it and set twoqotes to false.
if (twoquotes)
{
if (sqlcmd[idx+1] == '\'')
{
idx++; // second quote already there
twoquotes = false;
}
}
rtnstr += sqlcmd.Substring(st,(idx-st)+1);
if (twoquotes)
{
rtnstr += "'"; // add a second quote
}
twoquotes = false;
idx++;
st = idx;
}
rtnstr += sqlcmd.Substring(st);
return rtnstr;
}
***/
// Process a list of SQL commands. If an error occures, return 1
private int ProcessSQLCommands (OleDbCommand cmdSQL,StringCollection strColl)
{
int errs =0;
foreach (string sqlcmd in strColl)
{
try
{
/***
string fixedSqlCmd = FixSingleQuotes(sqlcmd);
cmdSQL.CommandText = fixedSqlCmd; //sqlcmd;
***/
cmdSQL.CommandText = sqlcmd;
cmdSQL.ExecuteNonQuery();
}
catch (Exception err)
{
errs = 1;
MessageBox.Show(err.Message.ToString(),"ProcessSQLCommands Error");
}
}
return errs;
}
//memo strings of greater than 255 where getting truncated and needed a separate
// reader.
public string GetMemo(string RecId)
{
string retstr=null;
OleDbCommand cmd=null;
OleDbDataReader dr = null;
StringBuilder tmp = new StringBuilder();
tmp.Append("SELECT [TEXTM] FROM [");
tmp.Append(DBTable);
tmp.Append("] WHERE RECID = '");
tmp.Append(RecId);
tmp.Append("'");
try
{
dbConn.Open();
cmd = new OleDbCommand(tmp.ToString(),dbConn);
dr = cmd.ExecuteReader();
if (dr.Read())retstr = dr.GetString(0);
}
catch (Exception e)
{
MessageBox.Show(e.Message,"VDB Error");
retstr = null;
}
if (dr !=null) dr.Close();
if (cmd != null) cmd.Dispose();
dbConn.Close();
return retstr;
}
// The default SQL statement will get all of the records in a database
// This should be suitable for all of our database, but just in case
// it can be overloaded.
public virtual string DefaultSelectCommand()
{
StringBuilder tmp = new StringBuilder();
tmp.Append("SELECT * FROM [");
tmp.Append(strDBTable);
tmp.Append("]");
return tmp.ToString();
}
// return and set the SELECT statement used to get a DataSet (DB_Data)
public string SelectCmd
{
get
{
return strSelectCommand;
}
set
{
strSelectCommand = value.ToString();
}
}
public System.Data.DataSet DB_Data
{
// return a DataSet containing the database (table) records
get
{
dbConn.Open();
// if a select command was not created, then use the default
// select all command
if (strSelectCommand == null || strSelectCommand.Equals(""))
strSelectCommand = DefaultSelectCommand();
OleDbDataAdapter da =new OleDbDataAdapter(strSelectCommand,dbConn);
DataSet ds = new DataSet();
try
{
da.Fill(ds);
}
catch (Exception err)
{
MessageBox.Show(err.Message.ToString(),"VDB Error");
ds = null; // return null if error getting dataset
}
dbConn.Close();
return ds;
}
// update the database (table) with the changes made to the DataSet
set
{
// pass in a dataset, update the changed/added/deleted records
int err = 0;
StringCollection CommandList = new StringCollection();
// Open a database connection
dbConn.Open();
// Setup for a series of database transactions
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
// dbTransAct = dbConn.BeginTransaction(IsolationLevel.Serializable);
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// Get only the new, modified, and deleted dataset rows
DataSet dsChanges = value.GetChanges();
// Get the database Table (the database file in dBase terms)
DataTable tbl = dsChanges.Tables[0];
// Spin through the changed rows (in the DataSet) and add
// the proper SQL command to the list of commands
foreach (DataRow row in tbl.Rows)
{
switch (row.RowState)
{
case DataRowState.Modified:
CommandList.Add(GetRecUpdateStr(tbl,row));
break;
case DataRowState.Added:
CommandList.Add(GetRecInsertStr(tbl,row));
break;
case DataRowState.Deleted:
CommandList.Add(RecDeleteStr(tbl,row));
break;
default:
// Ignore the DataRowState.Detached
// and the DataRowState.Unchanged
break;
}
}
// Process the list of SQL commands
err = ProcessSQLCommands(cmdSQL,CommandList);
// If no errors in the database transactions,
// commit the changes in both the database
// and the dataset.
if (err == 0)
{
dbTransAct.Commit();
value.AcceptChanges();
}
else
{
// If there was an error then roll back the changes
dbTransAct.Rollback();
}
dbConn.Close();
}
}
public bool ProcessACommand(string cmd)
{
// open a connection and setup for the database command
dbConn.Open();
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
dbTransAct = dbConn.BeginTransaction();
try
{
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
cmdSQL.CommandText = cmd;
cmdSQL.ExecuteNonQuery();
dbTransAct.Commit();
dbConn.Close();
}
catch (Exception e)
{
dbTransAct.Rollback();
dbConn.Close();
MessageBox.Show(e.Message,"Error writing to database");
return false;
}
return true;
}
// Create a function that returns an SQL statement to use for updating
// existing records in a database
public abstract string GetRecUpdateStr(DataTable tbl,DataRow row);
// Create a function that returns an SQL statement to use for inserting
// records in a database
public abstract string GetRecInsertStr(DataTable tbl,DataRow row);
// Create a function that returns an SQL statement to use for deleting
// existing records in a database
public abstract string RecDeleteStr(DataTable tbl,DataRow row);
// Create a function that returns a list of SQL commands that will create
// a new table
public abstract StringCollection CreateTableStatements(string strTblName);
// Create a function that returns a list of SQL commands that selects from
// given table into another table. (Used for copying to approved/tmpchg).
public virtual StringCollection SelectIntoStatements(string destdb){return null;}
// Create a function that returns a list of SQL commands that will create
// the index files needed for this database file.
public virtual StringCollection CreateIndexFilesStatements(){return null;}
// Create a function that returns a list of SQL commands that will create
// the first (empty) record.
public virtual StringCollection CreateFirstRecordStatement(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
// Default to no "first record" (a.k.a record zero)
// Return an empty set of SQL commands
return rtnStrColl;
}
// Override this function if post processing is needed after creating
// a table.
public virtual int PostCreateTableFunction()
{
return 0;
}
public int CreateTable(string strTlbName)
{
int errs =0;
dbConn.Open();
// Setup for a series of database transactions
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
// dbTransAct = dbConn.BeginTransaction(IsolationLevel.Serializable);
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// Process the list of SQL commands
// NOTE: if you create an associated INF file (for dBase indexes)
// before calling ProcessSQLCommands(), the INF file will be
// deleted (by the database engine) when the Create Table
// SQL command is run.
errs = ProcessSQLCommands(cmdSQL,CreateTableStatements(strTlbName));
// The PostCreateTableFunction() function should:
// - call CreateINF()if using dBase files with indexes
// - create the first "blank" record if required
if (errs == 0)
errs = PostCreateTableFunction();
// Create the first record
if (errs == 0)
errs = ProcessSQLCommands(cmdSQL,CreateFirstRecordStatement(strTlbName));
dbConn.Close();
return errs;
}
// Just a pass through, update string is passed in.
public bool UpdateUsing(string updstr)
{
return (ProcessACommand(updstr));
}
// Select data from the current table into a new table, where the new table
// is the parameter destfile which includes the pathname to the database
// file.
public int SelectIntoNewTable(string destfile)
{
int errs=0;
dbConn.Open();
// Setup for a series of database transactions
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// Process the list of SQL commands, selectinto has no where clause.
// It only requires that the destination database file be included.
errs = ProcessSQLCommands(cmdSQL,SelectIntoStatements(destfile));
dbConn.Close();
return errs;
}
// make statement to insert into (an existing table). If table specific
// commands are needed, move this to the specific table code.
public StringCollection InsertIntoStatements(string destdb, string WhereStr)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder str = new StringBuilder();
str.Append("INSERT INTO ");
str.Append(DBTable);
str.Append(" IN '");
str.Append(destdb.Substring(0,destdb.LastIndexOf('\\')));
str.Append("' 'dBase III;' SELECT * FROM ");
str.Append(DBTable);
if (WhereStr.Length > 0) // Was a WHERE clause passed in?
{
// Add " WHERE " to the beginning if it is not already there
string tmpstr = WhereStr.ToUpper();
if (tmpstr[0] != ' ')
{
str.Append(" ");
if (!tmpstr.StartsWith("WHERE "))
str.Append("WHERE ");
}
else if (!tmpstr.StartsWith(" WHERE "))
str.Append(" WHERE");
// add the passed in WHERE clause
str.Append(WhereStr);
}
rtnStrColl.Add(str.ToString());
return rtnStrColl;
}
public int InsertInto(string destfile, string WhereStr)
{
int errs=0;
dbConn.Open();
// Setup for a series of database transactions
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// Process the list of SQL commands, selectinto has no where clause, but
// requires that the index file be created ("",true arguments)
errs = ProcessSQLCommands(cmdSQL,InsertIntoStatements(destfile,WhereStr));
dbConn.Close();
return errs;
}
// make statement to delete records based on input criteria. If table specific
// commands are needed, move this to the specific table code.
public StringCollection DeleteSelectedStr(string whereclause)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder deleteStr = new StringBuilder();
deleteStr.Append("DELETE FROM [");
deleteStr.Append(DBTable);
deleteStr.Append("]");
// Add the WHERE clause
deleteStr.Append(" WHERE ");
deleteStr.Append(whereclause);
rtnStrColl.Add(deleteStr.ToString());
return rtnStrColl;
}
// Delete selected records based on criteria from WhereStr parameter.
public int DeleteSelected(string WhereStr)
{
int errs=0;
dbConn.Open();
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// Process the list of SQL commands
errs = ProcessSQLCommands(cmdSQL,DeleteSelectedStr(WhereStr));
dbConn.Close();
return errs;
}
public abstract StringCollection DeleteTableStatements(string strTblName);
// Override this function if post processing is needed after removing
// a table.
public int PostDeleteTableFunction()
{
return 0;
}
public virtual int DeleteTable(string strTblName)
{
int errs =0;
dbConn.Open();
// Setup for a series of database transactions
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
// dbTransAct = dbConn.BeginTransaction(IsolationLevel.Serializable);
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// Process the list of SQL commands
errs = ProcessSQLCommands(cmdSQL,DeleteTableStatements(strTblName));
// do any needed post processing
if (errs == 0)
errs = PostDeleteTableFunction();
if (errs == 0) // no errors
{
strDBTable = "";
if (databaseTypeValue.Equals(vdb_DBConnType.DBTypes.DBaseIII))
{
strDBFile = "";
}
}
dbConn.Close();
return errs;
}
// Override this function to create a text file with the same name as the
// dBase file, except give it an extension of INF instead of DBF.
// Inside this text file should be the index file names associated
// with the dBasefile. (each file name should be on its own line)
// Example, for USAGERO.DBF you should create a USAGERO.INF and inside
// the INF file should be:
// NDX1=USAGERO.NDX
// NDX2=USAGROID.NDX
//
// If the dBase does not use an index file, then there is no need to
// override this virtual funtion.
public virtual int CreateINF()
{
return 0;
}
public bool isdBaseFile()
{
return databaseTypeValue == (int)vdb_DBConnType.DBTypes.DBaseIII;
}
public virtual string GetCreateIndx1String()
{
return null;
}
public virtual string GetCreateIndx2String()
{
return null;
}
public virtual bool IndexFilesExist()
{
return true;
}
public virtual void DeleteIndexFiles()
{
}
// use this to clean up/create index & INF Files. The INF files are used to
// define which index files are used for the given database file. However, if file
// names are listed in the INF file and the NDX file does not exist, an error was
// given - so be sure that the index files exist too. Note that the INF file
// must be created after the NDX file, because an error occurs if creating an NDX
// file when an INF file exists. This was done to fix B2005-030.
public bool CheckIndxAndINF()
{
try
{
if (!IndexFilesExist())
{
string cwd = Directory.GetCurrentDirectory();
Directory.SetCurrentDirectory(DBPath);
// if more than one index file exists for a dbf, then delete (in case
// one of them did exist)
DeleteIndexFiles();
// CreateIndexFiles creates the NDX and also INF.
CreateIndexFiles();
Directory.SetCurrentDirectory(cwd);
}
else
CreateINF(); // CreateINF creates a new copy (overwrites any existing)
}
catch (Exception e)
{
MessageBox.Show("Could not set up index files " + e.Message,"Check For Indexes");
return false;
}
return true;
}
public virtual int CreateIndexFiles()
{
int errs =0;
dbConn.Open();
// Setup for a series of database transactions
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand();
System.Data.OleDb.OleDbTransaction dbTransAct;
dbTransAct = dbConn.BeginTransaction();
cmdSQL.Connection = dbConn;
cmdSQL.Transaction = dbTransAct;
// if dbase, delete the inf file. If it exists, an error occurs when
// creating the index.
if (File.Exists(strDBTable+".INF")) File.Delete(strDBTable+".INF");
// Process the list of SQL commands
errs = ProcessSQLCommands(cmdSQL,CreateIndexFilesStatements());
dbConn.Close();
if (errs==0 && isdBaseFile()) CreateINF();
return errs;
}
public void Pack()
{
// the database was not getting 'packed' on a delete, i.e. the deleted
// records were still visible in the 16-bit codes. We'll pack here by
// selecting into a temp db & renaming files.
// first see if there is an index, i.e. GetCreateIndxString will return
// a string if an index file is needed. If so, we know that we'll have
// to create the index(es) & also create an INF file.
string createindx = GetCreateIndx1String();
string origname = this.DBTable;
string newtbname=null;
try
{
if (this.DBTable.Length==8)
newtbname = "z" + this.DBTable.Substring(1,7);
else
newtbname = "z" + this.DBTable;
string sqlcmd = "select * into [" + newtbname + "] from [" + origname + "];";
// Setup for a series of database transactions
dbConn = new OleDbConnection(databaseType.ConnectionString(strDBPath,""));
dbConn.Open();
System.Data.OleDb.OleDbCommand cmdSQL = new OleDbCommand(sqlcmd,dbConn);
cmdSQL.ExecuteNonQuery();
dbConn.Close();
// delete original & rename (dbf, dbt), then make new index file & INF
// file, if they exist.
foreach(string str in DBExtensions)
{
string orig = strDBPath+"\\"+origname + "." + str;
if (File.Exists(orig))
{
File.Delete(orig);
string newnm = strDBPath + "\\" + newtbname + "." + str;
File.Move(newnm,orig);
}
}
if (createindx!=null)
{
// delete the index files...
DeleteIndexFiles();
dbConn.Open();
cmdSQL = new OleDbCommand(createindx,dbConn);
cmdSQL.ExecuteNonQuery();
createindx = GetCreateIndx2String();
if (createindx!=null)
{
cmdSQL.CommandText = createindx;
cmdSQL.ExecuteNonQuery();
}
dbConn.Close();
CreateINF();
}
}
catch (Exception e)
{
MessageBox.Show(e.Message,"Could not pack database, use data integrity checker on procedure");
}
}
}
}

View File

@@ -0,0 +1,155 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{F6AB1684-FC39-47E8-BEF1-A71EE4082206}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "VDB"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "VDB"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE;Upgrade2005;"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "EopToErgRelations.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ProcedureSelectionList.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "ProcedureSelectionList.resx"
DependentUpon = "ProcedureSelectionList.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "VDB.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "vdb_Proc.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "vdb_ROUsage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "vdb_Set.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "vdb_SetExt.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "vdb_TransUsage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "vdbConnType.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDB", "VDB.csproj", "{F6AB1684-FC39-47E8-BEF1-A71EE4082206}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{F6AB1684-FC39-47E8-BEF1-A71EE4082206}.Debug.ActiveCfg = Debug|.NET
{F6AB1684-FC39-47E8-BEF1-A71EE4082206}.Debug.Build.0 = Debug|.NET
{F6AB1684-FC39-47E8-BEF1-A71EE4082206}.Release.ActiveCfg = Release|.NET
{F6AB1684-FC39-47E8-BEF1-A71EE4082206}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,66 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: vdbConnType.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:40a $
*
* $History: vdbConnType.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Text;
namespace VDB_ConnType
{
/// <summary>
/// This currently defaults to dBase, but logic can be added to
/// select other database types.
/// </summary>
public class vdb_DBConnType
{
public enum DBTypes {DBaseIII, Access}; // list of database types
private int CurrentDbType; // current database type
public vdb_DBConnType()
{
CurrentDbType = (int)DBTypes.DBaseIII;
}
public int dbType
{
get
{
return CurrentDbType;
}
}
// The "database" parameter is here for future use of Access (part of the
// Data Source string) and for Sequel (the Initial Catalog) settings.
// for a dBase connection, we only need the "dbpath" parameter.
public string ConnectionString(string dbpath, string database)
{
StringBuilder tmp = new StringBuilder();
switch (CurrentDbType)
{
case (int)DBTypes.DBaseIII:
tmp.Append("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=");
tmp.Append(dbpath);
tmp.Append(";Extended Properties=dBase III;Persist Security Info=False");
break;
case (int)DBTypes.Access:
// build the connect string for an Access database
break;
default:
break;
}
return tmp.ToString();
}
}
}

View File

@@ -0,0 +1,553 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: vdb_Proc.cs $ $Revision: 11 $
* $Author: Kathy $ $Date: 9/23/05 8:33a $
*
* $History: vdb_Proc.cs $
*
* ***************** Version 11 *****************
* User: Kathy Date: 9/23/05 Time: 8:33a
* Updated in $/LibSource/VDB
* Fix B2005-043 - cannot select into for files with a '-' (dash).
*
* ***************** Version 10 *****************
* User: Jsj Date: 9/16/05 Time: 9:54a
* Updated in $/LibSource/VDB
* handle dbase NDX file names that begin with a number. SQL statement
* could not create a NDX file that begins with a number.
*
* ***************** Version 9 *****************
* User: Kathy Date: 8/16/05 Time: 2:53p
* Updated in $/LibSource/VDB
* B2005-030: error if missing ndx
*
* ***************** Version 8 *****************
* User: Kathy Date: 7/28/05 Time: 2:06p
* Updated in $/LibSource/VDB
* for mod proc number, select into correct destination file
*
* ***************** Version 7 *****************
* User: Kathy Date: 5/19/05 Time: 11:05a
* Updated in $/LibSource/VDB
* speed up approve
*
* ***************** Version 6 *****************
* User: Jsj Date: 5/17/05 Time: 9:39a
* Updated in $/LibSource/VDB
*
* ***************** Version 5 *****************
* User: Kathy Date: 5/11/05 Time: 9:28a
* Updated in $/LibSource/VDB
* add selectinto support
*
* ***************** Version 4 *****************
* User: Kathy Date: 4/21/05 Time: 10:19a
* Updated in $/LibSource/VDB
* always write inf file
*
* ***************** Version 3 *****************
* User: Kathy Date: 3/08/05 Time: 1:47p
* Updated in $/LibSource/VDB
* Approval
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/23/04 Time: 10:12a
* Updated in $/LibSource/VDB
* Fixed replace of single quote
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Text;
using System.Collections.Specialized;
using System.IO;
using System.Windows.Forms;
using VDB;
namespace VDB_Proc
{
/// <summary>
/// Summary description for vdb_Proc.
/// </summary>
public class vdb_Proc:VDB_Base
{
public enum SortTypes {NotSorted,StepSeqTypeSort,RECIDsort}; // list of sorting types
public string ProcNDX = "";
public string TmpNDXFileName = "";
public vdb_Proc(String strPath):base(strPath)
{
}
public string ProcGetTextFromMemo(string RecId)
{
return GetMemo(RecId);
}
// Build a SQL statement. Optionally sort and filter the select statement.
private void BuildSelectCommand(int SortingType,string WhereStr)
{
StringBuilder tmp = new StringBuilder();
tmp.Append("SELECT [STEP], [SEQUENCE], [TEXT], [TEXTM], [TYPE], [DATE], [TIME], [INITIALS], [RECID] FROM [");
tmp.Append(DBTable);
tmp.Append("]");
if (WhereStr.Length > 0) // Was a WHERE clause passed in?
{
// Add " WHERE " to the beginning if it is not already there
string tmpstr = WhereStr.ToUpper();
if (tmpstr[0] != ' ')
{
tmp.Append(" ");
if (!tmpstr.StartsWith("WHERE "))
tmp.Append("WHERE ");
}
else if (!tmpstr.StartsWith(" WHERE "))
tmp.Append(" WHERE");
// add the passed in WHERE clause
tmp.Append(tmpstr);
}
switch (SortingType)
{
case 0: //NotSorted
break;
case 1: // StepSeqTypeSort - sorted by STEP+SEQUENCE+TYPE
tmp.Append(" GROUP BY [STEP],[SEQUENCE],[TYPE],[TEXT],[TEXTM],[DATE],[TIME],[INITIALS],[RECID]");
break;
case 2: // RECIDsort - sorted by RECID
tmp.Append(" GROUP BY [RECID],[STEP],[SEQUENCE],[TYPE],[TEXT],[TEXTM],[DATE],[TIME],[INITIALS]");
break;
}
SelectCmd = tmp.ToString();
}
#if Upgrade2005_Print
// Build a SQL statement for record count on select.
private void BuildCountCommand(string WhereStr)
{
StringBuilder tmp = new StringBuilder();
tmp.Append("SELECT COUNT(*) FROM [");
tmp.Append(DBTable);
tmp.Append("]");
if (WhereStr.Length > 0) // Was a WHERE clause passed in?
{
// Add " WHERE " to the beginning if it is not already there
string tmpstr = WhereStr.ToUpper();
if (tmpstr[0] != ' ')
{
tmp.Append(" ");
if (!tmpstr.StartsWith("WHERE "))
tmp.Append("WHERE ");
}
else if (!tmpstr.StartsWith(" WHERE "))
tmp.Append(" WHERE");
// add the passed in WHERE clause
tmp.Append(tmpstr);
}
SelectCmd = tmp.ToString();
}
#endif
private void BuildNDXFileNames()
{
ProcNDX = DBTable;
}
// Build the SQL command needed to update a row in the Procedure file
public override string GetRecUpdateStr(DataTable tbl,DataRow row)
{
int j = 0;
bool FirstOne = true;
StringBuilder updateStr = new StringBuilder();
StringBuilder LikeRecID = new StringBuilder();
bool NullEntry = false;
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
if (col.ColumnName.Equals("STEP") && row.ItemArray[j].ToString().Equals(""))
{
NullEntry = true;
j++;
continue;
}
if (col.ColumnName.Equals("RECID"))
{
LikeRecID.Append("___"); // ignore the first 3 positions
LikeRecID.Append(row.ItemArray[j].ToString(),3,5);
}
if (FirstOne)
{
updateStr.Append(" [");
FirstOne = false;
}
else
updateStr.Append(", [");
updateStr.Append(col.ColumnName);
updateStr.Append("]=");
if (row.ItemArray[j].ToString().Equals(""))
{
updateStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
tmpstr = tmpstr.Replace("'","''");
updateStr.Append(tmpstr);
updateStr.Append("'");
}
else if (col.DataType == Type.GetType("System.DateTime"))
{
int jj;
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
jj=tmpstr.IndexOf(" ");
if (jj<0) jj = tmpstr.Length;
updateStr.Append(tmpstr.Substring(0,jj));
updateStr.Append("'");
}
j++;
}
if (NullEntry)
{
// So that we can change the RECID number on the first entry
updateStr.Append(" WHERE [STEP] IS NULL");
}
else
{
updateStr.Append(" WHERE [RECID] LIKE '");
updateStr.Append(LikeRecID.ToString());
updateStr.Append("'");
}
return updateStr.ToString();
}
// Build the SQL command needed to insert a row in the Procedure file
public override string GetRecInsertStr(DataTable tbl,DataRow row)
{
int j = 0;
StringBuilder insrtStr = new StringBuilder();
StringBuilder valueStr = new StringBuilder();
insrtStr.Append("INSERT INTO [");
insrtStr.Append(DBTable);
insrtStr.Append("] (");
valueStr.Append(" VALUES (");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
insrtStr.Append("[");
insrtStr.Append(col.ColumnName);
insrtStr.Append("],");
if (row.ItemArray[j].ToString().Equals(""))
{
valueStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
tmpstr = tmpstr.Replace("'","''");
valueStr.Append("'");
valueStr.Append(tmpstr);
valueStr.Append("'");
}
else if (col.DataType == Type.GetType("System.DateTime"))
{
int jj;
String tmpstr = row.ItemArray[j].ToString();
valueStr.Append("'");
jj = tmpstr.IndexOf(" ");
if (jj<0) jj=tmpstr.Length;
valueStr.Append(tmpstr.Substring(0,jj));
valueStr.Append("'");
}
else
{
valueStr.Append(row.ItemArray[j].ToString());
}
valueStr.Append(",");
j++;
}
insrtStr = insrtStr.Replace(',',')',insrtStr.Length-1,1);
valueStr = valueStr.Replace(',',')',valueStr.Length-1,1);
insrtStr.Append(valueStr.ToString());
return insrtStr.ToString();
}
// Build the SQL command needed to delete a row in the Procedure file
public override string RecDeleteStr(DataTable tbl,DataRow row)
{
int j = 0;
String RecIDStr = "";
String StepStr = "";
String SeqStr = "";
StringBuilder deleteStr = new StringBuilder();
deleteStr.Append("DELETE FROM [");
deleteStr.Append(DBTable);
deleteStr.Append("] WHERE ");
row.RejectChanges();
foreach (DataColumn col in tbl.Columns)
{
if (col.ColumnName.Equals("STEP"))
{
StepStr = row.ItemArray[j].ToString();
}
else if (col.ColumnName.Equals("SEQUENCE"))
{
SeqStr = row.ItemArray[j].ToString();
}
else if (col.ColumnName.Equals("RECID"))
{
RecIDStr = row.ItemArray[j].ToString();
}
j++;
}
// we might want to change this to delete via only the RECID
// but that could be risky if we have duplicate RECIDs
deleteStr.Append("[STEP] = '");
deleteStr.Append(StepStr);
deleteStr.Append("' AND [SEQUENCE] = '");
deleteStr.Append(SeqStr);
deleteStr.Append("' AND [RECID] = '");
deleteStr.Append(RecIDStr);
deleteStr.Append("'");
return deleteStr.ToString();
}
public override string GetCreateIndx1String()
{
StringBuilder index1Str = new StringBuilder();
// Make a temporary index file name if dBase filename
// for any procedure. (those that start with a number
// or had a dash were having a problem here - see
// B2005-040 & 043).
TmpNDXFileName = "ndxtmp";
index1Str.Append("CREATE INDEX [");
index1Str.Append(TmpNDXFileName);
index1Str.Append("] ON [");
index1Str.Append(DBTable);
index1Str.Append("] ([STEP],[SEQUENCE],[TYPE])");
return (index1Str.ToString());
}
public override bool IndexFilesExist()
{
if (ProcNDX == "") BuildNDXFileNames();
if(File.Exists(DBPath+"\\"+ProcNDX+".NDX")) return true;
return false;
}
public override void DeleteIndexFiles()
{
if(File.Exists(DBPath+"\\"+ProcNDX+".NDX")) File.Delete(DBPath+"\\"+ProcNDX+".NDX");
}
// Build a list of SQL commands needed to create a new Procedure table (file)
// and add the first row
public override StringCollection CreateTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder createStr = new StringBuilder();
if (strTblName.Length > 0) // was a table name passd in?
{
DBTable = strTblName; // this will create the INI file for dBase
}
if (DBTable.Equals(""))
{
MessageBox.Show("Trying to Create a new Table without a Name","Create Table Error");
return rtnStrColl;
}
// Build the command that creates a new SET table (file)
createStr.Append("CREATE TABLE [");
createStr.Append(DBTable);
createStr.Append("] ");
createStr.Append("([STEP] Char(2), [SEQUENCE] Char(10), [TEXT] Char(100), ");
createStr.Append("[TEXTM] TEXT, [TYPE] Char(2), [DATE] Date, [TIME] Char(5), ");
createStr.Append("INITIALS Char(5), [RECID] Char(8))");
rtnStrColl.Add(createStr.ToString()); // add create table
// If we are using dBase files, create the index files too
if (isdBaseFile())
{
// Build the command that creates the index file
rtnStrColl.Add(GetCreateIndx1String()); // add create index
}
return rtnStrColl;
}
// Build a list of SQL commands needed to create the first row (a.k.a record zero)
public override StringCollection CreateFirstRecordStatement(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder firstRecStr = new StringBuilder();
// Build the command that adds the first (blank) record
// with the RECID initialize to 00000001
firstRecStr.Append("INSERT INTO [");
firstRecStr.Append(DBTable);
firstRecStr.Append("] ([RECID]) VALUES ('00000001')");
rtnStrColl.Add(firstRecStr.ToString()); // add insert first record
return rtnStrColl;
}
// make statement to select into a new table. Table must not exist and
// can include a path to the table.
public override StringCollection SelectIntoStatements(string destdb)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder str = new StringBuilder();
str.Append("SELECT * INTO [");
str.Append(destdb.Substring(destdb.LastIndexOf('\\')+1,destdb.Length-destdb.LastIndexOf('\\')-1));
str.Append("] IN '");
str.Append(destdb.Substring(0,destdb.LastIndexOf('\\')));
str.Append("' 'dBase III;' from [");
str.Append(DBTable);
str.Append("]");
rtnStrColl.Add(str.ToString());
return rtnStrColl;
}
// After the table is created, create the associated INF file
public override int PostCreateTableFunction()
{
CreateINF(); // should already be created
return 0;
}
// This will be called from CreateTableStatements()
// and this is called if the table name is assigned to the DBTable property
public override int CreateINF()
{
// if we are using dBase files, create an INF file containing
// a list of the associated NDX files.
if (isdBaseFile())
{
StreamWriter infFile;
string infFileStr;
StringBuilder tmp = new StringBuilder();
// build the ndx file names (w/o extensions)
BuildNDXFileNames();
//build INF file name
tmp.Append(DBPath);
tmp.Append("\\");
tmp.Append(DBTable);
tmp.Append(".INF");
infFileStr = tmp.ToString();
// always recreate it. Some plants' data had invalid files
// and it was felt that it would be quicker to recreate always
// rather than read and check.
infFile = new StreamWriter(infFileStr,false);
infFile.Write("NDX1=");
infFile.Write(ProcNDX);
infFile.Write(".NDX\r\n");
infFile.Close();
// a temp index file name was always used to create the index
// because unusual file names, such as those beginning with
// a number or those with a '-' caused an error to occur
// during ndx file creation. This fixes, B2005-040 & B2005-043.
if (TmpNDXFileName.Length > 0)
{
File.Copy(TmpNDXFileName+".NDX",ProcNDX+".NDX");
File.Delete(TmpNDXFileName+".NDX");
TmpNDXFileName = "";
}
}
return 0;
}
public override StringCollection CreateIndexFilesStatements()
{
if (isdBaseFile())
{
StringCollection rtnStrColl = new StringCollection();
string indx1 = GetCreateIndx1String();
rtnStrColl.Add(indx1);
return rtnStrColl;
}
return null;
}
// return a list of SQL commands that will drop (delete) a database table (file)
public override StringCollection DeleteTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder DropTableStr = new StringBuilder();
DropTableStr.Append("Drop Table [");
DropTableStr.Append(DBTable);
DropTableStr.Append("]");
rtnStrColl.Add(DropTableStr.ToString());
return rtnStrColl;
}
// return a dataset of procedure records, not sorted
public System.Data.DataSet GetNotSorted(string WhereStr)
{
BuildSelectCommand((int)SortTypes.NotSorted,WhereStr);
return DB_Data;
}
// return a dataset of procedure records, sorted by the [STEP] field
public System.Data.DataSet GetSortedByStepSeqType(string WhereStr)
{
BuildSelectCommand((int)SortTypes.StepSeqTypeSort,WhereStr);
return DB_Data;
}
// return a dataset of procedure records, sorted by the [RECID] field
public System.Data.DataSet GetSortedByRECID(string WhereStr)
{
BuildSelectCommand((int)SortTypes.RECIDsort,WhereStr);
return DB_Data;
}
#if Upgrade2005_Print
// return integer count of selected records only
public int GetCount(string WhereStr)
{
BuildCountCommand(WhereStr);
DataSet ds = DB_Data;
return ds.Tables[0].Rows.Count;
}
#endif
}
}

View File

@@ -0,0 +1,478 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: vdb_ROUsage.cs $ $Revision: 6 $
* $Author: Kathy $ $Date: 5/01/06 11:17a $
*
* $History: vdb_ROUsage.cs $
*
* ***************** Version 6 *****************
* User: Kathy Date: 5/01/06 Time: 11:17a
* Updated in $/LibSource/VDB
* Fix B2006-018: single quote in proc number causes problem on data
* request
*
* ***************** Version 5 *****************
* User: Kathy Date: 8/16/05 Time: 2:54p
* Updated in $/LibSource/VDB
* B2005-030: error if missing ndx
*
* ***************** Version 4 *****************
* User: Kathy Date: 4/21/05 Time: 10:19a
* Updated in $/LibSource/VDB
* always write inf file & remove upgrade2005 define
*
* ***************** Version 3 *****************
* User: Kathy Date: 3/08/05 Time: 1:48p
* Updated in $/LibSource/VDB
* Approval
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/23/04 Time: 10:12a
* Updated in $/LibSource/VDB
* Fixed replace of single quote
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Text;
using System.Collections.Specialized;
using System.IO;
using System.Windows.Forms;
using VDB;
using VDB_ConnType;
namespace VDB_ROUsage
{
/// <summary>
/// Open, Create, Delete, Update functions for RO Usage files (tables)
/// </summary>
public class vdb_ROUsage:VDB_Base
{
public enum SortTypes {NotSorted,ProcSort,ROIDsort}; // list of sorting types
public string UsageROndx = "";
public string UsagROIDndx = "";
public vdb_ROUsage(String strPath):base(strPath)
{
// if no table (file name) specified, then default to USAGERO (USAGERO.DBF)
if (DBTable.Equals(""))
DBTable = "USAGERO";
}
// Build a SQL statement. Optionally sort and filter the select statement.
private void BuildSelectCommand(int SortingType,string WhereStr)
{
StringBuilder tmp = new StringBuilder();
tmp.Append("SELECT [NUMBER], [SEQUENCE], [INSTANCE], [ROID] FROM [");
tmp.Append(DBTable);
tmp.Append("]");
if (WhereStr.Length > 0) // Was a WHERE clause passed in?
{
// Add " WHERE " to the beginning if it is not already there
string tmpstr = WhereStr; //.ToUpper();
if (tmpstr[0] != ' ')
{
tmp.Append(" ");
if (!tmpstr.StartsWith("WHERE "))
tmp.Append("WHERE ");
}
else if (!tmpstr.StartsWith(" WHERE "))
tmp.Append(" WHERE");
// add the passed in WHERE clause
tmp.Append(tmpstr);
}
switch (SortingType)
{
case 0: //NotSorted
break;
case 1: // ProcSort - sorted by procedure number
tmp.Append(" GROUP BY [NUMBER],[SEQUENCE],[INSTANCE],[ROID]");
break;
case 2: // ROIDsort - sorted by ROID
tmp.Append(" GROUP BY [ROID],[NUMBER],[SEQUENCE],[INSTANCE]");
break;
}
SelectCmd = tmp.ToString();
}
private void BuildNDXFileNames()
{
UsageROndx = DBTable;
UsagROIDndx = DBTable.Substring(0,4)+"ROID";
}
// Build the SQL command needed to update a row in the USAGERO file
public override string GetRecUpdateStr(DataTable tbl,DataRow row)
{
int j = 0;
bool FirstOne = true;
StringBuilder updateStr = new StringBuilder();
string strNumber = "";
string strSequence = "";
string strInstance = "";
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
if (col.ColumnName.Equals("NUMBER"))
{
strNumber = row.ItemArray[j].ToString();
strNumber = strNumber.Replace("'","''");
}
else if (col.ColumnName.Equals("SEQUENCE"))
{
strSequence = row.ItemArray[j].ToString();
strSequence = strSequence.Replace("'","''");
}
else if (col.ColumnName.Equals("INSTANCE"))
{
strInstance = row.ItemArray[j].ToString();
strInstance = strInstance.Replace("'","''");
}
if (FirstOne)
{
updateStr.Append(" [");
FirstOne = false;
}
else
updateStr.Append(", [");
updateStr.Append(col.ColumnName);
updateStr.Append("]=");
if (row.ItemArray[j].ToString().Equals(""))
{
updateStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
tmpstr = tmpstr.Replace("'","''");
updateStr.Append(tmpstr);
updateStr.Append("'");
}
j++;
}
// Add the WHERE clause
updateStr.Append(" WHERE [NUMBER] = '");
updateStr.Append(strNumber.ToString());
updateStr.Append("' AND [SEQUENCE] = '");
updateStr.Append(strSequence.ToString());
updateStr.Append("' AND [INSTANCE] = '");
updateStr.Append(strInstance.ToString());
updateStr.Append("'");
return updateStr.ToString();
}
// Build the SQL command needed to insert a row in the USAGERO file
public override string GetRecInsertStr(DataTable tbl,DataRow row)
{
int j = 0;
StringBuilder insrtStr = new StringBuilder();
StringBuilder valueStr = new StringBuilder();
insrtStr.Append("INSERT INTO [");
insrtStr.Append(DBTable);
insrtStr.Append("] (");
valueStr.Append(" VALUES (");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
insrtStr.Append("[");
insrtStr.Append(col.ColumnName);
insrtStr.Append("],");
if (row.ItemArray[j].ToString().Equals(""))
{
valueStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
tmpstr = tmpstr.Replace("'","''");
valueStr.Append("'");
valueStr.Append(tmpstr);
valueStr.Append("'");
}
else
{
valueStr.Append(row.ItemArray[j].ToString());
}
valueStr.Append(",");
j++;
}
insrtStr = insrtStr.Replace(',',')',insrtStr.Length-1,1);
valueStr = valueStr.Replace(',',')',valueStr.Length-1,1);
insrtStr.Append(valueStr.ToString());
return insrtStr.ToString();
}
// Build the SQL command needed to delete a row in the USAGERO file
public override string RecDeleteStr(DataTable tbl,DataRow row)
{
int j = 0;
string strNumber = "";
string strSequence = "";
string strInstance = "";
StringBuilder deleteStr = new StringBuilder();
deleteStr.Append("DELETE FROM [");
deleteStr.Append(DBTable);
deleteStr.Append("]");
row.RejectChanges();
foreach (DataColumn col in tbl.Columns)
{
if (col.ColumnName.Equals("NUMBER"))
{
strNumber = row.ItemArray[j].ToString();
strNumber = strNumber.Replace("'","''");
}
else if (col.ColumnName.Equals("SEQUENCE"))
{
strSequence = row.ItemArray[j].ToString();
strSequence = strSequence.Replace("'","''");
}
else if (col.ColumnName.Equals("INSTANCE"))
{
strInstance = row.ItemArray[j].ToString();
strInstance = strInstance.Replace("'","''");
}
j++;
}
// Add the WHERE clause
deleteStr.Append(" WHERE [NUMBER] = '");
deleteStr.Append(strNumber.ToString());
deleteStr.Append("' AND [SEQUENCE] = '");
deleteStr.Append(strSequence.ToString());
deleteStr.Append("' AND [INSTANCE] = '");
deleteStr.Append(strInstance.ToString());
deleteStr.Append("'");
return deleteStr.ToString();
}
public override string GetCreateIndx1String()
{
StringBuilder index1Str = new StringBuilder();
index1Str.Append("CREATE INDEX [");
index1Str.Append(UsageROndx);
index1Str.Append("] ON ");
index1Str.Append(DBTable);
index1Str.Append(".DBF ([NUMBER],[SEQUENCE],[INSTANCE])");
return (index1Str.ToString());
}
public override string GetCreateIndx2String()
{
StringBuilder index2Str = new StringBuilder();
index2Str.Append("CREATE INDEX [");
index2Str.Append(UsagROIDndx);
index2Str.Append("] ON ");
index2Str.Append(DBTable);
index2Str.Append(".DBF ([ROID])");
return (index2Str.ToString());
}
public override bool IndexFilesExist()
{
if (UsageROndx==""||UsagROIDndx=="") BuildNDXFileNames();
if(!File.Exists(DBPath+"\\"+UsageROndx+".NDX") || !File.Exists(DBPath+"\\"+UsagROIDndx+".NDX")) return false;
return true;
}
public override void DeleteIndexFiles()
{
if(File.Exists(DBPath+"\\"+UsageROndx+".NDX")) File.Delete(DBPath+"\\"+UsageROndx+".NDX");
if(File.Exists(DBPath+"\\"+UsagROIDndx+".NDX")) File.Delete(DBPath+"\\"+UsagROIDndx+".NDX");
if(File.Exists(DBPath+"\\"+DBTable+".INF")) File.Delete(DBPath+"\\"+DBTable+".INF");
}
public override StringCollection CreateIndexFilesStatements()
{
if (isdBaseFile())
{
StringCollection rtnStrColl = new StringCollection();
string indx1 = GetCreateIndx1String();
rtnStrColl.Add(indx1);
string indx2 = GetCreateIndx2String();
rtnStrColl.Add(indx2);
return rtnStrColl;
}
return null;
}
// Build a list of SQL commands needed to create a new USAGERO table (file)
// and add the first row
public override StringCollection CreateTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder createStr = new StringBuilder();
//StringBuilder index1Str = new StringBuilder();
//StringBuilder index2Str = new StringBuilder();
if (strTblName.Length > 0) // was a table name passd in?
{
DBTable = strTblName;
}
if (DBTable.Equals(""))
{
MessageBox.Show("Trying to Create a new Table without a Name","Create Table Error");
return rtnStrColl;
}
// Build the command that creates a new SET table (file)
createStr.Append("CREATE TABLE [");
createStr.Append(DBTable);
createStr.Append("] ");
createStr.Append("([NUMBER] Char(20), [SEQUENCE] Char(12), ");
createStr.Append("[INSTANCE] Char(1), [ROID] Char(16))");
rtnStrColl.Add(createStr.ToString()); // add create table
if (isdBaseFile())
{
// build the ndx file names (w/o extensions)
// BuildNDXFileNames();
// Build the command that creates the first index file
rtnStrColl.Add(GetCreateIndx1String()); // add create 1st index
// Build the commmand that creates the second index file
string tmp = DBTable;
rtnStrColl.Add(GetCreateIndx2String()); // add create 2nd index
}
return rtnStrColl;
}
// After the table is created, create the associated INF file
public override int PostCreateTableFunction()
{
CreateINF(); // should already be created
return 0;
}
// This is called in the class constructor and
// if the table name is assigned to the DBTable property
public override int CreateINF()
{
// if we are using dBase files, create an INF file containing
// a list of the associated NDX files.
if (isdBaseFile())
{
StreamWriter infFile;
string infFileStr;
StringBuilder tmp = new StringBuilder();
// build the ndx file names (w/o extensions)
BuildNDXFileNames();
//build INF file name
tmp.Append(DBPath);
tmp.Append("\\");
tmp.Append(DBTable);
tmp.Append(".INF");
infFileStr = tmp.ToString();
// if the INF file does not already exist create it
//if (!File.Exists(infFileStr))
//{
// always recreate it. Some plants' data had invalid files
// and it was felt that it would be quicker to recreate always
// rather than
infFile = new StreamWriter(infFileStr,false);
infFile.Write("NDX1=");
infFile.Write(UsageROndx); // USAGERO.NDX
infFile.Write(".NDX\r\n");
infFile.Write("NDX2=");
infFile.Write(UsagROIDndx); //USAGROID.NDX
infFile.Write(".NDX\r\n");
infFile.Close();
//}
}
return 0;
}
// return a list of SQL commands that will drop (delete) a database table (file)
public override StringCollection DeleteTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder DropTableStr = new StringBuilder();
DropTableStr.Append("Drop Table [");
DropTableStr.Append(DBTable);
DropTableStr.Append("]");
rtnStrColl.Add(DropTableStr.ToString());
return rtnStrColl;
}
// return a dataset of RO Usage records, not sorted
public System.Data.DataSet GetNotSorted(string WhereStr)
{
BuildSelectCommand((int)SortTypes.NotSorted,WhereStr);
return DB_Data;
}
// return a dataset of RO Usage records, sorted by the [NUMBER] field
public System.Data.DataSet GetSortedByProc(string WhereStr)
{
BuildSelectCommand((int)SortTypes.ProcSort,WhereStr);
return DB_Data;
}
// return a dataset of RO Usage records, sorted by the [ROID] field
public System.Data.DataSet GetSortedByROID(string WhereStr)
{
BuildSelectCommand((int)SortTypes.ROIDsort,WhereStr);
return DB_Data;
}
public void UpdateProcNumber(string oldnum, string newnum)
{
// Change fromnumber first, then tonumber
StringBuilder updateStr = new StringBuilder();
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET [NUMBER] = '");
updateStr.Append(newnum.Replace("'","''"));
updateStr.Append("' WHERE [NUMBER] = '");
updateStr.Append(oldnum.Replace("'","''"));
updateStr.Append("'");
ProcessACommand(updateStr.ToString());
}
}
}

View File

@@ -0,0 +1,283 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: vdb_Set.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 8/23/04 10:12a $
*
* $History: vdb_Set.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/23/04 Time: 10:12a
* Updated in $/LibSource/VDB
* Fixed replace of single quote
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Text;
using System.Collections.Specialized;
using System.Windows.Forms;
using VDB;
namespace VDB_Set
{
/// <summary>
/// Open, Create, Delete, Update functions for SET files (tables)
/// </summary>
public class vdb_Set:VDB_Base
{
public vdb_Set(String strPath):base(strPath)
{
// if no table (file name) specified, then default to SET (SET.DBF)
if (DBTable.Equals(""))
DBTable = "SET";
}
// Build the SQL command needed to update a row in the SET file
public override string GetRecUpdateStr(DataTable tbl,DataRow row)
{
int j = 0;
bool FirstOne = true;
StringBuilder updateStr = new StringBuilder();
StringBuilder LikeRecID = new StringBuilder();
bool NullEntry = false;
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
if (col.ColumnName.Equals("ENTRY") && row.ItemArray[j].ToString().Equals(""))
{
NullEntry = true;
j++;
continue;
}
if (col.ColumnName.Equals("RECID"))
{
LikeRecID.Append("___"); // ignore the first 3 positions
LikeRecID.Append(row.ItemArray[j].ToString(),3,5);
}
if (FirstOne)
{
updateStr.Append(" [");
FirstOne = false;
}
else
updateStr.Append(", [");
updateStr.Append(col.ColumnName);
updateStr.Append("]=");
if (row.ItemArray[j].ToString().Equals(""))
{
updateStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
tmpstr = tmpstr.Replace("'","''");
updateStr.Append(tmpstr);
updateStr.Append("'");
}
else if (col.DataType == Type.GetType("System.DateTime"))
{
int jj;
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
jj=tmpstr.IndexOf(" ");
if (jj<0) jj = tmpstr.Length;
updateStr.Append(tmpstr.Substring(0,jj));
updateStr.Append("'");
}
j++;
}
if (NullEntry)
{
// So that we can change the RECID number on the first entry
updateStr.Append(" WHERE [ENTRY] IS NULL");
}
else
{
updateStr.Append(" WHERE [RECID] LIKE '");
updateStr.Append(LikeRecID.ToString());
updateStr.Append("' AND [ENTRY] IS NOT NULL");
}
return updateStr.ToString();
}
// Build the SQL command needed to insert a row in the SET file
public override string GetRecInsertStr(DataTable tbl,DataRow row)
{
int j = 0;
StringBuilder insrtStr = new StringBuilder();
StringBuilder valueStr = new StringBuilder();
insrtStr.Append("INSERT INTO [");
insrtStr.Append(DBTable);
insrtStr.Append("] (");
valueStr.Append(" VALUES (");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
insrtStr.Append("[");
insrtStr.Append(col.ColumnName);
insrtStr.Append("],");
if (row.ItemArray[j].ToString().Equals(""))
{
valueStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
tmpstr = tmpstr.Replace("'","''");
valueStr.Append("'");
valueStr.Append(tmpstr);
valueStr.Append("'");
}
else if (col.DataType == Type.GetType("System.DateTime"))
{
int jj;
String tmpstr = row.ItemArray[j].ToString();
valueStr.Append("'");
jj = tmpstr.IndexOf(" ");
if (jj<0) jj=tmpstr.Length;
valueStr.Append(tmpstr.Substring(0,jj));
valueStr.Append("'");
}
else
{
valueStr.Append(row.ItemArray[j].ToString());
}
valueStr.Append(",");
j++;
}
insrtStr = insrtStr.Replace(',',')',insrtStr.Length-1,1);
valueStr = valueStr.Replace(',',')',valueStr.Length-1,1);
insrtStr.Append(valueStr.ToString());
return insrtStr.ToString();
}
// Build the SQL command needed to delete a row in the SET file
public override string RecDeleteStr(DataTable tbl,DataRow row)
{
int j = 0;
String RecIDStr = "";
String NumberStr = "";
StringBuilder deleteStr = new StringBuilder();
deleteStr.Append("DELETE FROM [");
deleteStr.Append(DBTable);
deleteStr.Append("] WHERE ");
row.RejectChanges();
foreach (DataColumn col in tbl.Columns)
{
if (col.ColumnName.Equals("NUMBER"))
{
NumberStr = row.ItemArray[j].ToString();
NumberStr = NumberStr.Replace("'","''");
}
else if (col.ColumnName.Equals("RECID"))
{
RecIDStr = row.ItemArray[j].ToString();
}
j++;
}
deleteStr.Append("[NUMBER] = '");
deleteStr.Append(NumberStr);
deleteStr.Append("' AND [RECID] = '");
deleteStr.Append(RecIDStr);
deleteStr.Append("' AND [ENTRY] IS NOT NULL");
return deleteStr.ToString();
}
// Build a list of SQL commands needed to create a new SET table (file)
// and add the first row
public override StringCollection CreateTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder createStr = new StringBuilder();
// StringBuilder firstRecStr = new StringBuilder();
if (strTblName.Length > 0) // was a table name passd in?
{
DBTable = strTblName;
}
if (DBTable.Equals(""))
{
MessageBox.Show("Trying to Create a new Table without a Name","Create Table Error");
return rtnStrColl;
}
// Build the command that creates a new SET table (file)
createStr.Append("CREATE TABLE [");
createStr.Append(DBTable);
createStr.Append("] ");
createStr.Append("([TITLE] Char(250), [NUMBER] Char(20), [FORMAT] Char(1), ");
createStr.Append("[SUBDIR] Char(1), [ENTRY] Char(30), [RECID] Char(8), ");
createStr.Append("[PROCCODE] Char(1), [DATE] Date, [TIME] Char(5), ");
createStr.Append("INITIALS Char(5), SERIES Char(100))");
// // Build the command that adds the first (blank) record
// // with the RECID initialize to 00000001
// firstRecStr.Append("INSERT INTO [");
// firstRecStr.Append(DBTable);
// firstRecStr.Append("] ([RECID]) VALUES ('00000001')");
rtnStrColl.Add(createStr.ToString()); // add create table
// rtnStrColl.Add(firstRecStr.ToString()); // add inserst first record
return rtnStrColl;
}
// Build a list of SQL commands needed to create the first data row
public override StringCollection CreateFirstRecordStatement(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder firstRecStr = new StringBuilder();
// Build the command that adds the first (blank) record
// with the RECID initialize to 00000001
firstRecStr.Append("INSERT INTO [");
firstRecStr.Append(DBTable);
firstRecStr.Append("] ([RECID]) VALUES ('00000001')");
rtnStrColl.Add(firstRecStr.ToString()); // add inserst first record
return rtnStrColl;
}
// return a list of SQL commands that will drop (delete) a database table (file)
public override StringCollection DeleteTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder DropTableStr = new StringBuilder();
DropTableStr.Append("Drop Table [");
DropTableStr.Append(DBTable);
DropTableStr.Append("]");
rtnStrColl.Add(DropTableStr.ToString());
return rtnStrColl;
}
}
}

View File

@@ -0,0 +1,255 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: vdb_SetExt.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 8/23/04 10:12a $
*
* $History: vdb_SetExt.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/23/04 Time: 10:12a
* Updated in $/LibSource/VDB
* Fixed replace of single quote
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Text;
using System.Collections.Specialized;
using System.Windows.Forms;
using VDB;
namespace VDB_SetExt
{
/// <summary>
/// Open, Create, Delete, Update functions for SETEXT files (tables)
/// (set extension)
/// </summary>
public class vdb_SetExt:VDB_Base
{
public vdb_SetExt(String strPath):base(strPath)
{
// if no table (file name) specified, then default to SETEXT (SET.DBF)
if (DBTable.Equals(""))
DBTable = "SETEXT";
}
// Build a SQL statement for selecting the data. The select for the set extension
// datta is much more involved because the date field for the approved date needs
// calculated/formatted.
public override string DefaultSelectCommand()
{
StringBuilder tmp = new StringBuilder();
tmp.Append("select t3.COMMENT, t3.REV, t3.PC, t3.RECID,format(ApprovedDate,'m/d/yyyy hh:nn:ss') ");
tmp.Append(" as ApprovedDate from(select COMMENT, REV, PC, RECID,iif(MyDate=DateValue('1/1/1970'),null,MyDate) ");
tmp.Append(" as ApprovedDate from (select COMMENT, REV, PC, RECID, dateadd(\"S\",(((asc(mid(tdstamp,4,1))*256)+asc(mid(tdstamp,3,1)) )");
tmp.Append("*256+asc(mid(tdstamp,2,1)) )*256+asc(mid(tdstamp,1,1)),datevalue('1/1/1970')) as MyDate ");
tmp.Append(" from (select COMMENT, REV, PC, RECID,iif(isnull(tdstamp),chr(0)+chr(0)+chr(0)+chr(0),left(tdstamp+chr(0)+chr(0)+chr(0)+chr(0),4)) as tdstamp from setext)t1)t2)t3 ");
SelectCmd = tmp.ToString();
return SelectCmd;
}
// Build the SQL command needed to update a row in the SETEXT file
public override string GetRecUpdateStr(DataTable tbl,DataRow row)
{
int j = 0;
StringBuilder updateStr = new StringBuilder();
StringBuilder LikeRecID = new StringBuilder();
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
if (col.ColumnName.ToUpper().Equals("RECID"))
{
LikeRecID.Append("___"); // ignore the first 3 positions
LikeRecID.Append(row.ItemArray[j].ToString(),3,5);
}
//only comment is updated (at least for initial 32bit veproms
// browser. This may need modified if it is used later
if (col.ColumnName.ToUpper().Equals("COMMENT"))
{
updateStr.Append(" [");
updateStr.Append(col.ColumnName);
updateStr.Append("]=");
if (row.ItemArray[j].ToString().Equals(""))
{
updateStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
tmpstr = tmpstr.Replace("'","''");
updateStr.Append(tmpstr);
updateStr.Append("'");
}
else
{
updateStr.Append(row.ItemArray[j].ToString());
}
}
j++;
}
updateStr.Append(" WHERE [RECID] LIKE '");
updateStr.Append(LikeRecID.ToString());
updateStr.Append("'");
return updateStr.ToString();
}
// Build the SQL command needed to insert a row in the SET file
public override string GetRecInsertStr(DataTable tbl,DataRow row)
{
int j = 0;
StringBuilder insrtStr = new StringBuilder();
StringBuilder valueStr = new StringBuilder();
insrtStr.Append("INSERT INTO [");
insrtStr.Append(DBTable);
insrtStr.Append("] (");
valueStr.Append(" VALUES (");
foreach (DataColumn col in tbl.Columns)
{
// the select statement was modified to handle the tdstamp field (which
// is a calculated date). This needs to be handled on insert, i.e. the
// fieldname.
bool isString = (col.DataType == Type.GetType("System.String"));
bool isApprovedDate = col.ColumnName.ToUpper().Equals("APPROVEDDATE");
insrtStr.Append("[");
if(!isApprovedDate)
insrtStr.Append(col.ColumnName);
else
insrtStr.Append("TDSTAMP");
insrtStr.Append("],");
if (row.ItemArray[j].ToString().Equals(""))
{
valueStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
tmpstr = tmpstr.Replace("'","''");
valueStr.Append("'");
valueStr.Append(tmpstr);
valueStr.Append("'");
}
else
{
valueStr.Append(row.ItemArray[j].ToString());
}
valueStr.Append(",");
j++;
}
insrtStr = insrtStr.Replace(',',')',insrtStr.Length-1,1);
valueStr = valueStr.Replace(',',')',valueStr.Length-1,1);
insrtStr.Append(valueStr.ToString());
return insrtStr.ToString();
}
// Build the SQL command needed to delete a row in the SET file
public override string RecDeleteStr(DataTable tbl,DataRow row)
{
int j = 0;
String RecIDStr = "";
StringBuilder deleteStr = new StringBuilder();
deleteStr.Append("DELETE FROM [");
deleteStr.Append(DBTable);
deleteStr.Append("] WHERE ");
row.RejectChanges();
foreach (DataColumn col in tbl.Columns)
{
if (col.ColumnName.Equals("RECID"))
{
RecIDStr = row.ItemArray[j].ToString();
}
j++;
}
deleteStr.Append("[RECID] = '");
deleteStr.Append(RecIDStr);
deleteStr.Append("'");
return deleteStr.ToString();
}
// Build a list of SQL commands needed to create a new SET table (file)
// and add the first row
public override StringCollection CreateTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder createStr = new StringBuilder();
if (strTblName.Length > 0) // was a table name passd in?
{
DBTable = strTblName;
}
if (DBTable.Equals(""))
{
MessageBox.Show("Trying to Create a new Table without a Name","Create Table Error");
return rtnStrColl;
}
// Build the command that creates a new SET table (file)
createStr.Append("CREATE TABLE [");
createStr.Append(DBTable);
createStr.Append("] ");
createStr.Append("([COMMENT] Char(250), [REV] Char(30), [PC] Char(10), ");
createStr.Append("[RECID] Char(8), [TDSTAMP] Int)");
rtnStrColl.Add(createStr.ToString()); // add create table
return rtnStrColl;
}
// Build a list of SQL commands needed to create the first data row
public override StringCollection CreateFirstRecordStatement(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder firstRecStr = new StringBuilder();
// Build the command that adds the first (blank) record
// with the RECID initialize to 00000001
firstRecStr.Append("INSERT INTO [");
firstRecStr.Append(DBTable);
firstRecStr.Append("] ([RECID]) VALUES ('00000001')");
rtnStrColl.Add(firstRecStr.ToString()); // add inserst first record
return rtnStrColl;
}
// return a list of SQL commands that will drop (delete) a database table (file)
public override StringCollection DeleteTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder DropTableStr = new StringBuilder();
DropTableStr.Append("Drop Table [");
DropTableStr.Append(DBTable);
DropTableStr.Append("]");
rtnStrColl.Add(DropTableStr.ToString());
return rtnStrColl;
}
}
}

View File

@@ -0,0 +1,495 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: vdb_TransUsage.cs $ $Revision: 7 $
* $Author: Kathy $ $Date: 5/01/06 11:17a $
*
* $History: vdb_TransUsage.cs $
*
* ***************** Version 7 *****************
* User: Kathy Date: 5/01/06 Time: 11:17a
* Updated in $/LibSource/VDB
* Fix B2006-018: single quote in proc number causes problem on data
* request
*
* ***************** Version 6 *****************
* User: Kathy Date: 8/16/05 Time: 2:54p
* Updated in $/LibSource/VDB
* B2005-030: error if missing ndx
*
* ***************** Version 5 *****************
* User: Kathy Date: 4/21/05 Time: 10:20a
* Updated in $/LibSource/VDB
* always write inf file
*
* ***************** Version 4 *****************
* User: Kathy Date: 3/08/05 Time: 1:48p
* Updated in $/LibSource/VDB
* Approval
*
* ***************** Version 3 *****************
* User: Jsj Date: 8/30/04 Time: 12:16p
* Updated in $/LibSource/VDB
* upper cased WHERE string did not find mixed cased database items, now
* use the WHERE string as it is passed in.
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/23/04 Time: 10:13a
* Updated in $/LibSource/VDB
* Fixed replace of single quote
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:40a
* Created in $/LibSource/VDB
*********************************************************************************************/
using System;
using System.Data;
using System.Text;
using System.Collections.Specialized;
using System.IO;
using System.Windows.Forms;
using VDB;
using VDB_ConnType;
namespace VDB_TransUsage
{
/// <summary>
/// Open, Create, Delete, Update functions for Transition Usage files (tables)
/// </summary>
public class vdb_TransUsage:VDB_Base
{
public enum SortTypes {NotSorted,FromSort,ToSort}; // list of sorting types
public string TransFromNDX = "";
public string TransToNDX = "";
public vdb_TransUsage(String strPath):base(strPath)
{
// if no table (file name) specified, then default to TRAN (TRAN.DBF)
if (DBTable.Equals(""))
DBTable = "TRAN";
}
// Build a SQL statement. Optionally sort and filter the select statement.
private void BuildSelectCommand(int SortingType,string WhereStr)
{
StringBuilder tmp = new StringBuilder();
tmp.Append("SELECT [FROMNUMBER],[FROMSEQUEN],[FROMINSTAN],[TYPE],");
tmp.Append("[TONUMBER],[TOSEQUENCE],[TOINSTANCE],[DTI],[OLDTO] FROM [");
tmp.Append(DBTable);
tmp.Append("]");
if (WhereStr.Length > 0) // Was a WHERE clause passed in?
{
// Add " WHERE " to the beginning if it is not already there
string tmpstr = WhereStr.ToUpper();
if (tmpstr[0] != ' ')
{
tmp.Append(" ");
if (!tmpstr.StartsWith("WHERE "))
tmp.Append("WHERE ");
}
else if (!tmpstr.StartsWith(" WHERE "))
tmp.Append(" WHERE");
// add the passed in WHERE clause
// When the WhereStr was upper cased, procedure numbers with mixed and/or lower
// cased letters would not be found. Therefore, use the WhereStr exactly as it
// was sent in.
// tmp.Append(tmpstr);
tmp.Append(WhereStr);
}
switch (SortingType)
{
case 0: //NotSorted
break;
case 1: // FromSort - sorted by FROMNUMBER
tmp.Append(" GROUP BY [FROMNUMBER],[FROMSEQUEN],[FROMINSTAN],[TYPE],");
tmp.Append("[TONUMBER],[TOSEQUENCE],[TOINSTANCE],[DTI],[OLDTO]");
break;
case 2: // Tosort - sorted by TONUMBER
tmp.Append(" GROUP BY [TONUMBER],[TOSEQUENCE],[TOINSTANCE],");
tmp.Append("[FROMNUMBER],[FROMSEQUEN],[FROMINSTAN],[TYPE],[DTI],[OLDTO]");
break;
}
SelectCmd = tmp.ToString();
}
private void BuildNDXFileNames()
{
TransFromNDX = DBTable +"FROM";
TransToNDX = DBTable + "TO";
}
// Build the SQL command needed to update a row in the TRAN file
public override string GetRecUpdateStr(DataTable tbl,DataRow row)
{
int j = 0;
bool FirstOne = true;
StringBuilder updateStr = new StringBuilder();
string strNumber = "";
string strSequence = "";
string strInstance = "";
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
if (col.ColumnName.Equals("FROMNUMBER"))
{
strNumber = row.ItemArray[j].ToString();
strNumber = strNumber.Replace("'","''");
}
else if (col.ColumnName.Equals("FROMSEQUEN"))
{
strSequence = row.ItemArray[j].ToString();
strSequence = strSequence.Replace("'","''");
}
else if (col.ColumnName.Equals("FROMINSTAN"))
{
strInstance = row.ItemArray[j].ToString();
strInstance = strInstance.Replace("'","''");
}
if (FirstOne)
{
updateStr.Append(" [");
FirstOne = false;
}
else
updateStr.Append(", [");
updateStr.Append(col.ColumnName);
updateStr.Append("]=");
if (row.ItemArray[j].ToString().Equals(""))
{
updateStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
updateStr.Append("'");
tmpstr = tmpstr.Replace("'","''");
updateStr.Append(tmpstr);
updateStr.Append("'");
}
j++;
}
// Add the WHERE clause
updateStr.Append(" WHERE [FROMNUMBER] = '");
updateStr.Append(strNumber.ToString());
updateStr.Append("' AND [FROMSEQUEN] = '");
updateStr.Append(strSequence.ToString());
updateStr.Append("' AND [FROMINSTAN] = '");
updateStr.Append(strInstance.ToString());
updateStr.Append("'");
return updateStr.ToString();
}
// Build the SQL command needed to insert a row in the TRAN file
public override string GetRecInsertStr(DataTable tbl,DataRow row)
{
int j = 0;
StringBuilder insrtStr = new StringBuilder();
StringBuilder valueStr = new StringBuilder();
insrtStr.Append("INSERT INTO [");
insrtStr.Append(DBTable);
insrtStr.Append("] (");
valueStr.Append(" VALUES (");
foreach (DataColumn col in tbl.Columns)
{
bool isString = (col.DataType == Type.GetType("System.String"));
insrtStr.Append("[");
insrtStr.Append(col.ColumnName);
insrtStr.Append("],");
if (row.ItemArray[j].ToString().Equals(""))
{
valueStr.Append("NULL");
}
else if (isString)
{
String tmpstr = row.ItemArray[j].ToString();
tmpstr = tmpstr.Replace("'","''");
valueStr.Append("'");
valueStr.Append(tmpstr);
valueStr.Append("'");
}
else
{
valueStr.Append(row.ItemArray[j].ToString());
}
valueStr.Append(",");
j++;
}
insrtStr = insrtStr.Replace(',',')',insrtStr.Length-1,1);
valueStr = valueStr.Replace(',',')',valueStr.Length-1,1);
insrtStr.Append(valueStr.ToString());
return insrtStr.ToString();
}
// Build the SQL command needed to delete a row in the TRAN file
public override string RecDeleteStr(DataTable tbl,DataRow row)
{
int j = 0;
string strNumber = "";
string strSequence = "";
string strInstance = "";
StringBuilder deleteStr = new StringBuilder();
deleteStr.Append("DELETE FROM [");
deleteStr.Append(DBTable);
deleteStr.Append("]");
row.RejectChanges();
foreach (DataColumn col in tbl.Columns)
{
if (col.ColumnName.Equals("FROMNUMBER"))
{
strNumber = row.ItemArray[j].ToString();
strNumber = strNumber.Replace("'","''");
}
else if (col.ColumnName.Equals("FROMSEQUEN"))
{
strSequence = row.ItemArray[j].ToString();
strSequence = strSequence.Replace("'","''");
}
else if (col.ColumnName.Equals("FROMINSTAN"))
{
strInstance = row.ItemArray[j].ToString();
strInstance = strInstance.Replace("'","''");
}
j++;
}
// Add the WHERE clause
deleteStr.Append(" WHERE [FROMNUMBER] = '");
deleteStr.Append(strNumber.ToString());
deleteStr.Append("' AND [FROMSEQUEN] = '");
deleteStr.Append(strSequence.ToString());
deleteStr.Append("' AND [FROMINSTAN] = '");
deleteStr.Append(strInstance.ToString());
deleteStr.Append("'");
return deleteStr.ToString();
}
public override string GetCreateIndx1String()
{
StringBuilder index1Str = new StringBuilder();
index1Str.Append("CREATE INDEX [");
index1Str.Append(TransFromNDX);
index1Str.Append("] ON ");
index1Str.Append(DBTable);
index1Str.Append(".DBF ([FROMNUMBER],[FROMSEQUEN],[FROMINSTAN])");
return (index1Str.ToString());
}
public override string GetCreateIndx2String()
{
StringBuilder index2Str = new StringBuilder();
index2Str.Append("CREATE INDEX [");
index2Str.Append(TransToNDX);
index2Str.Append("] ON ");
index2Str.Append(DBTable);
index2Str.Append(".DBF ([TONUMBER], [TOSEQUENCE])");
return (index2Str.ToString());
}
public override bool IndexFilesExist()
{
if (TransFromNDX==""||TransToNDX=="")BuildNDXFileNames();
if(!File.Exists(DBPath+"\\"+TransFromNDX+".NDX") || !File.Exists(DBPath+"\\"+TransToNDX+".NDX")) return false;
return true;
}
public override void DeleteIndexFiles()
{
if(File.Exists(DBPath+"\\"+TransFromNDX+".NDX")) File.Delete(DBPath+"\\"+TransFromNDX+".NDX");
if(File.Exists(DBPath+"\\"+TransToNDX+".NDX")) File.Delete(DBPath+"\\"+TransToNDX+".NDX");
if(File.Exists(DBPath+"\\"+DBTable+".INF")) File.Delete(DBPath+"\\"+DBTable+".INF");
}
public override StringCollection CreateIndexFilesStatements()
{
if (isdBaseFile())
{
StringCollection rtnStrColl = new StringCollection();
string indx1 = GetCreateIndx1String();
rtnStrColl.Add(indx1);
string indx2 = GetCreateIndx2String();
rtnStrColl.Add(indx2);
return rtnStrColl;
}
return null;
}
// Build a list of SQL commands needed to create a new TRAN table (file)
// and add the first row
public override StringCollection CreateTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder createStr = new StringBuilder();
//StringBuilder index1Str = new StringBuilder();
//StringBuilder index2Str = new StringBuilder();
if (strTblName.Length > 0) // was a table name passd in?
{
DBTable = strTblName;
}
if (DBTable.Equals(""))
{
MessageBox.Show("Trying to Create a new Table without a Name","Create Table Error");
return rtnStrColl;
}
// Build the command that creates a new SET table (file)
createStr.Append("CREATE TABLE [");
createStr.Append(DBTable);
createStr.Append("] ");
createStr.Append("([FROMNUMBER] Char(20), [FROMSEQUEN] Char(12), ");
createStr.Append("[FROMINSTAN] Char(1), [TYPE] Char(1),");
createStr.Append("[TONUMBER] Char(20), [TOSEQUENCE] Char(12), ");
createStr.Append("[TOINSTANCE] Char(2), [DTI] Char(18), [OLDTO] Char(32))");
rtnStrColl.Add(createStr.ToString()); // add create table
if (isdBaseFile())
{
// Build the command that creates the first index file
rtnStrColl.Add(GetCreateIndx1String()); // add create 1st index
// Build the commmand that creates the second index file
//string tmp = DBTable;
rtnStrColl.Add(GetCreateIndx2String()); // add create 2nd index
}
return rtnStrColl;
}
// After the table is created, create the associated INF file
public override int PostCreateTableFunction()
{
CreateINF(); // should already be created
return 0;
}
// This will be called from CreateTableStatements()
// and this is called if the table name is assigned to the DBTable property
public override int CreateINF()
{
// if we are using dBase files, create an INF file containing
// a list of the associated NDX files.
if (isdBaseFile())
{
StreamWriter infFile;
string infFileStr;
StringBuilder tmp = new StringBuilder();
// build the ndx file names (w/o extensions)
BuildNDXFileNames();
//build INF file name
tmp.Append(DBPath);
tmp.Append("\\");
tmp.Append(DBTable);
tmp.Append(".INF");
infFileStr = tmp.ToString();
// if the INF file does not already exist create it
//if (!File.Exists(infFileStr))
//{
// always recreate it. Some plants' data had invalid files
// and it was felt that it would be quicker to recreate always
// rather than
infFile = new StreamWriter(infFileStr,false);
infFile.Write("NDX1=");
infFile.Write(TransFromNDX); // TRANFROM.NDX
infFile.Write(".NDX\r\n");
infFile.Write("NDX2=");
infFile.Write(TransToNDX); //TRANTO.NDX
infFile.Write(".NDX\r\n");
infFile.Close();
//}
}
return 0;
}
// return a list of SQL commands that will drop (delete) a database table (file)
public override StringCollection DeleteTableStatements(string strTblName)
{
StringCollection rtnStrColl = new StringCollection();
StringBuilder DropTableStr = new StringBuilder();
DropTableStr.Append("Drop Table [");
DropTableStr.Append(DBTable);
DropTableStr.Append("]");
rtnStrColl.Add(DropTableStr.ToString());
return rtnStrColl;
}
// return a dataset of Transition Usage records, not sorted
public System.Data.DataSet GetNotSorted(string WhereStr)
{
BuildSelectCommand((int)SortTypes.NotSorted,WhereStr);
return DB_Data;
}
// return a dataset or Transition Usage records, sorted by the [FROMNUMBER] field
public System.Data.DataSet GetSortedByFromTrans(string WhereStr)
{
BuildSelectCommand((int)SortTypes.FromSort,WhereStr);
return DB_Data;
}
// return a dataset or Transition Usage records, sorted by the [TONUMBER] field
public System.Data.DataSet GetSortedByToTrans(string WhereStr)
{
BuildSelectCommand((int)SortTypes.ToSort,WhereStr);
return DB_Data;
}
public void UpdateProcNumber(string oldnum, string newnum)
{
// Change fromnumber first, then tonumber
StringBuilder updateStr = new StringBuilder();
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET [FROMNUMBER] = '");
updateStr.Append(newnum.Replace("'","''"));
updateStr.Append("' WHERE [FROMNUMBER] = '");
updateStr.Append(oldnum.Replace("'","''"));
updateStr.Append("'");
ProcessACommand(updateStr.ToString());
// now to...
updateStr.Remove(0,updateStr.Length);
updateStr.Append("UPDATE [");
updateStr.Append(DBTable);
updateStr.Append("] SET [TONUMBER] = '");
updateStr.Append(newnum.Replace("'","''"));
updateStr.Append("' WHERE [TONUMBER] = '");
updateStr.Append(oldnum.Replace("'","''"));
updateStr.Append("'");
ProcessACommand(updateStr.ToString());
}
}
}

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,113 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VEMessage.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:24a $
*
* $History: VEMessage.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:24a
* Created in $/LibSource/VEMessage
*********************************************************************************************/
using System;
using System.Collections.Specialized;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace VEMessageNS
{
// messages for communication between this app & vfw.
public enum MessageOps
{
WM_USER = 0x0400,
MSG_COMMAND_TERMINATE = WM_USER + 200 + 4,
POSQUERY = WM_USER+0x015, //21,
POSUPDATE = WM_USER+0x016, //22,
GETANSWER = WM_USER+0x017, //23,
RQSTATTACH = WM_USER+0x018, //24,
RQSTFILEOFFSET = WM_USER+0x19, //25,
RQSTFILEMODE = WM_USER+0x01a, //26,
RQSTFILEOWNER = WM_USER+0x01b, //27,
RQSTFILESEEK = WM_USER+0x01c, //28,
RQSTFILECLOSE = WM_USER+0x01d, //29,
RQSTFILEOPEN = WM_USER+0x01e, //30,
RQSTFILEREAD = WM_USER+0x01f, //31,
RQSTFILEWRITE = WM_USER+0x020, //32,
RQSTPROCESSRECORD = WM_USER+0x021, //33,
GETPROCESSREC = WM_USER+0x022, //34,
SETLOCKBYUSER = WM_USER+0x023, // 35
};
public class Win32
{
[DllImport("wow32.dll")]
public static extern Int16 WOWHandle16(IntPtr x, int xx);
}
public class VEMessage
{
public HybridDictionary dicMessage;
static int m_Handle_16bit;
static IntPtr m_Handle_vfw;
public VEMessage()
{
dicMessage = new HybridDictionary();
dicMessage.Add(0x415,MessageOps.POSQUERY);
dicMessage.Add(0x416,MessageOps.POSUPDATE);
dicMessage.Add(0x417,MessageOps.GETANSWER);
dicMessage.Add(0x418,MessageOps.RQSTATTACH);
dicMessage.Add(0x419,MessageOps.RQSTFILEOFFSET);
dicMessage.Add(0x41a,MessageOps.RQSTFILEMODE);
dicMessage.Add(0x41b,MessageOps.RQSTFILEOWNER);
dicMessage.Add(0x41c,MessageOps.RQSTFILESEEK);
dicMessage.Add(0x41d,MessageOps.RQSTFILECLOSE);
dicMessage.Add(0x41e,MessageOps.RQSTFILEOPEN);
dicMessage.Add(0x41f,MessageOps.RQSTFILEREAD);
dicMessage.Add(0x420,MessageOps.RQSTFILEWRITE);
dicMessage.Add(0x421,MessageOps.RQSTPROCESSRECORD);
dicMessage.Add(0x422,MessageOps.GETPROCESSREC);
dicMessage.Add(0x423,MessageOps.SETLOCKBYUSER);
}
public bool Exists(int msg)
{
return(dicMessage.Contains(msg));
}
public static int Handle_16bit
{
set
{
m_Handle_16bit=value;
}
get
{
return m_Handle_16bit;
}
}
public static IntPtr Handle_Vfw
{
set
{
m_Handle_vfw=value;
}
get
{
return m_Handle_vfw;
}
}
public int GetMessageOp(int m)
{
return ((int) dicMessage[m]);
}
public void SetReceiveHandle(Message m)
{
Handle_Vfw = m.WParam;
}
}
}

View File

@@ -0,0 +1,105 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{D6084F16-AF86-4D6D-B53B-13BCA7B90CA0}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "VEMessage"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "VEMessage"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "VEMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VEMessage", "VEMessage.csproj", "{D6084F16-AF86-4D6D-B53B-13BCA7B90CA0}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{D6084F16-AF86-4D6D-B53B-13BCA7B90CA0}.Debug.ActiveCfg = Debug|.NET
{D6084F16-AF86-4D6D-B53B-13BCA7B90CA0}.Debug.Build.0 = Debug|.NET
{D6084F16-AF86-4D6D-B53B-13BCA7B90CA0}.Release.ActiveCfg = Release|.NET
{D6084F16-AF86-4D6D-B53B-13BCA7B90CA0}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,56 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,59 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,147 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: LockDlg.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:44a $
*
* $History: LockDlg.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:44a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VENetwork
{
/// <summary>
/// Summary description for LockDlg.
/// </summary>
public class LockDlg : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox tbLockReason;
private System.Windows.Forms.Label lblLckMsg;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button Cancel;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private string [] LckTypes = {"SYSTEM", "PLANT", "PROCEDURE"};
private VELock vlk;
public LockDlg(VELock alock)
{
vlk = alock;
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.lblLckMsg.Text = "Please enter PURPOSE and estimated DURATION of " + LckTypes[(int)vlk.LockType-1] + " Lock: ";
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LockDlg));
this.tbLockReason = new System.Windows.Forms.TextBox();
this.lblLckMsg = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.Cancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// tbLockReason
//
this.tbLockReason.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.tbLockReason.Location = new System.Drawing.Point(8, 40);
this.tbLockReason.Name = "tbLockReason";
this.tbLockReason.Size = new System.Drawing.Size(328, 21);
this.tbLockReason.TabIndex = 0;
this.tbLockReason.Text = "";
this.tbLockReason.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbLockReason_KeyUp);
//
// lblLckMsg
//
this.lblLckMsg.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblLckMsg.Location = new System.Drawing.Point(0, 0);
this.lblLckMsg.Name = "lblLckMsg";
this.lblLckMsg.Size = new System.Drawing.Size(280, 32);
this.lblLckMsg.TabIndex = 1;
this.lblLckMsg.Text = "Please enter PURPOSE and estimated DURATION of Lock: ";
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(176, 72);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(64, 24);
this.btnOK.TabIndex = 2;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// Cancel
//
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.Cancel.Location = new System.Drawing.Point(264, 72);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(64, 24);
this.Cancel.TabIndex = 3;
this.Cancel.Text = "Cancel";
//
// LockDlg
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(376, 102);
this.Controls.Add(this.Cancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lblLckMsg);
this.Controls.Add(this.tbLockReason);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LockDlg";
this.Text = "VE-Proms Lock Purpose";
this.ResumeLayout(false);
}
#endregion
private void btnOK_Click(object sender, System.EventArgs e)
{
vlk.Why = this.tbLockReason.Text;
vlk.WhyDT = System.DateTime.Now;
}
private void tbLockReason_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
// if key pressed was a return - treat as ok button.
if (e.KeyCode == Keys.Return) this.btnOK.PerformClick();
}
}
}

View File

@@ -0,0 +1,183 @@
<?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="tbLockReason.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbLockReason.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbLockReason.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblLckMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblLckMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblLckMsg.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="Cancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="Cancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="Cancel.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.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>
<data name="$this.Name">
<value>LockDlg</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,231 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: LockInfoDlg.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:44a $
*
* $History: LockInfoDlg.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:44a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VENetwork
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class LockInfoDlg : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tbUserName;
private System.Windows.Forms.TextBox tbLoc;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox tbPhone1;
private System.Windows.Forms.TextBox tbWhy;
private System.Windows.Forms.TextBox tbWhyDT;
private System.Windows.Forms.TextBox tbPhone2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private string [] SLockTypes = {"System", "Plant", "Procedure Set"};
public LockInfoDlg(VELock lck)
{
InitializeComponent();
this.tbUserName.Text = lck.UserName;
this.tbPhone1.Text = lck.Phone1;
this.tbPhone2.Text = lck.Phone2;
this.tbLoc.Text = lck.Loc1 + " - " + lck.Loc2;
this.tbWhy.Text = lck.Why;
this.tbWhyDT.Text = lck.WhyDT.ToShortDateString() + " " + lck.WhyDT.ToShortTimeString();
this.Text = SLockTypes[(int)lck.LockType-1] + " Lock";
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LockInfoDlg));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.tbUserName = new System.Windows.Forms.TextBox();
this.tbLoc = new System.Windows.Forms.TextBox();
this.tbPhone1 = new System.Windows.Forms.TextBox();
this.tbWhy = new System.Windows.Forms.TextBox();
this.tbWhyDT = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.tbPhone2 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(0, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Locked by:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 16);
this.label2.TabIndex = 1;
this.label2.Text = "Location:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label3
//
this.label3.Location = new System.Drawing.Point(0, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 16);
this.label3.TabIndex = 2;
this.label3.Text = "Phone:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.Location = new System.Drawing.Point(0, 136);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 16);
this.label4.TabIndex = 3;
this.label4.Text = "Information:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label5
//
this.label5.Location = new System.Drawing.Point(0, 168);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(80, 16);
this.label5.TabIndex = 4;
this.label5.Text = "Lock Created:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// tbUserName
//
this.tbUserName.BackColor = System.Drawing.SystemColors.Control;
this.tbUserName.Location = new System.Drawing.Point(96, 8);
this.tbUserName.Name = "tbUserName";
this.tbUserName.ReadOnly = true;
this.tbUserName.Size = new System.Drawing.Size(304, 20);
this.tbUserName.TabIndex = 5;
this.tbUserName.Text = "";
//
// tbLoc
//
this.tbLoc.BackColor = System.Drawing.SystemColors.Control;
this.tbLoc.Location = new System.Drawing.Point(96, 40);
this.tbLoc.Name = "tbLoc";
this.tbLoc.ReadOnly = true;
this.tbLoc.Size = new System.Drawing.Size(304, 20);
this.tbLoc.TabIndex = 6;
this.tbLoc.Text = "";
//
// tbPhone1
//
this.tbPhone1.BackColor = System.Drawing.SystemColors.Control;
this.tbPhone1.Location = new System.Drawing.Point(96, 72);
this.tbPhone1.Name = "tbPhone1";
this.tbPhone1.ReadOnly = true;
this.tbPhone1.Size = new System.Drawing.Size(168, 20);
this.tbPhone1.TabIndex = 7;
this.tbPhone1.Text = "";
//
// tbWhy
//
this.tbWhy.BackColor = System.Drawing.SystemColors.Control;
this.tbWhy.Location = new System.Drawing.Point(96, 136);
this.tbWhy.Name = "tbWhy";
this.tbWhy.ReadOnly = true;
this.tbWhy.Size = new System.Drawing.Size(304, 20);
this.tbWhy.TabIndex = 8;
this.tbWhy.Text = "";
//
// tbWhyDT
//
this.tbWhyDT.BackColor = System.Drawing.SystemColors.Control;
this.tbWhyDT.Location = new System.Drawing.Point(96, 168);
this.tbWhyDT.Name = "tbWhyDT";
this.tbWhyDT.ReadOnly = true;
this.tbWhyDT.Size = new System.Drawing.Size(208, 20);
this.tbWhyDT.TabIndex = 9;
this.tbWhyDT.Text = "";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button1.Location = new System.Drawing.Point(168, 200);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(72, 24);
this.button1.TabIndex = 10;
this.button1.Text = "OK";
//
// tbPhone2
//
this.tbPhone2.Location = new System.Drawing.Point(96, 104);
this.tbPhone2.Name = "tbPhone2";
this.tbPhone2.ReadOnly = true;
this.tbPhone2.Size = new System.Drawing.Size(168, 20);
this.tbPhone2.TabIndex = 0;
this.tbPhone2.Text = "";
//
// LockInfoDlg
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(424, 230);
this.Controls.Add(this.tbPhone2);
this.Controls.Add(this.button1);
this.Controls.Add(this.tbWhyDT);
this.Controls.Add(this.tbWhy);
this.Controls.Add(this.tbPhone1);
this.Controls.Add(this.tbLoc);
this.Controls.Add(this.tbUserName);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LockInfoDlg";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@@ -0,0 +1,255 @@
<?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="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label5.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label5.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label5.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbUserName.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbUserName.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbUserName.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbLoc.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbLoc.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbLoc.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPhone1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPhone1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbPhone1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbWhy.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbWhy.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbWhy.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbWhyDT.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbWhyDT.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbWhyDT.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPhone2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPhone2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbPhone2.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.Name">
<value>LockInfoDlg</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.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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,202 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: LockRlsDlg.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 8/17/04 12:54p $
*
* $History: LockRlsDlg.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/17/04 Time: 12:54p
* Updated in $/LibSource/VENetwork
* Needed to assign an Icon to the form. It was bombing with a resource
* error otherwise.
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:44a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VENetwork
{
/// <summary>
/// Allows user to Release Locks on exit.
/// </summary>
public class LockRlsDlg : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.CheckBox cbSystem;
private System.Windows.Forms.CheckBox cbPlant;
private System.Windows.Forms.CheckBox cbProcSet;
private System.ComponentModel.Container components = null;
private VELock LSystem;
private VELock LPlant;
private VELock LProcSet;
public LockRlsDlg(VELock lsys, VELock lplt, VELock lps)
{
LSystem = lsys;
LPlant = lplt;
LProcSet = lps;
//
// Required for Windows Form Designer support
//
InitializeComponent();
// Set checkboxes depending on whether a lock exists. Note
// that the input locks will be null if not locked by this user.
if (lsys != null)
cbSystem.Checked = true;
else
cbSystem.Enabled = false;
if (lplt != null)
{
cbPlant.Text = lplt.Path.Substring(0,lplt.Path.LastIndexOf("\\"));
cbPlant.Checked = true;
}
else
cbPlant.Enabled = false;
if (lps != null)
{
cbProcSet.Text = lps.Path.Substring(0,lps.Path.LastIndexOf("\\"));
cbProcSet.Checked = true;
}
else
cbProcSet.Enabled = false;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LockRlsDlg));
this.label1 = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.cbSystem = new System.Windows.Forms.CheckBox();
this.cbPlant = new System.Windows.Forms.CheckBox();
this.cbProcSet = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// label1
//
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.Location = new System.Drawing.Point(29, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(451, 56);
this.label1.TabIndex = 0;
this.label1.Text = "The Following Locks Have Been Detected. Please Click The Appropriate Box To Rele" +
"ase The Lock.";
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(173, 194);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(77, 28);
this.btnOK.TabIndex = 1;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(288, 194);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(77, 28);
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
//
// cbSystem
//
this.cbSystem.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.cbSystem.Location = new System.Drawing.Point(86, 74);
this.cbSystem.Name = "cbSystem";
this.cbSystem.Size = new System.Drawing.Size(375, 28);
this.cbSystem.TabIndex = 3;
this.cbSystem.Text = "System";
//
// cbPlant
//
this.cbPlant.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.cbPlant.Location = new System.Drawing.Point(86, 111);
this.cbPlant.Name = "cbPlant";
this.cbPlant.Size = new System.Drawing.Size(375, 27);
this.cbPlant.TabIndex = 4;
this.cbPlant.Text = "Plant";
//
// cbProcSet
//
this.cbProcSet.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.cbProcSet.Location = new System.Drawing.Point(86, 148);
this.cbProcSet.Name = "cbProcSet";
this.cbProcSet.Size = new System.Drawing.Size(375, 27);
this.cbProcSet.TabIndex = 5;
this.cbProcSet.Text = "Data";
//
// LockRlsDlg
//
this.AccessibleRole = System.Windows.Forms.AccessibleRole.TitleBar;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(537, 228);
this.Controls.Add(this.cbProcSet);
this.Controls.Add(this.cbPlant);
this.Controls.Add(this.cbSystem);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LockRlsDlg";
this.Text = "Release Locks";
this.ResumeLayout(false);
}
#endregion
private void btnOK_Click(object sender, System.EventArgs e)
{
// unlock any where the check was removed (kind of backwards but duplicates
// functionality from vfw.
if (this.cbSystem.Visible && this.cbSystem.Enabled && !this.cbSystem.Checked)
LSystem.UnLock(false);
if (this.cbPlant.Visible && this.cbPlant.Enabled && !this.cbPlant.Checked)
LPlant.UnLock(false);
if (this.cbProcSet.Visible && this.cbProcSet.Enabled && !this.cbProcSet.Checked)
LProcSet.UnLock(false);
}
}
}

View File

@@ -0,0 +1,201 @@
<?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="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbSystem.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbSystem.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbSystem.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbPlant.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbPlant.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbPlant.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbProcSet.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbProcSet.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbProcSet.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>LockRlsDlg</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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,122 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: MonUsrDlg.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:44a $
*
* $History: MonUsrDlg.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:44a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Utils;
namespace VENetwork
{
/// <summary>
/// Summary description for MonUsrDlg.
/// </summary>
public class MonUsrDlg : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.ListView lvUsers;
private System.Windows.Forms.Button button1;
private string [] SLockTypes = {"System", "Plant", "Procedure Set"};
public MonUsrDlg(ArrayList usr, int ilb)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.Text = SLockTypes[ilb] + " : Monitor Users";
DoListView(usr);
}
private void DoListView(ArrayList usrlst)
{
ListViewItem item=null;
lvUsers.Columns.Add("User Network ID",100, HorizontalAlignment.Left);
lvUsers.Columns.Add("User Phone",100, HorizontalAlignment.Left);
lvUsers.Columns.Add("User Name",200, HorizontalAlignment.Left);
for (int i=0; i<usrlst.Count; i++)
{
UserData dt = (UserData) usrlst[i];
item = new ListViewItem(dt.UserNetworkID);
item.SubItems.Add(dt.UserPhone1);
item.SubItems.Add(dt.UserName);
lvUsers.Items.Add(item);
}
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MonUsrDlg));
this.lvUsers = new System.Windows.Forms.ListView();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lvUsers
//
this.lvUsers.Location = new System.Drawing.Point(0, 0);
this.lvUsers.Name = "lvUsers";
this.lvUsers.Size = new System.Drawing.Size(400, 224);
this.lvUsers.TabIndex = 0;
this.lvUsers.View = System.Windows.Forms.View.Details;
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.button1.Location = new System.Drawing.Point(176, 232);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(64, 24);
this.button1.TabIndex = 1;
this.button1.Text = "OK";
//
// MonUsrDlg
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(400, 266);
this.Controls.Add(this.button1);
this.Controls.Add(this.lvUsers);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MonUsrDlg";
this.Text = "Monitor Users";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@@ -0,0 +1,165 @@
<?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="lvUsers.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lvUsers.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lvUsers.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button1.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.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.Name">
<value>MonUsrDlg</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,576 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VEConn.cs $ $Revision: 3 $
* $Author: Kathy $ $Date: 1/31/05 11:04a $
*
* $History: VEConn.cs $
*
* ***************** Version 3 *****************
* User: Kathy Date: 1/31/05 Time: 11:04a
* Updated in $/LibSource/VENetwork
* Fix B2005-005 (connection & delete directory errors)
*
* ***************** Version 2 *****************
* User: Jsj Date: 11/12/04 Time: 10:34a
* Updated in $/LibSource/VENetwork
* Save user's Temp dir path
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:44a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.IO;
using System.Collections;
using System.Windows;
using System.Windows.Forms;
using System.ComponentModel;
using System.Text;
using Utils;
using VlnStatus;
namespace VENetwork
{
// The following enum is used to set/check the mode for which the dat file connection
// was made (i.e. when the file was opened.
// NWModes:
// exclusive, hold, write
public enum NWModes {XCLUDMODE=1, HOLDMODE=2, WRITMODE=3};
// This class manages the connection options for multi-user support, i.e. creation,
// connecting to and removing dat files at the system, plant and procedure set levels.
public class VEConnection
{
private VELock m_Lock;
private string m_Path;
private string CurDir;
private long m_Position;
private NWModes m_Mode;
private FileStream datFs;
private UserRunTime usrRunTime;
const int ProcessRecLen = 140;
private VETempFile TempFile;
public VEConnection(VELock ilck, UserRunTime iusrRT)
{
TempFile = null;
datFs = null;
m_Mode = 0;
m_Lock = ilck;
usrRunTime = iusrRT;
SetUserTempDirPath();
if (m_Lock.LockType == LockTypes.None) return;
string tmp_path = ilck.Path;
CurDir = tmp_path.Substring(0,tmp_path.LastIndexOf("\\")+1); // save directory
// path is same as lock file except extension is dat not lck.
m_Path = tmp_path.Substring(0,tmp_path.Length-3) + "dat";
}
~ VEConnection()
{
// update the record as inactive & close the file (this gets called on
// exit of the program, rather than changing active data in the tree view).
Exit();
}
public int GetVfwMode()
{
//given the current mode, get the required filemode to send back to
// vfw. The values were taken from Borland include file
// define BASEMODE (O_NOINHERIT|O_NOCRITERR)
// 0x80 0x2000
// define XCLUDMODE (BASEMODE|O_COMMIT|O_CREAT|O_DENYALL|O_RDWR)
// 0x4000 0x0100 0x10 0x4
// define HOLDMODE (BASEMODE|O_DENYNONE|O_RDONLY)
// 0x40 0x1
// define WRITMODE (BASEMODE|O_COMMIT|O_DENYWRITE|O_RDWR)
// 0x4000 0x20 0x4
int BASEMODE = 0x80|0x2000;
if(m_Mode==NWModes.HOLDMODE)
return (BASEMODE|0x40|0x1);
else if (m_Mode==NWModes.XCLUDMODE)
return (BASEMODE|0x4000|0x0100|0x10|0x4);
else if (m_Mode==NWModes.WRITMODE)
return (BASEMODE|0x4000|0x20|0x4);
else
return (0);
}
// if file open is done from vfw, need to open file using that mode,
// get mode from input.
public NWModes GetModeFromVfwMode(int vfwMode)
{
int BASEMODE = 0x80|0x2000;
if (vfwMode==(BASEMODE|0x40|0x1))
return NWModes.HOLDMODE;
else if (vfwMode==(BASEMODE|0x4000|0x0100|0x10|0x4))
return NWModes.XCLUDMODE;
else if (vfwMode==(BASEMODE|0x4000|0x20|0x4))
return NWModes.WRITMODE;
return (NWModes) 0;
}
[Description("File offset")]public long FileOffset
{
get{return m_Position;}
}
// reads the dat file for this level, and creates a list of ACTIVE users, i.e.
// those users whose record's status is set to active.
public ArrayList GetUsers()
{
ArrayList retval = new ArrayList();
if (datFs!=null)
{
// read records in the .dat file and see if any are active.
long howbig = datFs.Length;
int howmany = (int)(howbig/ProcessRecLen) - 1; // the first record is a dummy
for (int rec=1;rec<=howmany;rec++)
{
UserData usrd = new UserData(datFs, rec);
if (usrd.UserStatus==(byte)Utils.UserCStatus.PRACTIVE)
retval.Add(usrd);
else
usrd = null;
}
}
return retval;
}
// display the monitor users dialog
public void MonitorUsers(int lbstr)
{
ArrayList al = GetUsers();
// temporarily do separate dialog. eventually, this will be a pane with a list
// on the main window
MonUsrDlg dlg = new MonUsrDlg(al,lbstr);
dlg.ShowDialog();
}
// determines whether there are active users, other than myself, currently in this
// level of data
public bool HasActiveUsers()
{
int cntactive=0;
// read records in the .dat file and see if any are active.
long howbig = datFs.Length;
int howmany = (int)(howbig/ProcessRecLen) - 1; // the first record is a dummy
for (int rec=1;rec<=howmany;rec++)
{
UserData usrd = new UserData(datFs, rec);
// if active record and it does not match my user name, there is another
// user in. return true.
if (usrd.UserStatus==(byte)Utils.UserCStatus.PRACTIVE)
{
cntactive++;
if (usrd.UserName.ToUpper()!=usrRunTime.myUserData.UserName.ToUpper())return true;
}
}
// if there is more than one active user that is current user, i.e. multiple
// sessions, return true
if (cntactive>1)return true;
return false;
}
// This method will attempt to open the *process.dat file in a read/write mode so
// that a process record can be added.
private bool OpenRW()
{
bool retval=true;
VlnSpinner spn=null;
try
{
spn = new VlnSpinner(2,50,"- Opening Process File ",m_Path,true,true,false);
datFs=null;
while(spn.SpinnerWait(datFs!=null))
{
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.ReadWrite,FileShare.Read);
}
// take this chance to do some cleanup in the procedure set directory
if (m_Lock.LockType == LockTypes.ProcSet) DoProcCleanup();
datFs.Seek(0L,SeekOrigin.End);
m_Position = datFs.Position;
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRACTIVE;
usrRunTime.myUserData.Write(datFs);
m_Mode=NWModes.WRITMODE;
datFs.Flush();
}
catch (Exception e)
{
//MessageBox.Show(e.Message,"Error on connecting to data - no lock");
retval = false;
}
spn.Dispose();
return retval;
}
// used upon expand/select an item in tree - open the connection to the
// the dat file. The reenter flag is used when the user is already in at this
// level, but a change in lock state may have occurred.
public bool Enter(bool reenter)
{
// for locktype.none, this level has no lock - so just say that
// enter succeeded.
if (m_Lock.LockType == LockTypes.None) return true;
bool attchtemp = false;
bool success=false;
VlnSpinner spin = new VlnSpinner(2,10,"- Connecting to Data ",m_Path,true,true,false);
while( spin.SpinnerWait( false ) ) // spin until break or return
{
// if not reenter refresh the lock. if reenter, the locking logic refreshed
// the lock.
if (!reenter)m_Lock.Refresh();
// if it's locked, see if it is locked by me and make sure there isn't an
// active connection by another user or by myself from another window or network
// process
if (m_Lock.LockStatus == Status.Locked || m_Lock.LockStatus == Status.LockPending)
{
// if this is a procedure set lock, also check that the correct temp
// file is attached, i.e. the one that is from the locking process.
if(m_Lock.LockType==LockTypes.ProcSet)
{
if (TempFile==null)TempFile = new VETempFile(this.CurDir);
attchtemp=TempFile.AttachSpecificTemp(usrRunTime.myUserData.UserNetworkID,m_Lock.UserProcess); //usrRunTime.myUserData.UserProcess);
// if failed to connect, but a lock was pending, reset the lock type to
// locked by other.
if(m_Lock.LockStatus == Status.LockPending && !attchtemp) m_Lock.LockStatus = Status.LockedByOther;
}
if (m_Lock.LockType != LockTypes.ProcSet || attchtemp)
{
// try to get exclusive access to it (if I don't already have it)
// first step is to exit from current connect
if (m_Mode !=0 && m_Mode != NWModes.XCLUDMODE) Exit();
// try to establish a new exclusive connection. If a new exclusive connection
// cannot be made, then a connection must exist from another process (either myself,
// or another user if pending lock).
// If I'm other user, this should be treated like a nolock for me, i.e. I can
// view data but not modify it.
if (m_Mode == 0)
{
try
{
datFs = new FileStream(m_Path,FileMode.Create,FileAccess.ReadWrite,FileShare.None);
if(m_Lock.LockType == LockTypes.ProcSet)
{ // these files are only used at the procedure set level
DeleteFiles("*.own",0); // Cleanup ownership files
DeleteFiles("*.wrq",0); // Cleanup write request files
}
usrRunTime.myUserData.UserProcess=m_Lock.UserProcess;
// truncate file
datFs.SetLength(0L);
m_Mode=NWModes.XCLUDMODE;
// write out a dummy record with the status set to inactive.
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRINACTIVE;
usrRunTime.myUserData.Write(datFs);
m_Position = datFs.Position;
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRACTIVE;
usrRunTime.myUserData.Write(datFs);
success=true;
m_Lock.LockStatus = Status.Locked; // in case it was pending
datFs.Flush();
break;
}
// if an ioexception occurs, the connect is open either by me
// or another user. Open a non-exlusive connection.
catch (IOException)
{
// if open by another user, reopen as it was. Else return for
// view only mode.
spin.Dispose();
bool opn = OpenRW();
if (!opn)
{
m_Lock.LockStatus = Status.LockedByOther;
return false;
}
datFs.Close();
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
success=true;
m_Mode=NWModes.HOLDMODE;
break;
}
catch (Exception e)
{
spin.Dispose();
m_Lock.LockStatus = Status.LockedByOther;
MessageBox.Show(e.Message, "Connecting to data failed - lock exists.");
return false;
}
}
else
{
m_Lock.LockStatus = Status.Locked;
success=true;
break; // already connected.
}
}
else
{
success = false;
break;
}
}
// Handle case where there is no lock or the current user is the lock owner,
// but they're already connected from another run (either windows session or
// network session)
if (m_Lock.LockStatus == Status.NoLock)
{
// check if already connected, i.e. a filestream exists, or that I'm not
// changing modes (the mode change occurs when going from locked to unlocked)
if (datFs != null && this.m_Mode!=NWModes.XCLUDMODE)
{
success=true;
break;
}
else
{
// if at the procedure set level, need to connect to a temp directory
// as well.
usrRunTime.myUserData.UserProcess="";
if(m_Lock.LockType==LockTypes.ProcSet && TempFile==null)
{
TempFile = new VETempFile(this.CurDir);
bool got_tmp = TempFile.FindAvailableTempDir(usrRunTime.myUserData.UserNetworkID);
if (got_tmp==false)
{
TempFile = null;
spin.Dispose();
return false;
}
usrRunTime.myUserData.UserProcess=TempFile.TempNum;
}
// try to get exclusive access to dat file (see following commentary)
try
{
// if this was open with exclusive, exit (this would be the
// case where an unlock occurred.
if (reenter || m_Mode == NWModes.XCLUDMODE) Exit();
// if can't get exclusive, an exception is thrown. just continue
// on from there, i.e. the file is being used.
// if we get exclusive access, cleanup the procset directory (if
// this is a procset level enter) and then clean out the dat file
datFs = new FileStream(m_Path,FileMode.Create,FileAccess.ReadWrite,FileShare.None);
if(m_Lock.LockType == LockTypes.ProcSet)
{ // these files are only used at the procedure set level
DeleteFiles("*.own",0); // Cleanup ownership files
DeleteFiles("*.wrq",0); // Cleanup write request files
}
// truncate file
datFs.SetLength(0L);
m_Mode=NWModes.XCLUDMODE;
// write out a dummy record with the status set to inactive.
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRINACTIVE;
usrRunTime.myUserData.Write(datFs);
datFs.Close();
}
// if it is an IOException, it means the user could not get exclusive access,
// just continue on, opening with read/write access to add process record
// and then reopen in hold mode.
catch (IOException)
{
}
// Catch a real error.
catch (Exception e)
{
MessageBox.Show(e.Message, "connect->enter failed");
spin.Dispose();
return false;
}
// Attempt to open the file in Read/write mode to add an active process record
bool opn = OpenRW();
if (!opn)return false;
// now close the process file & open in hold mode.
datFs.Close();
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
success=true;
m_Mode=NWModes.HOLDMODE;
break;
}
}
if (m_Lock.LockStatus == Status.LockedByOther)
{
success = false;
if (datFs!=null)Exit();
break;
}
}
spin.Dispose(); // end of spinnerwait while loop
// if successful connection & at the procedure set level, write out number
// of bytes to the temp directory file (temps\userid_.p##) to flag which
// connection this is associated with. Also, if this is a reenter (locked state change)
// then the tempfile is already the correct length, don't write out bytes.
if (success==true && m_Lock.LockType==LockTypes.ProcSet && TempFile!=null && !reenter)
{
TempFile.WriteBytes((int)(m_Position/140));
}
SetUserTempDirPath();
return success;
}
// if len is !0, try to delete files of the specified length.
// zero length files are normally in transition and will be
// deleted by their owners.
public void DeleteFiles(string tmp, int len)
{
DirectoryInfo di = new DirectoryInfo(Directory.GetCurrentDirectory());
FileInfo [] fis = di.GetFiles(tmp);
foreach (FileInfo fi in fis)
{
if (len==0 || len==fi.Length) fi.Delete();
}
}
// cleanup temp files and active record flags in the dat files.
private void DoProcCleanup()
{
// read records in the .dat file and do check for those that are active.
long howbig = datFs.Length;
int howmany = (int)(howbig/ProcessRecLen);
for (int rec=1;rec<howmany;rec++)
{
UserData usrd = new UserData(datFs, rec);
if (usrd.UserStatus==(byte)Utils.UserCStatus.PRACTIVE)
{
VETempFile tfile = new VETempFile(CurDir);
string tfilename = CurDir + "\\" + tfile.MakeTempName(usrd.UserNetworkID,usrd.UserProcess,'P');
FileInfo fi = new FileInfo(tfilename);
bool tfile_exists = fi.Exists;
int len=0;
if (tfile_exists) len = (int) fi.Length;
// now check if it is an active process (versus an active
// record left in dat file by a crashed process).
// Do this by checking:
// if the record points to the active process file
// or the process file doesn't exist
// or it's length doesn't match the process number
if (usrd.UserStatus == (byte)Utils.UserCStatus.PRACTIVE)
{
if ((usrd.UserNetworkID.ToUpper()==usrRunTime.myUserData.UserNetworkID.ToUpper() &&
usrd.UserProcess==usrRunTime.myUserData.UserProcess) ||
!tfile_exists || len!=rec)
{
datFs.Seek(-ProcessRecLen,SeekOrigin.Current);
usrd.UserStatus = (byte)Utils.UserCStatus.PRINACTIVE;
usrd.Write(datFs);
DeleteFiles("*.own",rec);
DeleteFiles("*.wrq",rec);
}
}
}
}
}
public long Seek(long offset, int fromwhere)
{
long skpos = 0L;
if(datFs!=null)
{
// fromwhere: 0=beginning;1=current;2=end. Map these from 16-bit code
// to .net 32-bit code.
SeekOrigin sorig;
if (fromwhere==0)
sorig = SeekOrigin.Begin;
else if (fromwhere==1)
sorig = SeekOrigin.Current;
else
sorig = SeekOrigin.End;
skpos = datFs.Seek(offset, sorig);
}
return skpos;
}
public Int16 GetProcRecBuff(Int16 size, ref byte [] bt)
{
int retval = datFs.Read(bt,0,(int)size);
return (Int16)retval;
}
public void Close()
{
datFs.Close();
m_Mode = 0;
datFs=null;
}
public Int16 Open(Int16 vfwmode)
{
Int16 retval = 1;
try
{
if (m_Mode!=0) Close();
m_Mode = GetModeFromVfwMode(vfwmode);
if(m_Mode==NWModes.HOLDMODE)
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
else if(m_Mode==NWModes.WRITMODE)
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.ReadWrite,FileShare.Read);
else if (m_Mode==NWModes.XCLUDMODE)
datFs = new FileStream(m_Path,FileMode.Create,FileAccess.ReadWrite,FileShare.None);
}
catch
{
retval = -1;
}
return retval;
}
// purpose: close the connection to the dat file.
public void Exit()
{
// if datFs is null, either we have a lock type of none or the destructor
// is being called & an exit may have been done, if collapse occurred
if (datFs==null) return; // datFs not set if lock type was none.
byte stat=(byte)Utils.UserCStatus.PRINACTIVE;
usrRunTime.myUserData.UserStatus=stat;
datFs.Close();
datFs=null;
VlnSpinner spin = new VlnSpinner(2,25,"- Exiting from Connection ",m_Path,true,true,false);
while(spin.SpinnerWait(datFs!=null))
{
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.ReadWrite,FileShare.Read);
}
spin.Dispose();
datFs.Seek(m_Position,SeekOrigin.Begin);
BinaryWriter bw = new BinaryWriter(datFs);
bw.Write(stat);
bw.Close();
datFs.Close();
if (TempFile!=null)
{
TempFile.CloseTempProc();
TempFile = null;
}
datFs=null;
m_Mode=0;
}
public void SetUserTempDirPath()
{
if (m_Lock.LockStatus == Status.NoLock && TempFile != null)
{
// no lock set, use temp directory
char [] backslash = {'\\'};
usrRunTime.TempDirPath = TempFile.TemporaryDirectoryName.TrimEnd(backslash);
}
else // lock set, don't use temp directory
usrRunTime.TempDirPath = null;
}
}
}

View File

@@ -0,0 +1,361 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VELock.cs $ $Revision: 2 $
* $Author: Kathy $ $Date: 6/15/06 8:58a $
*
* $History: VELock.cs $
*
* ***************** Version 2 *****************
* User: Kathy Date: 6/15/06 Time: 8:58a
* Updated in $/LibSource/VENetwork
* B2006-024 fix - add lock without prompt
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:45a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.IO;
using System.Windows;
using System.Windows.Forms;
using System.ComponentModel;
using Utils;
using VlnStatus;
namespace VENetwork
{
// The following two enums are used to check lock types & statuses through the users
// of the VELock class.
// LockTypes:
// no lock at level required (dummy nodes, etc), system, plant & set level, i.e.
// None, sprocess.dat, pprocess.dat, process.dat
public enum LockTypes {None=0, System=1, Plant=2, ProcSet=3};
// Status:
// no lock exists, locked my myself, locked by someelse, I want to lock-but someone else in
public enum Status {NoLock=0, Locked=1, LockedByOther=2, LockPending=3};
// This class manages the locking options for multi-user support, i.e. creation and
// removing locks, i.e. lck files at system, plant and procedure set levels.
public class VELock
{
string [] STypes = {"SPROCESS.LCK", "PPROCESS.LCK", "PROCESS.LCK"};
private VENetwork.LockTypes m_Type; // from type enum (above)
private string m_Path;
private VENetwork.Status m_Status;
private string m_UserNetworkID; // the 'm_' are all from the lck file.
private string m_UserName;
private string m_UserPhone1;
private string m_UserPhone2;
private string m_UserLoc1;
private string m_UserLoc2;
private string m_UserShell; // 1 - vfw, 2 - 16bit browser, 3 - 32-bit ve-proms
private String m_UserProcess;
private string m_FailureReason;
private string m_Why; // reason for the lock, from user
private DateTime m_DT;
private UserData curUserData; // user data from cfg file
private bool HasActiveUsers;
// this constructor opens the file & reads the data to set the properties
public VELock(string iloc, UserData iuserdata, VENetwork.LockTypes ityp)
{
// HasActiveUsers is used when a lock is created, to determine whether
// there are active users for the current level. Otherwise, it is not used.
HasActiveUsers = true;
m_Type = ityp;
// if there is no lock at this level, just return.
if (ityp==VENetwork.LockTypes.None) return;
curUserData = iuserdata;
m_Path = iloc + "\\" + STypes[(int)ityp-1];
LoadLockProperties();
}
// this method creates a lock for the current user. It is used when the user
// selects to place a lock at a given level.
public bool CreateLock(VEConnection myconn, bool prompt)
{
bool success=false;
if (!prompt)
success=CreateLockFileNoPrompt(myconn);
else
success=CreateLockFile(myconn);
if (success)LoadLockProperties();
return success;
}
[Description("UserName"),Category("LockInfo"),]public string UserName
{
get{return m_UserName;}
set{m_UserName=value;}
}
[Description("UserNetworkID"),Category("LockInfo"),]public string UserNetworkID
{
get{return m_UserNetworkID;}
set{m_UserNetworkID=value;}
}
[Description("UserProcess"),Category("LockInfo"),]public string UserProcess
{
get{return m_UserProcess;}
set{m_UserProcess=value;}
}
[Description("Loc1"),Category("LockInfo"),]public string Loc1
{
get{return m_UserLoc1;}
set{m_UserLoc1=value;}
}
[Description("Loc2"),Category("LockInfo"),]public string Loc2
{
get{return m_UserLoc2;}
set{m_UserLoc2=value;}
}
[Description("Phone1"),Category("LockInfo"),]public string Phone1
{
get{return m_UserPhone1;}
set{m_UserPhone1=value;}
}
[Description("Phone2"),Category("LockInfo"),]public string Phone2
{
get{return m_UserPhone2;}
set{m_UserPhone2=value;}
}
[Description("LockPath"),Category("LockInfo"),]public string Path
{
get{return m_Path;}
set{m_Path=value;}
}
[Description("FailureReason"),Category("LockInfo"),]public string FailureReason
{
get{return m_FailureReason;}
set{m_FailureReason=value;}
}
[Description("Why"),Category("Reason"),]public string Why
{
get{return m_Why;}
set{m_Why=value;}
}
[Description("WhyDate"),Category("Reason"),]public DateTime WhyDT
{
get{return m_DT;}
set{m_DT=value;}
}
[Description("LockStatus"), Category("LockInfo"),]public VENetwork.Status LockStatus
{
get{return m_Status;}
set{m_Status=value;}
}
[Description("LockType"),Category("LockInfo"),]public VENetwork.LockTypes LockType
{
get{return m_Type;}
set{m_Type=value;}
}
private bool WriteToLockFile()
{
FileStream fs = null;
BinaryWriter bw = null;
try
{
// set the user data
m_UserNetworkID = curUserData.UserNetworkID;
m_UserName = curUserData.UserName;
m_UserPhone1 = curUserData.UserPhone1;
m_UserPhone2 = curUserData.UserPhone2;
m_UserLoc1 = curUserData.UserLoc1;
m_UserLoc2 = curUserData.UserLoc2;
m_UserShell = curUserData.UserShell;
m_UserProcess = curUserData.UserProcess;
// A reason was entered. Create the file with user's data
fs = new FileStream(m_Path,FileMode.CreateNew,FileAccess.ReadWrite,FileShare.None);
bw = new BinaryWriter(fs);
byte tmp=(byte)Utils.UserCStatus.PRACTIVE; // status
bw.Write(tmp);
char [] xbuf = new char[9];
xbuf = m_UserNetworkID.PadRight(9,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[31];
xbuf = m_UserName.PadRight(31,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[16];
xbuf = m_UserPhone1.PadRight(16,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[16];
xbuf = m_UserPhone2.PadRight(16,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[31];
xbuf = m_UserLoc1.PadRight(31,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[31];
xbuf = m_UserLoc2.PadRight(31,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[2];
xbuf = m_UserShell.PadRight(2,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[3];
xbuf = m_UserProcess.PadRight(3,'\0').ToCharArray();
bw.Write(xbuf);
xbuf = new char[60];
xbuf = m_Why.PadRight(60,'\0').ToCharArray();
bw.Write(xbuf);
bw.Close();
fs.Close();
}
catch (Exception e)
{
MessageBox.Show(e.Message,"Could not set a lock at this time.");
if (bw!=null) bw.Close();
if (fs!=null) fs.Close();
if (File.Exists(m_Path)) File.Delete(m_Path);
return false;
}
return true;
}
private bool CreateLockFileNoPrompt(VEConnection veconn)
{
HasActiveUsers = veconn.HasActiveUsers();
if (HasActiveUsers) return false;
if (File.Exists(m_Path)==true) return false;
// a string should be passed in with the reason, but this was
// added to fix an approval bug & will have to do for now.
m_Why = "Approval";
WriteToLockFile();
return true;
}
// Create the lock file.
private bool CreateLockFile(VEConnection veconn)
{
// check for active users. if we have them, we can only create a pending lock
HasActiveUsers = veconn.HasActiveUsers();
if (HasActiveUsers)
{
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;
// Displays the MessageBox.
result = MessageBox.Show("There are other users in the system, a pending lock will be used until other users are no longer in the system. Do you want this type of lock?", "Ve-PROMS Pending Lock", buttons);
if(result == DialogResult.No)
{
return false;
}
}
// if one exists, can't do it.
if (File.Exists(m_Path)==false)
{
// Get user's reason for creating lock & make the file based on
// user's configuration data (UserData read in from the user's environment.)
LockDlg dlg = new LockDlg(this);
dlg.ShowDialog();
if (dlg.DialogResult == DialogResult.OK && (Why != null && Why !=""))
{
m_Why = Why;
WriteToLockFile();
}
else if (dlg.DialogResult != DialogResult.Cancel)
{
MessageBox.Show("You must enter a message to perform a lock.","VE-PROMS");
return false;
}
return true;
}
return false;
}
// Read in lock information & Determine lock status based on information
private void LoadLockProperties()
{
FileStream fs = null;
BinaryReader br = null;
if (File.Exists(m_Path))
{
VlnSpinner spin = new VlnSpinner(2,25,"- Getting Lock Info for ",m_Path,true,true,false);
while(spin.SpinnerWait(fs!=null))
{
try
{
this.m_DT = File.GetCreationTime(m_Path);
fs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.Read);
br = new BinaryReader(fs);
byte tmp;
tmp = br.ReadByte();
m_UserNetworkID = new string(br.ReadChars(9)).Replace('\0',' ').Trim();
m_UserName = new string(br.ReadChars(31)).Replace('\0',' ').Trim();
m_UserPhone1 = new string(br.ReadChars(16)).Replace('\0',' ').Trim();
m_UserPhone2 = new string(br.ReadChars(16)).Replace('\0',' ').Trim();
m_UserLoc1 = new string(br.ReadChars(31)).Replace('\0',' ').Trim();
m_UserLoc2 = new string(br.ReadChars(31)).Replace('\0',' ').Trim();
m_UserShell = new string(br.ReadChars(2)).Replace('\0',' ').Trim();
m_UserProcess = new string(br.ReadChars(3)).Replace('\0',' ').Trim();
m_Why = new string(br.ReadChars(60)).Replace('\0',' ').Trim();
br.Close();
fs.Close();
}
catch (Exception e)
{
MessageBox.Show(e.Message, "Could not read locking information");
br.Close();
fs.Close();
fs = null;
}
// if owned by me, it's a pending lock, i.e. I set to lock it, but
// someone else may be in. This gets reset when the dat file is
// connected to (if a lock exists).
if (curUserData.UserName == m_UserName)
m_Status = Status.LockPending;
else
m_Status = Status.LockedByOther;
}
spin.Dispose();
}
else
m_Status = Status.NoLock;
}
// this method unlocks by deleting the lock file & reloading properties
public bool UnLock(bool doprompt)
{
if (m_Status!=Status.Locked && m_Status!=Status.LockPending) return true;
if (doprompt)
{
string [] msg = {"System", "Plant", "Procedure Set"};
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result;
result = MessageBox.Show("Are you sure you want to release your "+msg[(int)this.m_Type-1]+ " lock?", "Ve-PROMS Lock Removal", buttons);
if(result == DialogResult.No)
{
return false;
}
}
if (File.Exists(m_Path))
{
VlnSpinner spin = new VlnSpinner(2,25,"- Unlinking ",m_Path,true,true,false);
while(spin.SpinnerWait(!File.Exists(m_Path)))
{
File.Delete(m_Path);
}
spin.Dispose();
}
LoadLockProperties();
return true;
}
// refresh reloads the lock properties (if I didn't lock it-if I locked it, they
// won't change).
public void Refresh()
{
LoadLockProperties();
}
}
}

View File

@@ -0,0 +1,172 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{01986CD0-4C52-4592-881D-0502FCF55A46}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "VENetwork"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "VENetwork"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "Utils"
AssemblyName = "Utils"
HintPath = "..\..\..\Ve-proms.net\BIN\Utils.dll"
Private = "False"
/>
<Reference
Name = "VlnStatus"
AssemblyName = "VlnStatus"
HintPath = "..\..\..\Ve-proms.net\BIN\VlnStatus.dll"
Private = "False"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "LockDlg.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "LockDlg.resx"
DependentUpon = "LockDlg.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "LockInfoDlg.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "LockInfoDlg.resx"
DependentUpon = "LockInfoDlg.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "LockRlsDlg.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "LockRlsDlg.resx"
DependentUpon = "LockRlsDlg.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "MonUsrDlg.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "MonUsrDlg.resx"
DependentUpon = "MonUsrDlg.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "VEConn.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "VELock.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "VETempFile.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VENetwork", "VENetwork.csproj", "{01986CD0-4C52-4592-881D-0502FCF55A46}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{01986CD0-4C52-4592-881D-0502FCF55A46}.Debug.ActiveCfg = Debug|.NET
{01986CD0-4C52-4592-881D-0502FCF55A46}.Debug.Build.0 = Debug|.NET
{01986CD0-4C52-4592-881D-0502FCF55A46}.Release.ActiveCfg = Release|.NET
{01986CD0-4C52-4592-881D-0502FCF55A46}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,199 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VETempFile.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:45a $
*
* $History: VETempFile.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:45a
* Created in $/LibSource/VENetwork
*********************************************************************************************/
using System;
using System.IO;
using System.Windows.Forms;
namespace VENetwork
{
// this class manages the temps directory for multi-user support in ve-proms.
// The temps directory is used to handle a user's temporary files in support of
// printing, etc.
public class VETempFile
{
public string TemporaryDirectoryName;
private string TemporaryFileName;
public string TempNum;
FileStream tmpFs;
private string CurrentDir;
public VETempFile(string cd)
{
CurrentDir = cd;
tmpFs=null;
}
~ VETempFile()
{
CloseTempProc();
}
// Converts the userid, num & PorD (characters 'P' or 'D') into a file-
// name to be used for temporary file support. This creates the file-
// name. The userid is extended to 8 characters with '_'s.
public string MakeTempName(string userid, string num, char PorD)
{
// first, make the temp directory, i.e. temps, if it doesn't
// exist.
DirectoryInfo di = new DirectoryInfo(CurrentDir + "temps");
if (!di.Exists) di.Create();
string tmpuid = userid.PadRight(8,'_');
string tpath = "temps" + "\\" + tmpuid + "." + PorD.ToString() + num;
return tpath;
}
// This method truncates the temp file (user___.P##) and then closes it.
public void CloseTempProc()
{
if(tmpFs!=null)
{
try
{
// if called from a destructor, the file may have been closed - reopen
// it if we can't write
if (tmpFs.CanWrite==false)
{
tmpFs=null;
tmpFs = new FileStream(TemporaryFileName,FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.None);
}
tmpFs.Seek(0L,SeekOrigin.Begin);
tmpFs.SetLength(0L); // truncate the file
tmpFs.Close();
tmpFs=null;
TemporaryDirectoryName=null;
}
catch (Exception e)
{
MessageBox.Show(e.Message,this.TemporaryDirectoryName);
}
}
}
// make all subdirectories, if not exist
private void MakeAllNecessaryDirectories(string path)
{
if (Directory.Exists(CurrentDir + path)) return;
// Create the directory, and any subdirectories
DirectoryInfo di = Directory.CreateDirectory(CurrentDir + path);
}
// sets class variables based on input.
private void SetUpTempDir(string userid, string num)
{
string TempPath = MakeTempName(userid,num,'D');
MakeAllNecessaryDirectories(TempPath);
TemporaryDirectoryName = TempPath + "\\";
}
// This method attempts to attach to the specified temp file.
// Userid and num are combined to create a process name and
// TempPathDirectory. If the file is successfully opened and
// a connection is established, a byte count matching the process
// number is written to the file and the file is held open. (This
// byte count is actually written in the connection logic,
// veconn.cs, after a connection is successfully made.)
public bool AttachSpecificTemp(string userid, string num)
{
// if already open, close.
CloseTempProc();
string pname = CurrentDir + MakeTempName(userid,num,'P');
// check to see if this user can use the file, i.e. open
// exclusively.
try
{
tmpFs = new FileStream(pname,FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.None);
}
catch
{
return false;
}
TemporaryFileName = pname;
TempNum = num;
SetUpTempDir(userid,num);
return true;
}
// if len is !0, try to delete files of the specified length.
// zero length files are normally in transition and will be
// deleted by their owners.
public void DeleteFiles(string tmp, int len)
{
DirectoryInfo di = new DirectoryInfo(Directory.GetCurrentDirectory());
FileInfo [] fis = di.GetFiles(tmp);
foreach (FileInfo fi in fis)
{
if (len==0 || len==fi.Length) fi.Delete();
}
}
// find the next available temp directory for a given userid.
public bool FindAvailableTempDir(string userid)
{
// first look for existing temp files for this user to see if any
// can be used.
int i;
string ptmp = MakeTempName(userid,"*",'P'); // create a template
// check to see if any exist.
DirectoryInfo di = new DirectoryInfo(CurrentDir);
FileInfo [] fis = di.GetFiles(ptmp);
for (i=0;i<fis.Length;i++)
{
FileInfo fi = fis[i];
string ptr = fi.Name.Substring(fi.Name.IndexOf(".")+2);
if (AttachSpecificTemp(userid,ptr))
{
if (fi.Length>0)
{
// this was left from a reboot or something.
// delete ownership and wrq files of the
// specified size. Check to see if it is
// consistent with the process file first.
DeleteFiles("*.own",(int)fi.Length);
DeleteFiles("*.wrq",(int)fi.Length);
}
return true;
}
}
fis = null;
// Couldn't use an existing one, find a new one.
for (i=0;i<99;i++)
if (AttachSpecificTemp(userid,i.ToString("d2"))) return true;
// if the user got this far, something's wrong - report error & exit.
MessageBox.Show("Too many temporary process files for user.","VE-PROMS error");
return false;
}
// this method writes out the requested number of bytes to the file.
public void WriteBytes(int num)
{
if (tmpFs != null)
{
while (num>0)
{
tmpFs.WriteByte((byte)'x');
num--;
}
tmpFs.Flush();
}
}
}
}

View File

@@ -0,0 +1,549 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ARProperties.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 8/20/04 4:45p $
*
* $History: ARProperties.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 8/20/04 Time: 4:45p
* Updated in $/LibSource/VEObject
* fixed cancel of archive selected procedures
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:52a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.IO;
using System.Drawing;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text;
using System.Data;
using VDB_Set;
using Utils;
namespace VEObject
{
/// <summary>
/// NOTE: cmbType (the combo box that contains the document types) must match
/// the order of document types given in the ArchiveTypeOptions for this dialog
/// to work correctly
/// </summary>
public class ARProperties : System.Windows.Forms.Form
{
private System.Windows.Forms.PropertyGrid myPropertyGrid;
private System.Windows.Forms.ComboBox cmbType;
private System.Windows.Forms.Label lblType;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnApply;
private VEO_Base _ParentObj;
private VEO_Base _CurObj;
private bool isnew;
private bool glbCancel;
private bool zipInCurProcSet;
private bool hasInvalidEntry;
private string strCurZipPath;
private string strZipFileName;
private string strFilesToArchive;
private string strZipFileExcludeList;
private string strProcSetDir;
private ZipFuncs ZipFile;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ARProperties(Object parent, Object curobj)
{
//
// Required for Windows Form Designer support
//
_ParentObj = (VEO_Base) parent;
_CurObj = (VEO_Base) curobj;
VEO_Archive tmpArc = (VEO_Archive)curobj;
if (tmpArc.isnew == true)
isnew=true;
else
isnew=false;
InitializeComponent();
this.myPropertyGrid.SelectedObject=curobj;
strCurZipPath = _ParentObj._Location;
strProcSetDir = _ParentObj._Location;
// If new, combo box should have 'Full'
this.cmbType.Visible=false;
this.btnApply.Enabled=false;
glbCancel = false;
zipInCurProcSet = true;
if (isnew == true)
{
this.btnApply.Visible = false;
SetupNewFileName();
ZipFile = new ZipFuncs();
// Since this a new Zip File, don't assign ZipFile with the path/name,
// Title, or Comment. These values can be changed prior to the
// actual creation of the Zip file.
}
else
{
VEO_Archive arc = (VEO_Archive)curobj;
ZipFile = new ZipFuncs(arc._Location);
GetCommentInformation();
this.cmbType.SelectedIndex = (int) arc._ArchiveType;
}
}
private void SetupNewFileName()
{
int i=0;
StringBuilder newname = new StringBuilder();
VEO_Archive arc = (VEO_Archive) _CurObj;
// The old VE-PROMS logic would create SOURCE.ZIP for
// the first archive, then ARCH_xxx.ZIP for the rest.
// Now we will just create ARCH_xxx.ZIP
while(i==0 || arc.Exists(strCurZipPath + "\\" + newname.ToString()))
{
newname.Remove(0,newname.Length);
newname.Append("ARCH_");
newname.Append(i.ToString("d3"));
newname.Append(".ZIP");
i++;
}
strZipFileName = newname.ToString();
_CurObj._Location = strCurZipPath + "\\" + strZipFileName;
_CurObj._Title = "New Archive " + newname.ToString();
this.myPropertyGrid.SelectedObject=_CurObj;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ARProperties));
this.myPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.cmbType = new System.Windows.Forms.ComboBox();
this.lblType = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnApply = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// myPropertyGrid
//
this.myPropertyGrid.CommandsVisibleIfAvailable = true;
this.myPropertyGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.myPropertyGrid.HelpVisible = false;
this.myPropertyGrid.LargeButtons = false;
this.myPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.myPropertyGrid.Location = new System.Drawing.Point(0, 48);
this.myPropertyGrid.Name = "myPropertyGrid";
this.myPropertyGrid.Size = new System.Drawing.Size(736, 112);
this.myPropertyGrid.TabIndex = 2;
this.myPropertyGrid.Text = "Properties";
this.myPropertyGrid.ToolbarVisible = false;
this.myPropertyGrid.ViewBackColor = System.Drawing.SystemColors.Window;
this.myPropertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText;
this.myPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.myPropertyGrid_PropertyValueChanged);
//
// cmbType
//
this.cmbType.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.cmbType.Items.AddRange(new object[] {
"Full",
"Partial"});
this.cmbType.Location = new System.Drawing.Point(104, 0);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(208, 24);
this.cmbType.TabIndex = 3;
this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
//
// lblType
//
this.lblType.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblType.Location = new System.Drawing.Point(0, 0);
this.lblType.Name = "lblType";
this.lblType.Size = new System.Drawing.Size(96, 24);
this.lblType.TabIndex = 4;
this.lblType.Text = "Archive Type:";
this.lblType.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(432, 200);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(64, 24);
this.btnOK.TabIndex = 8;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(512, 200);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(64, 24);
this.btnCancel.TabIndex = 9;
this.btnCancel.Text = "Cancel";
this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnApply
//
this.btnApply.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnApply.Location = new System.Drawing.Point(592, 200);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(56, 24);
this.btnApply.TabIndex = 10;
this.btnApply.Text = "Apply";
this.btnApply.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// ARProperties
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CausesValidation = false;
this.ClientSize = new System.Drawing.Size(736, 246);
this.Controls.Add(this.btnApply);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lblType);
this.Controls.Add(this.cmbType);
this.Controls.Add(this.myPropertyGrid);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ARProperties";
this.Text = "Archive Properties";
this.ResumeLayout(false);
}
#endregion
private void cmbType_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
// save was clicked, use the objects save methods.
private void btnOK_Click(object sender, System.EventArgs e)
{
btnApply_Click(sender,e);
if (hasInvalidEntry)
{
DialogResult = DialogResult.None;
return; // keep the dialog open
}
if (!glbCancel)
DialogResult=DialogResult.OK;
else
DialogResult=DialogResult.Cancel;
this.Close();
}
// Apply changes
private void btnApply_Click(object sender, System.EventArgs e)
{
bool success = true;
if (!ValidatePropertyEntries()) // check the entry fields
{
return; // has invalid data in a property field
}
if (isnew)
{
if(_ParentObj==null)
{
DialogResult=DialogResult.Cancel;
return;
}
// generate new zip file
success = GenerateArchiveFile();
if (success)
{
// save the property values
success=_CurObj.Write();
}
}
else // update existing ZipFile's Comment Field
{
success=_CurObj.Write();
if (success)
success = AddCommentInformation();
}
// if not successful with the archive, set the cancel
// flag so that a false tree item does not appear.
// Note that when archiving outside of the current directory,
// (for example to a floppy disk), success is set to false to
// prevent a false tree item.
glbCancel = !success;
btnApply.Enabled=false;
}
private bool SelectProcsToArchive()
{
StringCollection SelectedFilesToArchive;
bool isfirst = true;
bool rtnval = false;
ProcedureSelectionList ProcList = new ProcedureSelectionList();
vdb_Set vdbSet=new vdb_Set(strProcSetDir + "\\SET.DBF");
// Loop thru the procset (process like a dataset)
DataTable tbl = vdbSet.DB_Data.Tables[0];
foreach (DataRow row in tbl.Rows)
{
// skip the first one (it's always a "blank" record)
if (isfirst)
isfirst = false;
else
{
ProcList.Add(row);
}
}
if (ProcList.ShowDialog() == DialogResult.OK)
{
StringBuilder tmpstr = new StringBuilder();
string strZipPath = "\"" + strProcSetDir + "\\";
// get list of procedures to archive
// Note that there is no file extension in this list of dBase files
SelectedFilesToArchive = ProcList.GetListOfSelectedProcs_Files();
for(int j=0; j<SelectedFilesToArchive.Count; j++)
{
string tstr = SelectedFilesToArchive[j];
tmpstr.Append(strZipPath);
tmpstr.Append(tstr);
tmpstr.Append(".*\" ");
}
// add needed supporing files
tmpstr.Append(strZipPath);
tmpstr.Append("SET*.*\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("PROC.INI\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("CURSET.DAT\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("USA*.*\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("TRAN*.*\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("XT*.*\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("DOC_*.LIB\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("RO.FST\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("TITLE\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("*.LNK\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("RTFFILES\\*.*\" ");
tmpstr.Append(strZipPath);
tmpstr.Append("TEMPS\\*.*\"");
strFilesToArchive = tmpstr.ToString();
if (SelectedFilesToArchive.Count > 0)
rtnval = true;
}
return rtnval;
}
// This function generates a new zip file
private bool GenerateArchiveFile()
{
bool rtnval = true;
StringBuilder cmntTxt = new StringBuilder();
VEO_Archive arc = (VEO_Archive) _CurObj;
this.glbCancel = false;
if (arc._ArchiveType == VEO_Base.ArchiveTypeOptions.Partial)
{
// get list of selected procedures to archive
rtnval = SelectProcsToArchive();
}
else
{
// Archive entire procedure directory
strFilesToArchive = "\"" + strProcSetDir + "\\*.*\"";
}
if (rtnval)
{
strZipFileExcludeList = "\"" + strProcSetDir + "\\Approved\\*.*\" \"" + strProcSetDir + "\\Temps\\*.*\" *.zip process.dat ?process.dat *.lck";
// Setup DynaZip
ZipFile.strZipPathAndFile = arc.Location;
ZipFile.strZipFileExcludeList = strZipFileExcludeList;
ZipFile.strFilesToArchive = strFilesToArchive;
ZipFile.strArcTitle = arc.Description;
ZipFile.strComment = arc.Comment;
ZipFile.ArchiveType = (int)arc._ArchiveType;
this.Enabled = false;
rtnval = ZipFile.CreateNewZipFile();
this.Enabled = true;
}
return rtnval;
}
private bool AddCommentInformation()
{
VEO_Archive arc = (VEO_Archive) _CurObj;
// add comment
ZipFile.strArcTitle = arc.Description;
ZipFile.ArchiveType = (int)arc._ArchiveType;
ZipFile.strComment = arc.Comment;
return ZipFile.AddZipCommentInformation();
}
private void GetCommentInformation()
{
this.glbCancel = false;
VEO_Archive arc = (VEO_Archive) _CurObj;
if (ZipFile.strArcTitle == null)
arc.Description = arc._Title;
else
arc.Description = ZipFile.strArcTitle;
arc.Comment = ZipFile.strComment;
if (ZipFile.ArchiveType == (int)VEO_Base.ArchiveTypeOptions.Full)
arc.ArchiveType = VEO_Base.ArchiveTypeOptions.Full;
else
arc.ArchiveType = VEO_Base.ArchiveTypeOptions.Partial;
arc.Write();
return;
}
private void myPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
{
btnApply.Enabled = true;
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
this.glbCancel = true;
}
/*
* Check the property fields for invalid entries
* If an invalid entry is found, display a message and
* return to the property dialog
*/
private bool ValidatePropertyEntries()
{
VEO_Archive arc = (VEO_Archive) _CurObj;
hasInvalidEntry = false;
// Check the zip file path and filename
if (!IsAValidZipFileLocation())
{
hasInvalidEntry = true;
return false; // data in fields are not valid
}
if (zipInCurProcSet && (arc.Description == null || arc.Description.Equals("")))
{
// put in a default title
arc.Description = "Archive: " + strZipFileName;
}
return (true); // data in fields are valid
}
/*
* Check the zip file name and path.
* Display message box to notify user of invalid entry.
* Assign local strArchive variables accordingly.
*/
private bool IsAValidZipFileLocation()
{
string strArchiveLocation;
string strCurDirSave;
VEO_Archive arc = (VEO_Archive) _CurObj;
strArchiveLocation = arc._Location;
// Check for a cleared out location field
if (arc._Location == null || arc._Location.Equals(""))
{
MessageBox.Show("Need to Enter the Archive Location and File Name","Archive Error");
return false;
}
string strTmp = strArchiveLocation.ToUpper();
// Check for a zip extension
if (!strTmp.EndsWith(".ZIP"))
{
MessageBox.Show("Need to enter the Archive File Name","Archive Error");
return false;
}
// make sure the current working directory is the current procedure set
strCurDirSave = Directory.GetCurrentDirectory();
Directory.SetCurrentDirectory(strProcSetDir);
// Get the full path based on the user entry
strArchiveLocation = Path.GetFullPath(strArchiveLocation);
if (!strArchiveLocation.Equals(arc._Location))
{
if (strArchiveLocation == null || strArchiveLocation.Equals(""))
{
MessageBox.Show("Invalid Archive File Name or File Path","Archive Error");
// reset the current working directory
Directory.SetCurrentDirectory(strCurDirSave);
return false;
}
arc._Location = strArchiveLocation;
}
// parse out the file name
strZipFileName = Path.GetFileName(strArchiveLocation);
// parse out the path
strCurZipPath = strArchiveLocation.Substring(0,strArchiveLocation.LastIndexOf(strZipFileName)-1);
// If the zip file path is not the same as the current working directory
// then flag the fact we are creating a zip file outside the procedure directory.
zipInCurProcSet = Directory.Equals(Directory.GetCurrentDirectory(),strCurZipPath);
// reset the current working directory
Directory.SetCurrentDirectory(strCurDirSave);
return true;
}
}
}

View File

@@ -0,0 +1,201 @@
<?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="myPropertyGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="myPropertyGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myPropertyGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbType.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblType.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnApply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.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.Name">
<value>ARProperties</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.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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,293 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: AppConflict.cs $ $Revision: 4 $
* $Author: Kathy $ $Date: 8/16/05 2:55p $
*
* $History: AppConflict.cs $
*
* ***************** Version 4 *****************
* User: Kathy Date: 8/16/05 Time: 2:55p
* Updated in $/LibSource/VEObject
* B2005-030: error if missing ndx
*
* ***************** Version 3 *****************
* User: Jsj Date: 6/02/05 Time: 11:32a
* Updated in $/LibSource/VEObject
* fix for approving with conditional ROs
*
* ***************** Version 2 *****************
* User: Kathy Date: 3/22/05 Time: 10:01a
* Updated in $/LibSource/VEObject
* Add procnum to transition message
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:50p
* Created in $/LibSource/VEObject
* Approval
*********************************************************************************************/
using System;
using System.Text;
using System.Collections.Specialized;
namespace VEObject
{
/// <summary>
/// Summary description for AppConflict.
/// </summary>
public enum AppConflictTypes
{
RO=0, Trans=1, LibDoc=2
};
public class AppConflict
{
public AppConflictTypes CType;
public string ProcNum;
public string SeqNum;
public VEO_DummySet DummySet;
public AppConflict()
{
}
public string GetLocStr(string pnum, string snum)
{
string locstr=null;
string secnumtitle = DummySet.GetSectionNumAndTitle(pnum,snum);
if (snum.Length>1)
{
char tmp = System.Convert.ToChar(snum.Substring(1,1));
string stpnum = System.Convert.ToString(tmp-'0');
locstr = secnumtitle + " Step " + stpnum;
}
else
locstr = secnumtitle;
return locstr;
}
public virtual StringCollection GetStrForDlg()
{
return null;
}
public virtual string GetStrForEdit()
{
return null;
}
}
public class AppROConflict : AppConflict
{
public string ROID;
public string AccID;
public bool IsImage;
public string Val1, Val2;
public AppROConflict(VEO_DummySet ds, string rid, string pnum, string snum, bool image, string v1, string v2)
{
CType = AppConflictTypes.RO;
ROID = rid;
DummySet = ds;
ProcNum = pnum;
SeqNum = snum;
IsImage=image;
Val1=v1; //if image, this will contain image file path
Val2=v2;
if (Val1==null) Val1=" not defined ";
if (Val2==null) Val2=" not defined ";
}
public override string GetStrForEdit()
{
// For ROs:
// reference line is trimmed to 100 chars & consists of...
// 12 chars - sequence number where RO is used
// 20 chars - procedure number where RO is used
// 88 chars - menu item text, i.e. what's shown on dialog.
StringBuilder sb = new StringBuilder(125);
sb.Append(SeqNum.PadRight(12,' '));
sb.Append(ProcNum.PadRight(20,' '));
string locstr = GetLocStr(ProcNum,SeqNum);
string tmp=null;
if (IsImage)
tmp = "RO: Image File Difference: " + Val1.Replace("\n"," ") + " used in " + locstr;
else
tmp = "RO: New Value = " + Val1.Replace("\n"," ") + " Old Value = " + Val2.Replace("\n"," ") + " used in " + locstr;
int len = tmp.Length;
if (len==88)
sb.Append(tmp);
else if (len > 88)
sb.Append(tmp.Substring(0,88));
else
sb.Append(tmp.PadRight(88,' '));
return sb.ToString();
}
public override StringCollection GetStrForDlg()
{
StringCollection retstrs = new StringCollection();
StringBuilder sb = new StringBuilder();
string retstr;
string locstr = GetLocStr(ProcNum,SeqNum);
if (IsImage)
{
sb.Append(" RO Image File Difference At: ");
sb.Append(locstr);
retstrs.Add(sb.ToString());
sb.Remove(0,sb.Length);
sb.Append(" RO Value: ");
sb.Append(Val1);
retstrs.Add(sb.ToString());
}
else
{
int nlptr = -1;
int idx = 0;
sb.Append(" RO Difference At: ");
sb.Append(locstr);
retstrs.Add(sb.ToString());
sb.Remove(0,sb.Length);
sb.Append(" New Value = ");
nlptr = Val1.IndexOf("\n");
while (nlptr > -1)
{
sb.Append(Val1.Substring(idx,nlptr-idx));
retstrs.Add(sb.ToString());
sb.Remove(0,sb.Length);
idx = nlptr+1;
nlptr = Val1.IndexOf("\n",idx);
sb.Append(" ");
}
sb.Append(Val1.Substring(idx));
retstrs.Add(sb.ToString());
sb.Remove(0,sb.Length);
sb.Append(" Old Value = ");
idx = 0;
nlptr = Val2.IndexOf("\n");
while (nlptr > -1)
{
sb.Append(Val2.Substring(idx,nlptr-idx));
retstrs.Add(sb.ToString());
sb.Remove(0,sb.Length);
idx = nlptr+1;
nlptr = Val2.IndexOf("\n",idx);
sb.Append(" ");
}
sb.Append(Val2.Substring(idx));
retstrs.Add(sb.ToString());
}
return retstrs;
}
}
public class AppTransConflict : AppConflict
{
public string ToNum;
public string ToSeq;
public string OldTo;
public AppTransConflict(VEO_DummySet ds, string pnum, string snum, string tpnum, string tsnum, string old)
{
CType = AppConflictTypes.Trans;
DummySet = ds;
ProcNum = pnum;
SeqNum = snum;
ToNum=tpnum;
ToSeq=tsnum;
OldTo = old;
}
public override StringCollection GetStrForDlg()
{
StringCollection retstrs = new StringCollection();
StringBuilder sb = new StringBuilder();
sb.Append(" Transition: From = ");
sb.Append(ProcNum);
sb.Append(" ");
sb.Append(GetLocStr(ProcNum,SeqNum));
retstrs.Add(sb.ToString());
sb.Remove(0,sb.Length);
sb.Append(" To = ");
sb.Append(ToNum);
sb.Append(" ");
sb.Append(GetLocStr(ToNum,ToSeq));
retstrs.Add(sb.ToString());
return retstrs;
}
public override string GetStrForEdit()
{
// For Trans:
// reference line is trimmed to 100 chars & consists of...
// 12 chars - sequence number where Tran is used
// 20 chars - procedure number where Tran is used
// 88 chars - menu item text, i.e. what's shown on dialog.
StringBuilder sb = new StringBuilder(125);
sb.Append(SeqNum.PadRight(12,' '));
sb.Append(ProcNum.PadRight(20,' '));
string tmp = "Transition: To = " + " " + GetLocStr(ToNum,ToSeq);
int len = tmp.Length;
if (len==88)
sb.Append(tmp);
else if (len > 88)
sb.Append(tmp.Substring(0,88));
else
sb.Append(tmp.PadRight(88,' '));
return sb.ToString();
}
}
public class AppLibDocConflict : AppConflict
{
public string LibDocName;
public AppLibDocConflict(VEO_DummySet ds, string pnum, string seq, string Lname)
{
CType = AppConflictTypes.LibDoc;
DummySet = ds;
ProcNum = pnum;
SeqNum = seq;
LibDocName = Lname;
}
public override StringCollection GetStrForDlg()
{
StringCollection retstrs = new StringCollection();
StringBuilder sb = new StringBuilder();
sb.Append(" Library Doc = ");
sb.Append(LibDocName);
sb.Append(" used in ");
sb.Append(GetLocStr(ProcNum,SeqNum));
retstrs.Add(sb.ToString());
return retstrs;
}
public override string GetStrForEdit()
{
// For libdoc:
// reference line is trimmed to 100 chars & consists of...
// 12 chars - sequence number where LibDoc is used
// 20 chars - procedure number where LibDoc is used
// 88 chars - menu item text, i.e. what's shown on dialog.
StringBuilder sb = new StringBuilder(125);
sb.Append(SeqNum.PadRight(12,' '));
sb.Append(ProcNum.PadRight(20,' '));
string tmp = "Library Document: File Name = " + LibDocName + " used in " + GetLocStr(ProcNum,SeqNum);
int len = tmp.Length;
if (len==88)
sb.Append(tmp);
else if (len > 88)
sb.Append(tmp.Substring(0,88));
else
sb.Append(tmp.PadRight(88,' '));
return sb.ToString();
}
}
}

View File

@@ -0,0 +1,76 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: AppIndItm.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 3/08/05 1:50p $
*
* $History: AppIndItm.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:50p
* Created in $/LibSource/VEObject
* Approval
*********************************************************************************************/
using System;
using System.Collections;
namespace VEObject
{
/// <summary>
/// Summary description for AppIndItm.
/// </summary>
public class AppIndItem
{
public VEO_Proc Proc;
public ArrayList ConflictList;
public bool Checked;
public AppIndItem(VEO_Proc prc)
{
Checked=false;
Proc = prc;
ConflictList = new ArrayList();
}
public void AddConflict(AppConflict aconflct)
{
ConflictList.Add(aconflct);
}
}
public class ModLibDoc
{
public string LibFile;
public int status;
public int DocPages;
public ModLibDoc(string file, int stat)
{
LibFile = file;
status=stat;
DocPages=0;
}
}
public class ModRO
{
public string roid;
public bool IsImage;
public string Val1;
public string Val2;
public bool IsUsed;
public ModRO(string r, bool im, string v1, string v2)
{
roid = r;
IsImage = im;
Val1 = v1;
Val2 = v2;
IsUsed=false;
}
}
}

View File

@@ -0,0 +1,235 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ApproveDlg.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 5/17/05 11:55a $
*
* $History: ApproveDlg.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 5/17/05 Time: 11:55a
* Updated in $/LibSource/VEObject
* cleanup
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:50p
* Created in $/LibSource/VEObject
* Approval
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Utils;
namespace VEObject
{
/// <summary>
/// Summary description for ApproveDlg.
/// </summary>
public class ApproveDlg : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox tbApprovalDate;
private System.Windows.Forms.Label lblDate;
private System.Windows.Forms.GroupBox grpCB;
private System.Windows.Forms.RadioButton rbWDKeep;
private System.Windows.Forms.RadioButton rbWDRemove;
private System.Windows.Forms.CheckBox cbZipApp;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.CheckBox cbTmpChg;
public ApprovalOptions ApprovalOptions
{
get
{
ApprovalOptions ao = new ApprovalOptions();
ao.ApproveDate = this.tbApprovalDate.Text;
ao.ChangeBarsWD = this.rbWDKeep.Checked;
ao.DoZip = this.cbZipApp.Checked;
return ao;
}
}
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ApproveDlg()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.tbApprovalDate.Text = DTI.MakeDate(DTI.DateTimeInit,false,false);
this.rbWDRemove.Checked = true;
this.cbZipApp.Checked = true;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ApproveDlg));
this.tbApprovalDate = new System.Windows.Forms.TextBox();
this.lblDate = new System.Windows.Forms.Label();
this.grpCB = new System.Windows.Forms.GroupBox();
this.rbWDRemove = new System.Windows.Forms.RadioButton();
this.rbWDKeep = new System.Windows.Forms.RadioButton();
this.cbZipApp = new System.Windows.Forms.CheckBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.cbTmpChg = new System.Windows.Forms.CheckBox();
this.grpCB.SuspendLayout();
this.SuspendLayout();
//
// tbApprovalDate
//
this.tbApprovalDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.tbApprovalDate.Location = new System.Drawing.Point(221, 9);
this.tbApprovalDate.Name = "tbApprovalDate";
this.tbApprovalDate.Size = new System.Drawing.Size(249, 24);
this.tbApprovalDate.TabIndex = 3;
this.tbApprovalDate.Text = "";
//
// lblDate
//
this.lblDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblDate.Location = new System.Drawing.Point(19, 18);
this.lblDate.Name = "lblDate";
this.lblDate.Size = new System.Drawing.Size(183, 19);
this.lblDate.TabIndex = 2;
this.lblDate.Text = "Approval Date:";
//
// grpCB
//
this.grpCB.Controls.Add(this.rbWDRemove);
this.grpCB.Controls.Add(this.rbWDKeep);
this.grpCB.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.grpCB.Location = new System.Drawing.Point(10, 65);
this.grpCB.Name = "grpCB";
this.grpCB.Size = new System.Drawing.Size(268, 64);
this.grpCB.TabIndex = 4;
this.grpCB.TabStop = false;
this.grpCB.Text = "Change Bars In Working Draft";
//
// rbWDRemove
//
this.rbWDRemove.Location = new System.Drawing.Point(154, 28);
this.rbWDRemove.Name = "rbWDRemove";
this.rbWDRemove.Size = new System.Drawing.Size(86, 27);
this.rbWDRemove.TabIndex = 1;
this.rbWDRemove.Text = "Remove";
//
// rbWDKeep
//
this.rbWDKeep.Location = new System.Drawing.Point(29, 28);
this.rbWDKeep.Name = "rbWDKeep";
this.rbWDKeep.Size = new System.Drawing.Size(77, 27);
this.rbWDKeep.TabIndex = 0;
this.rbWDKeep.Text = "Keep";
//
// cbZipApp
//
this.cbZipApp.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.cbZipApp.Location = new System.Drawing.Point(19, 194);
this.cbZipApp.Name = "cbZipApp";
this.cbZipApp.Size = new System.Drawing.Size(269, 28);
this.cbZipApp.TabIndex = 6;
this.cbZipApp.Text = "Archive Data Before Approval?";
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(96, 240);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(182, 28);
this.btnOK.TabIndex = 7;
this.btnOK.Text = "Continue with Approval";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(307, 240);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(183, 28);
this.btnCancel.TabIndex = 8;
this.btnCancel.Text = "Cancel Approval";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// cbTmpChg
//
this.cbTmpChg.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.cbTmpChg.Location = new System.Drawing.Point(19, 157);
this.cbTmpChg.Name = "cbTmpChg";
this.cbTmpChg.Size = new System.Drawing.Size(317, 28);
this.cbTmpChg.TabIndex = 9;
this.cbTmpChg.Text = "Create A Temporary Change Version?";
//
// ApproveDlg
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(604, 293);
this.Controls.Add(this.cbTmpChg);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.cbZipApp);
this.Controls.Add(this.grpCB);
this.Controls.Add(this.tbApprovalDate);
this.Controls.Add(this.lblDate);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ApproveDlg";
this.Text = "Approval Properties";
this.grpCB.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void btnOK_Click(object sender, System.EventArgs e)
{
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
}
}
public class ApprovalOptions
{
//public string ApproveNameRev;
public string Type;
public string ApproveDate;
public bool ChangeBarsWD;
public bool ChangeBarsApp;
public bool DoZip;
}
}

View File

@@ -0,0 +1,237 @@
<?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="tbApprovalDate.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbApprovalDate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbApprovalDate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblDate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblDate.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblDate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="grpCB.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="grpCB.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="grpCB.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="grpCB.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="grpCB.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="grpCB.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="rbWDRemove.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="rbWDRemove.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="rbWDRemove.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="rbWDKeep.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="rbWDKeep.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="rbWDKeep.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbZipApp.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbZipApp.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbZipApp.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbTmpChg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbTmpChg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbTmpChg.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>ApproveDlg</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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,615 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ApproveSelDlg.cs $ $Revision: 9 $
* $Author: Jsj $ $Date: 4/16/07 12:05p $
*
* $History: ApproveSelDlg.cs $
*
* ***************** Version 9 *****************
* User: Jsj Date: 4/16/07 Time: 12:05p
* Updated in $/LibSource/VEObject
* Clear Button needed to clear flag in Modified Lib Doc List
*
* ***************** Version 8 *****************
* User: Jsj Date: 7/21/06 Time: 2:57p
* Updated in $/LibSource/VEObject
* remove duplicates from dependency list
*
* ***************** Version 7 *****************
* User: Kathy Date: 6/21/05 Time: 7:25a
* Updated in $/LibSource/VEObject
* cleanup/bug fixes
*
* ***************** Version 6 *****************
* User: Jsj Date: 6/02/05 Time: 11:33a
* Updated in $/LibSource/VEObject
* fix for approving with conditional ROs
*
* ***************** Version 5 *****************
* User: Jsj Date: 5/17/05 Time: 11:56a
* Updated in $/LibSource/VEObject
* cleanup
*
* ***************** Version 4 *****************
* User: Kathy Date: 4/21/05 Time: 10:21a
* Updated in $/LibSource/VEObject
* print all lines for long line in report
*
* ***************** Version 3 *****************
* User: Kathy Date: 4/12/05 Time: 1:01p
* Updated in $/LibSource/VEObject
*
* ***************** Version 2 *****************
* User: Kathy Date: 3/22/05 Time: 10:02a
* Updated in $/LibSource/VEObject
* log file & edit conflict
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:50p
* Created in $/LibSource/VEObject
* Approval
*********************************************************************************************/
using System;
using System.Drawing;
using System.Drawing.Printing;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using VlnStatus;
using Utils;
namespace VEObject
{
/// <summary>
/// Summary description for ApproveSelDlg.
/// </summary>
public class ApproveSelDlg : System.Windows.Forms.Form
{
private System.Windows.Forms.ListBox listAvail;
private System.Windows.Forms.ListBox listSelect;
private System.Windows.Forms.Label lblAvail;
private System.Windows.Forms.Label lblSelected;
private System.Windows.Forms.Button btnSelect;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnApprove;
private System.Windows.Forms.Button btnResolve;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnRpt;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private VEO_DummySet CurDSet;
private ArrayList AppItems;
private ArrayList ModROs;
private System.Windows.Forms.ListBox listDepend;
private ArrayList ModLibDocs;
public ApproveSelDlg(ArrayList items, VEO_ProcSet curset, ArrayList mros, ArrayList mlibdocs)
{
InitializeComponent();
// procedures are stored off dummyset, which is children[1] always
CurDSet = (VEO_DummySet) curset.Children[1];
AppItems = items;
ModROs = mros;
ModLibDocs = mlibdocs;
SetUpAvailSelectLists();
VlnStatusMessage StatMsgWin = new VlnStatusMessage("Looking for Dependencies...");
StatMsgWin.StatusMessage = "Populating Dependency List";
PopulateDependList();
PopulateLogFile();
StatMsgWin.Dispose();
}
private void SetUpAvailSelectLists()
{
// add the list of procs to the selected list and
// see if there are any more selections made.
foreach (object obj in AppItems)
{
AppIndItem apitm = (AppIndItem) obj;
string UnitSpecPrcNum = ROFST_FILE.ROProcessTools.UnitSpecific(apitm.Proc._Prcnum,0,0,CurDSet.LargestNumber);
listSelect.Items.Add(UnitSpecPrcNum);
}
int cnt=0;
while (cnt < CurDSet.Children.Count)
{
VEO_Proc prc = (VEO_Proc) CurDSet.Children[cnt];
string pnum = ROFST_FILE.ROProcessTools.UnitSpecific(prc._Prcnum,0,0,CurDSet.LargestNumber);
if (!listSelect.Items.Contains(pnum)) listAvail.Items.Add(pnum);
cnt++;
}
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ApproveSelDlg));
this.listAvail = new System.Windows.Forms.ListBox();
this.listSelect = new System.Windows.Forms.ListBox();
this.lblAvail = new System.Windows.Forms.Label();
this.lblSelected = new System.Windows.Forms.Label();
this.btnSelect = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.btnApprove = new System.Windows.Forms.Button();
this.btnResolve = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnRpt = new System.Windows.Forms.Button();
this.listDepend = new System.Windows.Forms.ListBox();
this.SuspendLayout();
//
// listAvail
//
this.listAvail.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.listAvail.ItemHeight = 20;
this.listAvail.Location = new System.Drawing.Point(29, 28);
this.listAvail.Name = "listAvail";
this.listAvail.Size = new System.Drawing.Size(345, 184);
this.listAvail.TabIndex = 0;
//
// listSelect
//
this.listSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.listSelect.ItemHeight = 20;
this.listSelect.Location = new System.Drawing.Point(509, 28);
this.listSelect.Name = "listSelect";
this.listSelect.Size = new System.Drawing.Size(355, 184);
this.listSelect.TabIndex = 1;
//
// lblAvail
//
this.lblAvail.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblAvail.Location = new System.Drawing.Point(29, 8);
this.lblAvail.Name = "lblAvail";
this.lblAvail.Size = new System.Drawing.Size(221, 16);
this.lblAvail.TabIndex = 2;
this.lblAvail.Text = "Available Procedures";
this.lblAvail.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblSelected
//
this.lblSelected.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblSelected.Location = new System.Drawing.Point(509, 8);
this.lblSelected.Name = "lblSelected";
this.lblSelected.Size = new System.Drawing.Size(249, 16);
this.lblSelected.TabIndex = 3;
this.lblSelected.Text = "Selected Procedures";
this.lblSelected.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btnSelect
//
this.btnSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnSelect.Location = new System.Drawing.Point(384, 32);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(120, 40);
this.btnSelect.TabIndex = 4;
this.btnSelect.Text = "Select";
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
//
// btnClear
//
this.btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnClear.Location = new System.Drawing.Point(384, 96);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(120, 40);
this.btnClear.TabIndex = 5;
this.btnClear.Text = "Clear";
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// label1
//
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.Location = new System.Drawing.Point(29, 216);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(187, 18);
this.label1.TabIndex = 7;
this.label1.Text = "Dependencies Report";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btnApprove
//
this.btnApprove.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnApprove.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnApprove.Location = new System.Drawing.Point(56, 616);
this.btnApprove.Name = "btnApprove";
this.btnApprove.Size = new System.Drawing.Size(216, 32);
this.btnApprove.TabIndex = 8;
this.btnApprove.Text = "Continue With Approval";
//
// btnResolve
//
this.btnResolve.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnResolve.Location = new System.Drawing.Point(360, 616);
this.btnResolve.Name = "btnResolve";
this.btnResolve.Size = new System.Drawing.Size(200, 32);
this.btnResolve.TabIndex = 9;
this.btnResolve.Text = "Edit Dependencies";
this.btnResolve.Click += new System.EventHandler(this.btnResolve_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(648, 616);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(192, 32);
this.btnCancel.TabIndex = 10;
this.btnCancel.Text = "Cancel";
//
// btnRpt
//
this.btnRpt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnRpt.Location = new System.Drawing.Point(384, 160);
this.btnRpt.Name = "btnRpt";
this.btnRpt.Size = new System.Drawing.Size(120, 46);
this.btnRpt.TabIndex = 11;
this.btnRpt.Text = "Print Report";
this.btnRpt.Click += new System.EventHandler(this.btnRpt_Click);
//
// listDepend
//
this.listDepend.Font = new System.Drawing.Font("Courier New", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.listDepend.HorizontalScrollbar = true;
this.listDepend.ItemHeight = 16;
this.listDepend.Location = new System.Drawing.Point(29, 240);
this.listDepend.Name = "listDepend";
this.listDepend.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.listDepend.Size = new System.Drawing.Size(835, 356);
this.listDepend.TabIndex = 12;
//
// ApproveSelDlg
//
this.AutoScale = false;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(871, 662);
this.Controls.Add(this.listDepend);
this.Controls.Add(this.btnRpt);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnResolve);
this.Controls.Add(this.btnApprove);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.btnSelect);
this.Controls.Add(this.lblSelected);
this.Controls.Add(this.lblAvail);
this.Controls.Add(this.listSelect);
this.Controls.Add(this.listAvail);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ApproveSelDlg";
this.Text = "Approve Selected Procedures";
this.ResumeLayout(false);
}
#endregion
// if user presses Clear button, clear the selected items list, and
// reset the available to all in procedure set.
private void btnClear_Click(object sender, System.EventArgs e)
{
// reset both lists and will reset available from procedures in set.
listSelect.Items.Clear();
listAvail.Items.Clear();
AppItems.Clear(); // no procedures to approve.
SetUpAvailSelectLists();
listDepend.Items.Clear();
// Bug Fix: B2007-010
// If you don't clear the DocPages, then if you re-select
// the same procedure to approve, it will think that
// the library document check was already done - thus
// no depenencies the second time around.
foreach (ModLibDoc ml in ModLibDocs) ml.DocPages = 0;
}
private bool PopulateEditList()
{
bool hascon = false;
if (AppItems.Count<=0)
{
MessageBox.Show("No conflicts exist","Approve Selected");
return hascon;
}
VlnStatusMessage StatMsgWin = new VlnStatusMessage("Conflict Resolution...");
StatMsgWin.StatusMessage = "Populating Edit List";
// Create the reference file - use apprcon as filename
// get first item in list & use this as the procedure number.
AppIndItem apitm = (AppIndItem) AppItems[0];
string pnum = apitm.Proc._Prcnum;
RefList rl = new RefList(pnum,"apprcon",CurDSet.usrRunTime);
rl.Create();
ArrayList tarry = new ArrayList();
foreach (object obj in AppItems)
{
apitm = (AppIndItem) obj;
foreach (AppConflict ac in apitm.ConflictList)
{
hascon = true;
string strForEdit;
strForEdit = ac.GetStrForEdit();
if (!tarry.Contains(strForEdit))
{
rl.WriteRefLine(strForEdit);
tarry.Add(strForEdit);
}
// rl.WriteRefLine(ac.GetStrForEdit());
}
}
rl.WriteTotalNumRefs();
rl.CloseFile();
StatMsgWin.Dispose();
if (!hascon)
{
MessageBox.Show("No conflicts exist - cannot edit.","Approve Selected");
apitm = (AppIndItem) AppItems[0];
// note that if the following is entered as a single string (rather than
// two strings concatenated) the argument passing changes the string and
// exeadjust does not work correctly - keep as two separate strings.
string fl = apitm.Proc.usrRunTime.ExeAdjust("\xE7" + "apprcon");
if (File.Exists(fl))File.Delete(fl);
return false;
}
return true;
}
private void PopulateDependList()
{
listDepend.Items.Clear();
bool doblank = false;
foreach (object obj in AppItems)
{
AppIndItem apitm = (AppIndItem) obj;
if (doblank) // don't add a blank line the first time.
listDepend.Items.Add(" ");
else
doblank=true;
listDepend.Items.Add("Dependencies in : " + ROFST_FILE.ROProcessTools.UnitSpecific(apitm.Proc._Prcnum,0,0,CurDSet.LargestNumber));
if (apitm.ConflictList.Count==0)
listDepend.Items.Add(" None");
else
{
foreach (AppConflict ac in apitm.ConflictList)
{
StringCollection sc = ac.GetStrForDlg();
foreach (string tmpstr in sc)
{
listDepend.Items.Add(tmpstr);
}
// listDepend.Items.Add(ac.GetStrForDlg());
}
}
}
}
private void PopulateLogFile()
{
using (StreamWriter sw = new StreamWriter("Approval.log", true))
{
sw.Write("APPROVE SELECTED: Conflicts found on ");
sw.Write(DateTime.Now);
sw.WriteLine(" performed by " + DTI.Initials);
foreach (object obj in AppItems)
{
AppIndItem apitm = (AppIndItem) obj;
sw.WriteLine(" Dependencies in : " + ROFST_FILE.ROProcessTools.UnitSpecific(apitm.Proc._Prcnum,0,0,CurDSet.LargestNumber));
if (apitm.ConflictList.Count==0)
sw.WriteLine(" None");
else
{
foreach (AppConflict ac in apitm.ConflictList)
{
sw.WriteLine(ac.GetStrForDlg());
}
}
sw.WriteLine(" ");
}
sw.WriteLine(" ");
}
}
private void btnSelect_Click(object sender, System.EventArgs e)
{
if (listAvail.SelectedIndex<0)
{
MessageBox.Show("You must select an item in the list.");
return;
}
string prc_sel = (string) listAvail.Items[listAvail.SelectedIndex];
VEO_ProcSet ps = (VEO_ProcSet) CurDSet.parentObj;
// find the proc object & add it to the arraylist of procedures to process. Then
// do the individual processing on it.
foreach (Object obj in CurDSet.Children)
{
VEO_Proc prc = (VEO_Proc) obj;
string tst = ROFST_FILE.ROProcessTools.UnitSpecific(prc._Prcnum,0,0,CurDSet.LargestNumber);
if (tst==prc_sel)
{
AppIndItem aii= new AppIndItem(prc);
AppItems.Add(aii);
ps.ProcessInd(AppItems, AppItems.Count-1, ModROs, ModLibDocs);
break;
}
}
int indx=0;
VlnStatusMessage StatMsgWin = null;
while (indx>=0)
{
AppIndItem CurItem = (AppIndItem) AppItems[indx];
if (!CurItem.Checked)
{
if (StatMsgWin==null)StatMsgWin = new VlnStatusMessage("Looking for Dependencies...");
StatMsgWin.StatusMessage = "Checking " + CurItem.Proc._Prcnum;
ps.ProcessInd(AppItems, indx, ModROs, ModLibDocs);
CurItem.Checked=true;
}
indx = -1;
for (int i=0;i<AppItems.Count;i++)
{
CurItem = (AppIndItem) AppItems[i];
if (!CurItem.Checked)
{
indx=i;
break;
}
}
}
listSelect.Items.Clear();
listAvail.Items.Clear();
SetUpAvailSelectLists();
if (StatMsgWin!=null)StatMsgWin.Dispose();
PopulateDependList();
}
private void btnRpt_Click(object sender, System.EventArgs e)
{
if (this.AppItems.Count<=0)
{
MessageBox.Show("No procedures are selected to approve, no items in conflict report.","Approve Selected");
return;
}
new PrintingConflictReport(listDepend);
}
private void btnResolve_Click(object sender, System.EventArgs e)
{
bool haslist = PopulateEditList();
if (haslist)
{
AppIndItem apitm = (AppIndItem) AppItems[0];
VEO_Proc prc = apitm.Proc;
VEO_ProcSet ps = (VEO_ProcSet) CurDSet.parentObj;
ps.AppSelForEdit = prc;
prc.ExecVfw("a");
this.Close();
}
}
}
public class PrintingConflictReport
{
private System.Windows.Forms.ListBox ListToPrint;
private Font printFont;
private int CurLine;
private int PageCnt;
public PrintingConflictReport(System.Windows.Forms.ListBox listDepend)
{
CurLine=0;
PageCnt=0;
ListToPrint = listDepend;
Printing();
}
// The PrintPage event is raised for each page to be printed.
private void pd_PrintPage(object sender, PrintPageEventArgs ev)
{
float linesPerPage = 0;
float yPos = 0;
int count = 0;
PageCnt++;
float leftMargin = ev.MarginBounds.Left;
float topMargin = ev.MarginBounds.Top;
String line=null;
// Calculate the number of lines per page.
linesPerPage = ev.MarginBounds.Height /
printFont.GetHeight(ev.Graphics) ;
Font titleFont = new Font("Courier New", 12, FontStyle.Bold);
line = "Approve Selected Dependency List Report " + DateTime.Now + " Page " + PageCnt.ToString();
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString (line, titleFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
line = " ";
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString (line, printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
// Iterate over the file, printing each line.
while (count < linesPerPage && CurLine <ListToPrint.Items.Count)
{
line = ListToPrint.Items[CurLine].ToString();
SizeF sz = ev.Graphics.MeasureString(line,printFont);
while (sz.Width>ev.MarginBounds.Width&&line.Length>85)
{
// going backwards from 85 chars, find a space to use as the line
// breaking point.
int indx = line.LastIndexOf(" ",84,85);
string sline = line.Substring(0,indx);
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString (sline, printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
line = " " + line.Substring(indx,line.Length-indx);
}
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString (line, printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
CurLine++;
}
// If more lines exist, print another page.
if (CurLine<ListToPrint.Items.Count)
ev.HasMorePages = true;
else
ev.HasMorePages = false;
}
// Print the file.
public void Printing()
{
printFont = new Font("Courier New", 10);
PrintDocument pd = new PrintDocument();
// Set the left and right margins to 1/2 inch.
pd.DefaultPageSettings.Margins.Left = 50;
pd.DefaultPageSettings.Margins.Right = 50;
// Set the top and bottom margins to 3/4 & 1 inch.
pd.DefaultPageSettings.Margins.Top = 75;
pd.DefaultPageSettings.Margins.Bottom = 100;
pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
// Print the document.
pd.Print();
}
}
}

View File

@@ -0,0 +1,255 @@
<?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="listAvail.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listAvail.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="listAvail.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listSelect.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listSelect.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="listSelect.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblAvail.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblAvail.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblAvail.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblSelected.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblSelected.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblSelected.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnSelect.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnSelect.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnSelect.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnClear.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnClear.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnClear.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApprove.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnApprove.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApprove.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnResolve.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnResolve.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnResolve.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnRpt.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnRpt.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnRpt.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listDepend.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listDepend.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="listDepend.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>ApproveSelDlg</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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,406 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: Archive.cs $ $Revision: 3 $
* $Author: Kathy $ $Date: 1/31/05 11:05a $
*
* $History: Archive.cs $
*
* ***************** Version 3 *****************
* User: Kathy Date: 1/31/05 Time: 11:05a
* Updated in $/LibSource/VEObject
* Fix B2005-005 - this just fixed empty icon usage
*
* ***************** Version 2 *****************
* User: Kathy Date: 1/24/05 Time: 2:45p
* Updated in $/LibSource/VEObject
* B2005-004 fixes - icon clean-up
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:52a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.ComponentModel;
using System.IO;
using System.Text;
using Utils;
using System.Collections.Specialized;
namespace VEObject
{
/// <summary>
/// Archive Object.
/// </summary>
public class VEO_Archive: VEO_Base
{
public bool isnew;
// These three strings are stored in the Zip file's
// comment field
private String tmpArchiveTitle;
private String _Comment;
public ArchiveTypeOptions _ArchiveType;
private String tmpComment;
private bool _ReadOnly;
private bool oldReadOnly;
private bool NeedToGetReadOnly;
private bool changeReadOnly;
private bool changeComment;
private bool changeArchiveTitle;
public VEO_Archive(string ipath, VEO_DummyZip dz)
{
iconStates = new int[5] {0,0,0,0,0};
_Location = ipath; // full path to the Zip file
VEObjectType = (int)VEObjectTypesDefs.Archive;
changeReadOnly = false;
changeComment = false;
changeArchiveTitle = false;
NeedToGetReadOnly = true;
isnew = IsThisANewArchive(ipath);
if (isnew)
{
_Title = "New Archive";
_Comment = "Created: " + System.DateTime.Now.ToString();
}
else // get the title and comment from the Zip file
{
GetInfoFromZipComment();
}
LoadLockInfo();
icon = iconStates[(int)Lock.LockStatus];
parentObj = dz;
usrRunTime = dz.usrRunTime;
}
// Read in the Title, Archive Type, and Comment from the Zip file's
// comment field.
private void GetInfoFromZipComment()
{
string tmpstr;
ZipFuncs ZipInfo = new ZipFuncs(_Location);
// just opening the zip file like this will read the zip's comment field
if (ZipInfo.strArcTitle != null)
tmpstr = ZipInfo.strArcTitle.Trim();
else
tmpstr = "";
// if the title is blank, then use the zip file name as the title
if (tmpstr.Length == 0)
this._Title = _Location.Substring(_Location.LastIndexOf("\\")+1);
else
this._Title = tmpstr;
_Comment = ZipInfo.strComment;
if (ZipInfo.ArchiveType == (int)VEO_Base.ArchiveTypeOptions.Full)
_ArchiveType = VEO_Base.ArchiveTypeOptions.Full;
else
_ArchiveType = VEO_Base.ArchiveTypeOptions.Partial;
}
private bool IsThisANewArchive(string arcPath)
{
string tmpstr = arcPath.ToUpper();
return (!tmpstr.EndsWith(".ZIP") || !File.Exists(tmpstr));
}
private string ParseOutZipPath()
{
string zpath = _Location.Substring(0,_Location.LastIndexOf("\\"));
return zpath;
}
// Gets and Sets for the Property Page
[Description("Location"),Category("Archive"),ReadOnly(true)]
public string Location
{
get{return _Location;}
//note: we don't allow them to change the zip file name or path.
}
[Description("Archive Title"),Category("Archive")]public string Description
{
get
{
if (!changeArchiveTitle)
return _Title;
else
return tmpArchiveTitle;
}
set
{
changeArchiveTitle = true;
tmpArchiveTitle = value;
}
}
[Description("Archive Type"),Category("Archive"),ReadOnly(true)]public ArchiveTypeOptions ArchiveType
{
get
{
return _ArchiveType;
}
set
{
_ArchiveType=value;
}
}
[Description("Comment"),Category("Archive")]public string Comment
{ get
{
if (!changeComment)
return _Comment;
else
return tmpComment;
}
set
{
changeComment = true;
tmpComment = value;
}
}
[Description("ReadOnly"),Category("Archive")]public bool ReadOnlyArchiveFile
{
get
{
if (!changeReadOnly && NeedToGetReadOnly)
{
FileAttributes attrib = File.GetAttributes(_Location);
_ReadOnly = (attrib & FileAttributes.ReadOnly) == FileAttributes.ReadOnly;
NeedToGetReadOnly = false;
}
return _ReadOnly;
}
set
{
if (!changeReadOnly) // only save previous value once
oldReadOnly = _ReadOnly;
changeReadOnly = true;
_ReadOnly = value;
}
}
// When the Save Button is pressed on the Property page, this function
// is called.
public override bool Write()
{
if (changeReadOnly)
{
changeReadOnly = false;
NeedToGetReadOnly = true;
FileAttributes attrib = File.GetAttributes(_Location);
if (_ReadOnly != ((attrib & FileAttributes.ReadOnly) == FileAttributes.ReadOnly))
attrib ^= FileAttributes.ReadOnly; //toggle
File.SetAttributes(_Location,attrib);
}
if (changeComment)
{
changeComment = false;
_Comment = tmpComment;
}
if (changeArchiveTitle)
{
changeArchiveTitle = false;
_Title = tmpArchiveTitle;
}
return true;
}
// When the Cancel Button on the Property Page is pressed,
// this function is called.
public override void CancelWrite()
{
if (changeReadOnly)
{
_ReadOnly = oldReadOnly;
}
changeArchiveTitle = false;
changeComment = false;
changeReadOnly = false;
NeedToGetReadOnly = true;
}
public override bool Read(bool dummy)
{
//load archive file list
return true;
}
public override void AddToTree(TreeNode parentnd)
{
}
public override bool Expand(TreeNode parentnd)
{
return true;
}
public override bool PropertiesDlg(Object parent)
{
ARProperties propdlg = new ARProperties(parent, this);
if (propdlg.ShowDialog() == DialogResult.OK) return true;
return false;
}
public bool Exists(string dname)
{
if(dname==null||dname=="") return false;
string archname=null;
// see if this is a pathname, it needs to be for the Exists check.
if (dname.IndexOf("\\") < 0) // it's not a path, prepend the path
archname = _Location + "\\" + dname;
else
archname = dname;
return File.Exists(archname);
}
public override bool mnuAllowNew()
{
return false;
}
public override bool mnuAllowDelete()
{
// VEO_DummyArchive ds = (VEO_DummyArchive) this.parentObj;
// VEO_ProcSet ps = (VEO_ProcSet) ds.parentObj;
// if (ps.isApproved == true) return false;
// if (amILockedByMe()==false) return false;
// if ((ps.accessFlags&Security.DOCMAINT)==Security.DOCMAINT) return true;
return true;
}
public override bool mnuAllowUpdateArch()
{
if (amILockedByMe()==false) return false;
return true;
}
public override bool mnuAllowExtractArch()
{
if (amILockedByMe()==false) return false;
return true;
}
public override bool mnuAllowTestArchive()
{
return true;
}
public override void DoListView(ListView veoListView)
{
ZipFuncs ZipInfo = new ZipFuncs(_Location);
ListViewItem item=null;
veoListView.Columns.Add("Date/Time", 150, HorizontalAlignment.Left);
veoListView.Columns.Add("File", 450, HorizontalAlignment.Left);
StringCollection ZipFileList;
// veoListView.Sorting = SortOrder.Ascending;
ZipFileList = ZipInfo.ZipFileContents();
for (int i=0; i< ZipFileList.Count; i++)
{
string tmpstr = ZipFileList[i].ToString();
int subIdx = tmpstr.IndexOf('!');
item = new ListViewItem(tmpstr.Substring(0,subIdx));
item.SubItems.Add(tmpstr.Substring(subIdx+1));
item.Tag = this;
veoListView.Items.Add(item);
}
AllowListViewSort = true;
}
public override bool Delete()
{
if ((File.GetAttributes(_Location) & System.IO.FileAttributes.ReadOnly) == System.IO.FileAttributes.ReadOnly)
File.SetAttributes(_Location,System.IO.FileAttributes.Normal);
File.Delete(_Location);
// if this is the last zip, then change parent's icon to empty
VEO_DummyZip zip = (VEO_DummyZip) this.parentObj;
if (zip.Children.Count==1) zip.IsEmpty=true; // just this one.
return true;
}
}
// This class is used when creating a new archive
public class VEO_ArchiveN: VEO_Archive
{
public VEO_ArchiveN(string ipath, VEO_DummyZip dz)
: base(ipath, dz)
{
}
[Description("Location"),Category("Archive"),ReadOnly(false),EditorAttribute(typeof(PropSaveFileAsDlg), typeof(System.Drawing.Design.UITypeEditor))]
public new string Location
{
get{return _Location;}
set
{
_Location=value.ToString();
}
}
[Description("Archive Type"),Category("Archive"),ReadOnly(false)]public new ArchiveTypeOptions ArchiveType
{
get
{
return _ArchiveType;
}
set
{
_ArchiveType=value;
}
}
}
/*
* Setup a class that will display the SaveFileAs dialog from the property dialog
* when the "..." is pressed.
*/
public class PropSaveFileAsDlg : System.Drawing.Design.UITypeEditor
{
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
}
public override object EditValue(
System.ComponentModel.ITypeDescriptorContext context,
System.IServiceProvider provider, object value)
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.AddExtension = true;
saveFileDialog1.CheckPathExists = true;
saveFileDialog1.DefaultExt = ".zip";
saveFileDialog1.Filter = "ZIP Files|*.zip|All Files|*.*||";
saveFileDialog1.DereferenceLinks = true;
saveFileDialog1.OverwritePrompt = true;
saveFileDialog1.Title = "Archive Location and Name";
saveFileDialog1.FileName = value.ToString();
saveFileDialog1.ShowDialog();
return saveFileDialog1.FileName;
}
public override bool GetPaintValueSupported(
System.ComponentModel.ITypeDescriptorContext context)
{
return false;
}
}
}

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,421 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: DataPath.cs $ $Revision: 5 $
* $Author: Jsj $ $Date: 3/06/07 1:26p $
*
* $History: DataPath.cs $
*
* ***************** Version 5 *****************
* User: Jsj Date: 3/06/07 Time: 1:26p
* Updated in $/LibSource/VEObject
* check for a null Location.
*
* ***************** Version 4 *****************
* User: Kathy Date: 1/24/05 Time: 2:45p
* Updated in $/LibSource/VEObject
* B2005-004 fixes
*
* ***************** Version 3 *****************
* User: Kathy Date: 1/19/05 Time: 11:59a
* Updated in $/LibSource/VEObject
* Fix B2005-003 - missing plant security setting
*
* ***************** Version 2 *****************
* User: Kathy Date: 1/14/05 Time: 10:38a
* Updated in $/LibSource/VEObject
* B2004-061: fix security options
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Windows.Forms;
using System.Collections;
using System.Xml;
using System.IO;
using System.ComponentModel;
using Utils;
namespace VEObject
{
/// <summary>
/// This defines the DataPath class, which handles the datapath information
/// which tells the program where to search for veproms data. A datapath is of
/// the form "[path],[title];" for example G:\,GDRIVE;
/// Its children are vedata directories as found in the menuwin.xml file.
/// These vedata directories represent plant data.
/// </summary>
public class VEO_DataPath : VEO_Base
{
protected string tmpTitle;
protected string tmpLocation;
protected bool changeLocation;
protected bool changeTitle;
private string PrevDirectory;
public VEO_DataPath(UserRunTime iusrRunTime, string ititle, string iloc)
{
iconStates = new int[5] {6,21,8,22,7};
_Title = ititle;
_Location = iloc;
usrRunTime = iusrRunTime;
changeTitle=false;
changeLocation=false;
isNew=false;
LoadLockInfo();
icon = iconStates[(int)Lock.LockStatus];
}
// the following properties are used in the properties dialog for modification
// of 'property' data.
[Description("Location"),Category("Data Path"),ReadOnly(true)]public string Location
{
get{return _Location;}
set
{
ShortName sname = new ShortName(value);
_Location=sname.ShortFileName;
sname = null;
}
}
[Description("Title"),Category("Data Path")]public string Title
{
get
{
if (!changeTitle)
return _Title;
else
return tmpTitle;
}
set
{
changeTitle=true;
tmpTitle=value;
}
}
public override void Restore()
{
changeTitle = false;
}
// Make a new child, which is a plant node.
public override Object MakeNewChild()
{
VEO_Plant pl = new VEO_PlantN(usrRunTime,null,null);
return (Object) pl;
}
// 'Open' positions in the datapath directory (for creation of plant
// directories (store the previous directory, to position out of this
// directory on end).
public override bool Open()
{
if (Directory.Exists(_Location) == false) return false;
isOpen = true;
PrevDirectory = Directory.GetCurrentDirectory();
if(_Location!=null)Directory.SetCurrentDirectory(_Location);
return true;
}
// Close clears any multi-user settings for the system level
public override bool Close()
{
if (!isOpen)return false;
isOpen = false;
Directory.SetCurrentDirectory(PrevDirectory);
return true;
}
// Save the new plant & add to children if it succeeds.
public override bool SaveChild(Object obj)
{
VEO_Plant plnt = (VEO_Plant)obj;
bool succeed = plnt.SaveNew(this._Location);
if (succeed == true)
{
plnt._Location = this._Location + plnt._Location;
plnt.parentObj = this;
}
return succeed;
}
public override bool Delete()
{
// concatenate title/loc so that it can be removed from the datapath string
string delpth = _Location + "," + _Title + ";";
bool success = usrRunTime.DeletePathFromCfg(delpth);
return success;
}
// for this data path, read in which plants are available, and add to
// the list.
public override bool Read(bool dummy)
{
ArrayList tmpChildren = new ArrayList();
// using the . do exist tests to see if they exist on this datapath.
XmlDocument xmldoc = usrRunTime.menuwinXML.GetXmlDoc();
XmlElement top = (XmlElement) xmldoc.FirstChild;
XmlElement sys = (XmlElement) top.SelectSingleNode("SystemAttach");
XmlElement ele = (XmlElement) sys.SelectSingleNode("Plant");
while (ele != null)
{
// get plants and test for existence with the location for
// this datapath. If exists, add it to the PlantList.
//get the TemplateName & if there is a {t} replace the {t}
// with this datapath's path.
XmlElement tn = (XmlElement) ele.SelectSingleNode("TemplateName");
if (tn != null)
{
string templatename = tn.InnerText;
if (templatename.IndexOf("{t}",0) != -1)
{
string tpath = templatename.Replace("{t}",this.Location);
string path = tpath.Substring(0,tpath.IndexOf(" menu"));
DirectoryInfo source = new DirectoryInfo(path.Replace("/","//"));
if (source.Exists)
{
XmlElement etitle = (XmlElement) ele.SelectSingleNode("MenuName");
VEO_Plant plnt = new VEO_Plant(usrRunTime, etitle.InnerText,path);
plnt.parentObj = this;
tmpChildren.Add(plnt);
}
}
}
ele = (XmlElement) ele.NextSibling;
}
Security lsec = usrRunTime.sec;
if (lsec.OpenFile()==true)
{
for(int i=0;i<tmpChildren.Count;i++)
{
VEO_Plant plnt = (VEO_Plant) tmpChildren[i];
lsec.AddPlant(i,plnt._Location);
// Check if the plant is included in the vesam file. If not,
// it may have been added since vesam was run. In this case,
// the BlockAccess flag is used to determine whether the user
// should have access to the plant.
bool hasSec = lsec.PlantHasSecurity(i);
// see if the plant has any plant options, if so, include
// it in the list. If not, check to see if any of its procedures
// have options set & if so, the plant should be included.
//
bool procopts=false;
if (hasSec)
{
plnt.accessFlags = lsec.GetPlantSecurity(i);
if (plnt.accessFlags==0L)
{
procopts = lsec.AnyOptionsSet(i);
}
}
// if security is okay, i.e. either the plant has options or at least
// one of the sets within it has some options, include the plant in the
// list. Also, if there is not security, but access is not blocked
// (!BlockAccess) add it.
if ((hasSec && (plnt.accessFlags!=0L||procopts)) || (!hasSec&&!lsec.BlockAccess()))
Children.Add(plnt);
}
lsec.CloseFile();
}
return true;
}
// write out to the user's cfg file.
public override bool Write()
{
string newtitle=null;
string oldmodstr=_Location + "," + _Title + ";";
if (changeTitle)
newtitle = tmpTitle;
else
newtitle = _Title;
string newmodstr = _Location + "," + newtitle + ";";
usrRunTime.ModTitleToCfg(oldmodstr,newmodstr);
if (changeTitle) _Title=newtitle;
changeTitle=false;
return true;
}
public override void DoListView(ListView veoListView)
{
ListViewItem item=null;
veoListView.Columns.Add("Location", 120, HorizontalAlignment.Left);
veoListView.Columns.Add("Title", 300, HorizontalAlignment.Left);
for (int i=0; i<Children.Count; i++)
{
VEO_Plant plnt = (VEO_Plant) Children[i];
item = new ListViewItem(plnt._Location,plnt.icon);
item.Tag = plnt;
item.SubItems.Add(plnt._Title);
veoListView.Items.Add(item);
}
}
public override bool mnuAllowNew()
{
if (amILockedByMe()==false) return false; // new (plant) requires sys lock
if(usrRunTime.sec.SystemAdminFlag) return true;
return false;
}
public override bool CollapseSibling()
{
if (!usrRunTime.InMultiUserMode) return false;
return true;
}
}
// the following class inherits from the VEO_DataPath and is used to handle
// a New data path (it has the Location property as editable).
class VEO_DataPathN : VEO_DataPath
{
public VEO_DataPathN(UserRunTime iusrRunTime, string ititle, string iloc)
: base(iusrRunTime, ititle, iloc)
{
isNew=true;
}
// this method is used so that if a new datapath is created, it is associated
// with editable properties (such as path). When the object exists this is
// not editable. So when a new object is created, if it's successful, it's
// copied to an object which is not editable for the treeview & any further
// operations.
public override Object Copy()
{
VEO_DataPath dp = new VEO_DataPath(usrRunTime,this._Title,this._Location);
dp.parentObj=this.parentObj;
return (Object) dp;
}
public void SaveFields()
{
// B2007-005
// Check to see if tmpLocation is null before checking for a substring.
if (tmpLocation != null && tmpLocation.Substring(tmpLocation.Length-1,1) != "\\")
_Location = tmpLocation+"\\";
else
_Location=tmpLocation;
_Title=tmpTitle;
changeLocation=false;
changeTitle=false;
}
[Description("Location"),Category("Data Path"),ReadOnly(false),EditorAttribute(typeof(VEFolderBrowserDlg), typeof(System.Drawing.Design.UITypeEditor))]public new string Location
{
get
{
if (!changeLocation)
return _Location;
else
return tmpLocation;
}
set
{
ShortName sname = new ShortName(value);
tmpLocation=sname.ShortFileName;
sname = null;
changeLocation=true;
}
}
}
public class VEFolderBrowserDlg : System.Drawing.Design.UITypeEditor
{
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
}
public override object EditValue(
System.ComponentModel.ITypeDescriptorContext context,
System.IServiceProvider provider, object value)
{
FolderBrowserDialog FldrDlg = new FolderBrowserDialog();
FldrDlg.ShowNewFolderButton = true;
FldrDlg.SelectedPath = Directory.GetCurrentDirectory();
if(FldrDlg.ShowDialog() == DialogResult.OK)
return FldrDlg.SelectedPath;
else
return null;
}
public override bool GetPaintValueSupported(
System.ComponentModel.ITypeDescriptorContext context)
{
return false;
}
}
public class VESymbDlg : System.Drawing.Design.UITypeEditor
{
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
}
public override object EditValue(
System.ComponentModel.ITypeDescriptorContext context,
System.IServiceProvider provider, object value)
{
System.Windows.Forms.GridItem grdentr = (GridItem) provider;
SymbolListSteps symblst = new SymbolListSteps();
SymbDlg symdlg = new SymbDlg(symblst,grdentr);
if(symdlg.ShowDialog() == DialogResult.OK)
{
return symdlg.ReturnText;
}
else
return value;
}
public override bool GetPaintValueSupported(
System.ComponentModel.ITypeDescriptorContext context)
{
return false;
}
}
public class VECreateFolderBrowserDlg : System.Drawing.Design.UITypeEditor
{
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
}
public override object EditValue(
System.ComponentModel.ITypeDescriptorContext context,
System.IServiceProvider provider, object value)
{
FolderBrowserDialog FldrDlg = new FolderBrowserDialog();
FldrDlg.SelectedPath = Directory.GetCurrentDirectory();
FldrDlg.ShowNewFolderButton = true;
if(FldrDlg.ShowDialog() == DialogResult.OK)
return FldrDlg.SelectedPath;
else
return null;
}
public override bool GetPaintValueSupported(
System.ComponentModel.ITypeDescriptorContext context)
{
return false;
}
}
}

View File

@@ -0,0 +1,325 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: DataRoot.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 3/06/07 1:29p $
*
* $History: DataRoot.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 3/06/07 Time: 1:29p
* Updated in $/LibSource/VEObject
* Property page check
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using System.IO;
using VENetwork;
using Utils;
namespace VEObject
{
/// <summary>
/// This module defines the DataRoot class, which is the root of all
/// data that is accessible to this user. (i.e. it is the container
/// for all data within the datapath). Applications accessing the database
/// should create a DataRoot.
/// </summary>
public class VEO_DataRoot : VEO_Base
{
protected string tmpLocation;
protected bool changeLocation;
public VEO_DataRoot(UserRunTime iusrRunTime)
{
VEObjectType=(int)VEObjectTypesDefs.System;
iconStates = new int[5] {6,21,8,22,7};
_Title = "VE-PROMS Data "+iusrRunTime.ucfgpath;
_Location = iusrRunTime.ucfgpath;
changeLocation = false;
usrRunTime = iusrRunTime;
isNew=false;
LoadLockInfo();
icon = iconStates[(int)Lock.LockStatus];
}
public override void LoadLockInfo()
{
Lock = new VELock(usrRunTime.syspath, usrRunTime.myUserData, usrRunTime.InMultiUserMode?VENetwork.LockTypes.System:VENetwork.LockTypes.None);
}
// The following properties are used in the 'Properties' dialog. This set is used
// for modify.
[Description("Title"),Category("VE-PROMS Data Paths (CFG File)"),ReadOnly(true)]public string Title
{
get{return _Title;}
set{_Title=value;}
}
//[Description("Location"),Category("VE-PROMS Data Paths (CFG File)"),EditorAttribute(typeof(DataRootFileDlg), typeof(System.Drawing.Design.UITypeEditor))]public string Location
[Description("Location"),Category("VE-PROMS Data Paths (CFG File)"),ReadOnly(true)]public string Location
{
get
{
if (!changeLocation)
return _Location;
else
return tmpLocation;
}
set
{
FileInfo fi = new FileInfo(value);
if (!fi.Exists)
{
MessageBox.Show("The file that was specified does not exist.");
return;
}
changeLocation = true;
tmpLocation=value;
}
}
public override bool Open()
{
isOpen = true;
// check current multi-user status
if (Connection!=null)Connection.Enter(false);
return true;
}
// Close clears any multi-user settings for the system level
public override bool Close()
{
isOpen = false;
if (Connection!=null)Connection.Exit();
return true;
}
public override void Restore()
{
changeLocation = false;
}
public override bool mnuAllowDelete()
{
return false;
}
public override bool mnuAllowLckDB()
{
if (usrRunTime.InMultiUserMode && usrRunTime.sec.PermissionToLockFlag&&Lock.LockStatus==VENetwork.Status.NoLock) return true;
return false;
}
public override bool mnuAllowNew()
{
// if (usrRunTime.InMultiUserMode && Lock.LockStatus==VENetwork.Status.LockedByOther)return false;
// B2007-005
// Standardize the need for a lock. Prevent NEW button on first tree node
// if a lock is not set
if (amILockedByMe()==false) return false;
return true;
}
public override bool mnuAllowUnlckDB()
{
if (usrRunTime.InMultiUserMode && usrRunTime.sec.PermissionToLockFlag&&(Lock.LockStatus==VENetwork.Status.Locked||
Lock.LockStatus==VENetwork.Status.LockPending)) return true;
return false;
}
// Add a Data Path. Private method used below.
private void AddDataPath(string entry)
{
int comma;
string tmp;
string loc;
string title;
comma = entry.IndexOf(",");
tmp=entry.Substring(0,comma);
loc=tmp.Trim();
//Make sure datapath has an ending backslash
if (!(loc.EndsWith("\\")))
loc = loc + "\\";
tmp=entry.Substring(comma+1,entry.Length-comma-2); // -2, don't copy ";"
title=tmp.Trim();
VEO_DataPath dp = new VEO_DataPath(usrRunTime,title,loc);
dp.parentObj = (VEO_Base) this;
Children.Add(dp);
}
// Get the datapath list. If in demo mode, use sample list; otherwise read in
// from the user's cfg file.
public override bool Read(bool dummy)
{
PrivateProfile ppCfg;
string dpath;
string entry;
int semi;
int strtindx=0;
int netpth;
if (usrRunTime.sec.isDemoMode)
{
dpath = usrRunTime.syspath + "\\samples\\,Demo Data;";
}
else
{
// for this data root, read in the datapath. If a user's cfg exists
// use that data. Otherwise, use the menuwin2.xml data which is part
// of the user's run time.
ppCfg = new PrivateProfile(usrRunTime.ucfgpath);
// dpath=ppCfg.Attr("/ini/section[@name='Menu']/param[@name='DataPath']/@value");
dpath=ppCfg.Attr("Menu","DataPath");
if (dpath==null || dpath=="")return false;
}
semi=dpath.IndexOf(";",strtindx);
if (semi == -1)
{
MessageBox.Show("Must have semi-colon in datapath");
Environment.Exit(-1);
}
while (semi !=-1)
{
entry = dpath.Substring(strtindx,semi-strtindx+1);
netpth = entry.IndexOf("////",0);
if (netpth != -1)
//if(GetNetTempDisk()) AddDataPath(entry);
MessageBox.Show("Need to support network temp disk");
else
AddDataPath(entry);
if (semi+1>dpath.Length)
strtindx=-1;
else
{
strtindx=semi+1;
semi=dpath.IndexOf(";",strtindx);
}
}
return true;
}
// use the change to the cfg file.
public override bool Write()
{
// check for cfg file existence
FileInfo fi = new FileInfo(Location);
if (fi.Exists)
{
if(changeLocation)_Location=tmpLocation;
changeLocation=false;
this._Title = "VE-PROMS Data " + Location;
usrRunTime.ucfgpath = Location;
return true;
}
else
{
MessageBox.Show("The file that was specified does not exist.");
return false;
}
}
// add a new datapath
public override Object MakeNewChild()
{
VEO_DataPathN dp = new VEO_DataPathN(usrRunTime,null,null);
return dp;
}
// check that the directory input by the user exists. If so, add the
// directory & title to the cfg file.
public override bool SaveChild(Object obj)
{
VEO_DataPathN dp = (VEO_DataPathN) obj;
// B2007-005
// If the user didn't enter a location, then show an error message
//and don't continue with the save.
if (dp.Location == null || dp.Location.Length == 0)
{
MessageBox.Show("No data path Location specified.","Error");
return false;
}
dp.SaveFields();
// Check for existance of directory if it doesn't exist give message
// and return;
string pth = dp._Location;
DirectoryInfo di = new DirectoryInfo(pth);
if (di.Exists == false)
{
try
{
di.Create();
}
catch
{
MessageBox.Show("Directory for data path doesn't exist, and could not be created.");
}
return false;
}
string newcfgpth = dp._Location+","+dp._Title+";";
usrRunTime.AddPathToCfg(newcfgpth);
return true;
}
public override void DoListView(ListView veoListView)
{
ListViewItem item=null;
veoListView.Columns.Add("Location", 120, HorizontalAlignment.Left);
veoListView.Columns.Add("Title", 300, HorizontalAlignment.Left);
for (int i=0; i<Children.Count; i++)
{
VEO_DataPath dp = (VEO_DataPath) Children[i];
item = new ListViewItem(dp._Location,dp.icon);
item.Tag = dp;
item.SubItems.Add(dp._Title);
veoListView.Items.Add(item);
}
}
}
public class DataRootFileDlg : System.Drawing.Design.UITypeEditor
{
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
}
public override object EditValue(
System.ComponentModel.ITypeDescriptorContext context,
System.IServiceProvider provider, object value)
{
OpenFileDialog FileDialog1 = new OpenFileDialog();
FileDialog1.AddExtension = true;
FileDialog1.CheckPathExists = true;
FileDialog1.DefaultExt = ".cfg";
FileDialog1.Filter = "CFG Files|*.cfg|All Files|*.*||";
FileDialog1.DereferenceLinks = true;
FileDialog1.Title = "User Configuration File (defines datapath)";
FileDialog1.FileName = value.ToString();
FileDialog1.ShowDialog();
return FileDialog1.FileName;
}
public override bool GetPaintValueSupported(
System.ComponentModel.ITypeDescriptorContext context)
{
return false;
}
}
}

View File

@@ -0,0 +1,315 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: LDProperties.cs $ $Revision: 3 $
* $Author: Kathy $ $Date: 2/10/05 12:36p $
*
* $History: LDProperties.cs $
*
* ***************** Version 3 *****************
* User: Kathy Date: 2/10/05 Time: 12:36p
* Updated in $/LibSource/VEObject
* B2005-012: No apply button for new
*
* ***************** Version 2 *****************
* User: Kathy Date: 8/04/04 Time: 10:25a
* Updated in $/LibSource/VEObject
* No usage on New Lib Doc
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.IO;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text;
using Utils;
namespace VEObject
{
/// <summary>
/// NOTE: cmbType (the combo box that contains the document types) must match
/// the order of document types given in the ProcTypeOptions for this dialog
/// to work correctly
/// </summary>
public class LDProperties : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnApply;
private VEO_Base _ParentObj;
private VEO_Base _CurObj;
private bool isnew;
private System.Windows.Forms.TabControl tabControl1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.TabPage tbPageUsage;
private System.Windows.Forms.PropertyGrid myPropertyGrid;
private System.Windows.Forms.TabPage tbGeneral;
private System.Windows.Forms.Label lblUsage;
private System.Windows.Forms.ListBox lbUsage;
private bool canedit;
public LDProperties(Object parent, Object curobj)
{
//
// Required for Windows Form Designer support
//
_ParentObj = (VEO_Base) parent;
_CurObj = (VEO_Base) curobj;
VEO_LibDoc ld = (VEO_LibDoc) curobj;
if (ld.isNew == true)
isnew=true;
else
isnew=false;
InitializeComponent();
this.myPropertyGrid.SelectedObject=curobj;
if (isnew == true)
{
this.tabControl1.TabPages.Remove(this.tbPageUsage);
canedit=true;
}
else
{
if (this.tabControl1.TabPages.Contains(this.tbPageUsage)==false)
this.tabControl1.TabPages.Add(this.tbPageUsage);
ld.GetUsages();
foreach (string usg in ld.usages)
{
this.lbUsage.Items.Add(usg);
}
}
if((_CurObj.canEdit()==false)&&!isnew)
{
canedit=false;
this.myPropertyGrid.Enabled=false;
}
else if (!isnew)
{
canedit=true;
this.myPropertyGrid.Enabled=true;
}
this.lblUsage.Text = "'" + ld.Title + "' is used in...";
btnApply.Enabled = false;
// make apply button visible if modify
this.btnApply.Visible = !isnew;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LDProperties));
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnApply = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tbGeneral = new System.Windows.Forms.TabPage();
this.myPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.tbPageUsage = new System.Windows.Forms.TabPage();
this.lblUsage = new System.Windows.Forms.Label();
this.lbUsage = new System.Windows.Forms.ListBox();
this.tabControl1.SuspendLayout();
this.tbGeneral.SuspendLayout();
this.tbPageUsage.SuspendLayout();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(424, 296);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(64, 24);
this.btnOK.TabIndex = 8;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(504, 296);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(64, 24);
this.btnCancel.TabIndex = 9;
this.btnCancel.Text = "Cancel";
this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnApply
//
this.btnApply.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnApply.Location = new System.Drawing.Point(584, 296);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(56, 24);
this.btnApply.TabIndex = 10;
this.btnApply.Text = "Apply";
this.btnApply.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tbGeneral);
this.tabControl1.Controls.Add(this.tbPageUsage);
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(784, 280);
this.tabControl1.TabIndex = 17;
//
// tbGeneral
//
this.tbGeneral.Controls.Add(this.myPropertyGrid);
this.tbGeneral.Location = new System.Drawing.Point(4, 22);
this.tbGeneral.Name = "tbGeneral";
this.tbGeneral.Size = new System.Drawing.Size(776, 254);
this.tbGeneral.TabIndex = 0;
this.tbGeneral.Text = "General";
//
// myPropertyGrid
//
this.myPropertyGrid.CommandsVisibleIfAvailable = true;
this.myPropertyGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.myPropertyGrid.HelpVisible = false;
this.myPropertyGrid.LargeButtons = false;
this.myPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.myPropertyGrid.Location = new System.Drawing.Point(8, 39);
this.myPropertyGrid.Name = "myPropertyGrid";
this.myPropertyGrid.Size = new System.Drawing.Size(736, 94);
this.myPropertyGrid.TabIndex = 16;
this.myPropertyGrid.Text = "Properties";
this.myPropertyGrid.ToolbarVisible = false;
this.myPropertyGrid.ViewBackColor = System.Drawing.SystemColors.Window;
this.myPropertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText;
this.myPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.myPropertyGrid_PropertyValueChanged);
//
// tbPageUsage
//
this.tbPageUsage.Controls.Add(this.lblUsage);
this.tbPageUsage.Controls.Add(this.lbUsage);
this.tbPageUsage.Location = new System.Drawing.Point(4, 22);
this.tbPageUsage.Name = "tbPageUsage";
this.tbPageUsage.Size = new System.Drawing.Size(776, 254);
this.tbPageUsage.TabIndex = 1;
this.tbPageUsage.Text = "Usages";
//
// lblUsage
//
this.lblUsage.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblUsage.Location = new System.Drawing.Point(16, 8);
this.lblUsage.Name = "lblUsage";
this.lblUsage.Size = new System.Drawing.Size(624, 24);
this.lblUsage.TabIndex = 22;
//
// lbUsage
//
this.lbUsage.Location = new System.Drawing.Point(16, 40);
this.lbUsage.Name = "lbUsage";
this.lbUsage.Size = new System.Drawing.Size(624, 199);
this.lbUsage.TabIndex = 21;
//
// LDProperties
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(768, 326);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.btnApply);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LDProperties";
this.Text = "Library Document Properties";
this.tabControl1.ResumeLayout(false);
this.tbGeneral.ResumeLayout(false);
this.tbPageUsage.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
// save was clicked, use the objects save methods.
private bool saveclick()
{
bool success = true;
if (isnew)
{
if(_ParentObj==null)
{
DialogResult=DialogResult.Cancel;
return true;
}
success=_ParentObj.SaveChild(_CurObj);
}
else
{
success=_CurObj.Write();
}
return success;
}
// save was clicked, use the objects save methods.
private void btnOK_Click(object sender, System.EventArgs e)
{
bool success = true;
if(canedit)success = saveclick();
if (success==true)
{
DialogResult = DialogResult.OK;
this.Close();
}
}
private void btnApply_Click(object sender, System.EventArgs e)
{
if(canedit)return;
bool success = saveclick();
if(success==true)btnApply.Enabled=false;
Refresh();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
if(!canedit)return;
_CurObj.Restore();
}
private void myPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
{
btnApply.Enabled = true;
}
}
}

View File

@@ -0,0 +1,255 @@
<?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="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnApply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabControl1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabControl1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tabControl1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabControl1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabControl1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabControl1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="tbGeneral.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbGeneral.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbGeneral.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbGeneral.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbGeneral.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbGeneral.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="myPropertyGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="myPropertyGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myPropertyGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPageUsage.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbPageUsage.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbPageUsage.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbPageUsage.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPageUsage.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPageUsage.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="lblUsage.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblUsage.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblUsage.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lbUsage.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lbUsage.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lbUsage.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.Name">
<value>LDProperties</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.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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,403 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: LibDoc.cs $ $Revision: 6 $
* $Author: Kathy $ $Date: 5/31/06 9:47a $
*
* $History: LibDoc.cs $
*
* ***************** Version 6 *****************
* User: Kathy Date: 5/31/06 Time: 9:47a
* Updated in $/LibSource/VEObject
* Fixed B2006-023 - library document usages, duplicates and missing
* procedure titles
*
* ***************** Version 5 *****************
* User: Kathy Date: 2/08/06 Time: 10:22a
* Updated in $/LibSource/VEObject
* Fix B2006-004 - usages not found
*
* ***************** Version 4 *****************
* User: Kathy Date: 5/31/05 Time: 12:42p
* Updated in $/LibSource/VEObject
* crash on save if no comment
*
* ***************** Version 3 *****************
* User: Kathy Date: 5/25/05 Time: 10:32a
* Updated in $/LibSource/VEObject
* Allow edits for tmpchg
*
* ***************** Version 2 *****************
* User: Kathy Date: 1/31/05 Time: 11:05a
* Updated in $/LibSource/VEObject
* Fix B2005-005 - this just fixed empty icon usage
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.IO;
using System.Windows.Forms;
using System.ComponentModel;
using System.Collections;
using System.Data;
using VDB_TransUsage;
using Utils;
namespace VEObject
{
/// <summary>
/// Summary description for LibDoc.
/// </summary>
public class VEO_LibDoc : VEO_Base
{
string _Comment;
public ArrayList usages;
public string ldname;
private string tmpRtfFileName;
protected bool changeTitle;
protected bool changeComment;
protected string tmpTitle;
protected string tmpComment;
public VEO_LibDoc(string ipath, VEO_DummyLibDoc ld, bool inew)
{
iconStates = new int[5] {15,15,15,15,15};
string loctitle=null;
string loccomment=null;
_Location = ipath;
VEObjectType = (int)VEObjectTypesDefs.LibraryDoc;
parentObj = ld;
usages = new ArrayList();
isNew = inew;
// use the path to open the file & read the title & comment
FileInfo fi = new FileInfo(ipath);
FileStream fs=null;
fs = fi.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite );
BinaryReader br = new BinaryReader(fs,System.Text.ASCIIEncoding.ASCII);
int cntPage = br.ReadInt16();
if(cntPage != -1)
{ // Not End of File
int nchar = br.ReadInt16();
string tmp = new string(br.ReadChars(nchar));
loctitle = tmp.Substring(0,tmp.Length-1); // remove null at end.
nchar = br.ReadInt16();
if (nchar>0)
{
tmp = new String(br.ReadChars(nchar));
loccomment = tmp.Substring(0,tmp.Length-1); // remove null at end.
}
}
br.Close();
fs.Close();
if (loctitle!=null)
_Title = loctitle;
else
_Title=ipath;
_Comment = loccomment;
VEO_Base tmp1 = (VEO_Base) ld.parentObj;
usrRunTime = tmp1.usrRunTime;
string pthnm = this._Location.Substring(0,_Location.ToUpper().IndexOf(".LIB"));
ldname = pthnm.Substring(_Location.LastIndexOf("\\")+1,8);
LoadLockInfo();
icon = iconStates[(int) Lock.LockStatus];
}
[Description("Location"),Category("Library Document"),ReadOnly(true)]public string Location
{
get{return _Location;}
set{_Location=value;}
}
[Description("Title"),Category("Library Document")]public string Title
{
get
{
if(!changeTitle)
return _Title;
else
return tmpTitle;
}
set
{
changeTitle=true;
tmpTitle=value;
}
}
[Description("Comment"),Category("Library Document")]public string Comment
{
get
{
if(!changeComment)
return _Comment;
else
return tmpComment;
}
set
{
changeComment=true;
tmpComment=value;
}
}
public override bool PropertiesDlg(Object parent)
{
LDProperties propdlg = new LDProperties(parent, this);
if (propdlg.ShowDialog() == DialogResult.OK) return true;
// for New libdoc, a file was created in order for dialog to work,
// remove it on cancel.
if (this.isNew && File.Exists(_Location)) File.Delete(_Location);
return false;
}
public void GetUsages()
{
usages.Clear();
VEO_DummyLibDoc dl = (VEO_DummyLibDoc) this.parentObj;
VEO_ProcSet ps = (VEO_ProcSet) dl.parentObj;
string pth = ps._curDirectory+"\\"+ps.Location+"\\tran.dbf";
vdb_TransUsage transusg = new vdb_TransUsage(pth);
DataSet ds = transusg.GetSortedByToTrans("[TONUMBER] = \'"+ldname.ToUpper() + "\' OR [TONUMBER] = \'" + ldname.ToLower()+"\'");
VEO_DummySet dset = (VEO_DummySet) ps.Children[1];
if (ds.Tables[0].Rows.Count !=0)
{
foreach(DataRow dr in ds.Tables[0].Rows)
{
string usg = dr["FROMNUMBER"].ToString();
string titl = null;
if (dset.Children.Count==0) dset.Read(false);
foreach(Object obj in dset.Children)
{
VEO_Proc prc = (VEO_Proc) obj;
if (usg == prc._Prcnum)
{
titl = prc._Title;
break;
}
}
usages.Add(usg + " " + titl);
}
}
transusg = null;
}
public override bool SaveNew(string dummy)
{
// since the file was created before creating this object, use the 'Write' method
// to save it.
bool success = Write();
isNew=false;
// the parent icon cannot be empty.
VEO_DummyLibDoc ld = (VEO_DummyLibDoc) parentObj;
ld.icon = ld.iconStates[0];
ld.IsEmpty=false;
return success;
}
public override bool Write()
{
string origfile=null;
if (isNew||changeTitle||changeComment)
{
try
{
// rename file extension to bak & rewrite it.
origfile = _Location.Substring(0,_Location.Length-3) + "BAK";
File.Delete(origfile);
File.Move(_Location,origfile);
FileStream chgfile = new FileStream(_Location, FileMode.Create);
BinaryWriter bw = new BinaryWriter(chgfile,System.Text.Encoding.ASCII);
// Write out header to the new file
short j=0;
bw.Seek(0,SeekOrigin.Begin);
bw.Write(j); // temporary page count value (reset on pagination)
j=(short)(Title.Length+1);
bw.Write(j);
char [] xbuf = new char[Title.Length];
xbuf = Title.ToCharArray();
bw.Write(xbuf);
bw.Write((byte)0); // add null for end of string
j=0;
if (Comment != null) j=(short)(Comment.Length+1);
bw.Write(j);
if(j>0)
{
xbuf = new char[Comment.Length];
xbuf = Comment.ToCharArray();
bw.Write(xbuf);
bw.Write((byte)0);
}
// Now open the original file for reading data, get past the header info
// first.
FileStream oldfile = new FileStream(origfile, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(oldfile,System.Text.ASCIIEncoding.ASCII);
int cntPage = br.ReadInt16();
if(cntPage != -1)
{ // Not End of File
int nchar = br.ReadInt16();
string tmp = new string(br.ReadChars(nchar));
nchar = br.ReadInt16();
if (nchar>0)tmp = new String(br.ReadChars(nchar));
}
byte ac;
bool done = false;
while(done==false)
{
if (br.PeekChar() >0)
{
ac = br.ReadByte();
bw.Write(ac);
}
else
done=true;
}
br.Close();
bw.Close();
oldfile.Close();
chgfile.Close();
}
catch (Exception e)
{
MessageBox.Show(e.Message,"Error on library document save.");
if (origfile!=null)
{
File.Delete(_Location);
File.Move(origfile,_Location);
}
return false;
}
if(origfile!=null)File.Delete(origfile);
if(changeComment)
{
_Comment=tmpComment;
changeComment=false;
}
if(changeTitle)
{
_Title=tmpTitle;
changeTitle=false;
}
}
return true;
}
private bool canDelete()
{
if (usages.Count == 0) GetUsages();
if (usages.Count > 0)
{
MessageBox.Show("Cannot delete library document, it is used.");
return false;
}
return true;
}
public override bool Delete()
{
// first see if the library document can be deleted (if it is used, it cannot
// be deleted.
if (canDelete()==false) return false;
File.Delete(_Location);
// if this is the only library document. then set the parents, icon to empty
VEO_DummyLibDoc ld = (VEO_DummyLibDoc) this.parentObj;
if (ld.Children.Count==1) IsEmpty=true; // just this one.
return true;
}
public string GetContentsFile()
{
return tmpRtfFileName;
}
public void ClearContentsFile()
{
if(tmpRtfFileName!=null)File.Delete(tmpRtfFileName);
tmpRtfFileName=null;
}
public bool ReadContentsFile()
{
try
{
// Open the file for reading data, get past the header info first.
FileStream ldfile = new FileStream(_Location, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(ldfile,System.Text.ASCIIEncoding.ASCII);
tmpRtfFileName = Path.GetTempFileName();
FileStream tmpfile = new FileStream(tmpRtfFileName, FileMode.Create);
BinaryWriter bw = new BinaryWriter(tmpfile,System.Text.Encoding.ASCII);
int cntPage = br.ReadInt16();
if(cntPage != -1)
{
int nchar = br.ReadInt16();
string tmp = new string(br.ReadChars(nchar));
nchar = br.ReadInt16();
if (nchar>0)tmp = new String(br.ReadChars(nchar));
}
byte ac;
bool done = false;
while(done==false)
{
if (br.PeekChar() >0)
{
ac = br.ReadByte();
bw.Write(ac);
}
else
done=true;
}
br.Close();
ldfile.Close();
bw.Close();
tmpfile.Close();
}
catch (Exception e)
{
MessageBox.Show(e.Message,"Error reading Library Document");
return false;
}
return true;
}
public override void AddToTree(TreeNode parentnd)
{
}
public override bool Expand(TreeNode parentnd)
{
return true;
}
public override bool mnuAllowNew()
{
return false;
}
public override bool mnuAllowDelete()
{
return AllowMods();
}
public override bool canEdit()
{
return AllowMods();
}
private bool AllowMods()
{
VEO_DummyLibDoc ds = (VEO_DummyLibDoc) this.parentObj;
VEO_ProcSet ps = (VEO_ProcSet) ds.parentObj;
if (ps.isApproved == true) return false;
if (amILockedByMe()==false) return false;
if ((ps.accessFlags&Security.LIBRARYDOCS)==Security.LIBRARYDOCS) return true;
return false;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,435 @@
<?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="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnApply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabControl1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabControl1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tabControl1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabControl1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabControl1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabControl1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="tbGeneral.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbGeneral.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbGeneral.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbGeneral.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbGeneral.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbGeneral.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="cbChgBarApp.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbChgBarApp.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbChgBarApp.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbExtraRev.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbExtraRev.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbExtraRev.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblExtraRev.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblExtraRev.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblExtraRev.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCurSet.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCurSet.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCurSet.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblGdLink.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblGdLink.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblGdLink.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbGuideLink.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbGuideLink.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbGuideLink.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblPLink.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblPLink.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblPLink.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbPLink.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbPLink.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbPLink.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblType.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbType.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myPropertyGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="myPropertyGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myPropertyGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPageAdvanced.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbPageAdvanced.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbPageAdvanced.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbPageAdvanced.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPageAdvanced.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbPageAdvanced.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="lblIniFile.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblIniFile.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblIniFile.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbIniText.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbIniText.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbIniText.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbpgSetINI.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbpgSetINI.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbpgSetINI.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbpgSetINI.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbpgSetINI.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbpgSetINI.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="lblSetINI.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblSetINI.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblSetINI.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbSetIniText.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbSetIniText.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbSetIniText.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbERG_Relate.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbERG_Relate.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tbERG_Relate.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbERG_Relate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tbERG_Relate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tbERG_Relate.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbErgRelateList.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cbErgRelateList.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cbErgRelateList.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lbEopRelateList.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lbEopRelateList.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lbEopRelateList.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.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>PSProperties</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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,701 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: Plant.cs $ $Revision: 10 $
* $Author: Jsj $ $Date: 10/20/06 9:34a $
*
* $History: Plant.cs $
*
* ***************** Version 10 *****************
* User: Jsj Date: 10/20/06 Time: 9:34a
* Updated in $/LibSource/VEObject
* long name fix
*
* ***************** Version 9 *****************
* User: Jsj Date: 9/26/06 Time: 9:38a
* Updated in $/LibSource/VEObject
* check for a siingle quote in directory name
*
* ***************** Version 8 *****************
* User: Kathy Date: 6/06/05 Time: 12:35p
* Updated in $/LibSource/VEObject
* Allow lock set even if system lock set
*
* ***************** Version 7 *****************
* User: Kathy Date: 4/12/05 Time: 1:01p
* Updated in $/LibSource/VEObject
*
* ***************** Version 6 *****************
* User: Kathy Date: 2/02/05 Time: 10:13a
* Updated in $/LibSource/VEObject
* B2005-006: fix missing proc sets under plant
*
* ***************** Version 5 *****************
* User: Kathy Date: 1/31/05 Time: 11:06a
* Updated in $/LibSource/VEObject
* Fix B2005-005 (connection & delete directory errors). also, fix icon
* usage & security for new
*
* ***************** Version 4 *****************
* User: Kathy Date: 1/24/05 Time: 2:45p
* Updated in $/LibSource/VEObject
* B2005-004 fixes
*
* ***************** Version 3 *****************
* User: Kathy Date: 1/14/05 Time: 10:38a
* Updated in $/LibSource/VEObject
* B2004-061: Fix security optoins
*
* ***************** Version 2 *****************
* User: Kathy Date: 1/10/05 Time: 12:58p
* Updated in $/LibSource/VEObject
* B2004-063 fix
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Collections;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using System.ComponentModel;
using Utils;
using VENetwork;
namespace VEObject
{
/// <summary>
/// This defines the VEO_Plant class which handles plant data. This contains
/// support for the vexxx layer.
/// </summary>
public class VEO_Plant : VEO_Base
{
public long accessFlags;
protected string tmpTitle;
protected string tmpLocation;
protected bool changeLocation;
protected bool changeTitle;
private string PrevDirectory;
public VEO_Plant(UserRunTime iusrRunTime, string ititle, string ipath)
{
// iconStates are the imagelist indexes for the tree view (imglist1)
// the states are Nolock, LockedByMe, LockedByOther, LockPending, Empty.
iconStates = new int[5] {3,21,5,22,4};
_Title = ititle;
_Location = ipath;
usrRunTime = iusrRunTime;
changeLocation=false;
changeTitle=false;
IsEmpty=false;
VEObjectType=(int)VEObjectTypesDefs.Plant;
isNew=false;
LoadLockInfo();
icon = iconStates[(int)Lock.LockStatus];
if (Lock.LockStatus != VENetwork.Status.LockedByOther)
{
if (ipath != null)
{
string[] dirs = new string[40];
dirs = Directory.GetDirectories(ipath);
if (dirs.Length == 0)
{
IsEmpty=true;
//only reset the icon to empty if there is no lock icon.
//if a lock, show the lock icon
if (Lock.LockStatus == VENetwork.Status.NoLock) icon = iconStates[(int)VEO_IconStates.Empty];
}
}
}
}
public override void LoadLockInfo()
{
Lock = new VELock(_Location, usrRunTime.myUserData, usrRunTime.InMultiUserMode?VENetwork.LockTypes.Plant:VENetwork.LockTypes.None);
}
// Properties used for modify of 'Properties' from File menu.
[Description("Location"),Category("Plant"),ReadOnly(true)]public string Location
{
get{return _Location;}
set{_Location=value;}
}
[Description("Title"),Category("Plant")]public string Title
{
get
{
if (!changeTitle)
return _Title;
else
return tmpTitle;
}
set
{
changeTitle=true;
tmpTitle=value;
}
}
// The open method checks for multi-user settings at the plant level. It
// also positions into the plant directory.
public override bool Open()
{
isOpen = true;
PrevDirectory = Directory.GetCurrentDirectory();
if(_Location!=null)Directory.SetCurrentDirectory(_Location);
if (Connection!=null)Connection.Enter(false);
return true;
}
// The close method resets, if necessary from any multi-user settings and
// positions back to the datapath directory (which is a level above the
// current level)
public override bool Close()
{
if (!isOpen)return false;
isOpen=false;
if (Connection!=null)Connection.Exit();
Directory.SetCurrentDirectory("..");
return true;
}
public override void Restore()
{
changeTitle=false;
}
public override bool Delete()
{
DialogResult result = MessageBox.Show("Are you sure you want to delete the entire plant directory " + this._Location,"Confirm Delete Again",MessageBoxButtons.YesNoCancel);
if (result == DialogResult.Yes)
{
// delete the entire directory
if (Directory.Exists(this._Location))
{
if(isOpen)Close();
try
{
Directory.Delete(this._Location,true);
}
catch (Exception e)
{
MessageBox.Show("Could not delete directory - manually delete " + this._Location + ". Cause: " + e.Message);
}
if (Directory.Exists(this._Location))
{
MessageBox.Show("Unable to delete the plant directory.");
return false;
}
return true;
}
}
return false;
}
private void CreateProcSet(string dirpath, XmlElement nm, string dirname, long flags)
{
// see if there is a title file in the directory and use
// it if there is, otherwise use menuname & if there's no menu
// name, use the directory name.
VEO_ProcSet procset = null;
string titlepath = dirpath + "\\" + "Title";
FileInfo fi = new FileInfo(titlepath);
if (File.Exists(titlepath))
{
StreamReader myReader = new StreamReader(titlepath);
titlepath = myReader.ReadLine();
myReader.Close();
procset = new VEO_ProcSet(usrRunTime, titlepath.Trim(), dirpath, flags);
}
else
{
if (nm != null)
procset = new VEO_ProcSet(usrRunTime, nm.InnerText, dirpath, flags);
else
{
string tmpdirnm = dirname;
int indx=0;
// if this is temp change directory, tack on text to recognize it
if ((indx=dirpath.ToUpper().IndexOf("TMPCHG"))>-1)
tmpdirnm = dirname + " - Temporary Change Version";
// if this is approved, tack on Current Approved Version to the title
else if ((indx=dirpath.ToUpper().IndexOf("APPROVED"))>-1)
tmpdirnm = dirname + " - Current Approved Version";
procset = new VEO_ProcSet(usrRunTime, tmpdirnm, dirpath,flags);
}
}
procset.parentObj = this;
Children.Add(procset);
}
// private method, used below, to add a directory to the child list
// (list contains proc sets)
private bool ProcessDirName(XmlElement par, string dirname, int plntsecindx)
{
XmlNodeList nodeList = par.SelectNodes("ProcFile");
if (nodeList == null) return false;
foreach (XmlNode dirnd in nodeList)
{
XmlElement dele=(XmlElement)dirnd;
string dirpath = _Location + "\\" + dirname;
if (File.Exists(dirpath+"\\"+dirnd.InnerText))
{
//
// see if there's an exception or a requirement, i.e. use
// the Working Draft if there's no proc2 directory (Except)
// or use the Working Draft Unit 1 if there's a proc2
// directory (Require)
bool excpt = false;
bool req = true;
string path1=null;
XmlElement except = (XmlElement) par.SelectSingleNode("Exception");
if (except != null)
{
// if this exception directory exists, don't add this to
// the set.
path1 = dirpath + "\\" + except.InnerText;
if (Directory.Exists(path1)) excpt = true;
}
XmlElement require = (XmlElement) par.SelectSingleNode("Require");
if (require != null)
{
// if this require directory exists, add this to set only
// if this exists.
path1 = dirpath + "\\" + require.InnerText;
if (Directory.Exists(path1) == false) req = false;
}
if (excpt == false && req == true)
{
XmlElement nm = (XmlElement) par.SelectSingleNode("MenuName");
long flags=0L;
// bug fix B2006-045
// need to convert long folder/file names to short (8.3)
ShortName sname = new ShortName(dirpath);
bool hasSec = usrRunTime.sec.ProcSetHasSecurity(plntsecindx, Path.GetFileName(sname.ShortFileName));
// bool hasSec = usrRunTime.sec.ProcSetHasSecurity(plntsecindx, dirname);
if (this.usrRunTime.sec==null) flags=Security.SUPERACCESS;
else if (hasSec) flags = usrRunTime.sec.GetProcSecurity(sname.ShortFileName);
// else if (hasSec) flags = usrRunTime.sec.GetProcSecurity(dirpath);
if((hasSec && flags!=0L) || (!hasSec&&!usrRunTime.sec.BlockAccess()))
{
CreateProcSet(dirpath, nm, dirname, flags);
return true;
}
}
}
}
return false;
}
// This method processes through the SubDirSearch xmlelement tree in
// menuwin2.xml to see if the input procedure set directory has valid
// procedure set subdirectories. Arguments are:
// subtop is xmlelement for the SubDirSearch in menuwin2.xml, dir is actual
// procset directory name (for example, procs, proc000.dvt, etc) and
// dname is the name to be used for the directory name in the menuwin2.xml
// file under the SubDirSearch xmlelement tree (for example, procs, *.dvt, etc)
private bool ProcessSubDir(XmlElement subtop, string dri, string dname, int plntsecindx)
{
XmlNodeList nodeList;
string xp = "descendant::ProcSet[Dir = \'" + dname + "\']";
try
{
nodeList = subtop.SelectNodes(xp);
// for each possible subdirectory for this directory, see if it
// exists.
foreach (XmlNode subdirname in nodeList)
{
XmlElement subdele=(XmlElement)subdirname;
XmlNodeList FnodeList = subdirname.SelectNodes("ProcFile");
// see if the files listed exist, if so, add them to the
// plant procset list.
foreach (XmlNode dirnd in FnodeList)
{
XmlElement dele=(XmlElement)dirnd;
string dirpath = _Location + "\\" + dri;
if (File.Exists(dirpath+"\\"+dirnd.InnerText))
{
XmlElement nm = (XmlElement) subdirname.SelectSingleNode("MenuName");
string subdir = dirnd.InnerText.Substring(0,dirnd.InnerText.LastIndexOf("\\"));
long flags=0L;
bool hasSec = usrRunTime.sec.ProcSetHasSecurity(plntsecindx, dri+"\\"+subdir);
if (this.usrRunTime.sec==null) flags=Security.SUPERACCESS;
else if (hasSec) flags = usrRunTime.sec.GetProcSecurity(dirpath + "\\" + subdir);
if((hasSec && flags!=0L) || (!hasSec&&!usrRunTime.sec.BlockAccess()))
CreateProcSet(dirpath+"\\"+subdir, nm, dri, flags);
}
break; // out of file check foreach
}
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
return false;
}
return true;
}
// Using the menuwin2.xml file, read in child list by seeing which
// directories (proc sets) are contained in this vexxx directory.
public override bool Read(bool ChkForChldOnly)
{
bool didone;
Cursor.Current = Cursors.WaitCursor;
// using the . Then do exist tests to see if they
// exist on this datapath.
usrRunTime.LoadMenuWin2();
XmlDocument xmldoc = usrRunTime.menuwin2XML.GetXmlDoc();
XmlElement top = (XmlElement) xmldoc.FirstChild;
XmlElement sys = (XmlElement) top.SelectSingleNode("PlantAttach");
XmlElement subtop = (XmlElement) top.SelectSingleNode("SubDirSearch");
DirectoryInfo cur = new DirectoryInfo(_Location);
DirectoryInfo[] diArr = cur.GetDirectories();
int plntsecindx = usrRunTime.sec.GetPlantSecurityIndex(_Location);
foreach (DirectoryInfo dri in diArr)
{
XmlNodeList nodeList;
string dname = null;
int indx;
if ((indx=dri.Name.IndexOf("."))>-1)
{
//must be *.prc, *.bck, *.dvt, *.sl?
if (indx+4<=dri.Name.Length)
{
dname = "*." + dri.Name.Substring(indx+1,3).ToLower();
if (dname.StartsWith("*.sl"))
dname = dname.Substring(0,4) + "?";
}
else
dname = null;
}
else if ((indx=dri.Name.IndexOf("'"))>-1)
{
// bug fix B2006-047
// if not a .PRC folder, then we get an error looking up
// the directory name in XML (if it has an ' in the name)
dname = null;
}
else
{
dname = dri.Name.ToLower();
}
if (dname!=null)
{
string xp = "descendant::ProcSet[Dir = \'" + dname + "\']";
try
{
nodeList = sys.SelectNodes(xp);
foreach (XmlNode dirname in nodeList)
{
XmlElement dele=(XmlElement)dirname;
didone = ProcessDirName(dele, dri.Name, plntsecindx);
if (Children.Count > 0 && ChkForChldOnly)
{
Cursor.Current = Cursors.Default;
return true;
}
// if a directory was found, see if any
// subdirectories exist that need added too.
bool didsub = false;
if (didone) didsub = ProcessSubDir(subtop, dri.Name, dname, plntsecindx);
}
}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString());
Cursor.Current = Cursors.Default;
return false;
}
}
}
// if no children, change icon to empty (unless it has a lock icon)
if (Children.Count <=0 && Lock.LockStatus == VENetwork.Status.NoLock) icon = iconStates[(int)VEO_IconStates.Empty];
Cursor.Current = Cursors.Default;
return true;
}
// write out change (modification of title for plant) for plant to
// the menuwin.xml file
public override bool Write()
{
string newtitle=null;
if (changeTitle)
{
newtitle = tmpTitle;
bool success = usrRunTime.ModMenuWin(newtitle, this._Title);
if (success==false)
{
MessageBox.Show("Could not modify title for the plant.");
return false;
}
MessageBox.Show("Please send \\ve-proms\\menuwin & \\ve-proms\\menuwin.xml files to Volian.");
_Title=newtitle;
changeTitle=false;
}
return true;
}
// create a new proc set object (child for this plant)
public override Object MakeNewChild()
{
if (!isOpen)Open();
VEO_ProcSet ps = new VEO_ProcSetN(usrRunTime,null,_Location);
return ps;
}
// save a new proc set (child for this plant)
public override bool SaveChild(Object obj)
{
VEO_ProcSetN ps = (VEO_ProcSetN) obj;
// check for valid child
bool valid = ps.IsValid();
if (valid == false) return false;
valid = ps.SaveNew("dummy");
if (valid == true)
{
// add this item to this plants list of children.
Children.Add((VEO_ProcSet)obj);
ps.parentObj=this;
ps._Location = this._Location + "\\" + ps._Location;
ps.icon=iconStates[0];
// if this plant's icon is 'empty', change it to either lock (if locked),
// or to not empty.
icon = iconStates[(int)Lock.LockStatus];
IsEmpty=false;
}
return valid;
}
// save a new plant directory
public override bool SaveNew(string pth)
{
// check for non-empty data.
if (tmpLocation == null || tmpLocation == "" || tmpTitle == null || tmpTitle == "")
{
MessageBox.Show("Need to fill in all data.");
return false;
}
// for this new plant, make the directory and write out
// to the menuwin & menuwin.xml files.
// if using the file browser dialog, the drive may be included, if so
// check that the directory matches the datapath.
int slash = tmpLocation.LastIndexOf("\\");
if (slash>0)
{
string drvtmp = tmpLocation.Substring(0,slash+1);
ShortName sname = new ShortName(drvtmp);
string drv=sname.ShortFileName;
sname = null;
if (drv.ToUpper() != pth.ToUpper())
{
MessageBox.Show("Invalid path, directory must match datapath");
return false;
}
// remove the drive part of the path, it's added back later.
tmpLocation = tmpLocation.Substring(slash+1,tmpLocation.Length-(slash+1));
}
// check for ve*
if (tmpLocation.Substring(0,2).ToUpper() != "VE")
{
MessageBox.Show("First two characters must be 'VE' for new plant directory name.");
return false;
}
// also check that the name is not greater than 8 characters (an old 16-bit hangover)
if (tmpLocation.Length>8)
{
MessageBox.Show("Directory/plant name must be 8 characters or less.");
return false;
}
// make path to new directory & check for existence.
string curpath=null;
curpath = pth + "\\" + this.tmpLocation;
DirectoryInfo cur = new DirectoryInfo(curpath);
if (cur.Exists )
{
DirectoryInfo[] di = cur.GetDirectories("*");
FileInfo[] fi = cur.GetFiles("*");
if (di.Length>0 || fi.Length>0)
{
MessageBox.Show("The plant directory you specified already exists & has contents. Enter a different name.");
return false;
}
}
// if the directory exists & it is already in the menu file, it didn't succeed
// in adding the new item.
if (cur.Exists && (usrRunTime.IsInMenuWin(this.tmpLocation)!=0))
{
MessageBox.Show("The plant directory you specified already exists and the plant name exists in the menu files.");
return false;
}
try
{
if (cur.Exists == false)cur.Create();
}
catch (Exception e)
{
MessageBox.Show("Error creating directory: " + e.Message);
return false;
}
// now add to end of menuwin & menuwin.xml.
bool success = usrRunTime.AddToMenuWin(this.tmpTitle,this.tmpLocation);
if (success==false)
{
MessageBox.Show("Could not add directory to ve-proms menuing files. Could not create plant directory.");
cur.Delete();
return false;
}
MessageBox.Show("The VE-PROMS Security Access Module (VESAM) may need to be used to set permissions to access the new plant.");
_Title=tmpTitle;
_Location=tmpLocation;
changeTitle=false;
changeLocation=false;
// set a security flag for this. Cases could be that there is no security in vesam,
// that it has security in vesam, though it didn't exist for this user until now,
// or the user could be super user.
accessFlags=0L;
int idx = usrRunTime.sec.GetPlantSecurityIndex(curpath);
accessFlags = usrRunTime.sec.GetPlantSecurity(idx);
return true;
}
public override void DoListView(ListView veoListView)
{
ListViewItem item=null;
veoListView.Columns.Add("Location", 120, HorizontalAlignment.Left);
veoListView.Columns.Add("Title", 300, HorizontalAlignment.Left);
for (int i=0; i<Children.Count; i++)
{
VEO_ProcSet ps = (VEO_ProcSet) Children[i];
item = new ListViewItem(ps._Location,ps.icon);
item.Tag = ps;
item.SubItems.Add(ps._Title);
veoListView.Items.Add(item);
}
}
public override bool CollapseSibling()
{
if (!usrRunTime.InMultiUserMode) return false;
return true;
}
public override bool mnuAllowLckDB()
{
if (!usrRunTime.InMultiUserMode) return false;
//if (amILockedByMe()==true) return false;
if (Lock.LockStatus==VENetwork.Status.LockedByOther)return false;
// if there are no children, allow a lock in case the user is creating a plant level
// with procedure set
if (this.Children.Count==0) return true;
if ((accessFlags&Security.LOCKSET)==Security.LOCKSET && Lock.LockStatus==VENetwork.Status.NoLock) return true;
return false;
}
public override bool mnuAllowUnlckDB()
{
if (!usrRunTime.InMultiUserMode) return false;
if ((accessFlags&Security.LOCKSET)==Security.LOCKSET&&(Lock.LockStatus==VENetwork.Status.Locked||
Lock.LockStatus==VENetwork.Status.LockPending)) return true;
return false;
}
public override bool mnuAllowDelete()
{
if (amILockedByMe()==false) return false;
if(usrRunTime.sec.SystemAdminFlag) return true;
return false;
}
public override bool mnuAllowNew()
{
if (amILockedByMe()==false) return false;
if (usrRunTime.sec.PermissionToManageFlag) return true;
return false;
}
public override bool canEdit()
{
if (amILockedByMe()==false) return false;
if(usrRunTime.sec.SystemAdminFlag) return true;
return false;
}
}
// the following class is used to support the New plant option from the 'Properties'
// dialog by making location to be editable.
class VEO_PlantN : VEO_Plant
{
public VEO_PlantN(UserRunTime iusrRunTime, string ititle, string ipath)
: base(iusrRunTime, ititle, ipath)
{
isNew=true;
}
// this method is used so that if a new datapath is created, it is associated
// with editable properties (such as path). When the object exists this is
// not editable. So when a new object is created, if it's successful, it's
// copied to an object which is not editable for the treeview & any further
// operations.
public override Object Copy()
{
VEO_Plant plnt = new VEO_Plant(usrRunTime,this._Title,this._Location);
plnt.parentObj = this.parentObj;
plnt.accessFlags = this.accessFlags;
return (Object) plnt;
}
public void SaveFields()
{
_Location=tmpLocation;
_Title=tmpTitle;
changeLocation=false;
changeTitle=false;
}
[Description("Location"),Category("Plant"),ReadOnly(false),EditorAttribute(typeof(VECreateFolderBrowserDlg), typeof(System.Drawing.Design.UITypeEditor))]public new string Location
{
get
{
if (!changeLocation)
return _Location;
else
return tmpLocation;
}
set
{
changeLocation=true;
tmpLocation=value;
}
}
}
}

View File

@@ -0,0 +1,415 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: PrcProperties.cs $ $Revision: 2 $
* $Author: Kathy $ $Date: 2/10/05 12:36p $
*
* $History: PrcProperties.cs $
*
* ***************** Version 2 *****************
* User: Kathy Date: 2/10/05 Time: 12:36p
* Updated in $/LibSource/VEObject
* B2005-012: No apply button for new
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: PrcProperties.cs $ $Revision: 2 $
* $Author: Kathy $ $Date: 2/10/05 12:36p $
*
* $History: PrcProperties.cs $
*
* ***************** Version 2 *****************
* User: Kathy Date: 2/10/05 Time: 12:36p
* Updated in $/LibSource/VEObject
* B2005-012: No apply button for new
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VEObject
{
/// <summary>
/// Summary description for PrcProperties.
/// </summary>
public class PrcProperties : System.Windows.Forms.Form
{
private System.Windows.Forms.TabPage generalTPage;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.TabControl tabCtlProc;
private PropertyGrid genPropertyGrid;
private PropertyGrid extPropertyGrid;
private VEO_Base ParentObj;
private VEO_Base ProcObj;
private VEO_Base ProcExtObj;
private bool isnew;
private bool dosuffix;
private System.Windows.Forms.TabPage ExtTPage;
public GridItem CurrentGridItem;
private System.Windows.Forms.Label lblSuffix;
private System.Windows.Forms.ComboBox cmbSuffix;
private bool canedit;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public PrcProperties(Object par, Object prc, Object ext)
{
ParentObj = (VEO_Base) par;
ProcObj = (VEO_Base) prc;
ProcExtObj = (VEO_Base) ext;
if(ProcObj.isNew)
isnew=true;
else
isnew=false;
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.genPropertyGrid.SelectedObject=prc;
if (ext != null)
{
this.extPropertyGrid.SelectedObject=ext;
if (this.tabCtlProc.TabPages.Count<2)this.tabCtlProc.TabPages.Add(ExtTPage);
}
else
this.tabCtlProc.TabPages.Remove(ExtTPage);
// make apply button visible if modify
this.btnApply.Visible = !isnew;
// if the parent has suffixes as part of format, then
// turn visibility on to the suffix combo box & label, and
// add each character to the suffix combo box & set current
// value.
VEO_ProcSet ps = (VEO_ProcSet) ParentObj.parentObj;
if (ps.SuffixFlags != null && ps.SuffixFlags != "")
{
dosuffix=true;
this.lblSuffix.Visible=true;
this.cmbSuffix.Visible=true;
this.cmbSuffix.Items.Add("blank");
for (int i=0; i<ps.SuffixFlags.Length; i++)
this.cmbSuffix.Items.Add(ps.SuffixFlags.Substring(i,1));
VEO_Proc lprc = (VEO_Proc) ProcObj;
this.cmbSuffix.SelectedIndex = 0;
if (lprc._ProcCode != null && lprc._ProcCode != "")
{
for(int i=0;i<ps.SuffixFlags.Length; i++)
{
if(lprc._ProcCode==this.cmbSuffix.Items[i].ToString())
{
this.cmbSuffix.SelectedIndex = i;
break;
}
}
}
}
else
{
this.lblSuffix.Visible=false;
this.cmbSuffix.Visible=false;
dosuffix=false;
}
if((ProcObj.canEdit()==false)&&!isnew)
{
canedit=false;
this.genPropertyGrid.Enabled=false;
this.extPropertyGrid.Enabled=false;
this.cmbSuffix.Enabled=false;
}
else
{
canedit=true;
this.genPropertyGrid.Enabled=true;
this.extPropertyGrid.Enabled=true;
this.cmbSuffix.Enabled=true;
}
this.btnApply.Enabled=false;
// make apply button visible if modify
this.btnApply.Visible = !isnew;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PrcProperties));
this.tabCtlProc = new System.Windows.Forms.TabControl();
this.generalTPage = new System.Windows.Forms.TabPage();
this.genPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.ExtTPage = new System.Windows.Forms.TabPage();
this.extPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnApply = new System.Windows.Forms.Button();
this.cmbSuffix = new System.Windows.Forms.ComboBox();
this.lblSuffix = new System.Windows.Forms.Label();
this.tabCtlProc.SuspendLayout();
this.generalTPage.SuspendLayout();
this.ExtTPage.SuspendLayout();
this.SuspendLayout();
//
// tabCtlProc
//
this.tabCtlProc.Controls.Add(this.generalTPage);
this.tabCtlProc.Controls.Add(this.ExtTPage);
this.tabCtlProc.Location = new System.Drawing.Point(0, 0);
this.tabCtlProc.Name = "tabCtlProc";
this.tabCtlProc.SelectedIndex = 0;
this.tabCtlProc.Size = new System.Drawing.Size(704, 192);
this.tabCtlProc.TabIndex = 0;
//
// generalTPage
//
this.generalTPage.Controls.Add(this.genPropertyGrid);
this.generalTPage.Location = new System.Drawing.Point(4, 22);
this.generalTPage.Name = "generalTPage";
this.generalTPage.Size = new System.Drawing.Size(696, 166);
this.generalTPage.TabIndex = 0;
this.generalTPage.Text = "General";
//
// genPropertyGrid
//
this.genPropertyGrid.CommandsVisibleIfAvailable = true;
this.genPropertyGrid.Dock = System.Windows.Forms.DockStyle.Top;
this.genPropertyGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.genPropertyGrid.HelpVisible = false;
this.genPropertyGrid.LargeButtons = false;
this.genPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.genPropertyGrid.Location = new System.Drawing.Point(0, 0);
this.genPropertyGrid.Name = "genPropertyGrid";
this.genPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.genPropertyGrid.Size = new System.Drawing.Size(696, 416);
this.genPropertyGrid.TabIndex = 1;
this.genPropertyGrid.Text = "Properties";
this.genPropertyGrid.ToolbarVisible = false;
this.genPropertyGrid.ViewBackColor = System.Drawing.SystemColors.Window;
this.genPropertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText;
this.genPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.genPropertyGrid_PropertyValueChanged);
//
// ExtTPage
//
this.ExtTPage.Controls.Add(this.extPropertyGrid);
this.ExtTPage.Location = new System.Drawing.Point(4, 22);
this.ExtTPage.Name = "ExtTPage";
this.ExtTPage.Size = new System.Drawing.Size(696, 166);
this.ExtTPage.TabIndex = 1;
this.ExtTPage.Text = "Extended";
//
// extPropertyGrid
//
this.extPropertyGrid.CommandsVisibleIfAvailable = true;
this.extPropertyGrid.Dock = System.Windows.Forms.DockStyle.Top;
this.extPropertyGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.extPropertyGrid.HelpVisible = false;
this.extPropertyGrid.LargeButtons = false;
this.extPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.extPropertyGrid.Location = new System.Drawing.Point(0, 0);
this.extPropertyGrid.Name = "extPropertyGrid";
this.extPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.extPropertyGrid.Size = new System.Drawing.Size(696, 416);
this.extPropertyGrid.TabIndex = 0;
this.extPropertyGrid.Text = "PropertyGrid";
this.extPropertyGrid.ToolbarVisible = false;
this.extPropertyGrid.ViewBackColor = System.Drawing.SystemColors.Window;
this.extPropertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText;
this.extPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.extPropertyGrid_PropertyValueChanged);
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnOK.Location = new System.Drawing.Point(400, 264);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(88, 32);
this.btnOK.TabIndex = 1;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(504, 264);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(88, 32);
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnApply
//
this.btnApply.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnApply.Location = new System.Drawing.Point(608, 264);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(88, 32);
this.btnApply.TabIndex = 3;
this.btnApply.Text = "Apply";
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// cmbSuffix
//
this.cmbSuffix.Location = new System.Drawing.Point(72, 216);
this.cmbSuffix.Name = "cmbSuffix";
this.cmbSuffix.Size = new System.Drawing.Size(56, 21);
this.cmbSuffix.TabIndex = 4;
this.cmbSuffix.Text = "comboBox1";
this.cmbSuffix.SelectedIndexChanged += new System.EventHandler(this.cmbSuffix_SelectedIndexChanged);
//
// lblSuffix
//
this.lblSuffix.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblSuffix.Location = new System.Drawing.Point(16, 216);
this.lblSuffix.Name = "lblSuffix";
this.lblSuffix.Size = new System.Drawing.Size(48, 16);
this.lblSuffix.TabIndex = 5;
this.lblSuffix.Text = "Suffix:";
//
// PrcProperties
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(720, 318);
this.Controls.Add(this.lblSuffix);
this.Controls.Add(this.cmbSuffix);
this.Controls.Add(this.btnApply);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.tabCtlProc);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PrcProperties";
this.Text = "Procedure Properties";
this.tabCtlProc.ResumeLayout(false);
this.generalTPage.ResumeLayout(false);
this.ExtTPage.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void genPropertyGrid_Click(object sender, System.EventArgs e)
{
CurrentGridItem = this.genPropertyGrid.SelectedGridItem;
}
private void extPropertyGrid_Click(object sender, System.EventArgs e)
{
CurrentGridItem = this.extPropertyGrid.SelectedGridItem;
}
private void genPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
{
btnApply.Enabled = true;
CurrentGridItem = this.genPropertyGrid.SelectedGridItem;
}
private void extPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
{
btnApply.Enabled = true;
CurrentGridItem = this.extPropertyGrid.SelectedGridItem;
}
// save data for use by ok and apply button clicks
private bool saveclick()
{
bool success = true;
// save the suffix if using it. Note that this was done
// as a separate combo box since fields cannot be removed
// from the property grid at run time.
if (dosuffix)
{
VEO_Proc prc = (VEO_Proc)ProcObj;
if (cmbSuffix.SelectedIndex == 0)
prc._ProcCode = null;
else
prc._ProcCode = cmbSuffix.SelectedItem.ToString();
}
if (isnew)
{
if(ParentObj==null)
{
DialogResult=DialogResult.Cancel;
return success;
}
success=ParentObj.SaveChild(ProcObj);
}
else
{
success=ProcObj.Write();
}
return success;
}
// save was clicked, use the objects save methods.
private void btnOK_Click(object sender, System.EventArgs e)
{
bool success = true;
if(canedit)success = saveclick();
if (success==true)
{
DialogResult = DialogResult.OK;
this.Close();
}
}
private void btnApply_Click(object sender, System.EventArgs e)
{
if(canedit)return;
bool success = saveclick();
if(success==true)btnApply.Enabled=false;
Refresh();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
if(!canedit)return;
ProcObj.Restore();
}
private void cmbSuffix_SelectedIndexChanged(object sender, System.EventArgs e)
{
btnApply.Enabled=true;
}
}
}

View File

@@ -0,0 +1,264 @@
<?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="tabCtlProc.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabCtlProc.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="tabCtlProc.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="tabCtlProc.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabCtlProc.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="tabCtlProc.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="generalTPage.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="generalTPage.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="generalTPage.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="generalTPage.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="generalTPage.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="generalTPage.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="genPropertyGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="genPropertyGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="genPropertyGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ExtTPage.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="ExtTPage.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="ExtTPage.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="ExtTPage.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ExtTPage.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ExtTPage.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="extPropertyGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="extPropertyGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="extPropertyGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnApply.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbSuffix.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="cmbSuffix.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="cmbSuffix.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblSuffix.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="lblSuffix.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="lblSuffix.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.Name">
<value>PrcProperties</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.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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,218 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: ProcExt.cs $ $Revision: 3 $
* $Author: Kathy $ $Date: 4/21/05 10:22a $
*
* $History: ProcExt.cs $
*
* ***************** Version 3 *****************
* User: Kathy Date: 4/21/05 Time: 10:22a
* Updated in $/LibSource/VEObject
* remove upgrade2005 define
*
* ***************** Version 2 *****************
* User: Kathy Date: 3/08/05 Time: 1:51p
* Updated in $/LibSource/VEObject
* Approval
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Collections;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Data;
using System.ComponentModel;
using System.Diagnostics;
using Utils;
using VDB;
namespace VEObject
{
/// <summary>
/// VEO_ProcExt support procedure set functionality.
/// </summary>
public class VEO_ProcExt : VEO_Base
{
public string latestRev; // 30 char long
public string latestPC; // 10 char long
public string recID; // 8 char long
public string approvalTD;
private string tmpComment;
private bool changeComment;
private string _Comment;
public DataRow drow;
public VEO_ProcExt(string comment, string rev, string pc, string recid, string std, DataRow row)
{
changeComment=false;
_Comment = comment;
latestRev = rev;
latestPC = pc;
recID = recid;
approvalTD = std;
drow = row;
if (std==null || std=="")
approvalTD = "Not Approved";
else
{
DateTime dtx = System.Convert.ToDateTime(std);
ThisTimeZone TZ = new ThisTimeZone();
TimeSpan TimeZoneSpan = TZ.GetUtcOffset(dtx); // Time Zone offset from UTC
long TimeZoneAdj = Math.Abs(TimeZoneSpan.Ticks / 10000000); // convert to seconds
DateTime cnv = dtx.AddSeconds(-TimeZoneAdj);
approvalTD = cnv.ToLongDateString() + " " + cnv.ToLongTimeString();
}
}
[Description("Approved"),Category("Procedure Extension"),ReadOnly(true)]public string Approved
{
get{return approvalTD;}
}
[Description("Revision"),Category("Procedure Extension"),ReadOnly(true)]public string Revision
{
get{return latestRev;}
}
[Description("Change ID"),Category("Procedure Extension"),ReadOnly(true)]public string ChangeID
{
get{return latestPC;}
}
[Description("Comment"),Category("Procedure Extension")]public string Comment
{
get
{
if (!changeComment)
return _Comment;
else
return tmpComment;
}
set
{
changeComment=true;
tmpComment=value;
}
}
public override void Restore()
{
changeComment=false;
}
public bool SaveNew(VEO_Proc prc, string srecid)
{
try
{
VEO_DummySet ds = (VEO_DummySet) prc.parentObj;
// Add the record to the setext file.
DataTable pdatatable = ds.vdbSetExt.DB_Data.Tables[0];
DataRow recidrow = pdatatable.Rows[0];
recidrow["RECID"]=srecid;
DataRow pdatarow = pdatatable.NewRow();
recID = srecid;
pdatarow["RECID"] = srecid;
pdatarow["COMMENT"] = Comment;
pdatarow["REV"] = System.DBNull.Value;
pdatarow["PC"] = System.DBNull.Value;
pdatatable.Rows.Add(pdatarow);
ds.vdbSetExt.DB_Data = pdatarow.Table.DataSet;
_Comment=Comment;
changeComment=false;
drow=pdatarow;
prc.procExt = this;
}
catch (Exception e)
{
MessageBox.Show(e.Message,"Could not perform database functions required to add procedure.");
return false;
}
return true;
}
public override bool Read(bool dummy)
{
return true;
}
public bool Write(VEO_DummySet dset)
{
bool dchange=false;
VEO_ProcSet pset = (VEO_ProcSet) dset.parentObj;
if (changeComment)
{
if((drow["COMMENT"]==System.DBNull.Value && tmpComment!=null) ||((string)drow["COMMENT"]!=tmpComment))
{
drow["COMMENT"] = tmpComment;
_Comment = tmpComment;
changeComment=false;
dchange=true;
}
}
if(dchange)
{
try
{
dset.vdbSetExt.DB_Data = drow.Table.DataSet;
}
catch (Exception e)
{
MessageBox.Show(e.Message);
return false;
}
}
return true;
}
public void SetProcApprovedDate(string dbname, string ApprovedPath)
{
MessageBox.Show("Set Extention setting of approval date is not implemented yet");
/*
* string apprfilepath = ApprovedPath + "\\" + dbname + ".dbf";
DateTime dt = File.GetLastWriteTime(apprfilepath);
//C - CODE....
//get the approved file date/time stamp
if ( getftime(apprfile, &ft) == -1)
{
Zfree(&buff);
close(apprfile);
return;
}
close(apprfile);
// assign the file date/time to the Date and Time structures
dt.da_year = ft.ft_year + 1980;
dt.da_mon = (char)ft.ft_month;
dt.da_day = (char)ft.ft_day;
tm.ti_hour = (char)ft.ft_hour;
tm.ti_min = (char)ft.ft_min;
tm.ti_sec = (char)ft.ft_tsec << 1;
// getdate(&dt);
// gettime(&tm);
(void) VDB_GetSetExtRecord(SetExtfd,rec,(char *)buff);
buff->approvalTD=dostounix(&dt,&tm);
NWSetMode(NWExclusive);
if (!VDB_LockSetFile(SetExtfd))
return;
(void) VDB_UpdateSetExtRecord(SetExtfd,rec,(char *)buff);
NWResetMode();
VDB_UnLockSetFile(SetExtfd);
Zfree(&buff);
return;
*/
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,237 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: Properties.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 7/27/04 8:53a $
*
* $History: Properties.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace VEObject
{
/// <summary>
/// This class provides the 'Properties' dialog box. It includes a property
/// grid which uses Property data from caller to list items in the grid.
/// </summary>
public class Properties : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.PropertyGrid myPropertyGrid;
private System.Windows.Forms.Panel panel1;
private VEO_Base _ParentObj;
private VEO_Base _CurObj;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnApply;
private bool isnew;
public GridItem CurrentGridItem;
private bool canedit;
public Properties(Object par, Object obj)
{
_ParentObj = (VEO_Base) par;
_CurObj = (VEO_Base) obj;
if(_CurObj.isNew)
isnew=true;
else
isnew=false;
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.btnApply.Enabled=false;
if((_CurObj.canEdit()==false)&&!isnew)
this.myPropertyGrid.Enabled=false;
else
this.myPropertyGrid.Enabled=true;
this.myPropertyGrid.SelectedObject=obj;
canedit=this.myPropertyGrid.Enabled;
// make apply button visible if modify
this.btnApply.Visible = !isnew;
}
/// <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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Properties));
this.myPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.panel1 = new System.Windows.Forms.Panel();
this.btnApply = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// myPropertyGrid
//
this.myPropertyGrid.CommandsVisibleIfAvailable = true;
this.myPropertyGrid.Dock = System.Windows.Forms.DockStyle.Top;
this.myPropertyGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.myPropertyGrid.HelpVisible = false;
this.myPropertyGrid.LargeButtons = false;
this.myPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.myPropertyGrid.Location = new System.Drawing.Point(0, 0);
this.myPropertyGrid.Name = "myPropertyGrid";
this.myPropertyGrid.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.myPropertyGrid.Size = new System.Drawing.Size(704, 416);
this.myPropertyGrid.TabIndex = 1;
this.myPropertyGrid.Text = "Properties";
this.myPropertyGrid.ToolbarVisible = false;
this.myPropertyGrid.ViewBackColor = System.Drawing.SystemColors.Window;
this.myPropertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText;
this.myPropertyGrid.Click += new System.EventHandler(this.myPropertyGrid_Click);
this.myPropertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.myPropertyGrid_PropertyValueChanged);
this.myPropertyGrid.DoubleClick += new System.EventHandler(this.myPropertyGrid_Click);
//
// panel1
//
this.panel1.Controls.Add(this.btnApply);
this.panel1.Controls.Add(this.btnCancel);
this.panel1.Controls.Add(this.btnSave);
this.panel1.Location = new System.Drawing.Point(0, 128);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(704, 96);
this.panel1.TabIndex = 2;
//
// btnApply
//
this.btnApply.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnApply.Location = new System.Drawing.Point(200, 8);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(64, 24);
this.btnApply.TabIndex = 2;
this.btnApply.Text = "Apply";
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnCancel.Location = new System.Drawing.Point(112, 8);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(64, 24);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "Cancel";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnSave
//
this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnSave.Location = new System.Drawing.Point(24, 8);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(64, 24);
this.btnSave.TabIndex = 0;
this.btnSave.Text = "OK";
this.btnSave.Click += new System.EventHandler(this.btnOK_Click);
//
// Properties
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(704, 190);
this.Controls.Add(this.panel1);
this.Controls.Add(this.myPropertyGrid);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Properties";
this.Text = "Properties";
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void myPropertyGrid_Click(object sender, System.EventArgs e)
{
CurrentGridItem = this.myPropertyGrid.SelectedGridItem;
}
private void myPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
{
btnApply.Enabled = true;
CurrentGridItem = this.myPropertyGrid.SelectedGridItem;
}
// save data for use by ok and apply button clicks
private bool saveclick()
{
bool success = true;
if (isnew)
{
if(_ParentObj==null)
{
DialogResult=DialogResult.Cancel;
return success;
}
success=_ParentObj.SaveChild(_CurObj);
}
else
{
success=_CurObj.Write();
}
return success;
}
// save was clicked, use the objects save methods.
private void btnOK_Click(object sender, System.EventArgs e)
{
bool success = true;
if (canedit) success = saveclick();
if (success==true)
{
DialogResult = DialogResult.OK;
this.Close();
}
}
private void btnApply_Click(object sender, System.EventArgs e)
{
if(!canedit)return;
bool success = saveclick();
if(success==true)btnApply.Enabled=false;
this.myPropertyGrid.Refresh();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
if(!canedit)return;
_CurObj.Restore();
}
}
}

View File

@@ -0,0 +1,201 @@
<?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="myPropertyGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="myPropertyGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myPropertyGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="panel1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="panel1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="panel1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="panel1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="panel1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="panel1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnApply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnApply.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnSave.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btnSave.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btnSave.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.Name">
<value>Properties</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>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@@ -0,0 +1,436 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: RO.cs $ $Revision: 6 $
* $Author: Kathy $ $Date: 5/02/06 9:46a $
*
* $History: RO.cs $
*
* ***************** Version 6 *****************
* User: Kathy Date: 5/02/06 Time: 9:46a
* Updated in $/LibSource/VEObject
* B2006-018: ro usages for procnums with single quote
*
* ***************** Version 5 *****************
* User: Jsj Date: 6/02/05 Time: 11:36a
* Updated in $/LibSource/VEObject
* fix for approving with conditional ROs and code cleanup
*
* ***************** Version 4 *****************
* User: Kathy Date: 5/19/05 Time: 11:08a
* Updated in $/LibSource/VEObject
* speed up approve
*
* ***************** Version 3 *****************
* User: Jsj Date: 5/17/05 Time: 12:00p
* Updated in $/LibSource/VEObject
* Approve graphic fix
*
* ***************** Version 2 *****************
* User: Jsj Date: 3/10/05 Time: 4:02p
* Updated in $/LibSource/VEObject
* hooks to new namespace for RO FST file
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:51p
* Created in $/LibSource/VEObject
* Approval
*********************************************************************************************/
using System;
using System.IO;
using System.Data;
using System.Windows.Forms;
using System.Collections;
using Utils;
using ROFST_FILE;
using VDB_ROUsage;
using VlnStatus;
namespace VEObject
{
/// <summary>
/// Summary description for ROFST. Provides support/interface to/from RO.fst file.
/// </summary>
public class ROFST : ROFST_File
{
// constructor loads ro.fst databases
public ROFST(string path):base(path)
{
}
~ ROFST()
{
}
public void CopyImagesToApproved(string appdir, VlnStatusMessage StatMsgWindow)
{
for(int i=0;i<numDatabases;i++)
{
// Go through the list entries recursively finding any graphics images to copy
// to approved.
uint start = ((ROFST_DbInfo)DatabasesInfo[i]).dbiGL;
ushort level = ((ROFST_DbInfo)DatabasesInfo[i]).dbiID;
ProcessGroupsForImages(appdir,null,0,null,brROFst,start,0,level, StatMsgWindow);
}
}
private bool wasused (ushort tblid, uint id)
{
string pth = DirPath.Substring(0,DirPath.Length-6);
vdb_ROUsage ROusage = new vdb_ROUsage(pth + "usagero.dbf"); // need path
string roid = tblid.ToString("X4") + id.ToString("X8");
string WhereStr = "WHERE ROID LIKE '" + roid.ToLower() + "%'";
DataSet RODataSet = ROusage.GetSortedByROID(WhereStr);
DataTable roTbl = RODataSet.Tables[0];
if (roTbl.Rows.Count>0) return true;
return false;
}
private void CopyROFile(string fname, string ApprovedDir)
{
PrivateProfile ropathINI = new PrivateProfile("PROC.INI");
string ropath = ropathINI.Attr("RO Defaults","ROPATH");
if (ropath == null || ropath == "") ropath = "..\\RO";
string src = ropath + "\\" + fname;
string dst = ApprovedDir + "\\" + fname;
if (File.Exists(src))
{
File.Copy(src,dst,true);
FileInfo fi_src = new FileInfo(src);
FileInfo fi_dst = new FileInfo(dst);
fi_dst.LastWriteTime = fi_src.LastWriteTime;
}
else
MessageBox.Show("Could not copy " + src);
}
private long CalculatePromsDate(DateTime imgdate)
{
/*
* do some conversion so that comparison can be made on date/time
* stored on image data from ro.fst to a datetime from .net.
* Proms had it in seconds since 00:00:00 1/1/1970.
* .NET has it in ticks since 00:00:00 1/1/1
*/
DateTime promsdt = new DateTime(1970,1,1,0,0,0); // Jan 1, 1970
// Convert the promsdt to UTC (GMT)
DateTime promsdtU = promsdt.ToUniversalTime();
long promsdtU_num = promsdtU.Ticks / 10000000;
// Convert the image file datetime to UTC
DateTime imgdateU = imgdate.ToUniversalTime();
long imgdateu_num = imgdateU.Ticks / 10000000;
/**
* Get the time adjustment for the current Time Zone with respect
* to the coordinated universal time (UTC) - a.k.a. Greenwich mean time (GMT).
* The time gotten for the Jan 1, 1970 is in UTC time, the imgdate time is
* in EST.
*
* Get the offset time between this time zone and UTC (GMT) time.
* Convert the offset to seconds.
* Subtract the offset from the UTC time gotten for Jan 1, 1970
*/
ThisTimeZone TZ = new ThisTimeZone();
TimeSpan TimeZoneSpan = TZ.GetUtcOffset(promsdt); // Time Zone offset from UTC
long TimeZoneAdj = Math.Abs(TimeZoneSpan.Ticks / 10000000); // convert to seconds
/*
* The file date/time and the Jan 1, 1970 adjustment date are in UTC.
* Subtract the "Jan 1, 1970" date/time from the file date/time
* the add the Time Zone offset to place the date/time value into
* local time.
*/
long lsec = (imgdateu_num - promsdtU_num) + TimeZoneAdj;
return lsec;
}
public void ApproveGraphicsFile(string fstRec, string appdir, VlnStatusMessage StatMsgWindow)
{
long dt;
// position to Graphics file name
int nlindx = fstRec.IndexOf("\n");
// Graphics file name
string fbuf = fstRec.Substring(0,nlindx);
// Grpahics file date/time (stored in RO.FST)
dt = System.Convert.ToInt32(fstRec.Substring(nlindx+1,8),16);
// Add the graphics file extension if needed
int indx = fbuf.IndexOf(".");
if (indx<0 || (fbuf.Length>indx+1 && fbuf[indx+1]=='\\'))
{
if (DefaultGraphicFileExt[0] != '.') fbuf = fbuf + ".";
fbuf = fbuf + DefaultGraphicFileExt;
}
// if file doesn't exist in approved
// or if it is more recent than approved,
// copy it to approved.
string appfbuf = appdir + "\\" + fbuf;
FileInfo app_fi = new FileInfo(fbuf);
if (!File.Exists(appfbuf) || (CalculatePromsDate(app_fi.LastWriteTime)!=dt))
{
if (StatMsgWindow !=null) StatMsgWindow.StatusMessage = "Updating graphic " + fbuf;
CopyROFile(fbuf,appdir);
}
}
private void ProcessGroupsForImages(string appdir, string tmp,uint x1,string ttl,BinaryReader br,
uint start, short level, ushort tblid, VlnStatusMessage StatMsgWindow)
{
uint id, parid;
short howmany;
long wasAt = br.BaseStream.Position;
br.BaseStream.Seek((long) start, SeekOrigin.Begin);
id = br.ReadUInt32();
parid = br.ReadUInt32();
howmany = br.ReadInt16();
if (howmany <= 0 && (ttl!=null && ttl!="") && wasused(tblid,id))
{
byte bt = br.ReadByte(); // skip type
bt = br.ReadByte();
// Read the Graphics File ROFST record
string dtl = ROFST.GetAsciiString(br);
// Approve the Graphics file
ApproveGraphicsFile(dtl, appdir, StatMsgWindow);
}
// if count in howmany is greater than zero, this must be a group
// recursively call this to find ros.
if (howmany>0)
{
if (level>=0)
{
string [] title = new string [howmany];
UInt32 [] offset = new UInt32 [howmany];
UInt16 [] type = new UInt16 [howmany];
for (int i=0; i<howmany; i++)
{
offset[i]=br.ReadUInt32();
type[i]=br.ReadUInt16();
title[i] = ROFST.GetAsciiString(br);
}
for (int i=0; i<howmany; i++)
{
if ((type[i]&8)>0)
ProcessGroupsForImages(appdir,null,type[i],title[i],br,offset[i],System.Convert.ToInt16(level+1),tblid,StatMsgWindow);
}
}
}
br.BaseStream.Seek(wasAt,SeekOrigin.Begin);
}
}
public class Usages
{
static Usages()
{
}
public static int CheckRoReferences(VEO_ProcSet ps, string path, ArrayList al, ArrayList ModROs, string keystr)
{
// get usage records for the input string 'keystr' and then check to
// see if the RO is in the input Modified list.
// If keystr is a lib-doc (i.e. starts with "DOC") then just return the
// whether there is modified ro in here.
// If keystr is a procedure num, check to see if other procedures use this
// modified RO and add them to the list of items to approve (al).
// -1 flags failure on return. Otherwise, return count of those found.
int retval=0;
vdb_ROUsage rousg=null;
DataSet dataset=null;
string us_path = path + "\\usagero.dbf";
try
{
rousg = new vdb_ROUsage(us_path);
dataset = rousg.GetSortedByProc("[NUMBER] = \'"+keystr.Replace("'","''")+"\'");
}
catch (Exception e)
{
MessageBox.Show("Could not get RO usages for this item " + keystr + ", " + e.Message);
return -1;
}
foreach (DataRow dr in dataset.Tables[0].Rows)
{
// if we find an RO that's in the ModROs list, then here's where
// we see if it's used by other procedures too.
string roid = dr["ROID"].ToString();
if (roid.Length == 12)
roid = roid + "0000";
else if (!roid.EndsWith("0000"))
roid = roid.Substring(0,12) + "0000";
ModRO wasModRO = null;
foreach (ModRO mro in ModROs)
{
string tmpROID = mro.roid;
if (tmpROID.Length == 12)
tmpROID = tmpROID + "0000";
if (tmpROID.Equals(roid))
{
mro.roid = tmpROID;
wasModRO = mro;
mro.IsUsed = true;
break;
}
}
// if just checking if the library document has any modified ROs, then
// just return (return with a number greater than 0 to flag that it had
// modified ROs. Doc is only passed in as the keystr when checking for
// modified library documents.
if (keystr.Substring(0,3).ToUpper()=="DOC")
{
if (wasModRO != null) return 1;
return 0;
}
// if this was a procedure, then we'll see if other procedures use this.
if (wasModRO != null)
{
us_path = path + "\\approved\\usagero.dbf";
rousg = null;
rousg = new vdb_ROUsage(us_path);
DataSet dataset_prc = null;
string keyroid = roid.Substring(0,12)+"%";
try
{
dataset_prc = rousg.GetSortedByROID("[ROID] LIKE \'"+keyroid+"\'");
//dataset_prc = rousg.GetSortedByROID("[ROID] = \'"+roid+"\'");
}
catch (Exception e)
{
MessageBox.Show("Could not get procedures using modified RO " + roid + ", " + e.Message);
return -1;
}
foreach (DataRow drroid in dataset_prc.Tables[0].Rows)
{
// first see if this prpc is already in list of procedures to approve
// if so, don't add it, but check to be sure this ro is in the conflict
// list.
bool inlist = false;
AppIndItem cur=null;
foreach (object obal in al)
{
AppIndItem aiiobj = (AppIndItem) obal;
if (aiiobj.Proc._Prcnum == (string)drroid["NUMBER"])
{
cur=aiiobj;
inlist=true;
break;
}
}
if (!inlist)
{
VEO_DummySet ds = (VEO_DummySet) ps.Children[1];
// find the procedure object to add it the the approve list
foreach (object ob in ds.Children)
{
VEO_Proc pr = (VEO_Proc) ob;
if (pr._Prcnum == (string) drroid["NUMBER"])
{
cur = new AppIndItem(pr);
al.Add(cur);
retval++;
break;
}
}
if (cur==null)
{
retval++;
cur = new AppIndItem(null);
}
}
// is this ROID already in the conflict list.
inlist = false;
foreach (AppConflict aco in cur.ConflictList)
{
if (aco.CType == AppConflictTypes.RO)
{
AppROConflict raco = (AppROConflict) aco;
if (raco.ROID == roid)
{
inlist=true;
break;
}
}
}
if (!inlist)
{
string val1 = (drroid["NUMBER"]==System.DBNull.Value)?null:(string)drroid["NUMBER"];
string val2 = (drroid["SEQUENCE"]==System.DBNull.Value)?null:(string)drroid["SEQUENCE"];
AppROConflict roc = new AppROConflict((VEO_DummySet)ps.Children[1],roid, val1, val2,wasModRO.IsImage,wasModRO.Val1,wasModRO.Val2);
cur.AddConflict(roc);
}
}
}
}
return retval;
}
// For approve individual, update the approved version with the ro usages for the
// procedure or library defined by input 'WdNum'. 'ApNum' is the procedure number if
// this is a procedure - if libdoc this will be same as 'WdNum', in case of change
// in procedure number.
public static void FixROUsages(string WdPath, string ApprovedPath, string ApNum, string WdNum)
{
string appath=ApprovedPath+"\\usagero.dbf";
try
{
vdb_ROUsage arousg = new vdb_ROUsage(appath);
// remove ro usages from the approved ro usage file. ApNum will be null
// if this is a new procedure - in this case we don't need to remove anything
// from the approved usages file.
if (ApNum != null)
{
DataSet adset = arousg.GetSortedByProc("[NUMBER]=\'"+ApNum.Replace("'","''")+"\'");
int ndr = adset.Tables[0].Rows.Count;
if (ndr>0)
{
int errs = arousg.DeleteSelected("[NUMBER]=\'"+ApNum.Replace("'","''")+"\'");
if (errs>0)
{
MessageBox.Show("Error resolving transition records");
return;
}
arousg.Pack();
}
adset=null;
}
// now update the approved ro usages from data based on data in the working
// draft.
vdb_ROUsage rousg = new vdb_ROUsage(WdPath+"\\usagero.dbf");
DataSet wdset = rousg.GetSortedByProc("[NUMBER] = \'"+WdNum.Replace("'","''")+"\'");
if (wdset.Tables[0].Rows.Count>0)
{
int errs = rousg.InsertInto(WdPath+"\\"+ApprovedPath+"\\usagero.dbf","[NUMBER] = \'"+WdNum.Replace("'","''")+"\'");
if (errs>0)
{
MessageBox.Show("Error resolving RO usage records.");
return;
}
}
wdset.Dispose();
rousg=null;
arousg=null;
}
catch (Exception e)
{
MessageBox.Show("Could not approve ro usages for " + WdNum + ", "+e.Message);
return;
}
}
}
}

View File

@@ -0,0 +1,121 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: RefList.cs $ $Revision: 3 $
* $Author: Jsj $ $Date: 7/21/06 2:59p $
*
* $History: RefList.cs $
*
* ***************** Version 3 *****************
* User: Jsj Date: 7/21/06 Time: 2:59p
* Updated in $/LibSource/VEObject
* The File for Edit Depenencies was being created in the wrong place for
* VFW to find.
*
* ***************** Version 2 *****************
* User: Kathy Date: 3/22/05 Time: 10:11a
* Updated in $/LibSource/VEObject
* clean up code
*
* ***************** Version 1 *****************
* User: Kathy Date: 3/08/05 Time: 1:51p
* Created in $/LibSource/VEObject
* Approval
*********************************************************************************************/
using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Utils;
namespace VEObject
{
/// <summary>
/// Summary description for RefList.
///
/// The RefList class creates, reads, writes, and deletes a file
/// of the 'input' name to hold procedure numbers/sequence numbers that
/// represent dependencies that need to be addressed (i.e. removed) by
/// the user in the editor. This is either for resolving approve selected
/// conflicts or deleting a procedure with transitions. (actual current use is
/// for approve selected conflicts).
/// The contents of this file is read in and listed via the TranRefsDlg in vfw
/// for now, i.e. as long as vfw is the editor.
/// The 'input' file is created in the user's Temp directory when in multi-user
/// mode or in the procedure directory when a lock is set or when in single user \
/// mode.
/// </summary>
public class RefList
{
private string FileName;
private string FromProcNum;
private FileStream FSRef;
private BinaryWriter BWRef;
private UserRunTime usrRunTime;
private long HeaderOffset;
private Int16 NumRefs;
public RefList(string frmProcNum, string fname, UserRunTime urt)
{
FileName = fname;
usrRunTime=urt;
FromProcNum=frmProcNum;
NumRefs=0;
BWRef = null;
}
public bool Create()
{
try
{
// Bug fix B2006-034
// Note that ExeAdjust() needs to check for a lock set.
// When a lock is set, the xE7 char would act like the xE2 char in
// the ExeAdjust() function.
// This bug fix is taking advantage of the fact that lock must be set
// at the time the approval code reaches this logic.
//
// FSRef = new FileStream(usrRunTime.ExeAdjust("\xE7" + FileName),FileMode.Create,FileAccess.Write,FileShare.ReadWrite);
FSRef = new FileStream(usrRunTime.ExeAdjust("\xE2" + FileName),FileMode.Create,FileAccess.Write,FileShare.ReadWrite);
BWRef = new BinaryWriter(FSRef);
BWRef.Write(NumRefs); // Temporary holding for number of references
Int16 len = (Int16)FromProcNum.Length;
BWRef.Write(len);
byte[] btmp = Encoding.ASCII.GetBytes(FromProcNum);
BWRef.Write(btmp,0,len);
HeaderOffset = FSRef.Length;
}
catch (Exception e)
{
MessageBox.Show(e.Message);
return false;
}
return true;
}
public void CloseFile()
{
if (BWRef != null) BWRef.Close();
FSRef=null;
BWRef=null;
NumRefs=0;
HeaderOffset=0;
}
public void WriteTotalNumRefs()
{
FSRef.Seek(0,System.IO.SeekOrigin.Begin);
BWRef.Write(NumRefs);
FSRef.Seek(0,System.IO.SeekOrigin.End);
}
public void WriteRefLine(string refline)
{
byte[] btmp = Encoding.ASCII.GetBytes(refline);
BWRef.Write(btmp,0,100);
NumRefs++;
}
}
}

View File

@@ -0,0 +1,810 @@
/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: VEObject.cs $ $Revision: 9 $
* $Author: Jsj $ $Date: 8/30/06 10:04a $
*
* $History: VEObject.cs $
*
* ***************** Version 9 *****************
* User: Jsj Date: 8/30/06 Time: 10:04a
* Updated in $/LibSource/VEObject
* Added Multi Procedure Data Checker
*
* ***************** Version 8 *****************
* User: Kathy Date: 6/21/05 Time: 7:27a
* Updated in $/LibSource/VEObject
* edit for approve if from procset/procedures node
*
* ***************** Version 7 *****************
* User: Kathy Date: 5/11/05 Time: 9:29a
* Updated in $/LibSource/VEObject
* approve menu from procedures tree node
*
* ***************** Version 6 *****************
* User: Kathy Date: 4/21/05 Time: 10:24a
* Updated in $/LibSource/VEObject
* remove upgrade2005 define
*
* ***************** Version 5 *****************
* User: Kathy Date: 3/22/05 Time: 10:14a
* Updated in $/LibSource/VEObject
* approve: remove revise menu enable
*
* ***************** Version 4 *****************
* User: Kathy Date: 2/03/05 Time: 11:20a
* Updated in $/LibSource/VEObject
* Change 'DUMMY' node to 'TEMP' node (just in case user sees it)
*
* ***************** Version 3 *****************
* User: Kathy Date: 1/31/05 Time: 11:06a
* Updated in $/LibSource/VEObject
* Fix B2005-005 (connection & delete directory errors). also, fix icon
*
* ***************** Version 2 *****************
* User: Kathy Date: 10/25/04 Time: 10:24a
* Updated in $/LibSource/VEObject
* Fix B2004-049
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:53a
* Created in $/LibSource/VEObject
*********************************************************************************************/
using System;
using System.Text;
using System.Collections;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Utils;
using VENetwork;
using VEMessageNS;
namespace VEObject
{
/// <summary>
/// VEObject namespace provides classes for the Volian Enterprises Objects DataRoot, DataPath,
/// Plant, Procedure Set, Procedures, Library Documents and Archives.
///
/// This file has the base class, VEO_Base, which all other objects inherits from.
/// </summary>
public enum VEObjectTypesDefs
{
Generic = 0, ProcedureSet = 1, Procedure = 2, Archive = 3, LibraryDoc =4, System = 5, Plant = 6, DummySet = 7
};
public enum VEO_IconStates
{
Normal=0, LckByMe=1, LckByOther=2, LckPending=3, Empty=4
};
public enum ProcTypeOptions
{
// Standard=0, Background=1, Deviation=2, Slave=3
Standard=0, Slave=1, Background=2, Deviation=3
};
public class VEO_Base
{
public int [] iconStates;
public int icon;
public string _Title;
public string _Location;
public ArrayList Children;
public Object parentObj;
public UserRunTime usrRunTime;
public bool isOpen;
private bool Expanded;
public bool IsEmpty;
public int VEObjectType;
public bool isNew;
public bool AllowListViewSort;
public VELock Lock;
public VEConnection Connection;
public TreeNode treeNode;
public enum ProcColumnOptions
{
OneColumn=0, TwoColumn=1, ThreeColumn=2
};
public enum ArchiveTypeOptions
{
Full=0, Partial=1
};
// constructor
public VEO_Base()
{
Expanded = false;
isOpen = false;
AllowListViewSort = false;
Children = new ArrayList();
VEObjectType = (int)VEObjectTypesDefs.Generic;
}
~ VEO_Base()
{
if (Connection!=null) Connection.Exit();
}
public virtual void LoadLockInfo()
{
Lock = new VELock(_Location, usrRunTime==null?null:usrRunTime.myUserData, VENetwork.LockTypes.None);
}
public virtual bool mnuAllowDelete()
{
return true;
}
public virtual bool mnuAllowApprove()
{
return false;
}
public virtual bool mnuAllowApproveSel()
{
return false;
}
public virtual bool mnuAllowApproveAll()
{
return false;
}
public virtual bool mnuAllowProperties()
{
return true;
}
public virtual bool mnuAllowNew()
{
return true;
}
public virtual bool mnuAllowUpdRO()
{
return false;
}
public virtual bool mnuAllowClean()
{
return false;
}
public virtual bool mnuAllowDataCheck()
{
return false;
}
public virtual bool mnuAllowChgDef()
{
return false;
}
public virtual bool mnuAllowUpdateArch()
{
return false;
}
public virtual bool mnuAllowTestArchive()
{
return false;
}
public virtual bool mnuAllowExtractArch()
{
return false;
}
public virtual bool mnuAllowLckDB()
{
return false;
}
public virtual bool mnuAllowUnlckDB()
{
return false;
}
public virtual bool mnuAllowMonUsr()
{
if (usrRunTime.InMultiUserMode && !(Lock.LockType==VENetwork.LockTypes.None) &&
!(Lock.LockStatus==VENetwork.Status.LockedByOther)) return true;
return false;
}
public virtual bool canEdit()
{
return true;
}
// used to flag whether all siblings of a node should be collapsed before expanding the
// node. This is needed for multi-user support for the plant & procedure set levels so
// that a user does not have open connections all over the tree.
public virtual bool CollapseSibling()
{
return false;
}
public virtual bool amILockedByMe()
{
// if not a newtork serial number, treat it as anything is locked.
if (!usrRunTime.InMultiUserMode)return true;
VEO_Base obj = this;
while (obj!=null)
{
if (obj.Lock.LockStatus == VENetwork.Status.Locked) return true;
obj = (VEO_Base) obj.parentObj;
}
return false;
}
public virtual bool isProcSet()
{
return false;
}
public virtual bool isArchiveSet()
{
return false;
}
public virtual bool updateROValues()
{
return false;
}
public virtual void CleanTransitionsAndROsUsages(int clntype,string ProcName)
{
return;
}
public virtual void ApproveProcedures(int ApproveType, ArrayList prcs)
{
return;
}
public virtual void DataIntegrityCheck(string ProcName)
{
return;
}
// Add TreeNodes to the input TreeNode parent.
public virtual void AddToTree(TreeNode parentnd)
{
for(int i=0; i<Children.Count; i++)
{
VEO_Base veo = (VEO_Base) Children[i];
veo.treeNode = new TreeNode(veo.GetTreeNodeText(),veo.icon,veo.icon);
parentnd.Nodes.Add(veo.treeNode);
veo.treeNode.Tag = veo;
}
}
public virtual void Restore()
{
}
public virtual bool PropertiesDlg(Object parent)
{
Properties propdlg = new Properties(parent, this);
DialogResult dr = propdlg.ShowDialog();
if (dr == DialogResult.OK) return true;
// restore the data (user may have changed in properties dialog,
// but need to restore original.
this.Restore();
return false;
}
public virtual bool EditNode()
{
return true;
}
public virtual bool canDoDragDrop()
{
return false;
}
public void RefreshTreeNode(TreeNode nd)
{
VEO_Base veo = (VEO_Base) nd.Tag;
//refresh the connect & lock.
if (veo.Connection != null) veo.Connection.Enter(false);
// if the object doesn't have a lock type (i.e. isn't where the system,
// plant or procset lock would be set) read in data & add it to the tree.
if (veo.Lock.LockType == VENetwork.LockTypes.None && !(veo is VEO_DummySet))
{
if (veo.Children.Count>0) veo.Children.Clear();
if (nd.Nodes.Count>0) nd.Nodes.Clear();
veo.Read(false);
veo.AddToTree(nd);
}
// if the object can have a lock at this level, but it currently doesnot
// have a lock, if it has children add a temp node to the treeview. This
// is done so that if this becomes expanded, the lock is checked again.
else if (veo.Lock.LockStatus!=VENetwork.Status.LockedByOther)
{
veo.Read(true);
if (veo.Children.Count>0)
{
veo.Children.Clear();
TreeNode dmy = new TreeNode("TEMP");
nd.Nodes.Add(dmy);
}
}
// if multi-user serial number, may have to reset lock status icon.
if (usrRunTime.InMultiUserMode)
{
// if no lock & emtpy, show empty. Otherwise, show lock icon
if (IsEmpty && veo.Lock.LockStatus==VENetwork.Status.NoLock)
veo.icon = veo.iconStates[(int)VEO_IconStates.Empty];
else
veo.icon = veo.iconStates[(int)veo.Lock.LockStatus];
nd.ImageIndex = veo.icon;
nd.SelectedImageIndex = veo.icon;
}
}
// When the user collapses the treenode, also, do some object cleanup.
// This removes children, exits connections for all sub-tree children
// and also refreshes locks, updates icons based on lock changes and
// load in children at the current node level.
public void Collapse(TreeNode nd, TreeViewAction act, bool dorefresh,bool closeconn)
{
Expanded=false;
Children.Clear();
if (Connection != null && closeconn) Connection.Exit();
// if this is the actual node that was collapsed, then refresh at this level,
// i.e. refresh the lock, update the icon (in case of lock status change)
// and load children (may make into temp child if necessary)
if (act == TreeViewAction.Collapse||dorefresh) {
RefreshTreeNode(nd);
// need to exit again because refresh tree node opens the connection
// to determine locking status.
if (Connection != null && closeconn) Connection.Exit();
}
}
// Expand the TreeNode. This makes a new/reenters connection at the level, sets up
// icons for the level, enters it by loading its children (if it successfully
// entered it, i.e. it's not locked.
public virtual bool Expand(TreeNode mytreend)
{
if (Connection==null)
Connection = new VEConnection(Lock, usrRunTime);
// Enter the connection, i.e. refresh the lock & then see if can get into the
// data level.
bool canenter = Connection.Enter(false);
// update icons (in case of lock status change)
if (usrRunTime.InMultiUserMode)
{
// if no lock & emtpy, show empty. Otherwise, show lock icon
if (IsEmpty && Lock.LockStatus==VENetwork.Status.NoLock)
icon = iconStates[(int)VEO_IconStates.Empty];
else
icon = iconStates[(int)Lock.LockStatus];
mytreend.ImageIndex = icon;
mytreend.SelectedImageIndex = icon;
}
// if user cannot enter, it must be locked. Return a false.
if (canenter==false)
{
Collapse(mytreend,TreeViewAction.Unknown,true,false);
mytreend.Nodes.Clear();
mytreend.TreeView.Refresh();
return false;
}
if (Expanded) return true;
Expanded = true;
// load the children. First check for either no children (in case this was locked on
// load, and then subsequently unlocked before the selection or check for a 'TEMP'
// node. If it exists, remove it. Then if this has a lock type of none, load it's
// children. Otherwise, load a temp child under each child. The temp child is
// used because when the user actually expands this node, a recheck of the lock
// status is needed and a change may have occurred (another user may have added,
// deleted or modified children by the time this is entered).
TreeNode frstchld = mytreend.FirstNode;
if (frstchld==null || frstchld.Text == "TEMP")
{
mytreend.Nodes.Clear();
Read(false);
AddToTree(mytreend);
}
VEO_Base veo;
for (int i=0; i<mytreend.Nodes.Count; i++)
{
veo = (VEO_Base) mytreend.Nodes[i].Tag;
// if the object doesn't have a lock type (i.e. isn't where the system,
// plant or procset lock would be set) read in data & add it to the tree.
if (veo.Lock.LockType == VENetwork.LockTypes.None && !(veo is VEO_DummySet))
{
veo.Read(false);
veo.AddToTree(mytreend.Nodes[i]);
}
// if the object can have a lock at this level, but it currently does not
// have a lock, if it has children, add a temp node to the treeview. This
// is done so that if this becomes expanded, the lock is checked again.
else if (veo.Lock.LockStatus!=VENetwork.Status.LockedByOther)
{
veo.Read(true);
if (veo.Children.Count>0)
{
veo.Children.Clear();
TreeNode dmy = new TreeNode("TEMP");
mytreend.Nodes[i].Nodes.Add(dmy);
}
}
}
return true;
}
public virtual void LockedDlg()
{
}
// virtual read
public virtual bool Read(bool dummy)
{
return true;
}
// virtual write
public virtual bool Write()
{
return false;
}
public virtual bool Open()
{
return false;
}
public virtual bool Close()
{
return false;
}
// virtual cancel write (save)
public virtual void CancelWrite()
{
}
public virtual bool Delete()
{
return true;
}
// make a new plain vanilla object (this is really a virtual.
public virtual Object MakeNewChild()
{
return (new Object());
}
public virtual Object Copy()
{
return this; //default to returning self
}
public virtual Object AddNewChild()
{
VEO_Base newobj = (VEO_Base) this.MakeNewChild();
if (newobj==null) return null; // something happened, just return
newobj.parentObj = (VEO_Base) this;
newobj.isNew=true;
bool prpchg = newobj.PropertiesDlg(this);
if (prpchg == true)
{
// Copy is used so that a VEO-object is created that has editable
// (versus new) properties. When the object is 'new' many fields
// are editable that should not be editable when not new (this is
// mainly an issue with the property grid, since the ReadOnly
// setting can only be done at compile/build time - it CANNOT be
// done at run-time. So when a new object is created, if it's
// successful, it's copied to an object which is edit (not new)
// for the treeview & any further operations.
VEO_Base cpyobj = (VEO_Base) newobj.Copy();
Children.Add(cpyobj); // add the new one to the children
if(newobj!=cpyobj)Children.Remove(newobj);
cpyobj.Read(false); // read any child data
return cpyobj;
}
else
return null;
}
public virtual string GetTreeNodeText()
{
return _Title;
}
public virtual bool SaveChild(Object obj)
{
return false;
}
// virtual SaveNew
public virtual bool SaveNew(string pth)
{
return false;
}
public virtual void DoListView(ListView veoListView)
{
return;
}
public virtual void DoWizzard()
{
return;
}
// Comunication between this object & vfw
struct COPYDATASTRUCT
{
public IntPtr dwData;
public int cbData;
public IntPtr lpData;
}
const int WM_COPYDATA = 0x004A;
// sending side
[DllImport("user32.dll")]
static extern bool SendMessage(
IntPtr hWnd,
UInt32 Msg,
UInt32 wParam,
ref COPYDATASTRUCT lParam);
public struct RqstAttachMsg
{
public Int16 level;
public Int16 flag;
public Int32 longval;
}
public struct AnswerMsg
{
public Int16 done;
public Int16 intAnswer;
public Int32 longAnswer;
}
public struct PRecordMsg
{
public Int16 done;
public Int16 cnt;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=140)] public String buff;
}
[StructLayout(LayoutKind.Sequential)]
public struct PosUpdateStr
{
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=16)] public String sender;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=80)] public String directory;
public Int32 docnumindx;
public Int32 recID;
}
private VEO_Base GetObjectAtLevel(int level)
{
try
{
VEO_Base veo = this;
while (veo != null)
{
if (level == 2 && veo.VEObjectType == (int)VEObjectTypesDefs.ProcedureSet)
return veo;
else if (level == 1 && veo.VEObjectType == (int)VEObjectTypesDefs.Plant)
return veo;
else if (level == 0 && veo.VEObjectType == (int)VEObjectTypesDefs.System)
return veo;
veo = (VEO_Base)veo.parentObj;
}
}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString());
}
return null;
}
private bool ReturnProcRecord(VEO_Base veo,Int16 size, IntPtr vfwhndl)
{
bool success=true;
COPYDATASTRUCT cds = new COPYDATASTRUCT();
PRecordMsg prmsg;
prmsg.done = 1;
byte [] bt = new byte[size+4];
prmsg.cnt = veo.Connection.GetProcRecBuff(size, ref bt);
if (prmsg.cnt != size)
{
MessageBox.Show("Could not read multi-user connection information");
return false;
}
prmsg.buff = Encoding.ASCII.GetString(bt,0,size);
IntPtr p = Marshal.AllocHGlobal(size+4);
Marshal.StructureToPtr(prmsg,p,true);
cds.dwData = (IntPtr)VEMessageNS.MessageOps.GETPROCESSREC;
// the following would be 'size+4', however marshalling requires space to be
// a multiple of 8
cds.cbData = 160;
cds.lpData = p;
try
{
SendMessage(vfwhndl,WM_COPYDATA,(UInt32)8, ref cds);
}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString());
success=false;
}
Marshal.FreeHGlobal(p);
return success;
}
private bool Reply(Int16 done, Int16 intAnswer, Int32 longAnswer, IntPtr vfwhndl)
{
bool success=true;
COPYDATASTRUCT cds = new COPYDATASTRUCT();
AnswerMsg ans;
ans.done = done;
ans.intAnswer = intAnswer;
ans.longAnswer = longAnswer;
IntPtr p=Marshal.AllocHGlobal(8);
Marshal.StructureToPtr(ans,p,true);
cds.dwData = (IntPtr)VEMessageNS.MessageOps.GETANSWER;
cds.cbData = 8;
cds.lpData = p;
try
{
SendMessage(vfwhndl,WM_COPYDATA,(UInt32)8, ref cds);
}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString());
success=false;
}
Marshal.FreeHGlobal(p);
return success;
}
public virtual void ProcessMessage(Message m, IntPtr vfwhndl)
{
VEO_Base veo = null;
bool success=false;
if (m.Msg==(int)VEMessageNS.MessageOps.POSQUERY)
{
// POSQUERY is only called to get initial procedure - make the main
// form invisible when this request is made. Wait until now so that
// the main form is visible until vfw window is just about to be
// made visible.
IntPtr handle =
System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
Form mainForm = (Form)Form.FromHandle(handle);
mainForm.Visible = false;
COPYDATASTRUCT cds = new COPYDATASTRUCT();
PosUpdateStr pu;
pu.sender = "NEWBROWSER";
VEO_Proc prc = null;
if (!(this is VEO_Proc))
{
// get to a proc, this is either a set or 'procedures' node
// from an approve selected.
VEO_ProcSet ps = null;
if (this is VEO_ProcSet)
ps = (VEO_ProcSet) this;
else if (this is VEO_DummySet)
ps = (VEO_ProcSet) this.parentObj;
else
{
MessageBox.Show("Error finding procedure for edit","VE-PROMS");
return;
}
prc=ps.AppSelForEdit;
}
else
prc = (VEO_Proc) this;
VEO_DummySet ds = (VEO_DummySet) prc.parentObj;
pu.directory = ds._Location;
pu.docnumindx = ds.Children.IndexOf(prc);
pu.recID = System.Convert.ToInt32(prc.recid,10);
IntPtr p=Marshal.AllocHGlobal(130);
Marshal.StructureToPtr(pu,p,true);
cds.dwData = (IntPtr)VEMessageNS.MessageOps.POSUPDATE;
cds.cbData = 130;
cds.lpData = p;
try
{
SendMessage(vfwhndl,WM_COPYDATA,(UInt32)8, ref cds);
}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString());
}
Marshal.FreeHGlobal(p);
}
else if (m.Msg==WM_COPYDATA)
{
bool reply = true;
Int16 int1=0, int2=0;
int int3=0;
int lvl = 0;
COPYDATASTRUCT cds = (COPYDATASTRUCT) m.GetLParam(typeof(COPYDATASTRUCT));
int tmpmsg = (int)cds.dwData;
VEMessageNS.MessageOps msg = (VEMessageNS.MessageOps) tmpmsg;
RqstAttachMsg ramsg = (RqstAttachMsg)Marshal.PtrToStructure(cds.lpData,typeof(RqstAttachMsg));
// get level veobject associated with this request, i.e. system, plant, or procset
// and then connect at level
lvl = ramsg.level;
try
{
veo = GetObjectAtLevel(lvl);
switch (msg)
{
case VEMessageNS.MessageOps.RQSTATTACH:
success = veo.Connection.Enter(false);
int2 = (short)(success?1:0);
break;
case VEMessageNS.MessageOps.RQSTFILEOFFSET:
if (ramsg.flag==0)
int3 = (int)veo.Connection.FileOffset;
//else
// MessageBox.Show("Set file offset" + ramsg.longval.ToString());
break;
case VEMessageNS.MessageOps.RQSTFILEMODE:
int2 = (short) veo.Connection.GetVfwMode();
break;
case VEMessageNS.MessageOps.RQSTFILEOWNER:
int2 = 1;
break;
case VEMessageNS.MessageOps.RQSTFILESEEK:
int3 = (int)veo.Connection.Seek(ramsg.longval, ramsg.flag);
break;
case VEMessageNS.MessageOps.RQSTFILECLOSE: //used in lock/unlock
veo.Connection.Close();
break;
case VEMessageNS.MessageOps.RQSTFILEOPEN: //used in lock/unlock
int2 = (short) veo.Connection.Open(ramsg.flag);
break;
// RQSTFILEREAD - not used in vfw <-> browser communication
case VEMessageNS.MessageOps.RQSTFILEREAD:
MessageBox.Show("RqstFileRead");
break;
case VEMessageNS.MessageOps.RQSTFILEWRITE: //used in lock/unlock
MessageBox.Show("RqstFileWrite");
break;
case VEMessageNS.MessageOps.RQSTPROCESSRECORD:
reply=false;
success=ReturnProcRecord(veo,ramsg.flag,vfwhndl);
break;
case VEMessageNS.MessageOps.SETLOCKBYUSER: //do set lock yet.
if (ramsg.flag >= 0)
{
if (ramsg.flag==0)
veo.Lock.LockStatus=VENetwork.Status.NoLock;
else
veo.Lock.LockStatus=VENetwork.Status.Locked;
}
int2 = (Int16)((veo.Lock.LockStatus==VENetwork.Status.Locked)?1:0);
break;
}
if (reply) success = Reply(int1,int2,int3,vfwhndl);
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
}
}
}

View File

@@ -0,0 +1,298 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{9EB41ACC-03B1-4349-86F6-F9165AD77B57}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "VEObject"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "VEObject"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "..\..\..\Ve-proms.net\BIN\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "System.Messaging"
AssemblyName = "System.Messaging"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Messaging.dll"
/>
<Reference
Name = "VlnProfiler"
AssemblyName = "VlnProfiler"
HintPath = "..\..\..\Ve-proms.net\BIN\VlnProfiler.dll"
/>
<Reference
Name = "IniFileIO"
AssemblyName = "IniFileIO"
HintPath = "..\..\..\Ve-proms.net\BIN\IniFileIO.dll"
/>
<Reference
Name = "Utils"
AssemblyName = "Utils"
HintPath = "..\..\..\Ve-proms.net\BIN\Utils.dll"
/>
<Reference
Name = "VDB"
AssemblyName = "VDB"
HintPath = "..\..\..\Ve-proms.net\BIN\VDB.dll"
/>
<Reference
Name = "VEMessage"
AssemblyName = "VEMessage"
HintPath = "..\..\..\Ve-proms.net\BIN\VEMessage.dll"
/>
<Reference
Name = "VENetwork"
AssemblyName = "VENetwork"
HintPath = "..\..\..\Ve-proms.net\BIN\VENetwork.dll"
/>
<Reference
Name = "ROFST"
AssemblyName = "ROFST"
HintPath = "..\..\..\Ve-proms.net\BIN\ROFST.dll"
Private = "False"
/>
<Reference
Name = "GUI_Utils"
AssemblyName = "GUI_Utils"
HintPath = "..\..\..\Ve-proms.net\BIN\GUI_Utils.dll"
Private = "False"
/>
<Reference
Name = "VlnStatus"
AssemblyName = "VlnStatus"
HintPath = "..\..\..\Ve-proms.net\BIN\VlnStatus.dll"
Private = "False"
/>
<Reference
Name = "dznet"
AssemblyName = "dznet"
HintPath = "..\..\..\Ve-proms.net\BIN\dznet.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AppConflict.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "AppIndItm.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ApproveDlg.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "ApproveDlg.resx"
DependentUpon = "ApproveDlg.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "ApproveSelDlg.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "ApproveSelDlg.resx"
DependentUpon = "ApproveSelDlg.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Archive.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ARProperties.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "ARProperties.resx"
DependentUpon = "ARProperties.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "DataPath.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "DataRoot.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "LDProperties.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "LDProperties.resx"
DependentUpon = "LDProperties.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "LibDoc.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Plant.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "PrcProperties.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "PrcProperties.resx"
DependentUpon = "PrcProperties.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Proc.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ProcExt.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ProcSet.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Properties.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "Properties.resx"
DependentUpon = "Properties.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "PSProperties.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "PSProperties.resx"
DependentUpon = "PSProperties.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "RefList.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "RO.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "VEObject.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VEObject", "VEObject.csproj", "{9EB41ACC-03B1-4349-86F6-F9165AD77B57}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{9EB41ACC-03B1-4349-86F6-F9165AD77B57}.Debug.ActiveCfg = Debug|.NET
{9EB41ACC-03B1-4349-86F6-F9165AD77B57}.Debug.Build.0 = Debug|.NET
{9EB41ACC-03B1-4349-86F6-F9165AD77B57}.Release.ActiveCfg = Release|.NET
{9EB41ACC-03B1-4349-86F6-F9165AD77B57}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//

View File

@@ -0,0 +1,56 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]

View File

@@ -0,0 +1,227 @@
/*********************************************************************************************
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: Form1.cs $ $Revision: 1 $
* $Author: Kathy $ $Date: 12/06/05 12:06p $
*
* $History: Form1.cs $
*
* ***************** Version 1 *****************
* User: Kathy Date: 12/06/05 Time: 12:06p
* Created in $/LibSource/VG/Test
*
* ***************** Version 1 *****************
* User: Kathy Date: 12/06/05 Time: 12:01p
* Created in $/LibSource/VG.root/VG/Test
*********************************************************************************************/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Xml;
using System.IO;
using VG;
using C1.C1Pdf;
namespace TestVG
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button2;
private int ConvertToTwips = 1440;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <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.button1 = new System.Windows.Forms.Button();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(24, 8);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(72, 32);
this.button1.TabIndex = 0;
this.button1.Text = "SVG To PDF";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// listBox1
//
this.listBox1.Location = new System.Drawing.Point(24, 72);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(584, 381);
this.listBox1.TabIndex = 1;
//
// button2
//
this.button2.Location = new System.Drawing.Point(544, 8);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(56, 32);
this.button2.TabIndex = 2;
this.button2.Text = "Exit";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(752, 494);
this.Controls.Add(this.button2);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
listBox1.Items.Clear();
DirectoryInfo di = new DirectoryInfo("E:\\proms.net\\genmac.xml");
FileInfo[] fis = di.GetFiles("*.svg");
foreach (FileInfo fi in fis)
{
this.listBox1.Items.Add(fi.Name);
//TestSvgToPdf("E:\\proms.net\\genmac.xml",fi.Name);
VG.Page pg = new Page(true, 0.5f * ConvertToTwips, 0.5f * ConvertToTwips);
XmlDocument xmldoc = new XmlDocument();
XmlTextReader reader = new XmlTextReader("E:\\proms.net\\genmac.xml\\"+fi.Name);
xmldoc.Load(reader);
reader.Close();
try
{
GeneratePDFForSVGFile(xmldoc, fi.Name, pg);
}
catch (Exception ex)
{
MessageBox.Show("Error processing: " + fi.Name, ex.Message);
}
}
MessageBox.Show("DONE generating PDF files from SVG");
}
private void GeneratePDFForSVGFile(XmlDocument xmldoc, string fname, VG.Page pg)
{
C1.C1Pdf.C1PdfDocument c1pdf = new C1.C1Pdf.C1PdfDocument();
string rootname = fname.Substring(0,fname.Length-4);
// create a pdf file with a page for each macro (i.e. macro element in xml tree),
// put it into the pdf file.
XmlNode topnode = xmldoc.LastChild;
for (int i=0;i<topnode.ChildNodes.Count;i++)
{
XmlNode nd = topnode.ChildNodes[i];
if (nd.Name!="desc")
{
SvgConvertToPdf(nd, c1pdf, pg);
if (i!=topnode.ChildNodes.Count-1)c1pdf.NewPage();
}
}
string outname = "E:\\proms.net\\genmac.xml\\testpdf\\" + rootname + ".pdf";
c1pdf.Save(outname);
}
private void SvgConvertToPdf(XmlNode nd, C1.C1Pdf.C1PdfDocument c1pdf, VG.Page ipg)
{
for (int i=0; i<nd.ChildNodes.Count; i++)
{
Page pg = new Page(true, ipg.LeftMargin, ipg.VertOffset);
XmlElement cmdele = (XmlElement) nd.ChildNodes[i];
string cmd = cmdele.Name.ToLower();
if (cmdele.GetAttribute("id")=="C0")
{
pg.LeftMargin = 100.0f;
pg.VertOffset = 100f;
}
switch (cmd)
{
case "rect":
VG_Rect vgrec = new VG_Rect(cmdele, pg);
vgrec.ToPdf(c1pdf);
vgrec=null;
break;
case "line":
VG_Line vgline = new VG_Line(cmdele, pg);
vgline.ToPdf(c1pdf);
break;
case "text":
VG_Text vgtxt = new VG_Text(cmdele, pg);
vgtxt.ToPdf(c1pdf);
break;
case "gdiadj":
break;
case "ellipse":
VG_Ellipse vgell = new VG_Ellipse(cmdele, pg);
vgell.ToPdf(c1pdf);
break;
case "image":
VG_Image vgi = new VG_Image(cmdele, pg);
vgi.ToPdf(c1pdf);
break;
case "absolute":
break;
default:
break;
}
}
}
private void button2_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
}
}

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="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listBox1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="listBox1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="listBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="button2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button2.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>Form1</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,133 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{12299365-FD7A-458A-B1E0-574933F7A647}"
>
<Build>
<Settings
ApplicationIcon = "App.ico"
AssemblyKeyContainerName = ""
AssemblyName = "Test"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "WinExe"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "Test"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "c1.c1pdf"
AssemblyName = "C1.C1Pdf"
HintPath = "C:\Program Files\ComponentOne Studio.NET\bin\c1.c1pdf.dll"
AssemblyFolderKey = "hklm\c1studio"
/>
<Reference
Name = "VG"
AssemblyName = "VG"
HintPath = "..\..\..\..\Ve-proms.net\Bin\VG.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
<File
RelPath = "AssemblyInfo.cs"
BuildAction = "Compile"
/>
<File
RelPath = "Form1.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "Form1.resx"
DependentUpon = "Form1.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "licenses.licx"
BuildAction = "EmbeddedResource"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,137 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{12299365-FD7A-458A-B1E0-574933F7A647}"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
>
<Build>
<Settings
ApplicationIcon = "App.ico"
AssemblyKeyContainerName = ""
AssemblyName = "Test"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "WinExe"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "Test"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "c1.c1pdf"
AssemblyName = "C1.C1Pdf"
HintPath = "C:\Program Files\ComponentOne Studio.NET\bin\c1.c1pdf.dll"
AssemblyFolderKey = "hklm\c1studio"
/>
<Reference
Name = "VG"
AssemblyName = "VG"
HintPath = "..\..\..\..\Ve-proms.net\Bin\VG.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
<File
RelPath = "AssemblyInfo.cs"
BuildAction = "Compile"
/>
<File
RelPath = "Form1.cs"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "Form1.resx"
DependentUpon = "Form1.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "licenses.licx"
BuildAction = "EmbeddedResource"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

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