Commit for development environment setup
This commit is contained in:
@@ -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.
|
||||
//
|
@@ -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("")]
|
205
PROMS/ReferencedObjectsOld/LibSource/DBEncapsulation/DBEncap.cs
Normal file
205
PROMS/ReferencedObjectsOld/LibSource/DBEncapsulation/DBEncap.cs
Normal file
@@ -0,0 +1,205 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: DBEncap.cs $ $Revision: 5 $
|
||||
* $Author: Kathy $ $Date: 12/10/02 2:24p $
|
||||
*
|
||||
* $History: DBEncap.cs $
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Kathy Date: 12/10/02 Time: 2:24p
|
||||
* Updated in $/LibSource/DBEncapsulation
|
||||
* handle dbnull for sql server
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Kathy Date: 10/09/02 Time: 12:36p
|
||||
* Updated in $/LibSource/DBEncapsulation
|
||||
* handle null in data
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 9/05/02 Time: 1:03p
|
||||
* Updated in $/LibSource/DBEncapsulation
|
||||
* added ExecuteNonQuery calls
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 9/05/02 Time: 11:31a
|
||||
* Updated in $/LibSource/DBEncapsulation
|
||||
* added Close functions
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Jsj Date: 8/23/02 Time: 3:07p
|
||||
* Created in $/LibSource/DBEncapsulation
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using Microsoft.Data.Odbc;
|
||||
|
||||
namespace DBEncapsulation
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DBEncapsulate: Encapsulate database interface methods &
|
||||
/// classes. Will encapsulate OLE DB & ODBC connections, commands, readers & other
|
||||
/// features as required.
|
||||
/// </summary>
|
||||
public class DBEncapsulate
|
||||
{
|
||||
public virtual void Connection(string strconnect)
|
||||
{
|
||||
}
|
||||
public virtual void OpenConnection()
|
||||
{
|
||||
}
|
||||
public virtual void CloseConnection()
|
||||
{
|
||||
}
|
||||
public virtual void Command(string strCommand)
|
||||
{
|
||||
}
|
||||
public virtual void CommandDispose()
|
||||
{
|
||||
}
|
||||
public virtual bool Reader()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public virtual void ReaderClose()
|
||||
{
|
||||
}
|
||||
public virtual bool Read()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public virtual string GetString(int num)
|
||||
{
|
||||
string tmp = "tmp";
|
||||
return (tmp);
|
||||
}
|
||||
public virtual int GetInt32(int num)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
public virtual void NonQuery()
|
||||
{
|
||||
}
|
||||
}
|
||||
public class OLEDB_DBEncap: DBEncapsulate
|
||||
{
|
||||
OleDbConnection myDatabaseConn;
|
||||
OleDbCommand myCommand;
|
||||
OleDbDataReader myReader;
|
||||
public override void Connection(string strconnect)
|
||||
{
|
||||
myDatabaseConn = new OleDbConnection(strconnect);
|
||||
}
|
||||
public override void OpenConnection()
|
||||
{
|
||||
myDatabaseConn.Open();
|
||||
}
|
||||
public override void CloseConnection()
|
||||
{
|
||||
myDatabaseConn.Close();
|
||||
}
|
||||
public override void Command(string strCommand)
|
||||
{
|
||||
myCommand = new OleDbCommand(strCommand,myDatabaseConn);
|
||||
}
|
||||
public override void CommandDispose()
|
||||
{
|
||||
myCommand.Dispose();
|
||||
}
|
||||
public override bool Reader()
|
||||
{
|
||||
myReader = myCommand.ExecuteReader();
|
||||
if (myReader == null)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
public override void ReaderClose()
|
||||
{
|
||||
myReader.Close();
|
||||
}
|
||||
public override bool Read()
|
||||
{
|
||||
return(myReader.Read());
|
||||
}
|
||||
public override string GetString(int num)
|
||||
{
|
||||
if (myReader.IsDBNull(num) == false)
|
||||
return(myReader.GetString(num));
|
||||
else
|
||||
return null;
|
||||
//if (myReader.GetString(num) == null) return null;
|
||||
//return(myReader.GetString(num));
|
||||
}
|
||||
public override int GetInt32(int num)
|
||||
{
|
||||
return(myReader.GetInt32(num));
|
||||
}
|
||||
public override void NonQuery()
|
||||
{
|
||||
myCommand.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public class ODBC_DBEncap: DBEncapsulate
|
||||
{
|
||||
OdbcConnection myDatabaseConn;
|
||||
OdbcCommand myCommand;
|
||||
OdbcDataReader myReader;
|
||||
public override void Connection(string strconnect)
|
||||
{
|
||||
myDatabaseConn = new OdbcConnection(strconnect);
|
||||
}
|
||||
public override void OpenConnection()
|
||||
{
|
||||
myDatabaseConn.Open();
|
||||
}
|
||||
public override void CloseConnection()
|
||||
{
|
||||
myDatabaseConn.Close();
|
||||
}
|
||||
public override void Command(string strCommand)
|
||||
{
|
||||
myCommand = new OdbcCommand(strCommand,myDatabaseConn);
|
||||
}
|
||||
public override void CommandDispose()
|
||||
{
|
||||
myCommand.Dispose();
|
||||
}
|
||||
public override bool Reader()
|
||||
{
|
||||
myReader = myCommand.ExecuteReader();
|
||||
if (myReader == null)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
public override void ReaderClose()
|
||||
{
|
||||
myReader.Close();
|
||||
}
|
||||
public override bool Read()
|
||||
{
|
||||
return(myReader.Read());
|
||||
}
|
||||
public override string GetString(int num)
|
||||
{
|
||||
if (myReader.IsDBNull(num) == false)
|
||||
return(myReader.GetString(num));
|
||||
else
|
||||
return null;
|
||||
}
|
||||
public override int GetInt32(int num)
|
||||
{
|
||||
return(myReader.GetInt32(num));
|
||||
}
|
||||
public override void NonQuery()
|
||||
{
|
||||
myCommand.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6D44F537-879E-11D6-84B8-00A0CC271352}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>DBEncapsulation</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>DBEncapsulation</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Data.Odbc">
|
||||
<Name>Microsoft.Data.Odbc</Name>
|
||||
<HintPath>C:\Program Files\Microsoft.Net\Odbc.Net\Microsoft.Data.Odbc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DBEncap.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBEncapsulation", "DBEncapsulation.csproj", "{6D44F537-879E-11D6-84B8-00A0CC271352}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Debug.ActiveCfg = Debug|.NET
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Debug.Build.0 = Debug|.NET
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Release.ActiveCfg = Release|.NET
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@@ -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.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 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("")];
|
||||
|
67
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.cpp
Normal file
67
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2003 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: IniFileIO.cpp $ $Revision: 4 $
|
||||
* $Author: Jsj $ $Date: 1/07/04 12:08p $
|
||||
*
|
||||
* $History: IniFileIO.cpp $
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 1/07/04 Time: 12:08p
|
||||
* Updated in $/LibSource/IniFileIO
|
||||
* was not returning found strings
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 12/16/03 Time: 11:44a
|
||||
* Updated in $/LibSource/IniFileIO
|
||||
* modified to all use in .net 1.0 and .net 1.1
|
||||
*********************************************************************************************/
|
||||
// This is the main DLL file.
|
||||
#include "stdafx.h"
|
||||
#include "IniFileIO.h"
|
||||
|
||||
using namespace IniFileIO;
|
||||
|
||||
String *INIFile::GetINIKeyValueStr(String *SectName, String *KeyName, String *DefaultValue, unsigned BufSize, String *IniFileName)
|
||||
{
|
||||
unsigned rtval;
|
||||
LPCTSTR tmpSectName;
|
||||
LPCTSTR tmpKeyName;
|
||||
LPCTSTR tmpDefaultValue;
|
||||
LPSTR tmpReturnBuff;
|
||||
LPCTSTR tmpIniFileName;
|
||||
ValueString = new String(NULL,BufSize+1);
|
||||
tmpSectName = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(SectName)));
|
||||
tmpKeyName = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(KeyName)));
|
||||
tmpDefaultValue = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(DefaultValue)));
|
||||
tmpReturnBuff = static_cast<LPSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(ValueString)));
|
||||
tmpIniFileName = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(IniFileName)));
|
||||
|
||||
rtval = GetPrivateProfileString(tmpSectName,tmpKeyName,tmpDefaultValue,tmpReturnBuff,BufSize,tmpIniFileName);
|
||||
ValueString = new String(tmpReturnBuff);
|
||||
return ValueString;
|
||||
|
||||
}
|
||||
|
||||
bool INIFile::WriteINIKeyValueStr(String *SectName, String *KeyName, String *KeyValue, String *IniFileName)
|
||||
{
|
||||
bool rtval;
|
||||
|
||||
LPCTSTR tmpSectName;
|
||||
LPCTSTR tmpKeyName;
|
||||
LPCTSTR tmpKeyValue;
|
||||
LPCTSTR tmpIniFileName;
|
||||
tmpSectName = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(SectName)));
|
||||
tmpKeyName = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(KeyName)));
|
||||
tmpKeyValue = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(KeyValue)));
|
||||
tmpIniFileName = static_cast<LPCTSTR>(static_cast<void*>(Marshal::StringToCoTaskMemAnsi(IniFileName)));
|
||||
|
||||
rtval = WritePrivateProfileString(tmpSectName,tmpKeyName,tmpKeyValue,tmpIniFileName);
|
||||
|
||||
Marshal::FreeCoTaskMem(System::IntPtr((void*)tmpSectName));
|
||||
Marshal::FreeCoTaskMem(System::IntPtr((void*)tmpKeyName));
|
||||
Marshal::FreeCoTaskMem(System::IntPtr((void*)tmpKeyValue));
|
||||
Marshal::FreeCoTaskMem(System::IntPtr((void*)tmpIniFileName));
|
||||
return rtval;
|
||||
}
|
35
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.h
Normal file
35
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2003 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: IniFileIO.h $ $Revision: 3 $
|
||||
* $Author: Jsj $ $Date: 12/16/03 11:39a $
|
||||
*
|
||||
* $History: IniFileIO.h $
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 12/16/03 Time: 11:39a
|
||||
* Updated in $/LibSource/IniFileIO
|
||||
* modified to all use in .net 1.0 and .net 1.1
|
||||
*********************************************************************************************/
|
||||
// IniFileIO.h
|
||||
|
||||
#pragma once
|
||||
#using <mscorlib.dll>
|
||||
#include <Windows.h>
|
||||
#include <atlstr.h>
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
|
||||
namespace IniFileIO
|
||||
{
|
||||
public __gc class INIFile
|
||||
{
|
||||
public:
|
||||
String *ValueString;
|
||||
INIFile() {};
|
||||
String *GetINIKeyValueStr(String *SectName, String *KeyName, String *DefaultValue, unsigned BufSize, String *IniFileName);
|
||||
bool WriteINIKeyValueStr(String *SectName, String *KeyName, String *KeyValue, String *IniFileName);
|
||||
};
|
||||
}
|
21
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.sln
Normal file
21
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.sln
Normal file
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IniFileIO", "IniFileIO.vcproj", "{FD05F903-0D2F-11D7-859A-D0745C000000}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{FD05F903-0D2F-11D7-859A-D0745C000000}.Debug.ActiveCfg = Debug|Win32
|
||||
{FD05F903-0D2F-11D7-859A-D0745C000000}.Debug.Build.0 = Debug|Win32
|
||||
{FD05F903-0D2F-11D7-859A-D0745C000000}.Release.ActiveCfg = Release|Win32
|
||||
{FD05F903-0D2F-11D7-859A-D0745C000000}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
238
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.vcproj
Normal file
238
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/IniFileIO.vcproj
Normal file
@@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="IniFileIO"
|
||||
ProjectGUID="{FD05F903-0D2F-11D7-859A-D0745C000000}"
|
||||
Keyword="ManagedCProj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="e:\ve-proms.net\bin"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="4"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/clr:initialAppDomain"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
DefaultCharIsUnsigned="false"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NOENTRY"
|
||||
OutputFile="$(OutDir)/IniFileIO.dll"
|
||||
LinkIncremental="2"
|
||||
ForceSymbolReferences="__DllMainCRTStartup@12"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="E:\Ve-proms.net\BIN"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="4"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/clr:initialAppDomain"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
MinimalRebuild="false"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NOENTRY"
|
||||
OutputFile="$(OutDir)/IniFileIO.dll"
|
||||
LinkIncremental="1"
|
||||
ForceSymbolReferences="__DllMainCRTStartup@12"
|
||||
GenerateDebugInformation="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath="AssemblyInfo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IniFileIO.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="IniFileIO.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>
|
31
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/ReadMe.txt
Normal file
31
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/ReadMe.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
========================================================================
|
||||
DYNAMIC LINK LIBRARY : IniFileIO Project Overview
|
||||
========================================================================
|
||||
|
||||
AppWizard has created this IniFileIO DLL for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your IniFileIO application.
|
||||
|
||||
IniFileIO.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.
|
||||
|
||||
IniFileIO.cpp
|
||||
This is the main DLL source file.
|
||||
|
||||
IniFileIO.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.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
@@ -0,0 +1,5 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// IniFileIO.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
8
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/Stdafx.h
Normal file
8
PROMS/ReferencedObjectsOld/LibSource/IniFileIO/Stdafx.h
Normal 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>
|
||||
|
@@ -0,0 +1,428 @@
|
||||
/*
|
||||
IniReader class for C#
|
||||
Version: 1.0 Date: 2002/04/24
|
||||
*/
|
||||
/*
|
||||
Copyright <20> 2002, The KPD-Team
|
||||
All rights reserved.
|
||||
http://www.mentalis.org/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Neither the name of the KPD-Team, nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// The Org.Mentalis.Files contains a number of classes that read from or write to special files.
|
||||
namespace Org.Mentalis.Files
|
||||
{
|
||||
/// <summary>
|
||||
/// The INIReader class can read keys from and write keys to an INI file.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class uses several Win32 API functions to read from and write to INI files. It will not work on Linux or FreeBSD.
|
||||
/// </remarks>
|
||||
public class IniReader
|
||||
{
|
||||
// API declarations
|
||||
/// <summary>
|
||||
/// The GetPrivateProfileInt function retrieves an integer associated with a key in the specified section of an initialization file.
|
||||
/// </summary>
|
||||
/// <param name="lpApplicationName">Pointer to a null-terminated string specifying the name of the section in the initialization file.</param>
|
||||
/// <param name="lpKeyName">Pointer to the null-terminated string specifying the name of the key whose value is to be retrieved. This value is in the form of a string; the GetPrivateProfileInt function converts the string into an integer and returns the integer.</param>
|
||||
/// <param name="nDefault">Specifies the default value to return if the key name cannot be found in the initialization file.</param>
|
||||
/// <param name="lpFileName">Pointer to a null-terminated string that specifies the name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.</param>
|
||||
/// <returns>The return value is the integer equivalent of the string following the specified key name in the specified initialization file. If the key is not found, the return value is the specified default value. If the value of the key is less than zero, the return value is zero.</returns>
|
||||
[DllImport("KERNEL32.DLL", EntryPoint = "GetPrivateProfileIntA", CharSet = CharSet.Ansi)]
|
||||
private static extern int GetPrivateProfileInt(string lpApplicationName, string lpKeyName, int nDefault, string lpFileName);
|
||||
/// <summary>
|
||||
/// The WritePrivateProfileString function copies a string into the specified section of an initialization file.
|
||||
/// </summary>
|
||||
/// <param name="lpApplicationName">Pointer to a null-terminated string containing the name of the section to which the string will be copied. If the section does not exist, it is created. The name of the section is case-independent; the string can be any combination of uppercase and lowercase letters.</param>
|
||||
/// <param name="lpKeyName">Pointer to the null-terminated string containing the name of the key to be associated with a string. If the key does not exist in the specified section, it is created. If this parameter is NULL, the entire section, including all entries within the section, is deleted.</param>
|
||||
/// <param name="lpString">Pointer to a null-terminated string to be written to the file. If this parameter is NULL, the key pointed to by the lpKeyName parameter is deleted.</param>
|
||||
/// <param name="lpFileName">Pointer to a null-terminated string that specifies the name of the initialization file.</param>
|
||||
/// <returns>If the function successfully copies the string to the initialization file, the return value is nonzero; if the function fails, or if it flushes the cached version of the most recently accessed initialization file, the return value is zero.</returns>
|
||||
[DllImport("KERNEL32.DLL", EntryPoint = "WritePrivateProfileStringA", CharSet = CharSet.Ansi)]
|
||||
private static extern int WritePrivateProfileString(string lpApplicationName, string lpKeyName, string lpString, string lpFileName);
|
||||
/// <summary>
|
||||
/// The GetPrivateProfileString function retrieves a string from the specified section in an initialization file.
|
||||
/// </summary>
|
||||
/// <param name="lpApplicationName">Pointer to a null-terminated string that specifies the name of the section containing the key name. If this parameter is NULL, the GetPrivateProfileString function copies all section names in the file to the supplied buffer.</param>
|
||||
/// <param name="lpKeyName">Pointer to the null-terminated string specifying the name of the key whose associated string is to be retrieved. If this parameter is NULL, all key names in the section specified by the lpAppName parameter are copied to the buffer specified by the lpReturnedString parameter.</param>
|
||||
/// <param name="lpDefault">Pointer to a null-terminated default string. If the lpKeyName key cannot be found in the initialization file, GetPrivateProfileString copies the default string to the lpReturnedString buffer. This parameter cannot be NULL. <br>Avoid specifying a default string with trailing blank characters. The function inserts a null character in the lpReturnedString buffer to strip any trailing blanks.</br></param>
|
||||
/// <param name="lpReturnedString">Pointer to the buffer that receives the retrieved string.</param>
|
||||
/// <param name="nSize">Specifies the size, in TCHARs, of the buffer pointed to by the lpReturnedString parameter.</param>
|
||||
/// <param name="lpFileName">Pointer to a null-terminated string that specifies the name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.</param>
|
||||
/// <returns>The return value is the number of characters copied to the buffer, not including the terminating null character.</returns>
|
||||
[DllImport("KERNEL32.DLL", EntryPoint = "GetPrivateProfileStringA", CharSet = CharSet.Ansi)]
|
||||
private static extern int GetPrivateProfileString(string lpApplicationName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
|
||||
/// <summary>
|
||||
/// The GetPrivateProfileSectionNames function retrieves the names of all sections in an initialization file.
|
||||
/// </summary>
|
||||
/// <param name="lpszReturnBuffer">Pointer to a buffer that receives the section names associated with the named file. The buffer is filled with one or more null-terminated strings; the last string is followed by a second null character.</param>
|
||||
/// <param name="nSize">Specifies the size, in TCHARs, of the buffer pointed to by the lpszReturnBuffer parameter.</param>
|
||||
/// <param name="lpFileName">Pointer to a null-terminated string that specifies the name of the initialization file. If this parameter is NULL, the function searches the Win.ini file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.</param>
|
||||
/// <returns>The return value specifies the number of characters copied to the specified buffer, not including the terminating null character. If the buffer is not large enough to contain all the section names associated with the specified initialization file, the return value is equal to the length specified by nSize minus two.</returns>
|
||||
[DllImport("KERNEL32.DLL", EntryPoint = "GetPrivateProfileSectionNamesA", CharSet = CharSet.Ansi)]
|
||||
private static extern int GetPrivateProfileSectionNames(byte[] lpszReturnBuffer, int nSize, string lpFileName);
|
||||
/// <summary>
|
||||
/// The WritePrivateProfileSection function replaces the keys and values for the specified section in an initialization file.
|
||||
/// </summary>
|
||||
/// <param name="lpAppName">Pointer to a null-terminated string specifying the name of the section in which data is written. This section name is typically the name of the calling application.</param>
|
||||
/// <param name="lpString">Pointer to a buffer containing the new key names and associated values that are to be written to the named section.</param>
|
||||
/// <param name="lpFileName">Pointer to a null-terminated string containing the name of the initialization file. If this parameter does not contain a full path for the file, the function searches the Windows directory for the file. If the file does not exist and lpFileName does not contain a full path, the function creates the file in the Windows directory. The function does not create a file if lpFileName contains the full path and file name of a file that does not exist.</param>
|
||||
/// <returns>If the function succeeds, the return value is nonzero.<br>If the function fails, the return value is zero.</br></returns>
|
||||
[DllImport("KERNEL32.DLL", EntryPoint = "WritePrivateProfileSectionA", CharSet = CharSet.Ansi)]
|
||||
private static extern int WritePrivateProfileSection(string lpAppName, string lpString, string lpFileName);
|
||||
/// <summary>Constructs a new IniReader instance.</summary>
|
||||
/// <param name="file">Specifies the full path to the INI file (the file doesn't have to exist).</param>
|
||||
public IniReader(string file)
|
||||
{
|
||||
Filename = file;
|
||||
}
|
||||
/// <summary>Gets or sets the full path to the INI file.</summary>
|
||||
/// <value>A String representing the full path to the INI file.</value>
|
||||
public string Filename
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Filename;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Filename = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Gets or sets the section you're working in. (aka 'the active section')</summary>
|
||||
/// <value>A String representing the section you're working in.</value>
|
||||
public string Section
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Section;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Section = value;
|
||||
}
|
||||
}
|
||||
/// <summary>Reads an Integer from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The value to return if the specified key isn't found.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns the default value if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public int ReadInteger(string section, string key, int defVal)
|
||||
{
|
||||
return GetPrivateProfileInt(section, key, defVal, Filename);
|
||||
}
|
||||
/// <summary>Reads an Integer from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns 0 if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public int ReadInteger(string section, string key)
|
||||
{
|
||||
return ReadInteger(section, key, 0);
|
||||
}
|
||||
/// <summary>Reads an Integer from the specified key of the active section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The section to search in.</param>
|
||||
/// <returns>Returns the value of the specified Key, or returns the default value if the specified Key isn't found in the active section of the INI file.</returns>
|
||||
public int ReadInteger(string key, int defVal)
|
||||
{
|
||||
return ReadInteger(Section, key, defVal);
|
||||
}
|
||||
/// <summary>Reads an Integer from the specified key of the active section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified key, or returns 0 if the specified key isn't found in the active section of the INI file.</returns>
|
||||
public int ReadInteger(string key)
|
||||
{
|
||||
return ReadInteger(key, 0);
|
||||
}
|
||||
/// <summary>Reads a String from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The value to return if the specified key isn't found.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns the default value if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public string ReadString(string section, string key, string defVal)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(MAX_ENTRY);
|
||||
int Ret = GetPrivateProfileString(section, key, defVal, sb, MAX_ENTRY, Filename);
|
||||
return sb.ToString();
|
||||
}
|
||||
/// <summary>Reads a String from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns an empty String if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public string ReadString(string section, string key)
|
||||
{
|
||||
return ReadString(section, key, "");
|
||||
}
|
||||
/// <summary>Reads a String from the specified key of the active section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified key, or returns an empty String if the specified key isn't found in the active section of the INI file.</returns>
|
||||
public string ReadString(string key)
|
||||
{
|
||||
return ReadString(Section, key);
|
||||
}
|
||||
/// <summary>Reads a Long from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The value to return if the specified key isn't found.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns the default value if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public long ReadLong(string section, string key, long defVal)
|
||||
{
|
||||
return long.Parse(ReadString(section, key, defVal.ToString()));
|
||||
}
|
||||
/// <summary>Reads a Long from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns 0 if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public long ReadLong(string section, string key)
|
||||
{
|
||||
return ReadLong(section, key, 0);
|
||||
}
|
||||
/// <summary>Reads a Long from the specified key of the active section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The section to search in.</param>
|
||||
/// <returns>Returns the value of the specified key, or returns the default value if the specified key isn't found in the active section of the INI file.</returns>
|
||||
public long ReadLong(string key, long defVal)
|
||||
{
|
||||
return ReadLong(Section, key, defVal);
|
||||
}
|
||||
/// <summary>Reads a Long from the specified key of the active section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified Key, or returns 0 if the specified Key isn't found in the active section of the INI file.</returns>
|
||||
public long ReadLong(string key)
|
||||
{
|
||||
return ReadLong(key, 0);
|
||||
}
|
||||
/// <summary>Reads a Byte array from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns null (Nothing in VB.NET) if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public byte[] ReadByteArray(string section, string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Convert.FromBase64String(ReadString(section, key));
|
||||
}
|
||||
catch { }
|
||||
return null;
|
||||
}
|
||||
/// <summary>Reads a Byte array from the specified key of the active section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified key, or returns null (Nothing in VB.NET) if the specified key pair isn't found in the active section of the INI file.</returns>
|
||||
public byte[] ReadByteArray(string key)
|
||||
{
|
||||
return ReadByteArray(Section, key);
|
||||
}
|
||||
/// <summary>Reads a Boolean from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The value to return if the specified key isn't found.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns the default value if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public bool ReadBoolean(string section, string key, bool defVal)
|
||||
{
|
||||
return Boolean.Parse(ReadString(section, key, defVal.ToString()));
|
||||
}
|
||||
/// <summary>Reads a Boolean from the specified key of the specified section.</summary>
|
||||
/// <param name="section">The section to search in.</param>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified section/key pair, or returns false if the specified section/key pair isn't found in the INI file.</returns>
|
||||
public bool ReadBoolean(string section, string key)
|
||||
{
|
||||
return ReadBoolean(section, key, false);
|
||||
}
|
||||
/// <summary>Reads a Boolean from the specified key of the specified section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <param name="defVal">The value to return if the specified key isn't found.</param>
|
||||
/// <returns>Returns the value of the specified key pair, or returns the default value if the specified key isn't found in the active section of the INI file.</returns>
|
||||
public bool ReadBoolean(string key, bool defVal)
|
||||
{
|
||||
return ReadBoolean(Section, key, defVal);
|
||||
}
|
||||
/// <summary>Reads a Boolean from the specified key of the specified section.</summary>
|
||||
/// <param name="key">The key from which to return the value.</param>
|
||||
/// <returns>Returns the value of the specified key, or returns false if the specified key isn't found in the active section of the INI file.</returns>
|
||||
public bool ReadBoolean(string key)
|
||||
{
|
||||
return ReadBoolean(Section, key);
|
||||
}
|
||||
/// <summary>Writes an Integer to the specified key in the specified section.</summary>
|
||||
/// <param name="section">The section to write in.</param>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string section, string key, int value)
|
||||
{
|
||||
return Write(section, key, value.ToString());
|
||||
}
|
||||
/// <summary>Writes an Integer to the specified key in the active section.</summary>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string key, int value)
|
||||
{
|
||||
return Write(Section, key, value);
|
||||
}
|
||||
/// <summary>Writes a String to the specified key in the specified section.</summary>
|
||||
/// <param name="section">Specifies the section to write in.</param>
|
||||
/// <param name="key">Specifies the key to write to.</param>
|
||||
/// <param name="value">Specifies the value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string section, string key, string value)
|
||||
{
|
||||
return (WritePrivateProfileString(section, key, value, Filename) != 0);
|
||||
}
|
||||
/// <summary>Writes a String to the specified key in the active section.</summary>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string key, string value)
|
||||
{
|
||||
return Write(Section, key, value);
|
||||
}
|
||||
/// <summary>Writes a Long to the specified key in the specified section.</summary>
|
||||
/// <param name="section">The section to write in.</param>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string section, string key, long value)
|
||||
{
|
||||
return Write(section, key, value.ToString());
|
||||
}
|
||||
/// <summary>Writes a Long to the specified key in the active section.</summary>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string key, long value)
|
||||
{
|
||||
return Write(Section, key, value);
|
||||
}
|
||||
/// <summary>Writes a Byte array to the specified key in the specified section.</summary>
|
||||
/// <param name="section">The section to write in.</param>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string section, string key, byte[] value)
|
||||
{
|
||||
if (value == null)
|
||||
return Write(section, key, (string)null);
|
||||
else
|
||||
return Write(section, key, value, 0, value.Length);
|
||||
}
|
||||
/// <summary>Writes a Byte array to the specified key in the active section.</summary>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string key, byte[] value)
|
||||
{
|
||||
return Write(Section, key, value);
|
||||
}
|
||||
/// <summary>Writes a Byte array to the specified key in the specified section.</summary>
|
||||
/// <param name="section">The section to write in.</param>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <param name="offset">An offset in <i>value</i>.</param>
|
||||
/// <param name="length">The number of elements of <i>value</i> to convert.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string section, string key, byte[] value, int offset, int length)
|
||||
{
|
||||
if (value == null)
|
||||
return Write(section, key, (string)null);
|
||||
else
|
||||
return Write(section, key, Convert.ToBase64String(value, offset, length));
|
||||
}
|
||||
/// <summary>Writes a Boolean to the specified key in the specified section.</summary>
|
||||
/// <param name="section">The section to write in.</param>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string section, string key, bool value)
|
||||
{
|
||||
return Write(section, key, value.ToString());
|
||||
}
|
||||
/// <summary>Writes a Boolean to the specified key in the active section.</summary>
|
||||
/// <param name="key">The key to write to.</param>
|
||||
/// <param name="value">The value to write.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool Write(string key, bool value)
|
||||
{
|
||||
return Write(Section, key, value);
|
||||
}
|
||||
/// <summary>Deletes a key from the specified section.</summary>
|
||||
/// <param name="section">The section to delete from.</param>
|
||||
/// <param name="key">The key to delete.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool DeleteKey(string section, string key)
|
||||
{
|
||||
return (WritePrivateProfileString(section, key, null, Filename) != 0);
|
||||
}
|
||||
/// <summary>Deletes a key from the active section.</summary>
|
||||
/// <param name="key">The key to delete.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool DeleteKey(string key)
|
||||
{
|
||||
return (WritePrivateProfileString(Section, key, null, Filename) != 0);
|
||||
}
|
||||
/// <summary>Deletes a section from an INI file.</summary>
|
||||
/// <param name="section">The section to delete.</param>
|
||||
/// <returns>Returns true if the function succeeds, false otherwise.</returns>
|
||||
public bool DeleteSection(string section)
|
||||
{
|
||||
return WritePrivateProfileSection(section, null, Filename) != 0;
|
||||
}
|
||||
/// <summary>Retrieves a list of all available sections in the INI file.</summary>
|
||||
/// <returns>Returns an ArrayList with all available sections.</returns>
|
||||
public ArrayList GetSectionNames()
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] buffer = new byte[MAX_ENTRY];
|
||||
GetPrivateProfileSectionNames(buffer, MAX_ENTRY, Filename);
|
||||
string[] parts = Encoding.ASCII.GetString(buffer).Trim('\0').Split('\0');
|
||||
return new ArrayList(parts);
|
||||
}
|
||||
catch { }
|
||||
return null;
|
||||
}
|
||||
//Private variables and constants
|
||||
/// <summary>
|
||||
/// Holds the full path to the INI file.
|
||||
/// </summary>
|
||||
private string m_Filename;
|
||||
/// <summary>
|
||||
/// Holds the active section name
|
||||
/// </summary>
|
||||
private string m_Section;
|
||||
/// <summary>
|
||||
/// The maximum number of bytes in a section buffer.
|
||||
/// </summary>
|
||||
private const int MAX_ENTRY = 32768;
|
||||
}
|
||||
}
|
@@ -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>{A46428FC-1E35-4B8D-8B06-A1DF8BAC7A04}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Org.Mentalis.Files</RootNamespace>
|
||||
<AssemblyName>Org.Mentalis.Files</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="IniReader.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>
|
@@ -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("Org.Mentalis.Files")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Org.Mentalis.Files")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[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("fd26053d-c25d-46ca-961c-7016c31e8b4b")]
|
||||
|
||||
// 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")]
|
@@ -0,0 +1,36 @@
|
||||
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("Org.Mentalis.Files")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Org.Mentalis.Files")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[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("fd26053d-c25d-46ca-961c-7016c31e8b4b")]
|
||||
|
||||
// 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: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -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.
|
||||
//
|
@@ -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("")]
|
3047
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/RODBInterface.cs
Normal file
3047
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/RODBInterface.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,136 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0C7825FD-AA05-11D6-84D1-00A0CC271352}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>RODBInterface</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>RODBInterface</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<Name>System.Drawing</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RODBInterface.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="userpass.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VlnXml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="userpass.resx">
|
||||
<DependentUpon>userpass.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DBEncapsulation\DBEncapsulation.csproj">
|
||||
<Project>{6D44F537-879E-11D6-84B8-00A0CC271352}</Project>
|
||||
<Name>DBEncapsulation</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Org.Mentalis.Files\Org.Mentalis.Files.csproj">
|
||||
<Project>{A46428FC-1E35-4B8D-8B06-A1DF8BAC7A04}</Project>
|
||||
<Name>Org.Mentalis.Files</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ROField\ROFields.csproj">
|
||||
<Project>{0C782592-AA05-11D6-84D1-00A0CC271352}</Project>
|
||||
<Name>ROFields</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\VlnStatus\VlnStatus.csproj">
|
||||
<Project>{551CB7B3-00B1-11D7-8590-482B59000000}</Project>
|
||||
<Name>VlnStatus</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RODBInterface", "RODBInterface.csproj", "{0C7825FD-AA05-11D6-84D1-00A0CC271352}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{0C7825FD-AA05-11D6-84D1-00A0CC271352}.Debug.ActiveCfg = Debug|.NET
|
||||
{0C7825FD-AA05-11D6-84D1-00A0CC271352}.Debug.Build.0 = Debug|.NET
|
||||
{0C7825FD-AA05-11D6-84D1-00A0CC271352}.Release.ActiveCfg = Release|.NET
|
||||
{0C7825FD-AA05-11D6-84D1-00A0CC271352}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
1213
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/VlnXml.cs
Normal file
1213
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/VlnXml.cs
Normal file
File diff suppressed because it is too large
Load Diff
188
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/userpass.cs
Normal file
188
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/userpass.cs
Normal file
@@ -0,0 +1,188 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace RODBInterface
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for userpass.
|
||||
/// </summary>
|
||||
public class userpass : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
private System.Windows.Forms.Label uidLbl;
|
||||
private System.Windows.Forms.Label pwLbl;
|
||||
private System.Windows.Forms.Button OKBtn;
|
||||
internal System.Windows.Forms.Button CancelBtn;
|
||||
private System.Windows.Forms.TextBox uidTxtBx;
|
||||
private System.Windows.Forms.TextBox pwTxtBx;
|
||||
|
||||
//public UidPw UIDPW
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// UidPw up = new UidPw();
|
||||
// up.Password = this.pwTxtBx.Text;
|
||||
// up.UserId = this.uidTxtBx.Text;
|
||||
// return up;
|
||||
// }
|
||||
//}
|
||||
|
||||
public string uname=null;
|
||||
public string pword=null;
|
||||
public userpass()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
//
|
||||
// TODO: Add any constructor code after InitializeComponent call
|
||||
//
|
||||
}
|
||||
|
||||
public userpass(string PassedInName)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
//
|
||||
// TODO: Add any constructor code after InitializeComponent call
|
||||
//
|
||||
uidTxtBx.Text = PassedInName;
|
||||
}
|
||||
|
||||
/// <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.uidTxtBx = new System.Windows.Forms.TextBox();
|
||||
this.uidLbl = new System.Windows.Forms.Label();
|
||||
this.pwLbl = new System.Windows.Forms.Label();
|
||||
this.pwTxtBx = new System.Windows.Forms.TextBox();
|
||||
this.OKBtn = new System.Windows.Forms.Button();
|
||||
this.CancelBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// uidTxtBx
|
||||
//
|
||||
this.uidTxtBx.Location = new System.Drawing.Point(8, 40);
|
||||
this.uidTxtBx.Name = "uidTxtBx";
|
||||
this.uidTxtBx.Size = new System.Drawing.Size(134, 22);
|
||||
this.uidTxtBx.TabIndex = 0;
|
||||
this.uidTxtBx.Text = "";
|
||||
this.uidTxtBx.KeyUp += new System.Windows.Forms.KeyEventHandler(this.uidTxtBx_KeyUp);
|
||||
//
|
||||
// uidLbl
|
||||
//
|
||||
this.uidLbl.Location = new System.Drawing.Point(16, 16);
|
||||
this.uidLbl.Name = "uidLbl";
|
||||
this.uidLbl.Size = new System.Drawing.Size(115, 18);
|
||||
this.uidLbl.TabIndex = 1;
|
||||
this.uidLbl.Text = "User ID";
|
||||
//
|
||||
// pwLbl
|
||||
//
|
||||
this.pwLbl.Location = new System.Drawing.Point(184, 16);
|
||||
this.pwLbl.Name = "pwLbl";
|
||||
this.pwLbl.Size = new System.Drawing.Size(86, 18);
|
||||
this.pwLbl.TabIndex = 2;
|
||||
this.pwLbl.Text = "Password";
|
||||
//
|
||||
// pwTxtBx
|
||||
//
|
||||
this.pwTxtBx.AcceptsTab = true;
|
||||
this.pwTxtBx.Location = new System.Drawing.Point(176, 40);
|
||||
this.pwTxtBx.Name = "pwTxtBx";
|
||||
this.pwTxtBx.PasswordChar = '*';
|
||||
this.pwTxtBx.Size = new System.Drawing.Size(125, 22);
|
||||
this.pwTxtBx.TabIndex = 3;
|
||||
this.pwTxtBx.Text = "";
|
||||
this.pwTxtBx.KeyUp += new System.Windows.Forms.KeyEventHandler(this.pwTxtBx_KeyUp);
|
||||
//
|
||||
// OKBtn
|
||||
//
|
||||
this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.OKBtn.Location = new System.Drawing.Point(336, 16);
|
||||
this.OKBtn.Name = "OKBtn";
|
||||
this.OKBtn.Size = new System.Drawing.Size(96, 28);
|
||||
this.OKBtn.TabIndex = 4;
|
||||
this.OKBtn.Text = "OK";
|
||||
this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
|
||||
//
|
||||
// CancelBtn
|
||||
//
|
||||
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CancelBtn.Location = new System.Drawing.Point(336, 56);
|
||||
this.CancelBtn.Name = "CancelBtn";
|
||||
this.CancelBtn.Size = new System.Drawing.Size(96, 28);
|
||||
this.CancelBtn.TabIndex = 5;
|
||||
this.CancelBtn.Text = "Cancel";
|
||||
//
|
||||
// userpass
|
||||
//
|
||||
this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
||||
this.ClientSize = new System.Drawing.Size(448, 96);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.CancelBtn);
|
||||
this.Controls.Add(this.OKBtn);
|
||||
this.Controls.Add(this.pwTxtBx);
|
||||
this.Controls.Add(this.uidTxtBx);
|
||||
this.Controls.Add(this.pwLbl);
|
||||
this.Controls.Add(this.uidLbl);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "userpass";
|
||||
this.Text = " Login";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void OKBtn_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
uname = this.uidTxtBx.Text;
|
||||
pword = this.pwTxtBx.Text;
|
||||
}
|
||||
|
||||
private void pwTxtBx_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
|
||||
{
|
||||
// if key pressed was a return - treat as ok button.
|
||||
if (e.KeyCode == Keys.Return) this.OKBtn.PerformClick();
|
||||
}
|
||||
|
||||
private void uidTxtBx_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
|
||||
{
|
||||
// if key pressed was a return - treat as ok button.
|
||||
if (e.KeyCode == Keys.Return) this.OKBtn.PerformClick();
|
||||
}
|
||||
}
|
||||
}
|
184
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/userpass.resx
Normal file
184
PROMS/ReferencedObjectsOld/LibSource/RODBInterface/userpass.resx
Normal file
@@ -0,0 +1,184 @@
|
||||
<?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="uidTxtBx.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="uidTxtBx.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="uidTxtBx.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="uidLbl.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="uidLbl.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="uidLbl.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="pwLbl.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="pwLbl.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="pwLbl.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="pwTxtBx.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="pwTxtBx.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="pwTxtBx.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="OKBtn.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="OKBtn.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="OKBtn.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="CancelBtn.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="CancelBtn.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="CancelBtn.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</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>userpass</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>
|
55
PROMS/ReferencedObjectsOld/LibSource/ROFST/AssemblyInfo.cs
Normal file
55
PROMS/ReferencedObjectsOld/LibSource/ROFST/AssemblyInfo.cs
Normal 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.
|
||||
//
|
@@ -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("")]
|
3073
PROMS/ReferencedObjectsOld/LibSource/ROFST/ROFST.cs
Normal file
3073
PROMS/ReferencedObjectsOld/LibSource/ROFST/ROFST.cs
Normal file
File diff suppressed because it is too large
Load Diff
115
PROMS/ReferencedObjectsOld/LibSource/ROFST/ROFST.csproj
Normal file
115
PROMS/ReferencedObjectsOld/LibSource/ROFST/ROFST.csproj
Normal file
@@ -0,0 +1,115 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{134D8938-9CDC-4712-9444-D5DCC6638AB6}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>ROFST</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>ROFST</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE;Upgrade2005;</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ROFST.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Utils\Utils.csproj">
|
||||
<Project>{680054D3-49C4-40E7-92A5-67B97DCE6308}</Project>
|
||||
<Name>Utils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\VlnStatus\VlnStatus.csproj">
|
||||
<Project>{551CB7B3-00B1-11D7-8590-482B59000000}</Project>
|
||||
<Name>VlnStatus</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
19
PROMS/ReferencedObjectsOld/LibSource/ROFST/ROFST.sln
Normal file
19
PROMS/ReferencedObjectsOld/LibSource/ROFST/ROFST.sln
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ROFST", "ROFST.csproj", "{134D8938-9CDC-4712-9444-D5DCC6638AB6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{134D8938-9CDC-4712-9444-D5DCC6638AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{134D8938-9CDC-4712-9444-D5DCC6638AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{134D8938-9CDC-4712-9444-D5DCC6638AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{134D8938-9CDC-4712-9444-D5DCC6638AB6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
55
PROMS/ReferencedObjectsOld/LibSource/ROField/AssemblyInfo.cs
Normal file
55
PROMS/ReferencedObjectsOld/LibSource/ROField/AssemblyInfo.cs
Normal 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.
|
||||
//
|
@@ -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("")]
|
301
PROMS/ReferencedObjectsOld/LibSource/ROField/ROField.cs
Normal file
301
PROMS/ReferencedObjectsOld/LibSource/ROField/ROField.cs
Normal file
@@ -0,0 +1,301 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: ROField.cs $ $Revision: 11 $
|
||||
* $Author: Kathy $ $Date: 4/04/03 9:41a $
|
||||
*
|
||||
* $History: ROField.cs $
|
||||
*
|
||||
* ***************** Version 11 *****************
|
||||
* User: Kathy Date: 4/04/03 Time: 9:41a
|
||||
* Updated in $/LibSource/ROFields
|
||||
* B2003-030: get correct field type for new image
|
||||
*
|
||||
* ***************** Version 10 *****************
|
||||
* User: Kathy Date: 12/10/02 Time: 2:27p
|
||||
* Updated in $/LibSource/ROFields
|
||||
* fieldname special chars
|
||||
*
|
||||
* ***************** Version 9 *****************
|
||||
* User: Kathy Date: 12/02/02 Time: 8:30a
|
||||
* Updated in $/LibSource/ROFields
|
||||
* fieldname replace chars
|
||||
*
|
||||
* ***************** Version 8 *****************
|
||||
* User: Kathy Date: 11/11/02 Time: 7:14a
|
||||
* Updated in $/LibSource/ROFields
|
||||
* image field type should be 32 not 20
|
||||
*
|
||||
* ***************** Version 7 *****************
|
||||
* User: Kathy Date: 10/15/02 Time: 2:17p
|
||||
* Updated in $/LibSource/ROFields
|
||||
* combo field number
|
||||
*
|
||||
* ***************** Version 6 *****************
|
||||
* User: Kathy Date: 9/27/02 Time: 1:11p
|
||||
* Updated in $/LibSource/ROFields
|
||||
* fix digit as first char in fieldname
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Kathy Date: 9/25/02 Time: 2:31p
|
||||
* Updated in $/LibSource/ROFields
|
||||
* multitxt->variable
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Kathy Date: 9/03/02 Time: 2:53p
|
||||
* Updated in $/LibSource/ROFields
|
||||
* missing " on image field def.
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Kathy Date: 8/30/02 Time: 11:56a
|
||||
* Updated in $/LibSource/ROFields
|
||||
* image
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 8/28/02 Time: 10:59a
|
||||
* Updated in $/LibSource/ROFields
|
||||
* development
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace ROFields
|
||||
{
|
||||
public enum FieldTypes: uint
|
||||
{
|
||||
Nil=0, SingleTxt=1, VariableTxt=2, FrmtSingleTxt=4, XYPlot=8, Table=10, Image=32,
|
||||
MultiTxt=40, Combination=128, MultiFld=100
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for ROField: This class contains RO Field information. Each ROField
|
||||
/// contains:
|
||||
/// string fieldname - the name of the field
|
||||
/// string recid - its database record id (used to interface to the database - null if
|
||||
/// not created yet.
|
||||
/// string masterrecID - its record id in the master if appropriate.
|
||||
/// uint fieldtype - the field type as defined in the enum FieldTypes (listed above)
|
||||
/// </summary>
|
||||
public class ROField
|
||||
{
|
||||
string fieldname;
|
||||
string recID;
|
||||
string masterrecID;
|
||||
uint fldtype;
|
||||
|
||||
// constuctor
|
||||
public ROField(string fname, string rID, string mrID, uint fieldtype)
|
||||
{
|
||||
fieldname = fname;
|
||||
recID = rID;
|
||||
masterrecID = mrID;
|
||||
fldtype = fieldtype;
|
||||
}
|
||||
public string GetFieldname { get {return fieldname;}}
|
||||
public string GetRecID { get {return recID;}}
|
||||
public string GetMasterRecID { get {return masterrecID;}}
|
||||
public uint GetFieldType{ get {return fldtype;}}
|
||||
public void SetFieldname(string name) {fieldname = name;}
|
||||
public void SetRecID(string recid) {recID = recid;}
|
||||
public void SetMasterRecID(string mrecid) {masterrecID = mrecid;}
|
||||
public void SetFieldType(uint ftype) {fldtype = ftype;}
|
||||
|
||||
// Given a schema string, determine which RO Field type it is.
|
||||
public uint ParseFieldType(string info)
|
||||
{
|
||||
int indx;
|
||||
// formatted single line text has 'pattern' in schema definition)
|
||||
indx = info.IndexOf("xsd:pattern");
|
||||
if (indx >= 0) return (uint) FieldTypes.FrmtSingleTxt;
|
||||
|
||||
// Combination field has 'choice' in schema definition
|
||||
indx = info.IndexOf("xsd:choice");
|
||||
if (indx >= 0) return (uint) FieldTypes.Combination;
|
||||
|
||||
// image - search for 'Image_Height', in case Image is in the string from some other mechanism
|
||||
indx = info.IndexOf("Image_Height");
|
||||
if (indx >=0) return (uint) FieldTypes.Image;
|
||||
|
||||
// single line text has 'normalizedString' (pattern does too, but
|
||||
// it would be eliminated above.
|
||||
indx = info.IndexOf("xsd:normalizedString");
|
||||
if (indx >=0) return (uint) FieldTypes.SingleTxt;
|
||||
|
||||
// now look for all of the multi-line fields: multi text, table, & XY Plot
|
||||
indx = info.IndexOf("xsd:string");
|
||||
if (indx <0) indx = info.IndexOf("xsd:String");
|
||||
if (indx >=0)
|
||||
{
|
||||
int indxspecific;
|
||||
indxspecific = info.IndexOf("Variable");
|
||||
if (indxspecific >= 0) return (uint) FieldTypes.VariableTxt;
|
||||
indxspecific = info.IndexOf("Table");
|
||||
if (indxspecific >= 0) return (uint) FieldTypes.Table;
|
||||
indxspecific = info.IndexOf("XYPlot");
|
||||
if (indxspecific >= 0) return (uint) FieldTypes.XYPlot;
|
||||
}
|
||||
|
||||
// indx = info.IndexOf("Image");
|
||||
// if (indx >=0) return (uint) FieldTypes.Image;
|
||||
|
||||
return 1000;
|
||||
}
|
||||
|
||||
// Creates a string representing the schema for this field. note that the input
|
||||
// fieldname will override that which is stored for this ROField (for editting
|
||||
// purposes).
|
||||
public string MakeFieldName(string fldname)
|
||||
{
|
||||
if (fldname.Length < 2)
|
||||
return fldname;
|
||||
// a digit cannot start an xml fieldname, prepend a "__" to it.
|
||||
string tmp0;
|
||||
if (char.IsDigit(fldname,0))
|
||||
tmp0 = "__" + fldname;
|
||||
else
|
||||
tmp0 = fldname;
|
||||
// an xml fieldname cannot have a space, change it to a "__"
|
||||
string tmpstr = tmp0.Replace(" ","__");
|
||||
int len = tmpstr.Length;
|
||||
int cnt = 0;
|
||||
|
||||
// this is also our sequence that tells us the follow 3 digits is the ascii number (base 10)
|
||||
// of the character we replaced.
|
||||
string OKpunch = "-._";
|
||||
|
||||
string outstr = "";
|
||||
int decval;
|
||||
|
||||
while (cnt < len)
|
||||
{
|
||||
char tmpchr = tmpstr[cnt];
|
||||
if(!char.IsLetterOrDigit(tmpchr)&& (OKpunch.IndexOf(tmpchr) == -1) )
|
||||
{
|
||||
decval = tmpchr;
|
||||
outstr += OKpunch + decval.ToString("D3");
|
||||
}
|
||||
else
|
||||
{
|
||||
outstr += tmpchr.ToString();
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
return outstr;
|
||||
}
|
||||
|
||||
public string MakeSchemaString(string fieldname, string width, string pattern)
|
||||
{
|
||||
uint ftype = this.GetFieldType;
|
||||
StringBuilder strbld = new StringBuilder();
|
||||
strbld.Append("<xsd:element name=\"");
|
||||
strbld.Append(MakeFieldName(fieldname));
|
||||
strbld.Append("\" minOccurs=\"0\">\n");
|
||||
if (ftype == (uint)FieldTypes.VariableTxt || ftype == (uint)FieldTypes.Table || ftype == (uint)FieldTypes.XYPlot)
|
||||
{
|
||||
strbld.Append("<xsd:annotation>\n<xsd:documentation xml:lang=\"en\">");
|
||||
if (ftype == (uint)FieldTypes.VariableTxt)
|
||||
strbld.Append("Variable");
|
||||
else if (ftype == (uint)FieldTypes.Table)
|
||||
strbld.Append("Table");
|
||||
else
|
||||
strbld.Append("XYPlot");
|
||||
strbld.Append("</xsd:documentation>\n</xsd:annotation>");
|
||||
}
|
||||
strbld.Append("<xsd:simpleType>\n<xsd:restriction base=\"xsd:");
|
||||
if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.SingleTxt)
|
||||
strbld.Append("normalizedString\">\n<xsd:maxLength value=\"");
|
||||
else
|
||||
strbld.Append("String\">\n<xsd:maxLength value=\"");
|
||||
strbld.Append(width);
|
||||
strbld.Append("\" />\n");
|
||||
if (ftype == (uint)FieldTypes.FrmtSingleTxt)
|
||||
{
|
||||
strbld.Append("<xsd:pattern value=\"");
|
||||
strbld.Append(pattern);
|
||||
strbld.Append("\" />\n");
|
||||
}
|
||||
strbld.Append("</xsd:restriction>\n</xsd:simpleType>\n</xsd:element>");
|
||||
return (strbld.ToString());
|
||||
}
|
||||
|
||||
public string MakeComboSchemaString(string fieldname, bool fixd, string fixdwid, bool multi, string multiwid,
|
||||
bool table, string tablewid, bool xyplot, string xyplotwid)
|
||||
{
|
||||
StringBuilder strbld = new StringBuilder();
|
||||
strbld.Append("<xsd:choice>\n");
|
||||
if (fixd == true)
|
||||
{
|
||||
strbld.Append("<xsd:element name=\"");
|
||||
strbld.Append(MakeFieldName(fieldname)+"a");
|
||||
strbld.Append("\" type=\"Fixed\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:simpleType>\n<xsd:restriction base=\"xsd:normalizedString\">\n<xsd:maxLength value=\"");
|
||||
strbld.Append(fixdwid);
|
||||
strbld.Append("\" />\n</xsd:restriction>\n</xsd:simpleType>\n</xsd:element>\n");
|
||||
}
|
||||
if (multi == true)
|
||||
{
|
||||
strbld.Append("<xsd:element name=\"");
|
||||
strbld.Append(MakeFieldName(fieldname)+"b");
|
||||
strbld.Append("\" type=\"Variable\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:annotation>\n<xsd:documentation xml:lang=\"en\">\nVariable\n");
|
||||
strbld.Append("</xsd:documentation>\n</xsd:annotation>\n<xsd:simpleType name=\"Variable\">\n");
|
||||
strbld.Append("<xsd:restriction base=\"xsd:string\">\n<xsd:maxLength value=\"");
|
||||
strbld.Append(multiwid);
|
||||
strbld.Append("\" />\n</xsd:restriction>\n</xsd:simpleType>\n</xsd:element>\n");
|
||||
}
|
||||
if (table == true)
|
||||
{
|
||||
strbld.Append("<xsd:element name=\"");
|
||||
strbld.Append(MakeFieldName(fieldname)+"c");
|
||||
strbld.Append("\" type=\"Table\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:annotation>\n<xsd:documentation xml:lang=\"en\">\nTable\n");
|
||||
strbld.Append("</xsd:documentation>\n</xsd:annotation>\n<xsd:simpleType name=\"Variable\">\n");
|
||||
strbld.Append("<xsd:restriction base=\"xsd:string\">\n<xsd:maxLength value=\"");
|
||||
strbld.Append(tablewid);
|
||||
strbld.Append("\" />\n</xsd:restriction>\n</xsd:simpleType>\n</xsd:element>");
|
||||
}
|
||||
if (xyplot == true)
|
||||
{
|
||||
strbld.Append("<xsd:element name=\"");
|
||||
strbld.Append(MakeFieldName(fieldname)+"d");
|
||||
strbld.Append("\" type=\"XY_Plot\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:annotation>\n<xsd:documentation xml:lang=\"en\">\nXYPlot\n");
|
||||
strbld.Append("</xsd:documentation>\n</xsd:annotation>\n<xsd:simpleType name=\"Variable\">\n");
|
||||
strbld.Append("<xsd:restriction base=\"xsd:string\">\n<xsd:maxLength value=\"");
|
||||
strbld.Append(xyplotwid);
|
||||
strbld.Append("\" />\n</xsd:restriction>\n</xsd:simpleType>\n</xsd:element>");
|
||||
}
|
||||
strbld.Append("</xsd:choice>");
|
||||
return (strbld.ToString());
|
||||
}
|
||||
|
||||
public string MakeImageSchemaString(string fieldname)
|
||||
{
|
||||
StringBuilder strbld = new StringBuilder();
|
||||
strbld.Append("<xsd:element name=\"");
|
||||
strbld.Append(MakeFieldName(fieldname));
|
||||
strbld.Append("\">\n<xsd:complexType>\n<xsd:sequence>");
|
||||
strbld.Append("<xsd:element name=\"Image_Filename\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:simpleType>\n<xsd:annotation>\n");
|
||||
strbld.Append("<xsd:documentation xml:lang=\"en\">VLN_FINDFILE</xsd:documentation>\n");
|
||||
strbld.Append("</xsd:annotation>\n<xsd:restriction base=\"xsd:normalizedString\">\n");
|
||||
strbld.Append("<xsd:maxLength value=\"70\" />\n</xsd:restriction>\n</xsd:simpleType>");
|
||||
strbld.Append("</xsd:element>\n<xsd:element name=\"Image_Height\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:simpleType>\n<xsd:annotation>\n");
|
||||
strbld.Append("<xsd:documentation xml:lang=\"en\">Lines (6 lines per inch)</xsd:documentation>\n");
|
||||
strbld.Append("</xsd:annotation>\n<xsd:restriction base=\"xsd:normalizedString\">\n");
|
||||
strbld.Append("<xsd:maxLength value=\"10\" />\n</xsd:restriction>\n</xsd:simpleType>\n");
|
||||
strbld.Append("</xsd:element>\n<xsd:element name=\"Image_Width\" minOccurs=\"0\">\n");
|
||||
strbld.Append("<xsd:simpleType>\n<xsd:annotation>\n");
|
||||
strbld.Append("<xsd:documentation xml:lang=\"en\">Characters (12 chars. Per inch)</xsd:documentation>\n");
|
||||
strbld.Append("</xsd:annotation>\n<xsd:restriction base=\"xsd:normalizedString\">\n");
|
||||
strbld.Append("<xsd:maxLength value=\"10\" />\n</xsd:restriction>\n</xsd:simpleType>\n");
|
||||
strbld.Append("</xsd:element>\n</xsd:sequence>\n</xsd:complexType>\n</xsd:element>");
|
||||
return(strbld.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
102
PROMS/ReferencedObjectsOld/LibSource/ROField/ROFields.csproj
Normal file
102
PROMS/ReferencedObjectsOld/LibSource/ROField/ROFields.csproj
Normal file
@@ -0,0 +1,102 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0C782592-AA05-11D6-84D1-00A0CC271352}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>ROField</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>ROField</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ROField.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
21
PROMS/ReferencedObjectsOld/LibSource/ROField/ROFields.sln
Normal file
21
PROMS/ReferencedObjectsOld/LibSource/ROField/ROFields.sln
Normal file
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ROFields", "ROFields.csproj", "{0C782592-AA05-11D6-84D1-00A0CC271352}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Debug.ActiveCfg = Debug|.NET
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Debug.Build.0 = Debug|.NET
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Release.ActiveCfg = Release|.NET
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
268
PROMS/ReferencedObjectsOld/LibSource/Utils/About.cs
Normal file
268
PROMS/ReferencedObjectsOld/LibSource/Utils/About.cs
Normal file
@@ -0,0 +1,268 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: About.cs $ $Revision: 5 $
|
||||
* $Author: Jsj $ $Date: 1/02/08 1:38p $
|
||||
*
|
||||
* $History: About.cs $
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Jsj Date: 1/02/08 Time: 1:38p
|
||||
* Updated in $/LibSource/Utils
|
||||
* upped copyright to 2008
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 1/02/07 Time: 1:53p
|
||||
* Updated in $/LibSource/Utils
|
||||
* uppped copyright to 2007
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 7/18/06 Time: 11:40a
|
||||
* Updated in $/LibSource/Utils
|
||||
* turned off Microsoft Solution Provider logo.
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 1/03/06 Time: 9:08a
|
||||
* Updated in $/LibSource/Utils
|
||||
* upped copyright to year 2005
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for About.
|
||||
/// </summary>
|
||||
public class AboutDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Button btnHlpAbtOK;
|
||||
private System.Windows.Forms.Label CopyrightMessage;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.Label lblProgName;
|
||||
private System.Windows.Forms.Label lblVerRelNums;
|
||||
private System.Windows.Forms.Label lblSerialNumber;
|
||||
private System.Windows.Forms.Label lblSerialNumTitle;
|
||||
private System.Windows.Forms.Label lblUserID;
|
||||
private System.Windows.Forms.LinkLabel VolianWebLink;
|
||||
private System.Windows.Forms.Label lblLicenseTab;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public AboutDlg(string ProgName, string SerialNoStr, string SnTitleTab, string SerialNoTitle, string VerRel, string cpyrght, string UIDstr)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
CopyrightMessage.Text = cpyrght;
|
||||
this.lblProgName.Text = ProgName;
|
||||
lblVerRelNums.Text = VerRel;
|
||||
lblSerialNumber.Text = SerialNoStr;
|
||||
lblSerialNumTitle.Text = SerialNoTitle;
|
||||
lblUserID.Text = UIDstr;
|
||||
lblLicenseTab.Text = SnTitleTab;
|
||||
}
|
||||
|
||||
/// <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(AboutDlg));
|
||||
this.btnHlpAbtOK = new System.Windows.Forms.Button();
|
||||
this.lblProgName = new System.Windows.Forms.Label();
|
||||
this.lblVerRelNums = new System.Windows.Forms.Label();
|
||||
this.lblSerialNumber = new System.Windows.Forms.Label();
|
||||
this.CopyrightMessage = new System.Windows.Forms.Label();
|
||||
this.lblUserID = new System.Windows.Forms.Label();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.lblSerialNumTitle = new System.Windows.Forms.Label();
|
||||
this.VolianWebLink = new System.Windows.Forms.LinkLabel();
|
||||
this.lblLicenseTab = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnHlpAbtOK
|
||||
//
|
||||
this.btnHlpAbtOK.BackColor = System.Drawing.Color.YellowGreen;
|
||||
this.btnHlpAbtOK.Font = new System.Drawing.Font("Tahoma", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.btnHlpAbtOK.Location = new System.Drawing.Point(144, 160);
|
||||
this.btnHlpAbtOK.Name = "btnHlpAbtOK";
|
||||
this.btnHlpAbtOK.Size = new System.Drawing.Size(96, 32);
|
||||
this.btnHlpAbtOK.TabIndex = 0;
|
||||
this.btnHlpAbtOK.Text = "OK";
|
||||
this.btnHlpAbtOK.Click += new System.EventHandler(this.btnHlpAbtOK_Click);
|
||||
//
|
||||
// lblProgName
|
||||
//
|
||||
this.lblProgName.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblProgName.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblProgName.Location = new System.Drawing.Point(8, 8);
|
||||
this.lblProgName.Name = "lblProgName";
|
||||
this.lblProgName.Size = new System.Drawing.Size(360, 19);
|
||||
this.lblProgName.TabIndex = 1;
|
||||
this.lblProgName.Text = "Program Name";
|
||||
this.lblProgName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblVerRelNums
|
||||
//
|
||||
this.lblVerRelNums.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblVerRelNums.Font = new System.Drawing.Font("Arial", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblVerRelNums.Location = new System.Drawing.Point(8, 40);
|
||||
this.lblVerRelNums.Name = "lblVerRelNums";
|
||||
this.lblVerRelNums.Size = new System.Drawing.Size(352, 24);
|
||||
this.lblVerRelNums.TabIndex = 2;
|
||||
this.lblVerRelNums.Text = "Version 0 Release 0";
|
||||
this.lblVerRelNums.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblSerialNumber
|
||||
//
|
||||
this.lblSerialNumber.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblSerialNumber.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblSerialNumber.Location = new System.Drawing.Point(8, 72);
|
||||
this.lblSerialNumber.Name = "lblSerialNumber";
|
||||
this.lblSerialNumber.Size = new System.Drawing.Size(360, 16);
|
||||
this.lblSerialNumber.TabIndex = 3;
|
||||
this.lblSerialNumber.Text = "Serial Number: xx";
|
||||
this.lblSerialNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// CopyrightMessage
|
||||
//
|
||||
this.CopyrightMessage.BackColor = System.Drawing.Color.Transparent;
|
||||
this.CopyrightMessage.Font = new System.Drawing.Font("Arial", 6F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.CopyrightMessage.Location = new System.Drawing.Point(8, 192);
|
||||
this.CopyrightMessage.Name = "CopyrightMessage";
|
||||
this.CopyrightMessage.Size = new System.Drawing.Size(232, 16);
|
||||
this.CopyrightMessage.TabIndex = 4;
|
||||
this.CopyrightMessage.Text = " Copyright C 1988 - 2008 All Rights Reserved";
|
||||
this.CopyrightMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblUserID
|
||||
//
|
||||
this.lblUserID.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblUserID.Font = new System.Drawing.Font("Arial", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblUserID.Location = new System.Drawing.Point(8, 136);
|
||||
this.lblUserID.Name = "lblUserID";
|
||||
this.lblUserID.Size = new System.Drawing.Size(360, 16);
|
||||
this.lblUserID.TabIndex = 6;
|
||||
this.lblUserID.Text = "User ID: xxxxx";
|
||||
this.lblUserID.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
this.pictureBox2.Enabled = false;
|
||||
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
|
||||
this.pictureBox2.Location = new System.Drawing.Point(272, 160);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(69, 32);
|
||||
this.pictureBox2.TabIndex = 7;
|
||||
this.pictureBox2.TabStop = false;
|
||||
this.pictureBox2.Visible = false;
|
||||
//
|
||||
// lblSerialNumTitle
|
||||
//
|
||||
this.lblSerialNumTitle.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblSerialNumTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblSerialNumTitle.Location = new System.Drawing.Point(112, 96);
|
||||
this.lblSerialNumTitle.Name = "lblSerialNumTitle";
|
||||
this.lblSerialNumTitle.Size = new System.Drawing.Size(256, 32);
|
||||
this.lblSerialNumTitle.TabIndex = 8;
|
||||
this.lblSerialNumTitle.Text = "Serial Number Title";
|
||||
//
|
||||
// VolianWebLink
|
||||
//
|
||||
this.VolianWebLink.Location = new System.Drawing.Point(248, 192);
|
||||
this.VolianWebLink.Name = "VolianWebLink";
|
||||
this.VolianWebLink.Size = new System.Drawing.Size(112, 16);
|
||||
this.VolianWebLink.TabIndex = 9;
|
||||
this.VolianWebLink.TabStop = true;
|
||||
this.VolianWebLink.Text = "Volian Enterprises Inc.";
|
||||
this.VolianWebLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.VolianWebLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// lblLicenseTab
|
||||
//
|
||||
this.lblLicenseTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblLicenseTab.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblLicenseTab.Location = new System.Drawing.Point(8, 96);
|
||||
this.lblLicenseTab.Name = "lblLicenseTab";
|
||||
this.lblLicenseTab.Size = new System.Drawing.Size(104, 24);
|
||||
this.lblLicenseTab.TabIndex = 10;
|
||||
this.lblLicenseTab.Text = "Licenced To:";
|
||||
//
|
||||
// AboutDlg
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);
|
||||
this.BackColor = System.Drawing.SystemColors.GrayText;
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
this.ClientSize = new System.Drawing.Size(370, 209);
|
||||
this.Controls.Add(this.lblLicenseTab);
|
||||
this.Controls.Add(this.VolianWebLink);
|
||||
this.Controls.Add(this.lblSerialNumTitle);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.lblUserID);
|
||||
this.Controls.Add(this.CopyrightMessage);
|
||||
this.Controls.Add(this.lblSerialNumber);
|
||||
this.Controls.Add(this.lblVerRelNums);
|
||||
this.Controls.Add(this.lblProgName);
|
||||
this.Controls.Add(this.btnHlpAbtOK);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AboutDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "About";
|
||||
this.Load += new System.EventHandler(this.AboutDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void btnHlpAbtOK_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("www.volian.com");
|
||||
}
|
||||
|
||||
private void AboutDlg_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
4144
PROMS/ReferencedObjectsOld/LibSource/Utils/About.resx
Normal file
4144
PROMS/ReferencedObjectsOld/LibSource/Utils/About.resx
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 227 KiB |
55
PROMS/ReferencedObjectsOld/LibSource/Utils/AssemblyInfo.cs
Normal file
55
PROMS/ReferencedObjectsOld/LibSource/Utils/AssemblyInfo.cs
Normal 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.
|
||||
//
|
@@ -0,0 +1,57 @@
|
||||
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: AssemblyKeyName("")]
|
185
PROMS/ReferencedObjectsOld/LibSource/Utils/CurSet.cs
Normal file
185
PROMS/ReferencedObjectsOld/LibSource/Utils/CurSet.cs
Normal file
@@ -0,0 +1,185 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: CurSet.cs $ $Revision: 2 $
|
||||
* $Author: Jsj $ $Date: 5/17/05 11:51a $
|
||||
*
|
||||
* $History: CurSet.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 5/17/05 Time: 11:51a
|
||||
* Updated in $/LibSource/Utils
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for CurSet.
|
||||
/// </summary>
|
||||
public class CurSet
|
||||
{
|
||||
public string PathName;
|
||||
public string DefaultDestFName; //[MAXPATH]
|
||||
public string DefaultPlantFmt; //[10];
|
||||
public string DefaultPrinter; //[4];
|
||||
public ArrayList DefaultUserCBMsg; //[2][10];
|
||||
public string DefaultUserFmt; //[3];
|
||||
public ArrayList DefPenColors; //[8]
|
||||
public short DefaultChangeBars;
|
||||
public short DefaultDestination;
|
||||
public short DefaultOriginals;
|
||||
public short DefaultPagination;
|
||||
public short DefaultPaperMacro;
|
||||
public short DefaultPlotterType,DefaultPlotterPort,DefaultCIEType;
|
||||
public short DontPrintStatusTree;
|
||||
public short DisableDuplexPrinting;
|
||||
|
||||
private string[] SettingFiles={"..\\procs\\curset.dat", "~curset.dat"};
|
||||
|
||||
public CurSet(string pname)
|
||||
{
|
||||
PathName = pname;
|
||||
|
||||
}
|
||||
|
||||
public bool Create(UserRunTime usrRT)
|
||||
{
|
||||
// find file to copy from procs or system.
|
||||
bool found = false;
|
||||
int i=0;
|
||||
while(found==false)
|
||||
{
|
||||
if (File.Exists(usrRT.ExeAdjust(SettingFiles[i])) == true)
|
||||
found=true;
|
||||
else
|
||||
i++;
|
||||
}
|
||||
if (found==false) return false;
|
||||
File.Copy(usrRT.ExeAdjust(SettingFiles[i]),"curset.dat");
|
||||
PathName = "curset.dat";
|
||||
return true;
|
||||
}
|
||||
|
||||
private string ReadTheString(BinaryReader bw, int maxlen)
|
||||
{
|
||||
StringBuilder retStr = new StringBuilder(maxlen+1);
|
||||
// read a series of characters until a null is found.
|
||||
char ac;
|
||||
bool done = false;
|
||||
while(done==false)
|
||||
{
|
||||
ac = bw.ReadChar();
|
||||
if (ac=='\0')
|
||||
done=true;
|
||||
else
|
||||
retStr.Append(ac);
|
||||
}
|
||||
return retStr.ToString();
|
||||
}
|
||||
|
||||
public bool Read()
|
||||
{
|
||||
BinaryReader br;
|
||||
ArrayList DefaultUserCBMsg = new ArrayList(2);
|
||||
ArrayList DefPenColors = new ArrayList(8);
|
||||
FileStream fs;
|
||||
FileInfo fi = new FileInfo(PathName);
|
||||
try
|
||||
{
|
||||
fs = fi.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite );
|
||||
br = new BinaryReader(fs,System.Text.ASCIIEncoding.ASCII);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.ToString(),"CURSET.DAT Error");
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DefaultDestination=br.ReadSByte();
|
||||
DefaultChangeBars= br.ReadSByte();
|
||||
DefaultOriginals=br.ReadSByte();
|
||||
DefaultPagination=br.ReadSByte();
|
||||
DefaultPrinter = ReadTheString(br,4);
|
||||
DefaultPlantFmt = ReadTheString(br,10);
|
||||
DefaultDestFName = ReadTheString(br,128);
|
||||
DefaultPlotterType = br.ReadSByte();
|
||||
DefaultPlotterPort = br.ReadSByte();
|
||||
DefaultCIEType = br.ReadSByte();
|
||||
short tmp;
|
||||
for (int i=0;i<8;i++)
|
||||
{
|
||||
tmp = br.ReadSByte();
|
||||
DefPenColors.Add(tmp);
|
||||
}
|
||||
|
||||
DefaultPaperMacro = br.ReadSByte();
|
||||
string stmp;
|
||||
stmp = ReadTheString(br,10);
|
||||
DefaultUserCBMsg.Add(stmp);
|
||||
stmp = ReadTheString(br,10);
|
||||
DefaultUserCBMsg.Add(stmp);
|
||||
DontPrintStatusTree = br.ReadSByte();
|
||||
DefaultUserFmt = ReadTheString(br,10);
|
||||
DisableDuplexPrinting = br.ReadSByte();
|
||||
br.Close();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
if(br!=null) br.Close();
|
||||
}
|
||||
fs.Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Save(string filename)
|
||||
{
|
||||
// may be a different pathname, if so, change it.
|
||||
if (filename.ToUpper() != PathName.ToUpper()) PathName = filename;
|
||||
|
||||
FileStream fs = new FileStream(PathName, FileMode.Create);
|
||||
BinaryWriter w = new BinaryWriter(fs);
|
||||
|
||||
w.Write(DefaultDestination);
|
||||
w.Write(DefaultChangeBars);
|
||||
w.Write(DefaultOriginals);
|
||||
w.Write(DefaultPagination);
|
||||
w.Write(DefaultPrinter);
|
||||
w.Write(DefaultPlantFmt);
|
||||
w.Write(DefaultDestFName);
|
||||
w.Write(DefaultPlotterType);
|
||||
w.Write(DefaultPlotterPort);
|
||||
w.Write(DefaultCIEType);
|
||||
w.Write((short)DefPenColors[0]);
|
||||
w.Write((short)DefPenColors[1]);
|
||||
w.Write((short)DefPenColors[2]);
|
||||
w.Write((short)DefPenColors[3]);
|
||||
w.Write((short)DefPenColors[4]);
|
||||
w.Write((short)DefPenColors[5]);
|
||||
w.Write((short)DefPenColors[6]);
|
||||
w.Write((short)DefPenColors[7]);
|
||||
w.Write(DefaultPaperMacro);
|
||||
w.Write((string)DefaultUserCBMsg[0]);
|
||||
w.Write((string)DefaultUserCBMsg[1]);
|
||||
w.Write(DontPrintStatusTree);
|
||||
w.Write(DefaultUserFmt);
|
||||
w.Write(DisableDuplexPrinting);
|
||||
w.Close();
|
||||
fs.Close();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
139
PROMS/ReferencedObjectsOld/LibSource/Utils/DTI.cs
Normal file
139
PROMS/ReferencedObjectsOld/LibSource/Utils/DTI.cs
Normal file
@@ -0,0 +1,139 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: DTI.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 3/08/05 1:46p $
|
||||
*
|
||||
* $History: DTI.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 3/08/05 Time: 1:46p
|
||||
* Created in $/LibSource/Utils
|
||||
* Approval
|
||||
*********************************************************************************************/
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DTI.
|
||||
/// </summary>
|
||||
public class DTI
|
||||
{
|
||||
public static string DateTimeInit;
|
||||
public static string SetDateTimeInit;
|
||||
public static string Initials; // set from the user's run time.
|
||||
|
||||
public static string CurDate(string delim)
|
||||
{
|
||||
DateTime dt = DateTime.Today;
|
||||
|
||||
StringBuilder sdt = new StringBuilder(11);
|
||||
if (delim == null || delim == "") delim = "-";
|
||||
sdt.Append(dt.Month.ToString("D2"));
|
||||
sdt.Append(delim);
|
||||
sdt.Append(dt.Day.ToString("D2"));
|
||||
sdt.Append(delim);
|
||||
sdt.Append(dt.Year.ToString("D2"));
|
||||
return sdt.ToString();
|
||||
}
|
||||
|
||||
public static string CurTime()
|
||||
{
|
||||
DateTime dt = DateTime.Now;
|
||||
StringBuilder sdt = new StringBuilder(11);
|
||||
sdt.Append(dt.Hour.ToString("D2"));
|
||||
sdt.Append(":");
|
||||
sdt.Append(dt.Minute.ToString("D2"));
|
||||
sdt.Append(":");
|
||||
sdt.Append(dt.Second.ToString("D2"));
|
||||
return sdt.ToString();
|
||||
}
|
||||
|
||||
// ovrride == 0 default, don't do anything different
|
||||
// ovrride == 1 means simply override "super"
|
||||
// ovrride == 2 means force a reset of the DTI
|
||||
public static void UpdateDateTimeInit(int ovrride)
|
||||
{
|
||||
StringBuilder ldti = new StringBuilder(19);
|
||||
if (ovrride != 2 && (ovrride!=0 || Initials!="super"))
|
||||
{
|
||||
string tptr = CurDate(null);
|
||||
ldti = new StringBuilder(12);
|
||||
ldti.Insert(0,tptr.Substring(6,4));
|
||||
ldti.Insert(4,tptr.Substring(0,2));
|
||||
ldti.Insert(6,tptr.Substring(3,2));
|
||||
ldti.Insert(8,CurTime().Substring(0,5));
|
||||
ldti.Insert(13,Initials.PadRight(5,' ').Substring(0,5));
|
||||
}
|
||||
else
|
||||
ldti.Insert(0,DTI.SetDateTimeInit);
|
||||
|
||||
// for dbase, replace spaces with '0' in date/time part & shift any non-number
|
||||
// in first time field back to end of time field (?not sure why - this was
|
||||
// done in 16-bit code.
|
||||
for (int i=0;i<13&&ldti[i]!=0;i++) if (ldti[i]==' ') ldti[i]='0';
|
||||
char c = ldti[10];
|
||||
if (!Char.IsDigit(c))
|
||||
{
|
||||
ldti[10]=ldti[11];
|
||||
ldti[11]=ldti[12];
|
||||
ldti[12]=c;
|
||||
}
|
||||
|
||||
if (ldti.ToString().Substring(0,8).Equals("19800101"))
|
||||
{
|
||||
ldti.Insert(0,SetDateTimeInit.Substring(0,13));
|
||||
}
|
||||
DateTimeInit = ldti.ToString();
|
||||
}
|
||||
|
||||
// MakeDate is passed a date in the form of YYYYMMDD and translates it
|
||||
// into MM/DD/YY (if ShortYear is true) or MM/DD/YYYY. condense
|
||||
// removes any leading ' ' or 0 in month or day.
|
||||
public static string MakeDate(string src, bool condense, bool ShortYear)
|
||||
{
|
||||
int[] DateOffset={4,5,47,6,7,47,2,3}; // 47 = '/'
|
||||
StringBuilder datebuff = new StringBuilder(12);
|
||||
for (int i=0; i<DateOffset.Length; i++)
|
||||
{
|
||||
if (DateOffset[i]<9)
|
||||
datebuff.Append(src[DateOffset[i]]);
|
||||
else
|
||||
datebuff.Append(System.Convert.ToChar(DateOffset[i]));
|
||||
}
|
||||
|
||||
// for Y2K the year should be four digits. Copy the first
|
||||
// four characters from the source (i.e. 4 digit year) to
|
||||
// the 'year part' of the destination.
|
||||
|
||||
if (!ShortYear)
|
||||
{
|
||||
datebuff.Append(" "); // add the two characters to replace in next stmt
|
||||
for (int i=0;i<4;i++) datebuff[i+6]=src[i];
|
||||
}
|
||||
// if the condense flag is set, remove leading 0 or blank
|
||||
// from day and month fields.
|
||||
if(condense)
|
||||
{
|
||||
for (int i=0;i<datebuff.Length;i++)
|
||||
{
|
||||
bool r1 = (datebuff[0]==' ')?true:false;
|
||||
bool r2 = (datebuff[3]=='0'||datebuff[3]==' ')?true:false;
|
||||
int pos = 0;
|
||||
|
||||
if (!((r1 && i==0)||(r2 && i==3)))
|
||||
{
|
||||
datebuff[pos]=datebuff[i];
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(datebuff.ToString());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
73
PROMS/ReferencedObjectsOld/LibSource/Utils/DirSpace.cs
Normal file
73
PROMS/ReferencedObjectsOld/LibSource/Utils/DirSpace.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: DirSpace.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 3/08/05 1:46p $
|
||||
*
|
||||
* $History: DirSpace.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 3/08/05 Time: 1:46p
|
||||
* Created in $/LibSource/Utils
|
||||
* Approval
|
||||
*********************************************************************************************/
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for DirSpace.
|
||||
/// </summary>
|
||||
public class DirSpace
|
||||
{
|
||||
static DirSpace()
|
||||
{
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
|
||||
public static extern bool GetDiskFreeSpaceEx(
|
||||
[MarshalAs(UnmanagedType.LPTStr)] string lpDirectoryName,
|
||||
ref long lpFreeBytesAvailable,
|
||||
ref long lpTotalNumberOfBytes,
|
||||
ref long lpTotalNumberOfFreeBytes);
|
||||
|
||||
public static long Free()
|
||||
{
|
||||
string curdir = Environment.CurrentDirectory;
|
||||
long freeBytes = new long();
|
||||
long totalFreeBytes = new long();
|
||||
long totalBytes = new long();
|
||||
|
||||
bool x = GetDiskFreeSpaceEx(curdir, ref freeBytes, ref totalFreeBytes, ref
|
||||
totalBytes);
|
||||
return totalFreeBytes;
|
||||
}
|
||||
|
||||
private static long DirSize(DirectoryInfo d)
|
||||
{
|
||||
long Size = 0;
|
||||
// Add file sizes.
|
||||
FileInfo[] fis = d.GetFiles();
|
||||
foreach (FileInfo fi in fis)
|
||||
{
|
||||
Size += fi.Length;
|
||||
}
|
||||
// Add subdirectory sizes.
|
||||
DirectoryInfo[] dis = d.GetDirectories();
|
||||
foreach (DirectoryInfo di in dis)
|
||||
{
|
||||
Size += DirSize(di);
|
||||
}
|
||||
return(Size);
|
||||
}
|
||||
|
||||
public static long Get(string TheDirectory)
|
||||
{
|
||||
DirectoryInfo d = new DirectoryInfo(TheDirectory);
|
||||
return DirSize(d);
|
||||
}
|
||||
}
|
||||
}
|
75
PROMS/ReferencedObjectsOld/LibSource/Utils/FmtFiles.cs
Normal file
75
PROMS/ReferencedObjectsOld/LibSource/Utils/FmtFiles.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: FmtFiles.cs $ $Revision: 2 $
|
||||
* $Author: Jsj $ $Date: 5/17/05 11:51a $
|
||||
*
|
||||
* $History: FmtFiles.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 5/17/05 Time: 11:51a
|
||||
* Updated in $/LibSource/Utils
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for FmtFiles.
|
||||
/// </summary>
|
||||
public class FmtFile
|
||||
{
|
||||
public string FmtFileName;
|
||||
public FmtFile(string fname)
|
||||
{
|
||||
if (fname.IndexOf(".fmt",0) > -1)
|
||||
FmtFileName = fname;
|
||||
else
|
||||
FmtFileName = fname + ".fmt";
|
||||
}
|
||||
|
||||
public string GetFormatTitle(UserRunTime usrRT)
|
||||
{
|
||||
string fmtpath = usrRT.syspath + "\\format\\" + FmtFileName;
|
||||
FileStream fs;
|
||||
FileInfo fi = new FileInfo(fmtpath);
|
||||
try
|
||||
{
|
||||
fs = fi.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.ToString(),"Format File Read Error");
|
||||
return null;
|
||||
}
|
||||
|
||||
BinaryReader bw = new BinaryReader(fs,System.Text.ASCIIEncoding.ASCII);
|
||||
|
||||
ushort len;
|
||||
len = bw.ReadUInt16();
|
||||
string retTitle = null;
|
||||
if (len > 1)
|
||||
retTitle = new string(bw.ReadChars(len-1)); // -1: remove the null
|
||||
else
|
||||
retTitle = "Format not found";
|
||||
|
||||
return retTitle;
|
||||
}
|
||||
}
|
||||
|
||||
public class DocFile
|
||||
{
|
||||
public DocFile()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
58
PROMS/ReferencedObjectsOld/LibSource/Utils/MenuXML.cs
Normal file
58
PROMS/ReferencedObjectsOld/LibSource/Utils/MenuXML.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: MenuXML.cs $ $Revision: 2 $
|
||||
* $Author: Jsj $ $Date: 5/17/05 11:52a $
|
||||
*
|
||||
* $History: MenuXML.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 5/17/05 Time: 11:52a
|
||||
* Updated in $/LibSource/Utils
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// This class reads in an xml menu file, as input and creates an XmlDocument from it.
|
||||
/// </summary>
|
||||
public class MenuXML
|
||||
{
|
||||
private string menuFileName;
|
||||
private XmlDocument xmlDoc;
|
||||
public MenuXML(string fn)
|
||||
{
|
||||
menuFileName = fn;
|
||||
try
|
||||
{
|
||||
xmlDoc = new XmlDocument();
|
||||
XmlTextReader reader = new XmlTextReader(fn);
|
||||
xmlDoc.Load(reader);
|
||||
reader.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message.ToString(),"XML Menu Error");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public XmlDocument GetXmlDoc()
|
||||
{
|
||||
return xmlDoc;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
256
PROMS/ReferencedObjectsOld/LibSource/Utils/PrivateProfile.cs
Normal file
256
PROMS/ReferencedObjectsOld/LibSource/Utils/PrivateProfile.cs
Normal file
@@ -0,0 +1,256 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: PrivateProfile.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:34a $
|
||||
*
|
||||
* $History: PrivateProfile.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// PrivateProfile opens a private profile string and stores it's contents in an xml document.
|
||||
/// </summary>
|
||||
public class PrivateProfile
|
||||
{
|
||||
private string ppName;
|
||||
private XmlDocument ppXml;
|
||||
private XmlNode AddNode(XmlNode xParent, string sName, string sValue )
|
||||
{
|
||||
XmlNode nd;
|
||||
// Add a node
|
||||
nd=xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Element,sName,"");
|
||||
xParent.AppendChild(nd);
|
||||
nd.Value=sValue;
|
||||
return nd;
|
||||
}
|
||||
private XmlNode AddNode(XmlNode xParent, string sName)
|
||||
{
|
||||
XmlNode nd;
|
||||
// Add a node
|
||||
nd=xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Element,sName,"");
|
||||
xParent.AppendChild(nd);
|
||||
return nd;
|
||||
}
|
||||
private void AddAttribute(XmlNode xParent, string sName, string sValue )
|
||||
{
|
||||
XmlNode xa=xParent.Attributes.GetNamedItem(sName);
|
||||
// bug fix. 09/15/03
|
||||
// If there was a space after an equal sign, that space character
|
||||
// was becomming part of the value string (reading the user.CFG file).
|
||||
// This was giving us a "Must have semi-colon" error message.
|
||||
// We now strip spaces before and after any Attribute that is written.
|
||||
sValue = sValue.Trim(' ');
|
||||
|
||||
// Add an attribute
|
||||
if(sValue=="")
|
||||
{
|
||||
if(xa != null)
|
||||
{
|
||||
xParent.Attributes.RemoveNamedItem(sName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(xa == null)
|
||||
{
|
||||
xa = xParent.OwnerDocument.CreateNode(System.Xml.XmlNodeType.Attribute ,sName,"");
|
||||
xParent.Attributes.SetNamedItem(xa);
|
||||
}
|
||||
xa.Value=sValue;
|
||||
}
|
||||
|
||||
}
|
||||
private XmlNode AddSection(XmlNode xParent, string sSection )
|
||||
{
|
||||
// Add a section [name]
|
||||
XmlNode nd =AddNode(xParent,"section");
|
||||
AddAttribute(nd,"name",sSection.Substring(1,sSection.IndexOf("]")-1));
|
||||
return nd;
|
||||
}
|
||||
private XmlNode AddSection_UC(XmlNode xParent, string sSection )
|
||||
{
|
||||
// Add a section [name]
|
||||
string name_uc = sSection.Substring(1,sSection.IndexOf("]")-1).ToUpper() + "__UC";
|
||||
XmlNode nd =AddNode(xParent,"sectionUC");
|
||||
AddAttribute(nd,"name",name_uc);
|
||||
return nd;
|
||||
}
|
||||
private void AddComment(XmlNode xParent, string sComment)
|
||||
{
|
||||
|
||||
if(xParent.ChildNodes.Count > 0)
|
||||
{
|
||||
XmlNode ndlast=xParent.ChildNodes.Item(xParent.ChildNodes.Count-1);
|
||||
if(ndlast.Name=="comment")
|
||||
{
|
||||
XmlNode xa = ndlast.Attributes.GetNamedItem("text");
|
||||
xa.Value=xa.Value + "\r\n" + sComment;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Add a comment text
|
||||
XmlNode nd =AddNode(xParent,"comment");
|
||||
AddAttribute(nd,"text",sComment);
|
||||
}
|
||||
private void AddLine(XmlNode xParent, string sLine)
|
||||
{
|
||||
// Add a comment text
|
||||
XmlNode nd =AddNode(xParent,"line");
|
||||
AddAttribute(nd,"text",sLine);
|
||||
}
|
||||
private void AddParam(XmlNode xParent, string sParam)
|
||||
{
|
||||
int i = sParam.IndexOf("=");
|
||||
// add a param name=value
|
||||
string sName=sParam.Substring(0,i);
|
||||
string sValue=sParam.Substring(i+1);
|
||||
XmlNode nd =AddNode(xParent,"param");
|
||||
sName = sName.Trim(' ');
|
||||
AddAttribute(nd,"name",sName);
|
||||
AddAttribute(nd,"value",sValue);
|
||||
// AddAttribute(nd,"srchname",sName.ToUpper()+"__UC");
|
||||
// AddAttribute(nd,"value",sValue);
|
||||
}
|
||||
private void AddParam_UC(XmlNode xParent, string sParam)
|
||||
{
|
||||
int i = sParam.IndexOf("=");
|
||||
// add a param name=value
|
||||
string sName=sParam.Substring(0,i);
|
||||
string sValue=sParam.Substring(i+1);
|
||||
XmlNode nd =AddNode(xParent,"paramUC");
|
||||
sName = sName.Trim(' ');
|
||||
AddAttribute(nd,"name",sName.ToUpper()+"__UC");
|
||||
AddAttribute(nd,"value",sValue);
|
||||
}
|
||||
private void LoadXML()
|
||||
{
|
||||
string sLine;
|
||||
ppXml.LoadXml("<ini/>");// initialize ppXml
|
||||
XmlNode xmlTop=ppXml.DocumentElement;
|
||||
XmlNode xmlNd=ppXml.DocumentElement;
|
||||
XmlNode xmlNd_UC=ppXml.DocumentElement;
|
||||
StreamReader myReader = new StreamReader(ppName);// Open file
|
||||
while( (sLine = myReader.ReadLine())!= null)// read line-by-line
|
||||
{
|
||||
// add structure
|
||||
if(sLine.Length > 0)
|
||||
{
|
||||
switch (sLine.Substring(0,1))
|
||||
{
|
||||
case "[":
|
||||
xmlNd=AddSection(xmlTop, sLine);
|
||||
xmlNd_UC=AddSection_UC(xmlTop, sLine);
|
||||
break;
|
||||
case ";":
|
||||
AddComment(xmlNd, sLine);
|
||||
break;
|
||||
default:
|
||||
if(sLine.IndexOf("=") >= 0)
|
||||
{
|
||||
AddParam(xmlNd, sLine);
|
||||
AddParam_UC(xmlNd_UC, sLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLine(xmlNd, sLine);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
myReader.Close();
|
||||
// close file
|
||||
}
|
||||
public PrivateProfile(string sFileName)
|
||||
{
|
||||
ppName=sFileName; // Store file name
|
||||
ppXml= new XmlDocument();// Allocate XML
|
||||
LoadXML();// Load XML
|
||||
}
|
||||
~PrivateProfile()
|
||||
{
|
||||
// Clean-up
|
||||
//
|
||||
}
|
||||
public string PrettyNode(XmlNode nd,int level)
|
||||
{
|
||||
string retval="";
|
||||
string prefix=new string(' ',level*2);
|
||||
if(nd.ChildNodes.Count > 0)
|
||||
{
|
||||
retval = prefix + "<" + nd.Name;
|
||||
for(int i=0;i<nd.Attributes.Count;i++)
|
||||
{
|
||||
retval=retval + " " + nd.Attributes.Item(i).Name + "='" + nd.Attributes.Item(i).Value + "'";
|
||||
}
|
||||
retval=retval+">";
|
||||
for(int i=0;i<nd.ChildNodes.Count;i++)
|
||||
{
|
||||
retval=retval+"\r\n"+PrettyNode(nd.ChildNodes.Item(i),level+1);
|
||||
}
|
||||
retval=retval+"\r\n" + prefix + "</" + nd.Name + ">";
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = prefix + "<" + nd.Name;
|
||||
for(int i=0;i<nd.Attributes.Count;i++)
|
||||
{
|
||||
retval=retval + " " + nd.Attributes.Item(i).Name + "='" + nd.Attributes.Item(i).Value + "'";
|
||||
}
|
||||
retval=retval+"/>";
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
public string PrettyXML()
|
||||
{
|
||||
return PrettyNode(ppXml.DocumentElement,0);
|
||||
}
|
||||
public XmlDocument XML()
|
||||
{
|
||||
// return XML Document
|
||||
return ppXml;
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
// return string
|
||||
return "";
|
||||
}
|
||||
public void Save()
|
||||
{
|
||||
SaveAs(ppName);
|
||||
}
|
||||
public void SaveAs(string sName)
|
||||
{
|
||||
}
|
||||
public string Attr(string sPath)
|
||||
{
|
||||
string retval="";
|
||||
XmlNode xn = ppXml.SelectSingleNode(sPath);
|
||||
if(xn != null)
|
||||
{
|
||||
string quots = xn.Value;
|
||||
if (quots.Substring(0,1)=="\"" && quots.Substring(quots.Length-1,1)=="\"")
|
||||
retval = quots.Substring(1,quots.Length-2);
|
||||
else
|
||||
retval=xn.Value;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
public string Attr(string sSection, string sParameter)
|
||||
{
|
||||
string findstr = "/ini/sectionUC[@name='" + sSection.ToUpper() + "__UC']/paramUC[@name='" + sParameter.ToUpper() + "__UC']/@value";
|
||||
return Attr(findstr);
|
||||
}
|
||||
}
|
||||
}
|
622
PROMS/ReferencedObjectsOld/LibSource/Utils/Security.cs
Normal file
622
PROMS/ReferencedObjectsOld/LibSource/Utils/Security.cs
Normal file
@@ -0,0 +1,622 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: Security.cs $ $Revision: 4 $
|
||||
* $Author: Jsj $ $Date: 5/17/05 11:52a $
|
||||
*
|
||||
* $History: Security.cs $
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 5/17/05 Time: 11:52a
|
||||
* Updated in $/LibSource/Utils
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Kathy Date: 1/24/05 Time: 2:44p
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2005-004 fixes
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 1/14/05 Time: 10:38a
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2004-061: fix security options
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using System.Text;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Security.
|
||||
/// </summary>
|
||||
public class Security
|
||||
{
|
||||
public const long VIEW =0x00000001L;
|
||||
public const long PRINT =0x00000002L;
|
||||
public const long PRINTDRAFT =0x00000004L;
|
||||
public const long PRINTCHANGES =0x00000008L;
|
||||
public const long EDIT =0x00000010L;
|
||||
public const long SEARCH =0x00000020L;
|
||||
public const long STANDARDSTEPS =0x00000040L;
|
||||
public const long APPROVE =0x00000080L;
|
||||
public const long APPROVESINGLE =0x00000100L;
|
||||
public const long LIBRARYDOCS =0x00000200L;
|
||||
public const long ADDMODDEL =0x00000400L;
|
||||
public const long CLEAN =0x00000800L;
|
||||
public const long LOCKPROC =0x00001000L;
|
||||
public const long LOCKSET =0x00000001L;
|
||||
public const long UCF =0x00000002L;
|
||||
public const long LOCKSYSTEM =0x00000001L;
|
||||
public const long DOCMAINT =0x00000002L;
|
||||
public const long ROEDITOR =0x00000004L;
|
||||
public const long SYSADMIN =0x00000008L;
|
||||
|
||||
public const int SUPERUSER =1000;
|
||||
public const long SUPERACCESS =0xFFFFFFFFL;
|
||||
|
||||
// the following four flags are system security options,
|
||||
// read in for the user from the security file (vesam.opt)
|
||||
private bool BlockAccessFlag=false;
|
||||
public bool PermissionToManageFlag=false;
|
||||
public bool SystemAdminFlag=false;
|
||||
public bool PermissionToLockFlag=false;
|
||||
|
||||
// private string optFileName;
|
||||
private int numsets = 0;
|
||||
private long uoptions; // user options
|
||||
private Int16 blockAccess = 0;
|
||||
private long oldpos;
|
||||
public int userid = -1;
|
||||
// private int plantid = -1;
|
||||
// private int procid = -1;
|
||||
private string ident;
|
||||
public string initials;
|
||||
private const string samoptname = "vesam.opt";
|
||||
public string optfilename;
|
||||
private ArrayList psets; //
|
||||
public FileStream fs;
|
||||
public BinaryReader bw;
|
||||
public bool isDemoMode=false;
|
||||
|
||||
public Security(string pathname)
|
||||
{
|
||||
if (File.Exists(pathname + "\\" + samoptname) == false)
|
||||
{
|
||||
MessageBox.Show("Could not locate the Security Options file:\n\n" + pathname+"\\"+samoptname,"Security Access Error");
|
||||
optfilename = null;
|
||||
return;
|
||||
}
|
||||
optfilename = pathname + "\\" + samoptname;
|
||||
psets = new ArrayList();
|
||||
}
|
||||
|
||||
public bool OpenFile()
|
||||
{
|
||||
try
|
||||
{
|
||||
fs = new FileStream(optfilename,FileMode.Open,FileAccess.Read,FileShare.Read,1,false);
|
||||
bw = new BinaryReader(fs);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message,"Security File");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseFile()
|
||||
{
|
||||
bw.Close();
|
||||
fs.Close();
|
||||
bw=null;
|
||||
fs=null;
|
||||
}
|
||||
|
||||
public int CheckUserId(string Name, string Pass)
|
||||
{
|
||||
// check for default superuser username/password.
|
||||
if ((Name=="vlnmsp") && (Pass=="575"))
|
||||
{
|
||||
userid = SUPERUSER;
|
||||
ident = "vlnmsp";
|
||||
initials = Name;
|
||||
return userid;
|
||||
}
|
||||
|
||||
if (bw==null)
|
||||
{
|
||||
bool op;
|
||||
if ((op = OpenFile()) == false) return -1;
|
||||
}
|
||||
byte x;
|
||||
// read past some header stuff.
|
||||
for (int jj=0;jj<16;jj++)
|
||||
x=bw.ReadByte();
|
||||
long nxtUs;
|
||||
uint nmUser;
|
||||
nxtUs=bw.ReadUInt32();
|
||||
nmUser=bw.ReadUInt16();
|
||||
|
||||
int uid, tmp;
|
||||
string fName, fPass;
|
||||
for (int i = 0; i < nmUser; i++)
|
||||
{
|
||||
fs.Seek((long)nxtUs,SeekOrigin.Begin);
|
||||
nxtUs=bw.ReadUInt32();
|
||||
uid = bw.ReadUInt16();
|
||||
tmp = bw.ReadUInt16();
|
||||
byte [] test = new byte[10];
|
||||
test = bw.ReadBytes(10);
|
||||
fName = Encoding.ASCII.GetString(test,0,10);
|
||||
int indx = fName.IndexOf("\0");
|
||||
string fNameTrim = fName.Substring(0,indx);
|
||||
if (fNameTrim == Name)
|
||||
{
|
||||
test = bw.ReadBytes(10);
|
||||
fPass = Encoding.ASCII.GetString(test,0,10);
|
||||
indx = fPass.IndexOf("\0");
|
||||
string fPassTrim = fPass.Substring(0,indx);
|
||||
if (fPassTrim == Pass)
|
||||
{
|
||||
userid = uid;
|
||||
ident = Name;
|
||||
initials = Name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
CloseFile();
|
||||
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void SetUserSystemRights()
|
||||
{
|
||||
BlockAccessFlag=BlockAccess();
|
||||
long userAccessFlags=GetUserSecurity();
|
||||
PermissionToManageFlag=(userAccessFlags&Security.DOCMAINT)==0?false:true;
|
||||
PermissionToLockFlag=(userAccessFlags&Security.LOCKSYSTEM)==0?false:true;
|
||||
SystemAdminFlag=(userAccessFlags&Security.SYSADMIN)==0?false:true;
|
||||
}
|
||||
|
||||
public void LoadUserSecurity()
|
||||
{
|
||||
//
|
||||
// get the system level security options for this user here
|
||||
//
|
||||
bool op = OpenFile();
|
||||
if (op==false) return;
|
||||
|
||||
if( userid == 1000 )
|
||||
{ // super user priviledge
|
||||
uoptions = 0xFFFFFFFFL;
|
||||
SetUserSystemRights();
|
||||
CloseFile();
|
||||
return;
|
||||
}
|
||||
|
||||
fs.Seek(32,SeekOrigin.Begin);
|
||||
blockAccess=bw.ReadInt16();
|
||||
|
||||
fs.Seek(0,SeekOrigin.Begin);
|
||||
byte x;
|
||||
// read past some header stuff.
|
||||
for (int jj=0;jj<16;jj++)
|
||||
x=bw.ReadByte();
|
||||
|
||||
long nxtUs;
|
||||
uint nmUser;
|
||||
nxtUs=bw.ReadUInt32();
|
||||
nmUser=bw.ReadUInt16();
|
||||
|
||||
int uid;
|
||||
for (int i = 0; i < nmUser; i++)
|
||||
{
|
||||
oldpos = nxtUs;
|
||||
fs.Seek((long)nxtUs,SeekOrigin.Begin);
|
||||
nxtUs=bw.ReadUInt32();
|
||||
uid = bw.ReadUInt16();
|
||||
if (uid == userid)
|
||||
{
|
||||
string junk = new string (bw.ReadChars(22));
|
||||
uoptions=bw.ReadUInt16();
|
||||
break;
|
||||
}
|
||||
}
|
||||
SetUserSystemRights();
|
||||
CloseFile();
|
||||
}
|
||||
|
||||
public void SetUpDemoMode()
|
||||
{
|
||||
userid=Security.SUPERUSER; // super user so that demo data can be anywhere (doesn't check vesamp.opt)
|
||||
ident="demo";
|
||||
initials="demo";
|
||||
isDemoMode = true;
|
||||
}
|
||||
public int GetPlantSecurityIndex(string Location)
|
||||
{
|
||||
for (int i=0;i<psets.Count;i++)
|
||||
{
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[i];
|
||||
if (Location.ToUpper() == sps.GetPath().ToUpper()) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public bool PlantHasSecurity(int idx)
|
||||
{
|
||||
if (userid == SUPERUSER) return true;
|
||||
if (idx<0 || idx>psets.Count-1)return false;
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[idx];
|
||||
return sps.HasSecurity;
|
||||
}
|
||||
|
||||
public bool ProcSetHasSecurity(int idx, string procset)
|
||||
{
|
||||
if (userid == SUPERUSER) return true;
|
||||
if (idx<0 || idx>psets.Count-1)return false;
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[idx];
|
||||
return sps.ProcSetHasSecurity(procset);
|
||||
}
|
||||
|
||||
public long GetPlantSecurity(int idx)
|
||||
{
|
||||
if(userid == SUPERUSER ) return SUPERACCESS;
|
||||
if (idx<0 || idx>psets.Count-1) return 0L;
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[idx];
|
||||
return (sps.GetSecurity());
|
||||
}
|
||||
|
||||
public bool AnyOptionsSet(int idx)
|
||||
{
|
||||
if(userid==SUPERUSER) return true;
|
||||
if (idx<0 || idx>psets.Count-1) return false;
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[idx];
|
||||
return sps.AnyOptionsSet();
|
||||
}
|
||||
|
||||
public long GetUserSecurity()
|
||||
{
|
||||
if(userid == SUPERUSER) return SUPERACCESS;
|
||||
return(uoptions);
|
||||
}
|
||||
|
||||
public bool BlockAccess()
|
||||
{
|
||||
if (userid == SUPERUSER) return false;
|
||||
if(blockAccess!=0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsAllowed(long mask)
|
||||
{
|
||||
if(userid == SUPERUSER) return true;
|
||||
return (uoptions&mask) != 0;
|
||||
}
|
||||
|
||||
public bool IsAllowed(string plantpath, string procpath, long mask)
|
||||
{
|
||||
bool retval = false;
|
||||
if(userid == SUPERUSER) return true;
|
||||
for(int i=0; i<numsets; i++)
|
||||
{
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[i];
|
||||
if(sps.IsAllowed(plantpath,procpath,mask)==true)
|
||||
{
|
||||
retval = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
public long GetProcSecurity(string fullpath)
|
||||
{
|
||||
long mask=0L;
|
||||
string plantpath;
|
||||
string fullprocpath;
|
||||
string procpath;
|
||||
string tmpchg=null;
|
||||
string apr=null;
|
||||
|
||||
if(userid == SUPERUSER) return SUPERACCESS;
|
||||
plantpath = fullpath;
|
||||
procpath = plantpath.Substring(plantpath.LastIndexOf("\\"),plantpath.Length-plantpath.LastIndexOf("\\"));
|
||||
if (procpath.Substring(1,procpath.Length-1).ToUpper() == "TMPCHG")
|
||||
{
|
||||
// we have a Temporary Change directory, store it
|
||||
tmpchg=procpath;
|
||||
// remove the tmpchg text from the plantpath string
|
||||
plantpath=plantpath.Substring(0,plantpath.Length-tmpchg.Length);
|
||||
// Get the procedure subdirectory
|
||||
procpath = plantpath.Substring(plantpath.LastIndexOf("\\"),plantpath.Length-plantpath.LastIndexOf("\\"));
|
||||
}
|
||||
if(procpath.Substring(1,procpath.Length-1).ToUpper() == "APPROVED")
|
||||
{
|
||||
// we have an approved dir, store it
|
||||
apr = procpath;
|
||||
// remove the approved text from the plantpath string
|
||||
plantpath=plantpath.Substring(0,plantpath.Length-apr.Length);
|
||||
// Get the procedure subdirectory
|
||||
procpath = plantpath.Substring(plantpath.LastIndexOf("\\"),plantpath.Length-plantpath.LastIndexOf("\\"));
|
||||
}
|
||||
|
||||
// at this point, tmpchg & apr will be set if we have a tmpchg or approved directory,
|
||||
// plantpath will contain the plant directory & procedure set subdirectory, and
|
||||
// procpath will be the procedure set subdirectory name (with the preceeding '\').
|
||||
// Now set plantpath to be the plant level directory. Make fullprocpath from the
|
||||
// procedure set subdirectory & any approved/tmpchg directories that were part
|
||||
// of the path that was passed in.
|
||||
plantpath=plantpath.Substring(0,plantpath.Length-procpath.Length);
|
||||
procpath=procpath.Substring(1,procpath.Length-1); // remove '\' prefix
|
||||
fullprocpath=procpath+apr+tmpchg;
|
||||
for(int i=0; i<numsets; i++)
|
||||
{
|
||||
SecurityPlantSets sps = (SecurityPlantSets) psets[i];
|
||||
if( sps.GetProcSecurity(plantpath,fullprocpath,ref mask) ) break;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
public void AddPlant(int nTab, string path)
|
||||
{
|
||||
SecurityPlantSets sps = new SecurityPlantSets(path, oldpos, this);
|
||||
psets.Insert(nTab,sps);
|
||||
numsets = psets.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public class SecurityProcSets
|
||||
{
|
||||
private long[] procoptions;
|
||||
private string path;
|
||||
|
||||
public SecurityProcSets(string pth, Security security, long userPos, int procid, int numplants, int pid)
|
||||
{
|
||||
procoptions = new long[4];
|
||||
path = pth;
|
||||
// read in proc options
|
||||
if (security.userid == Security.SUPERUSER)
|
||||
{
|
||||
for(int i=0;i<4;i++) procoptions[i]=0xff;
|
||||
return;
|
||||
}
|
||||
security.fs.Seek(userPos+38L,SeekOrigin.Begin);
|
||||
|
||||
short tpid;
|
||||
for (int i=0;i<numplants;i++)
|
||||
{
|
||||
tpid = security.bw.ReadInt16();
|
||||
security.fs.Seek(8L,SeekOrigin.Current);
|
||||
short nProcSets;
|
||||
nProcSets = security.bw.ReadInt16();
|
||||
for (int j=0; j<nProcSets;j++)
|
||||
{
|
||||
short tprocid;
|
||||
tprocid = security.bw.ReadInt16();
|
||||
if (tprocid==procid && tpid==pid)
|
||||
{
|
||||
tprocid = security.bw.ReadInt16();
|
||||
for(int k=0;k<4;k++) procoptions[k]=security.bw.ReadInt32();
|
||||
return;
|
||||
}
|
||||
else
|
||||
security.fs.Seek(18,SeekOrigin.Current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool AnyOptionsSet()
|
||||
{
|
||||
for(int k=0;k<4;k++) if(procoptions[k]!=0L)return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsAllowed(string procpath, long mask)
|
||||
{
|
||||
bool retval = false;
|
||||
if (path==procpath) retval = (procoptions[0]&mask) !=0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
public string GetPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public bool GetProcSecurity(string procpath, ref long mask)
|
||||
{
|
||||
bool retval = false;
|
||||
if (path.ToUpper()==procpath.ToUpper())
|
||||
{
|
||||
mask = procoptions[0];
|
||||
retval = true;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public class SecurityPlantSets
|
||||
{
|
||||
private string path;
|
||||
private long setoption;
|
||||
private int numopts;
|
||||
private ArrayList procs; // SecurityProcSets;
|
||||
private Security security;
|
||||
// Flag whether this plant has data in the security options file. (maybe newly
|
||||
// created since vesam was run).
|
||||
public bool HasSecurity;
|
||||
|
||||
public SecurityPlantSets(string cptr, long userPos, Security sec)
|
||||
{
|
||||
string title;
|
||||
string pth;
|
||||
int pid=0;
|
||||
long plantpos;
|
||||
procs = new ArrayList();
|
||||
security = sec;
|
||||
path = cptr;
|
||||
HasSecurity=false;
|
||||
|
||||
security.fs.Seek(8L,SeekOrigin.Begin);
|
||||
numopts = -1;
|
||||
plantpos = security.bw.ReadInt32(); // 1st plant set position
|
||||
short np;
|
||||
np = security.bw.ReadInt16(); // number of plant sets.
|
||||
long oldpos=0;
|
||||
short sz;
|
||||
for (int i=0;i<np;i++)
|
||||
{
|
||||
security.fs.Seek(plantpos,SeekOrigin.Begin);
|
||||
plantpos = security.bw.ReadInt32();
|
||||
pid = security.bw.ReadInt16();
|
||||
sz = security.bw.ReadInt16();
|
||||
title = new string(security.bw.ReadChars(sz));
|
||||
sz = security.bw.ReadInt16();
|
||||
pth=null;
|
||||
pth = new string(security.bw.ReadChars(sz));
|
||||
if (pth.ToUpper()==path.ToUpper()) // this is what we're looking for..
|
||||
{
|
||||
numopts = security.bw.ReadInt16();
|
||||
security.fs.Seek(4L,SeekOrigin.Current);
|
||||
oldpos = security.fs.Position;
|
||||
HasSecurity=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// get the plant level options
|
||||
int currentUID = sec.userid;
|
||||
if (currentUID != Security.SUPERUSER)
|
||||
{
|
||||
security.fs.Seek(userPos,SeekOrigin.Begin);
|
||||
security.fs.Seek(38L,SeekOrigin.Current);
|
||||
short tpid;
|
||||
for (int i=0;i<np;i++)
|
||||
{
|
||||
tpid = security.bw.ReadInt16();
|
||||
if (tpid == pid) // correct plant
|
||||
{
|
||||
setoption = security.bw.ReadInt32();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
setoption = security.bw.ReadInt32(); //skip following data...
|
||||
setoption = security.bw.ReadInt32();
|
||||
tpid = security.bw.ReadInt16();
|
||||
for (int j=0;j<tpid;j++) security.fs.Seek(20L,SeekOrigin.Current);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
setoption = Security.SUPERACCESS;
|
||||
if (numopts>0)
|
||||
procs = new ArrayList(numopts);
|
||||
else
|
||||
procs = null;
|
||||
for(int i=0;i<numopts;i++)
|
||||
{
|
||||
security.fs.Seek(oldpos+4L,SeekOrigin.Begin);
|
||||
short procid;
|
||||
procid = security.bw.ReadInt16();
|
||||
sz = security.bw.ReadInt16();
|
||||
title = new string(security.bw.ReadChars(sz));
|
||||
sz = security.bw.ReadInt16();
|
||||
pth = new string(security.bw.ReadChars(sz));
|
||||
security.fs.Seek(4L,SeekOrigin.Current);
|
||||
oldpos = security.fs.Position;
|
||||
SecurityProcSets sps = new SecurityProcSets(pth, security, userPos, procid, np, pid);
|
||||
procs.Insert(i,sps);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public bool ProcSetHasSecurity(string procset)
|
||||
{
|
||||
if (procs==null)return false; // if no procs for plant in security file.
|
||||
//see if this plant has a procedure set that matches the input string
|
||||
// this will tell us that it is included in the vesam.opt file.
|
||||
for (int i=0;i<procs.Count;i++)
|
||||
{
|
||||
SecurityProcSets sps = (SecurityProcSets) procs[i];
|
||||
if (sps.GetPath().ToUpper() == procset.ToUpper()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool AnyOptionsSet()
|
||||
{
|
||||
for (int i=0;i<numopts;i++)
|
||||
{
|
||||
SecurityProcSets sps = (SecurityProcSets) procs[i];
|
||||
if (sps.AnyOptionsSet())return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsAllowed(string plantpath, string procpath, long mask)
|
||||
{
|
||||
bool retval = false;
|
||||
if (path==plantpath)
|
||||
{
|
||||
for (int i=0;i<numopts;i++)
|
||||
{
|
||||
SecurityProcSets sps = (SecurityProcSets) procs[i];
|
||||
if (sps.IsAllowed(procpath, mask)==true)
|
||||
{
|
||||
retval = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
public long GetSecurity()
|
||||
{
|
||||
return (setoption);
|
||||
}
|
||||
|
||||
public bool GetProcSecurity(string plantpath, string procpath, ref long mask)
|
||||
{
|
||||
bool retval = false;
|
||||
if(path.ToUpper() == plantpath.ToUpper())
|
||||
{
|
||||
if (security.userid!=Security.SUPERUSER)
|
||||
{
|
||||
for (int i=0; i<numopts; i++)
|
||||
{
|
||||
SecurityProcSets sps = (SecurityProcSets) procs[i];
|
||||
if (sps.GetProcSecurity(procpath,ref mask) == true)
|
||||
{
|
||||
retval = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = true;
|
||||
mask = Security.SUPERACCESS;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
295
PROMS/ReferencedObjectsOld/LibSource/Utils/SerialNo.cs
Normal file
295
PROMS/ReferencedObjectsOld/LibSource/Utils/SerialNo.cs
Normal file
@@ -0,0 +1,295 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: SerialNo.cs $ $Revision: 7 $
|
||||
* $Author: Jsj $ $Date: 12/06/07 3:32p $
|
||||
*
|
||||
* $History: SerialNo.cs $
|
||||
*
|
||||
* ***************** Version 7 *****************
|
||||
* User: Jsj Date: 12/06/07 Time: 3:32p
|
||||
* Updated in $/LibSource/Utils
|
||||
* turn on backgrounds for point beach
|
||||
*
|
||||
* ***************** Version 6 *****************
|
||||
* User: Jsj Date: 7/18/06 Time: 11:40a
|
||||
* Updated in $/LibSource/Utils
|
||||
* fixed parse of plant name from SERIAL.NO file
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Jsj Date: 6/29/06 Time: 1:38p
|
||||
* Updated in $/LibSource/Utils
|
||||
* turned on enhanced backgrounds for byron and braidwood
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 6/29/06 Time: 1:27p
|
||||
* Updated in $/LibSource/Utils
|
||||
* turned on Deviations for byron and braidwood
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 5/17/05 Time: 11:53a
|
||||
* Updated in $/LibSource/Utils
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 4/12/05 Time: 1:00p
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2005-019: bad serial num message
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for SerialNo.
|
||||
/// </summary>
|
||||
public class SerialNo
|
||||
{
|
||||
private string sernofile;
|
||||
public int SerialNum;
|
||||
private string SerialNumTitle;
|
||||
private static byte sum =0xcf;// used in serial number code (nextchar)
|
||||
|
||||
public enum SN_Flags
|
||||
{
|
||||
SN_NETWORK_ON =0x0001,
|
||||
SN_BACKGROUND_ON =0x0002,
|
||||
SN_DEVIATION_ON =0x0004,
|
||||
SN_CHECKLISTEXPORT_ON =0x0008,
|
||||
SN_REVISIONFUNCTION_ON =0x0010,
|
||||
SN_ONLYAPPROVEONCE_ON =0x0020,
|
||||
SN_BGEPLANTWIDEOPT_ON =0x0040,
|
||||
SN_REVISESTRIPPC_ON =0x0080,
|
||||
SN_PROCCOMMENT_ON =0x0400,
|
||||
SN_REMOVECHGID_ON =0x0800,
|
||||
SN_OPTIONALACCEDIT_ON =0x1000,
|
||||
SN_TEMPCHANGE_ON =0X2000,
|
||||
SN_VOLIANONLY_ON =0x8000
|
||||
};
|
||||
|
||||
public SN_Flags[] SerialNumberOptionsByPlant=
|
||||
{
|
||||
/* 0 Volian Enterprises, Inc. */ (SN_Flags)0xFFFF,
|
||||
/* 1 Entergy Nuclear Northeast - Indian Point Unit 2 */ SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_NETWORK_ON,
|
||||
/* 2 Virginia Power - Surry (1A) */ SN_Flags.SN_NETWORK_ON,
|
||||
/* 3 Virginia Power - North Anna */ SN_Flags.SN_DEVIATION_ON|SN_Flags.SN_NETWORK_ON,
|
||||
/* 4 Northern States Power - Prairie Island */ SN_Flags.SN_DEVIATION_ON,
|
||||
/* 5 American Electric Power - D. C. Cook - AOPs */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/* 6 Wisconsin Electric Power - Point Beach */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/* 7 Rochester Gas and Electric Corp. - Ginna */ SN_Flags.SN_BACKGROUND_ON,
|
||||
/* 8 TUEC - Comanche Peak */ 0,
|
||||
/* 9 Entergy Nuclear Northeast - Indian Point Unit 3 */ SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_NETWORK_ON,
|
||||
/*10 Maine Yankee Atomic Power Company - Maine Yankee */ 0,
|
||||
/*11 Yankee Atomic Electric - Yankee Rowe */ 0,
|
||||
/*12 Wisconsin Public Service Corp.- Kewaunee */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/*13 Wisconsin Public Service Corp.- Kewaunee Operating Procedures*/ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/*14 South Carolina Gas and Electric - V.C. Summer */ 0,
|
||||
/*15 Louisiana Power and Light - Waterford */ 0,
|
||||
/*16 Pacific Gas and Electric - Diablo Canyon */ SN_Flags.SN_OPTIONALACCEDIT_ON,
|
||||
/*17 Southern California Edison - San Onofre */ 0,
|
||||
/*18 Carolina Power and Light - Robinson */ SN_Flags.SN_NETWORK_ON,/*|SN_BACKGROUND_ON|SN_DEVIATION_ON, */
|
||||
/*19 Arkansas Nuclear One - Unit 1 */ 0,
|
||||
/*20 Arkansas Nuclear One - Unit 2 */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_ONLYAPPROVEONCE_ON|SN_Flags.SN_REVISIONFUNCTION_ON|SN_Flags.SN_REVISESTRIPPC_ON|SN_Flags.SN_PROCCOMMENT_ON,
|
||||
/*21 Southern Nuclear Operating Company - Vogtle */ SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_DEVIATION_ON,
|
||||
/*22 Florida Power and Light - Turkey Point (Unit 3) */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_DEVIATION_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/*23 Houston Lighting & Power Company - South Texas */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/*24 Carolina Power & Light - Shearon Harris */ 0,
|
||||
/*25 Virginia Power - EPIP */ SN_Flags.SN_NETWORK_ON,
|
||||
/*26 Wolf Creek Nuclear Operating Corp. - Wolf Creek */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_OPTIONALACCEDIT_ON|SN_Flags.SN_TEMPCHANGE_ON|SN_Flags.SN_CHECKLISTEXPORT_ON,
|
||||
/*27 Duke Power - Catawba */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_DEVIATION_ON,
|
||||
/*28 Duke Power - McGuire */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_DEVIATION_ON,
|
||||
/*29 Exelon Nuclear - Braidwood */ SN_Flags.SN_NETWORK_ON | SN_Flags.SN_BACKGROUND_ON | SN_Flags.SN_DEVIATION_ON,
|
||||
/*30 Exelon Nuclear - Byron */ SN_Flags.SN_NETWORK_ON | SN_Flags.SN_BACKGROUND_ON | SN_Flags.SN_DEVIATION_ON,
|
||||
/*31 Virginia Power - Innsbrook */ SN_Flags.SN_NETWORK_ON,
|
||||
/*32 Constellation Energy Group - Calvert Cliffs */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_REVISIONFUNCTION_ON|SN_Flags.SN_ONLYAPPROVEONCE_ON|SN_Flags.SN_BGEPLANTWIDEOPT_ON|SN_Flags.SN_OPTIONALACCEDIT_ON|SN_Flags.SN_REMOVECHGID_ON,
|
||||
/*33 American Electric Power - D. C. Cook - EOPs */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON,
|
||||
/*34 American Electric Power - D. C. Cook - Training */ 0,
|
||||
/*35 North Atlantic Energy Service Corp. - Seabrook Nuclear Plant */ SN_Flags.SN_TEMPCHANGE_ON,
|
||||
/*36 Entergy - River Bend Nuclear Station */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_REVISIONFUNCTION_ON,
|
||||
/*37 Southern Nuclear Operating Company - Farley Nuclear Plant */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON|SN_Flags.SN_DEVIATION_ON,
|
||||
/*38 AmerenUE - Callaway Plant */ SN_Flags.SN_NETWORK_ON|SN_Flags.SN_BACKGROUND_ON
|
||||
};
|
||||
|
||||
public SerialNo(string isernofile,string ucfgpath, UserRunTime usrRT, bool DemoMode)
|
||||
{
|
||||
sernofile = isernofile;
|
||||
PrivateProfile ppCfg;
|
||||
string sn;
|
||||
// byte xor=0xCF;
|
||||
ppCfg = new PrivateProfile(ucfgpath);
|
||||
// sn=ppCfg.Attr("/ini/section[@name='override']/param[@name='SN']/@value");
|
||||
sn=ppCfg.Attr("override","SN");
|
||||
if (sn!=null && sn!="")
|
||||
{
|
||||
int indx = 0;
|
||||
if ((indx = sn.IndexOf(";",0,sn.Length))>0)
|
||||
SerialNum=System.Convert.ToInt32(sn.Substring(0,indx));
|
||||
else
|
||||
SerialNum=System.Convert.ToInt32(sn);
|
||||
if (SerialNum>SerialNumberOptionsByPlant.Length)
|
||||
{
|
||||
MessageBox.Show("Serial number in " + ucfgpath + " is invalid. Demo mode will be used","VE-PROMS");
|
||||
SerialNum=-1;
|
||||
}
|
||||
SerialNumTitle="Override";
|
||||
return;
|
||||
}
|
||||
|
||||
ppCfg=null;
|
||||
SerialNum = -1;
|
||||
if (DemoMode || !File.Exists(usrRT.ExeAdjust(sernofile)))
|
||||
{
|
||||
// no serial number file, put into demo mode.
|
||||
SerialNumTitle = "Demo Mode";
|
||||
// MessageBox.Show("No Serial Number. Defaulting to Working Demo Mode.\n\nTo purchase VE-PROMS, contact Volian Enterorices Inc.\n\nPhone: (724) 335-3744\n\nEmail: VEPROMS@VOLIAN.COM\n\nSerial Number Warning");
|
||||
if (DemoMode)
|
||||
{
|
||||
MessageBox.Show("Thank you for trying our VE-PROMS Working Demo.\n\n"+
|
||||
"To purchase VE-PROMS, contact Volian Enterprises, Inc.\n\n"+
|
||||
"Phone: (724) 335-3744\n\n"+
|
||||
"Email: VolianEnterprises@volian.com",
|
||||
"VE-PROMS Working Demo");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("No Serial Number. Defaulting to Working Demo Mode.\n\n"+
|
||||
"To purchase VE-PROMS, contact Volian Enterprises, Inc.\n\n"+
|
||||
"Phone: (724) 335-3744\n\n"+
|
||||
"Email: VolianEnterprises@volian.com",
|
||||
"Serial Number Warning");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// open file & read in serial number
|
||||
int i;
|
||||
byte j;
|
||||
FileStream fssn = null;
|
||||
BinaryReader brsn = null;
|
||||
byte xor=0xCF;
|
||||
// sum=0xcf;
|
||||
try
|
||||
{
|
||||
fssn = new FileStream(usrRT.ExeAdjust(sernofile),FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
|
||||
brsn = new BinaryReader(fssn);
|
||||
int length = (int)fssn.Length-1024;
|
||||
for (i=0;i<1024;i++)
|
||||
{
|
||||
j = nextchar(brsn);
|
||||
xor ^= (byte)j;
|
||||
if (j==0xCF)
|
||||
{
|
||||
if (SerialNum != -1) return;
|
||||
SerialNum=i;
|
||||
}
|
||||
}
|
||||
if (SerialNum == -1)
|
||||
{
|
||||
SerialNumTitle = "Demo Mode";
|
||||
// MessageBox.Show("No Serial Number. Defaulting to Working Demo Mode.\n\nTo purchase VE-PROMS, contact Volian Enterorices Inc.\n\nPhone: (724) 335-3744\n\nEmail: VEPROMS@VOLIAN.COM\n\nSerial Number Warning","VE-PROMS");
|
||||
MessageBox.Show("No Serial Number. Defaulting to Working Demo Mode.\n\n"+
|
||||
"To purchase VE-PROMS, contact Volian Enterprises, Inc.\n\n"+
|
||||
"Phone: (724) 335-3744\n\n"+
|
||||
"Email: VolianEnterprises@volian.com",
|
||||
"Serial Number Warning");
|
||||
return;
|
||||
}
|
||||
// Just read past this byte. At this point we already
|
||||
// have a serial number. We now just want to get the
|
||||
// description text (usually plant/utility name) associated
|
||||
// with the serial number.
|
||||
j = nextchar(brsn);
|
||||
//
|
||||
// This was always failing. Could not find a reason why. Appears that
|
||||
// the Exclusive OR arithmatic is a little different in .NET. The
|
||||
// nextchar() funtion seems to be returning the correct values.
|
||||
//
|
||||
// if (j!=xor)
|
||||
// {
|
||||
// if (brsn!=null) brsn.Close();
|
||||
// if (fssn!=null) fssn.Close();
|
||||
// return;
|
||||
// }
|
||||
char [] title = new char[length];
|
||||
i=0;
|
||||
while((--length) > 0 && (j=nextchar(brsn))!=0xFF)
|
||||
{
|
||||
title[i++] = (char)j;
|
||||
}
|
||||
SerialNumTitle = new string(title);
|
||||
// remove the serial number at the beginning of the title
|
||||
// - we didn't need to do this - jsj 7/18/2006
|
||||
// SerialNumTitle = SerialNumTitle.Substring(SerialNumTitle.IndexOf(' ')+1);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message,"Serial Number Error");
|
||||
return;
|
||||
}
|
||||
if (brsn!=null) brsn.Close();
|
||||
if (fssn!=null) fssn.Close();
|
||||
}
|
||||
|
||||
private byte nextchar(BinaryReader br)
|
||||
{
|
||||
byte retval = 0xFF; // unsigned -1
|
||||
try
|
||||
{
|
||||
byte nxt;
|
||||
retval = br.ReadByte();
|
||||
if(retval != 0xFF)
|
||||
{
|
||||
nxt=retval;
|
||||
retval=(byte)((nxt-sum) & 0xFF);
|
||||
sum=(byte)(((nxt<<1) & 0xFE) | ((nxt>>7) & 0x1));
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
// MessageBox.Show(e.Message);
|
||||
return retval;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
public uint GetSNOption(uint a)
|
||||
{
|
||||
if (SerialNum == -1)
|
||||
return 0;
|
||||
else
|
||||
return ((uint)SerialNumberOptionsByPlant[SerialNum]&(uint)a);
|
||||
}
|
||||
|
||||
public string SerialNumberString
|
||||
{
|
||||
get
|
||||
{
|
||||
string rtnstr = "";
|
||||
if (SerialNum == -1) // demo
|
||||
rtnstr = "Thank you for trying VE-PROMS";
|
||||
else
|
||||
rtnstr = "Serial Number: " + SerialNum.ToString();
|
||||
|
||||
return rtnstr;
|
||||
}
|
||||
}
|
||||
|
||||
public string SerialNumberTitleString
|
||||
{
|
||||
get
|
||||
{
|
||||
return SerialNumTitle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
51
PROMS/ReferencedObjectsOld/LibSource/Utils/ShrtNm.cs
Normal file
51
PROMS/ReferencedObjectsOld/LibSource/Utils/ShrtNm.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: ShrtNm.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:34a $
|
||||
*
|
||||
* $History: ShrtNm.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ShrtNm.
|
||||
/// </summary>
|
||||
public class ShortName
|
||||
{
|
||||
[DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Auto)]
|
||||
[return:MarshalAs(UnmanagedType.U4)]
|
||||
public static extern int GetShortPathName(
|
||||
[MarshalAs(UnmanagedType.LPTStr)] string lpszLongPath,
|
||||
[MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpszShortPath,
|
||||
[MarshalAs(UnmanagedType.U4)] int cchBuffer);
|
||||
|
||||
private string _LongFileName;
|
||||
private StringBuilder _ShortFileName;
|
||||
|
||||
public ShortName(string longname)
|
||||
{
|
||||
_LongFileName = longname;
|
||||
_ShortFileName = new StringBuilder(256);
|
||||
int len = GetShortPathName(_LongFileName,_ShortFileName,256);
|
||||
if (len==256) _ShortFileName=null;
|
||||
if (len==0) _ShortFileName.Append(longname);
|
||||
}
|
||||
|
||||
[Description("FileName")]public string ShortFileName
|
||||
{
|
||||
get{return _ShortFileName.ToString();}
|
||||
}
|
||||
}
|
||||
}
|
214
PROMS/ReferencedObjectsOld/LibSource/Utils/SymbDlg.cs
Normal file
214
PROMS/ReferencedObjectsOld/LibSource/Utils/SymbDlg.cs
Normal file
@@ -0,0 +1,214 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: SymbDlg.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:34a $
|
||||
*
|
||||
* $History: SymbDlg.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for SymbDlg.
|
||||
/// </summary>
|
||||
public class SymbDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.TabControl tbctlSymbol;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
private ListBox symlistbox;
|
||||
public SymbolListB SymList1;
|
||||
public string ReturnText;
|
||||
private int NumItems;
|
||||
private System.Windows.Forms.TextBox tbValue;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
public GridItem gridItem;
|
||||
private string[] SymbolFonts = {"VESymb","Courier New","VolianDraw"};
|
||||
|
||||
public SymbDlg(SymbolListB symb, GridItem grditm)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
ReturnText=null;
|
||||
gridItem = grditm;
|
||||
|
||||
SymList1 = symb;
|
||||
NumItems = symb.SymbolListStrings.Length;
|
||||
InitializeComponent();
|
||||
|
||||
DoListTabPage();
|
||||
DoGridTabPage();
|
||||
|
||||
if (gridItem!=null)
|
||||
{
|
||||
tbValue.Text = (string) gridItem.Value;
|
||||
tbValue.Visible = true;
|
||||
}
|
||||
else
|
||||
tbValue.Visible = false;
|
||||
}
|
||||
|
||||
private void DoGridTabPage()
|
||||
{
|
||||
//TabPage gridTabPage = new TabPage("Grid");
|
||||
//tbctlSymbol.TabPages.Add(gridTabPage);
|
||||
}
|
||||
|
||||
private void symlistbox_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
|
||||
{
|
||||
// Set the DrawMode property to draw fixed sized items.
|
||||
symlistbox.DrawMode = DrawMode.OwnerDrawFixed;
|
||||
|
||||
// Draw the background of the ListBox control for each item.
|
||||
e.DrawBackground();
|
||||
// Create a new Brush and initialize to a Black colored brush by default.
|
||||
Brush myBrush = Brushes.Black;
|
||||
Font fontVESymb = new Font(SymbolFonts[SymList1.SymbolList[e.Index].CharacterSet],e.Font.SizeInPoints);
|
||||
Font fontregular = new Font("Courier New",e.Font.SizeInPoints);
|
||||
float x;
|
||||
// Draw the current item text based on the current Font and the custom brush settings.
|
||||
e.Graphics.DrawString(SymList1.SymbolList[e.Index].CharacterCode,fontVESymb,myBrush,e.Bounds.Left,e.Bounds.Top);
|
||||
x=e.Graphics.MeasureString(SymList1.SymbolList[e.Index].CharacterCode,fontVESymb).Width;
|
||||
e.Graphics.DrawString(SymList1.SymbolListStrings[e.Index],fontregular,myBrush,e.Bounds.Left+x,e.Bounds.Top);
|
||||
e.DrawFocusRectangle();
|
||||
}
|
||||
|
||||
private void DoListTabPage()
|
||||
{
|
||||
TabPage listTabPage = new TabPage("List");
|
||||
tbctlSymbol.TabPages.Add(listTabPage);
|
||||
symlistbox = new ListBox();
|
||||
symlistbox.Height = 200;
|
||||
symlistbox.Width = 400;
|
||||
listTabPage.Controls.Add(symlistbox);
|
||||
symlistbox.DrawItem += new DrawItemEventHandler(symlistbox_DrawItem);
|
||||
symlistbox.DoubleClick += new EventHandler(symlistbox_DoubleClick);
|
||||
symlistbox.DrawMode = DrawMode.OwnerDrawFixed;
|
||||
// add dummy items, these will be resolved when displayed.
|
||||
for(int i=0; i<NumItems;i++)
|
||||
symlistbox.Items.Add(i.ToString());
|
||||
}
|
||||
|
||||
private void symlistbox_DoubleClick(Object sender, EventArgs e)
|
||||
{
|
||||
// use encoding for the Microsoft Windows OEM Codepage 437 to get the old
|
||||
// 'dos' character codes. Also, needed to use the encoding & transfer to/from
|
||||
// bytes so that the unicode character wouldn't be entered thus causing a
|
||||
// character conversion. (strings are unicode by default in .net)
|
||||
int itm = symlistbox.SelectedIndex;
|
||||
Encoding oem = Encoding.GetEncoding(437);
|
||||
byte[] oemBytes = oem.GetBytes(tbValue.Text);
|
||||
byte[] tst = new byte[oemBytes.Length+1];
|
||||
int indx = tbValue.SelectionStart;
|
||||
for (int i=0; i<indx; i++) tst[i]=oemBytes[i];
|
||||
tst[indx]=SymList1.SymbolList[itm].Translation;
|
||||
for (int i=indx;i<tbValue.Text.Length;i++) tst[i+1]=oemBytes[i];
|
||||
tbValue.Text = oem.GetString(tst);
|
||||
tbValue.Refresh();
|
||||
}
|
||||
|
||||
/// <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(SymbDlg));
|
||||
this.tbctlSymbol = new System.Windows.Forms.TabControl();
|
||||
this.tbValue = new System.Windows.Forms.TextBox();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tbctlSymbol
|
||||
//
|
||||
this.tbctlSymbol.Location = new System.Drawing.Point(8, 0);
|
||||
this.tbctlSymbol.Name = "tbctlSymbol";
|
||||
this.tbctlSymbol.SelectedIndex = 0;
|
||||
this.tbctlSymbol.Size = new System.Drawing.Size(464, 264);
|
||||
this.tbctlSymbol.TabIndex = 0;
|
||||
//
|
||||
// tbValue
|
||||
//
|
||||
this.tbValue.Location = new System.Drawing.Point(8, 280);
|
||||
this.tbValue.Name = "tbValue";
|
||||
this.tbValue.Size = new System.Drawing.Size(504, 20);
|
||||
this.tbValue.TabIndex = 1;
|
||||
this.tbValue.Text = "";
|
||||
//
|
||||
// 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(72, 320);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(104, 24);
|
||||
this.btnOK.TabIndex = 2;
|
||||
this.btnOK.Text = "Save Text";
|
||||
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(208, 320);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(72, 23);
|
||||
this.btnCancel.TabIndex = 3;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
//
|
||||
// SymbDlg
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(672, 350);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.tbValue);
|
||||
this.Controls.Add(this.tbctlSymbol);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "SymbDlg";
|
||||
this.Text = "Symbol";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void btnOK_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
ReturnText = tbValue.Text;
|
||||
}
|
||||
}
|
||||
}
|
192
PROMS/ReferencedObjectsOld/LibSource/Utils/SymbDlg.resx
Normal file
192
PROMS/ReferencedObjectsOld/LibSource/Utils/SymbDlg.resx
Normal file
@@ -0,0 +1,192 @@
|
||||
<?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="tbctlSymbol.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tbctlSymbol.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbctlSymbol.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tbctlSymbol.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbctlSymbol.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbctlSymbol.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="tbValue.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbValue.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbValue.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.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>SymbDlg</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>
|
142
PROMS/ReferencedObjectsOld/LibSource/Utils/SymbLst.cs
Normal file
142
PROMS/ReferencedObjectsOld/LibSource/Utils/SymbLst.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: SymbLst.cs $ $Revision: 2 $
|
||||
* $Author: Kathy $ $Date: 11/15/04 10:54a $
|
||||
*
|
||||
* $History: SymbLst.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 11/15/04 Time: 10:54a
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2004-057: crash on scroll fixed & rest of PSI/Title symbols added
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for SymbLst.
|
||||
/// </summary>
|
||||
///
|
||||
public class SymbolListItem
|
||||
{
|
||||
public string CharacterCode;
|
||||
public byte Translation;
|
||||
public short CharacterSet;
|
||||
public SymbolListItem(string cc, byte trans, short cs)
|
||||
{
|
||||
CharacterCode = cc;
|
||||
Translation = trans;
|
||||
CharacterSet = cs;
|
||||
}
|
||||
}
|
||||
public class SymbolListB
|
||||
{
|
||||
public string[] SymbolListStrings;
|
||||
public SymbolListItem[] SymbolList;
|
||||
public SymbolListB()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class SymbolListSteps : SymbolListB // for steps
|
||||
{
|
||||
|
||||
public SymbolListSteps()
|
||||
{
|
||||
SymbolListStrings = new string[]
|
||||
{
|
||||
"Degree",
|
||||
"Delta",
|
||||
"Greater Than or Equal To",
|
||||
"Less Than Or Equal To",
|
||||
"Plus or Minus",
|
||||
"Sigma",
|
||||
"Gamma",
|
||||
"One Half",
|
||||
"ACCUM Character",
|
||||
"Solid Bullet",
|
||||
"Approximatly Equal",
|
||||
"Similar or Equal",
|
||||
"Division Symbol",
|
||||
"Square Root",
|
||||
"Rho",
|
||||
"PI",
|
||||
"Micro",
|
||||
"Lower Case Delta",
|
||||
"Lower Case Sigma",
|
||||
"One Fourth",
|
||||
"Distinguished Zero",
|
||||
"Average Disintegration Energy",
|
||||
"Grave",
|
||||
"Vertical Line",
|
||||
"Epsilon",
|
||||
"Theta",
|
||||
"Dot in Oval",
|
||||
"Tau",
|
||||
"Hard Space",
|
||||
"Diamond",
|
||||
"Turn On Bold",
|
||||
"Turn Off Bold",
|
||||
"Turn On Underline",
|
||||
"Turn Off Underline",
|
||||
"Turn On Italics",
|
||||
"Turn Off Italics",
|
||||
"Turn On Superscript",
|
||||
"Turn Off Superscript",
|
||||
"Turn On Subscript",
|
||||
"Turn Off Subscript"
|
||||
};
|
||||
|
||||
SymbolList = new SymbolListItem[] {
|
||||
new SymbolListItem("\xB0",0xF8,0), /* <20> - Degree */
|
||||
new SymbolListItem("\x44",0x7F,0), /* - Delta */
|
||||
new SymbolListItem("\xB3",0xF2,0), /* <20> - Greater Than or Equal */
|
||||
new SymbolListItem("\xA3",0xF3,0), /* <20> - Less Than or Equal */
|
||||
new SymbolListItem("\xB1",0xF1,0), /* <20> - Plus or Minus */
|
||||
new SymbolListItem("\x53",0xE4,0), /* <20> - Sigma */
|
||||
new SymbolListItem("\x67",0xE7,0), /* <20> - (Printed as a Gamma) */
|
||||
new SymbolListItem("\xBD",0xAB,1), /* <20> - One Half */
|
||||
new SymbolListItem("\xFE",0xFE,0), /* <20> - ACCUM Character */
|
||||
new SymbolListItem("\xB7",0x07,0), /* - Solid Bullet */
|
||||
new SymbolListItem("\xBB",0xF7,0), /* Similar */
|
||||
new SymbolListItem("\x40",0xF0,0), /* <20> - Approximately equal */
|
||||
new SymbolListItem("\xB8",0xF6,0), /* <20> - Division symbol */
|
||||
new SymbolListItem("\xD6",0xFB,0), /* <20> - Square Root */
|
||||
new SymbolListItem("\x72",0xE2,0), /* <20> - (Printed as a rho) */
|
||||
new SymbolListItem("\x70",0xE3,0), /* <20> - (Printed as pi) */
|
||||
new SymbolListItem("\x6D",0xE6,0), /* <20> - micro */
|
||||
new SymbolListItem("\x64",0xEB,0), /* <20> - Lower Case Delta */
|
||||
new SymbolListItem("\x73",0xE5,0), /* <20> - Lower Case Sigma */
|
||||
new SymbolListItem("\xBC",0xAC,1), /* <20> - One Fourth */
|
||||
new SymbolListItem("\xC6",0xED,0), /* <20> - Distinguished Zero */
|
||||
new SymbolListItem("\x9F",0x90,0), // Average Deintegration Energy
|
||||
new SymbolListItem("\xEC",0x8D,1), // Grave
|
||||
new SymbolListItem("\xBD",0xB3,0), // Vertical Bar
|
||||
new SymbolListItem("\x65",0xEE,0), // Epsilon
|
||||
new SymbolListItem("\x71",0xE9,0), // Theta
|
||||
new SymbolListItem("\x9E",0xEC,0), // Dot With Oval
|
||||
new SymbolListItem("\x74",0xA8,0), // Tau
|
||||
new SymbolListItem("\xA0",0xFF,1), // Hard Space
|
||||
new SymbolListItem("\xA8",0xA9,0), // Diamond
|
||||
new SymbolListItem("\xD5",0xD5,1), // Bold on
|
||||
new SymbolListItem("\xD6",0xD6,1), // Bold off
|
||||
new SymbolListItem("\xAE",0xAE,1), // Underline on
|
||||
new SymbolListItem("\xAF",0xAF,1), // Underline off
|
||||
new SymbolListItem("\xB2",0xB2,1), // Italics on
|
||||
new SymbolListItem("\xDD",0xDD,1), // Italics off
|
||||
new SymbolListItem("\xC6",0xC6,1), // Superscript on
|
||||
new SymbolListItem("\xC7",0xC7,1), // Superscript off
|
||||
new SymbolListItem("\xD1",0xD1,1), // Subscript on
|
||||
new SymbolListItem("\xA6",0xA6,1) // Subscript off
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
624
PROMS/ReferencedObjectsOld/LibSource/Utils/UsrRunTime.cs
Normal file
624
PROMS/ReferencedObjectsOld/LibSource/Utils/UsrRunTime.cs
Normal file
@@ -0,0 +1,624 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: UsrRunTime.cs $ $Revision: 9 $
|
||||
* $Author: Jsj $ $Date: 10/31/07 10:11a $
|
||||
*
|
||||
* $History: UsrRunTime.cs $
|
||||
*
|
||||
* ***************** Version 9 *****************
|
||||
* User: Jsj Date: 10/31/07 Time: 10:11a
|
||||
* Updated in $/LibSource/Utils
|
||||
* Bug fix to ExeAdjust()
|
||||
*
|
||||
* ***************** Version 8 *****************
|
||||
* User: Jsj Date: 7/21/06 Time: 2:57p
|
||||
* Updated in $/LibSource/Utils
|
||||
* added comment of logic that might be needed in future.
|
||||
*
|
||||
* ***************** Version 7 *****************
|
||||
* User: Jsj Date: 5/17/05 Time: 11:54a
|
||||
* Updated in $/LibSource/Utils
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 6 *****************
|
||||
* User: Kathy Date: 4/21/05 Time: 10:17a
|
||||
* Updated in $/LibSource/Utils
|
||||
* issingleuser
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Kathy Date: 4/12/05 Time: 1:00p
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2004-050: single user needed network info
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Kathy Date: 1/24/05 Time: 2:44p
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2005-004 fixes
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Kathy Date: 1/10/05 Time: 12:57p
|
||||
* Updated in $/LibSource/Utils
|
||||
* B2004-063 fix
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 11/12/04 Time: 10:32a
|
||||
* Updated in $/LibSource/Utils
|
||||
* Save the user's TEMP dir path ExeAjust() handles TEMP dir and Data Dir
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:34a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Text;
|
||||
using Org.Mentalis.Files;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
public enum UserCStatus
|
||||
{
|
||||
PRINACTIVE=0, PRACTIVE=1 // process record is NOT active, active respectively
|
||||
};
|
||||
|
||||
public class UserData
|
||||
{
|
||||
public byte UserStatus;
|
||||
public string UserNetworkID;
|
||||
public string UserName;
|
||||
public string UserPhone1;
|
||||
public string UserPhone2;
|
||||
public string UserLoc1;
|
||||
public string UserLoc2;
|
||||
public string UserShell; // 1 - vfw; 2 - browser; 3 - 32-bit browser
|
||||
public string UserProcess;
|
||||
|
||||
// the first constructor loads data from a user's cfg file
|
||||
public UserData(string ucfgpath)
|
||||
{
|
||||
if (File.Exists(ucfgpath)==false) return;
|
||||
// create an xml node from the [User Data] in the cfg file & transfer
|
||||
// to this. Note that the UserNetworkID is not set until the serial
|
||||
// number is read to determine whether in multi-user-mode (B2004-050)
|
||||
PrivateProfile ppUserData = new PrivateProfile(ucfgpath);
|
||||
UserName=ppUserData.Attr("User Data","UserName");
|
||||
UserPhone1=ppUserData.Attr("User Data","UserPhone1");
|
||||
UserPhone2=ppUserData.Attr("User Data","UserPhone2");
|
||||
UserLoc1=ppUserData.Attr("User Data","UserLoc1");
|
||||
UserLoc2=ppUserData.Attr("User Data","UserLoc2");
|
||||
char tmp = '\x03';
|
||||
UserShell = tmp.ToString(); // 1 - vfw; 2 - browser; 3 - 32-bit browser
|
||||
UserProcess="";
|
||||
ppUserData=null;
|
||||
}
|
||||
|
||||
public void SetNetworkID(string ucfgpath, bool inmultiuser)
|
||||
{
|
||||
// create an xml node from the [User Data] in the cfg file & transfer
|
||||
// to this.
|
||||
PrivateProfile ppUserData = new PrivateProfile(ucfgpath);
|
||||
UserNetworkID=ppUserData.Attr("User Data","UserNetworkID");
|
||||
if (inmultiuser && (UserNetworkID == "" || UserNetworkID==null))
|
||||
{
|
||||
MessageBox.Show("Invalid UserNetworkID from " + ucfgpath +", set before reexecuting VE-PROMS.","VE-PROMS Error");
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
ppUserData=null;
|
||||
}
|
||||
// the next constructor gets the input 'nth' record from the dat file (dat file is
|
||||
// passed in via a FileStream
|
||||
public UserData(FileStream dfs, int n)
|
||||
{
|
||||
// seek to the position as defined by n.
|
||||
long skpos = (long)(n * 140); // 140 is the size of the record from old proms.
|
||||
dfs.Seek(skpos,SeekOrigin.Begin);
|
||||
byte [] test = new byte[140];
|
||||
dfs.Read(test,0,140);
|
||||
UserStatus = test[0];
|
||||
string tmp = Encoding.ASCII.GetString(test,0,140);
|
||||
UserNetworkID = tmp.Substring(1,9).Replace('\0',' ').Trim();
|
||||
UserName = tmp.Substring(10,31).Replace('\0',' ').Trim();
|
||||
UserPhone1 = tmp.Substring(41,16).Replace('\0',' ').Trim();
|
||||
UserPhone2 = tmp.Substring(57,16).Replace('\0',' ').Trim();
|
||||
UserLoc1 = tmp.Substring(73,31).Replace('\0',' ').Trim();
|
||||
UserLoc2 = tmp.Substring(104,31).Replace('\0',' ').Trim();
|
||||
UserShell = tmp.Substring(135,2).Replace('\0',' ').Trim();
|
||||
UserProcess = tmp.Substring(137,3).Replace('\0',' ').Trim();
|
||||
}
|
||||
|
||||
// write this user data out to the filestream at the current position in file
|
||||
// defined in dfs
|
||||
public void Write(FileStream dfs)
|
||||
{
|
||||
dfs.WriteByte(UserStatus);
|
||||
byte[] btmp = Encoding.ASCII.GetBytes(UserNetworkID.PadRight(9,'\0'));
|
||||
dfs.Write(btmp,0,9);
|
||||
btmp = Encoding.ASCII.GetBytes(UserName.PadRight(31,'\0'));
|
||||
dfs.Write(btmp,0,31);
|
||||
btmp = Encoding.ASCII.GetBytes(UserPhone1.PadRight(16,'\0'));
|
||||
dfs.Write(btmp,0,16);
|
||||
btmp = Encoding.ASCII.GetBytes(UserPhone2.PadRight(16,'\0'));
|
||||
dfs.Write(btmp,0,16);
|
||||
btmp = Encoding.ASCII.GetBytes(UserLoc1.PadRight(31,'\0'));
|
||||
dfs.Write(btmp,0,31);
|
||||
btmp = Encoding.ASCII.GetBytes(UserLoc2.PadRight(31,'\0'));
|
||||
dfs.Write(btmp,0,31);
|
||||
btmp = Encoding.ASCII.GetBytes(UserShell.PadRight(2,'\0'));
|
||||
dfs.Write(btmp,0,2);
|
||||
btmp = Encoding.ASCII.GetBytes(UserProcess.PadRight(3,'\0'));
|
||||
dfs.Write(btmp,0,3);
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for UserRunTime. This class contains all pertinent information
|
||||
/// for the runtime for this instance of the program, including cfg, paths, menu file,
|
||||
/// security, serial number, options, etc.
|
||||
/// </summary>
|
||||
public class UserRunTime
|
||||
{
|
||||
public string exepath;
|
||||
public string syspath;
|
||||
public string netsyspath;
|
||||
public string TempDirPath;
|
||||
|
||||
public string ucfgpath; // user config file name
|
||||
public string appcfgpath; // app config file name
|
||||
|
||||
public Security sec;
|
||||
public SerialNo SerialNumber;
|
||||
public string OptionsFile;
|
||||
public string initials; // user login name
|
||||
public string UserID; // cfg name and/or login
|
||||
public MenuXML menuwinXML;
|
||||
public MenuXML menuwin2XML;
|
||||
public string myUserNetworkID;
|
||||
public UserData myUserData;
|
||||
public bool InMultiUserMode;
|
||||
|
||||
// make some form properties here, such as color. - make need it's own class,
|
||||
//
|
||||
public UserRunTime()
|
||||
{
|
||||
menuwin2XML = null;
|
||||
SetExeName();
|
||||
// load in xml list of plants. Then do exist tests to see if they
|
||||
// exist on the datapath.
|
||||
menuwinXML = new MenuXML(syspath + "\\menuwin.xml");
|
||||
}
|
||||
|
||||
public void SetSecurity(Security isec)
|
||||
{
|
||||
// set the user's run time security settings. also, flag whether this user is
|
||||
// running in multi user mode (just so we don't have to keep making this check
|
||||
// later)
|
||||
sec = isec;
|
||||
// Do this separate (SetUserMode()) to remove interdependent logic path between
|
||||
// security(vesam), user CFG file, and the serial number
|
||||
// InMultiUserMode = (SerialNumber.GetSNOption((uint)Utils.SerialNo.SN_Flags.SN_NETWORK_ON)>0)?true:false;
|
||||
}
|
||||
|
||||
public void SetUserMode()
|
||||
{
|
||||
if (SerialNumber.SerialNum != -1)
|
||||
InMultiUserMode = (SerialNumber.GetSNOption((uint)Utils.SerialNo.SN_Flags.SN_NETWORK_ON)>0)?true:false;
|
||||
if (InMultiUserMode) myUserData.SetNetworkID(ucfgpath, InMultiUserMode);
|
||||
}
|
||||
|
||||
private bool IsSingleUserMode()
|
||||
{
|
||||
// Need to do:
|
||||
// This needs to check if a lock is currently set as well
|
||||
// - jsj 7/20/06
|
||||
return !InMultiUserMode;
|
||||
}
|
||||
|
||||
// Adjust the input file with the required pathname as follows:
|
||||
// '~': (system path) i.e. c:\VE-PROMS
|
||||
// '@': (executable path) i.e. c:\VE-PROMS\BIN
|
||||
// '\342': current data directory i.e. c:\VEHPR1B\PROCS
|
||||
// '\347': resolve for single user mode, append tempdir onto data dir i.e. TEMPS\JOHN____.D00
|
||||
public string ExeAdjust(string str)
|
||||
{
|
||||
if (exepath==null)SetExeName();
|
||||
|
||||
// This logic will allow me to combine the use of our special
|
||||
// tokens. For example, I needed a user temp directory in the
|
||||
// VE-PROMS root for the Search Across Procedure Sets option:
|
||||
// "~\374results" --> C:\VE-PROMS\TEMPS\JOHN____.D00\RESUTLS
|
||||
|
||||
StringBuilder exebuff = new StringBuilder();
|
||||
StringBuilder exetkn = new StringBuilder(str);
|
||||
string exetkn_str = exetkn.ToString();
|
||||
int pos = 0;
|
||||
char[] tchar = "~@\xE7\xE2".ToCharArray();
|
||||
/** Bug Fix: B2007-015
|
||||
* If a short file/directory name contained a ~ character, it was
|
||||
* being processed, when it should not have.
|
||||
* i.e. we were getting the current directory, then looping back up
|
||||
* and searching the directory string (finding a ~ char)
|
||||
*
|
||||
* I added logic to use a starting position in the IndexOfAny() function
|
||||
* so that we can skip past the portions already processes.
|
||||
*/
|
||||
while ((pos=exetkn_str.IndexOfAny(tchar,pos))>-1)
|
||||
{
|
||||
char[] chr;
|
||||
string curdir = Directory.GetCurrentDirectory(); // for use with '\xE2'
|
||||
chr = new char[exetkn_str.Length];
|
||||
chr = exetkn_str.ToCharArray();
|
||||
exetkn.Remove(pos,1);
|
||||
|
||||
switch (chr[0])
|
||||
{
|
||||
case '~': exetkn.Insert(pos,syspath+"\\"); // i.e. c:\VE-PROMS
|
||||
pos += syspath.Length +1;
|
||||
break;
|
||||
case '@': exetkn.Insert(pos,exepath+"\\"); // i.e. c:\VE-PROMS\BIN
|
||||
pos += exepath.Length + 1;
|
||||
break;
|
||||
case '\xE2': // case '\342':
|
||||
exetkn.Insert(pos,curdir+"\\"); // i.e. c:\VEHPR1B\PROCS
|
||||
pos += curdir.Length + 1;
|
||||
break;
|
||||
case '\xE7': // case '\347':
|
||||
if (!IsSingleUserMode()&& TempDirPath!=null)
|
||||
{
|
||||
exetkn.Insert(pos,TempDirPath+"\\"); // i.e. TEMPS\JOHN____.D00
|
||||
pos += TempDirPath.Length + 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
exetkn_str = exetkn.ToString();
|
||||
}
|
||||
return exetkn.ToString();
|
||||
}
|
||||
|
||||
private void SetExeName()
|
||||
{
|
||||
ShortName sname = new ShortName(System.Environment.CommandLine);
|
||||
string cmdlinepath = sname.ShortFileName;
|
||||
string upbuff = cmdlinepath.ToUpper();
|
||||
string tmp = upbuff.Substring(1,upbuff.LastIndexOf("\\")-1);
|
||||
int idx = tmp.IndexOf("VE-PROMS.NET");
|
||||
if (idx > 0)
|
||||
{
|
||||
exepath = tmp.Substring(0,idx+8) + tmp.Substring(idx+12);
|
||||
syspath = exepath.Substring(0,exepath.IndexOf("\\BIN"));
|
||||
netsyspath = syspath + ".NET";
|
||||
}
|
||||
else
|
||||
{
|
||||
exepath = tmp;
|
||||
syspath = exepath.Substring(0,exepath.IndexOf("\\BIN"));
|
||||
netsyspath = syspath + ".NET";
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAppConfig(string pth)
|
||||
{
|
||||
appcfgpath = pth;
|
||||
}
|
||||
|
||||
public bool SetUserConfig()
|
||||
{
|
||||
bool Rtnval = true;
|
||||
PrivateProfile Veproms_ini = new PrivateProfile(ExeAdjust("~veproms.ini"));
|
||||
// Find the UserId (not the number, he name/initials)
|
||||
if (UserID==null || UserID.Equals(""))
|
||||
{
|
||||
// see if it's defined via an environment variable
|
||||
UserID = System.Environment.GetEnvironmentVariable("userid");
|
||||
if (UserID == null)
|
||||
{
|
||||
// Check the VEPROMS.INI file
|
||||
// UserID = Veproms_ini.Attr("/ini/section[@name='veconfig']/param[@name='userid']/@value");
|
||||
UserID = Veproms_ini.Attr("veconfig","userid");
|
||||
}
|
||||
if (UserID == null || UserID.Equals(""))
|
||||
{
|
||||
if (sec.initials != null && !sec.initials.Equals(""))
|
||||
{
|
||||
// default to the user's login name
|
||||
UserID = sec.initials;
|
||||
}
|
||||
else
|
||||
{
|
||||
// default to VEPROMS.CFG
|
||||
UserID = "VEPROMS";
|
||||
}
|
||||
}
|
||||
}
|
||||
// Fing the VECONFIG path
|
||||
ucfgpath=System.Environment.GetEnvironmentVariable("veconfig");
|
||||
// If VECONFIG environment variable not set then check the
|
||||
// VEPROMS.INI file for VECONFIG settings.
|
||||
if (ucfgpath == null || ucfgpath.Equals(""))
|
||||
{
|
||||
// ucfgpath = Veproms_ini.Attr("/ini/section[@name='veconfig']/param[@name='file']/@value");
|
||||
ucfgpath = Veproms_ini.Attr("veconfig","file");
|
||||
if (ucfgpath==null || ucfgpath.Equals(""))
|
||||
{
|
||||
// still no path, use default cfg file path
|
||||
ucfgpath = ExeAdjust("~CONFIG");
|
||||
}
|
||||
}
|
||||
|
||||
if (ucfgpath != null)
|
||||
{
|
||||
string tmp_UID="";
|
||||
// See it the VECONFIG path includes a CFG file name.
|
||||
// if no CFG file name, then build one based on userid
|
||||
bool atroot = ucfgpath.EndsWith(":\\");
|
||||
if (!atroot)
|
||||
{
|
||||
if (ucfgpath.EndsWith("\\"))
|
||||
{
|
||||
// trim the ending backslash
|
||||
ucfgpath = ucfgpath.Substring(0,ucfgpath.Length-1);
|
||||
}
|
||||
}
|
||||
//See if we need to build a CFG file name
|
||||
if (atroot || Directory.Exists(ucfgpath))
|
||||
{
|
||||
// use the no more than the first 8 chars of the userid
|
||||
tmp_UID = (UserID.Length > 8)?UserID.Substring(0,8) : UserID;
|
||||
|
||||
// Build the CFG file name and append to the VECONFIG path
|
||||
ucfgpath = ucfgpath + "\\" + tmp_UID + ".CFG";
|
||||
}
|
||||
}
|
||||
if (File.Exists(ucfgpath))
|
||||
myUserData = new UserData(ucfgpath);
|
||||
else
|
||||
{
|
||||
// error - cfg file does not exist
|
||||
Rtnval = false;
|
||||
MessageBox.Show("Configuration file:\n\n" + ucfgpath + "\n\nDoes not exist","Missing CFG file");
|
||||
}
|
||||
return Rtnval;
|
||||
}
|
||||
|
||||
public void FreeMenuWinXML()
|
||||
{
|
||||
menuwinXML=null;
|
||||
}
|
||||
public void LoadMenuWin2()
|
||||
{
|
||||
if (menuwin2XML == null)
|
||||
menuwin2XML = new MenuXML(syspath + "\\menuwin2.xml");
|
||||
// menuwin2XML = new MenuXML("e:\\ve-proms\\menuwin2.xml");
|
||||
}
|
||||
public void FreeMenuWin2XML()
|
||||
{
|
||||
menuwin2XML=null;
|
||||
}
|
||||
|
||||
// The following methods update the cfg file (delete item, add item & mod)
|
||||
//public bool DeletePathFromCfg(string delpth)
|
||||
//{
|
||||
// IniReader in1 = new IniReader(ucfgpath);
|
||||
// string curpath = in1.ReadString("Menu","DataPath","");
|
||||
// string modpath = curpath.Replace(delpth,"");
|
||||
// inifile.WriteINIKeyValueStr("Menu","DataPath",modpath,ucfgpath);
|
||||
// return true;
|
||||
//}
|
||||
|
||||
//public void AddPathToCfg(string pth)
|
||||
//{
|
||||
// string newpath=null;
|
||||
// INIFile inifile = new INIFile();
|
||||
// string curpath = inifile.GetINIKeyValueStr("Menu","DataPath","",132,ucfgpath);
|
||||
// string tmp = curpath.TrimEnd(" \t".ToCharArray());
|
||||
// // If none exists, just add that entered, if it ends with ';', don't add another
|
||||
// if (tmp==null||tmp=="")
|
||||
// newpath = pth;
|
||||
// else if (tmp.Substring(tmp.Length-1,1)==";")
|
||||
// newpath = tmp + pth;
|
||||
// else
|
||||
// newpath = tmp+";"+pth;
|
||||
// inifile.WriteINIKeyValueStr("Menu","DataPath",newpath,ucfgpath);
|
||||
//}
|
||||
|
||||
//public void ModTitleToCfg(string oldtitle, string newtitle)
|
||||
//{
|
||||
// INIFile inifile = new INIFile();
|
||||
// string curpath = inifile.GetINIKeyValueStr("Menu","DataPath","",132,ucfgpath);
|
||||
// string newpath=curpath.Replace(oldtitle,newtitle);
|
||||
// inifile.WriteINIKeyValueStr("Menu","DataPath",newpath,ucfgpath);
|
||||
//}
|
||||
|
||||
// Check if plant (defined by location) is in the menuwin file. Return 0 if not,
|
||||
// 1 if in file and -1 if error reading file.
|
||||
public int IsInMenuWin(string location)
|
||||
{
|
||||
// see if this plant is already in the file, check menuwin
|
||||
// and if there, assume in both.
|
||||
try
|
||||
{
|
||||
// Create an instance of StreamReader to read from a file.
|
||||
// The using statement also closes the StreamReader.
|
||||
using (StreamReader sr = new StreamReader(syspath+"\\menuwin"))
|
||||
{
|
||||
string line;
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
int indx;
|
||||
indx = line.ToUpper().IndexOf(location.ToUpper());
|
||||
if (indx>-1)
|
||||
{
|
||||
sr.Close();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Let the user know what went wrong.
|
||||
Console.WriteLine("Could not test " + e.Message + " for plant existence in menuwin file");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public bool AddToMenuWin(string title,string location)
|
||||
{
|
||||
int inmenufile = IsInMenuWin(location);
|
||||
if (inmenufile==-1)return false; // error checking for it
|
||||
if (inmenufile==1)return true; // already there.
|
||||
|
||||
// make backup files in case of failure.
|
||||
FileInfo menuwinbak = new FileInfo(syspath+"\\menuwin");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwin.BAK",true);
|
||||
menuwinbak=null;
|
||||
|
||||
// add the title and location to the menuwin menuwin.xml files.
|
||||
// menuwin first.
|
||||
FileStream fs = new FileStream(syspath+"\\menuwin",
|
||||
FileMode.Open, FileAccess.ReadWrite, FileShare.None);
|
||||
|
||||
// if the file couldn't open, give an error.
|
||||
if (fs == null)
|
||||
{
|
||||
MessageBox.Show("Could not add plant to menuwin file.","VE-PROMS");
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin.BAK");
|
||||
menuwinbak.Delete();
|
||||
return false;
|
||||
}
|
||||
// go to last character of file & see if we have a /r/n. There
|
||||
// needs to be a single newline between plants in the menuwin file
|
||||
// or an error will occur.
|
||||
fs.Seek(-2,SeekOrigin.End);
|
||||
StreamReader tmpReader = new StreamReader(fs);
|
||||
int tmpi1 = tmpReader.Peek();
|
||||
bool hasnewline=false;
|
||||
if (tmpi1==0xD)hasnewline=true;
|
||||
fs.Seek(0,SeekOrigin.End);
|
||||
|
||||
StreamWriter swFromFileStream = new StreamWriter(fs);
|
||||
if (hasnewline)
|
||||
swFromFileStream.Write(title);
|
||||
else
|
||||
swFromFileStream.Write("\r\n"+title);
|
||||
string tmpl = "\r\n{t}" + location + " menu ~menu1a\r\n";
|
||||
swFromFileStream.Write(tmpl);
|
||||
swFromFileStream.Flush();
|
||||
swFromFileStream.Close();
|
||||
fs.Close();
|
||||
|
||||
// now add menuwin.xml text, add this before the end tags for
|
||||
// system attach & menuwin (i.e. that's the seek part of this
|
||||
// subtracting from end of file the number of characters for
|
||||
// these two tags.
|
||||
// make backup files in case of failure.
|
||||
FileInfo menuwinxbak = new FileInfo(syspath+"\\menuwin");
|
||||
menuwinxbak.CopyTo(syspath+"\\menuwinx.BAK",true);
|
||||
menuwinxbak=null;
|
||||
|
||||
fs = new FileStream(syspath+"\\menuwin.xml",
|
||||
FileMode.Open, FileAccess.Write, FileShare.None);
|
||||
if (fs == null)
|
||||
{
|
||||
MessageBox.Show("Could not add plant to menuwin.xml file.","VE-PROMS");
|
||||
//delete menuwin & rename the bak file.
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin");
|
||||
menuwinbak.Delete();
|
||||
menuwinbak = null;
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin.BAK");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwin");
|
||||
menuwinbak.Delete();
|
||||
menuwinxbak = new FileInfo(syspath+"\\menuwinx.BAK");
|
||||
menuwinxbak.Delete();
|
||||
return false;
|
||||
}
|
||||
long flen = fs.Length;
|
||||
fs.SetLength(flen-27); //remove tags.
|
||||
fs.Seek(0,SeekOrigin.End);
|
||||
swFromFileStream = new StreamWriter(fs);
|
||||
swFromFileStream.Write("<Plant>\r\n<MenuName>");
|
||||
swFromFileStream.Write(title);
|
||||
swFromFileStream.Write("</MenuName>\r\n<TemplateName>{t}");
|
||||
swFromFileStream.Write(location);
|
||||
swFromFileStream.Write(" menu menu1a</TemplateName>\r\n</Plant>\r\n");
|
||||
swFromFileStream.Write("</SystemAttach>\r\n</MenuWin>");
|
||||
|
||||
swFromFileStream.Flush();
|
||||
swFromFileStream.Close();
|
||||
fs.Close();
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin.BAK");
|
||||
menuwinbak.Delete();
|
||||
menuwinxbak = new FileInfo(syspath+"\\menuwinx.BAK");
|
||||
menuwinxbak.Delete();
|
||||
// reload so that the new plant node gets added to the xml tree.
|
||||
menuwinXML = null;
|
||||
menuwinXML = new MenuXML(syspath + "\\menuwin.xml");
|
||||
MessageBox.Show("Please send \\ve-proms\\menuwin & \\ve-proms\\menuwin.xml files to Volian.","VE-PROMS");
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool ModMenuWin(string newtitle, string oldtitle)
|
||||
{
|
||||
// replace the oldtitle with the new in both the menuwin file
|
||||
// and the menuwin.xml file.
|
||||
FileInfo menuwinbak = new FileInfo(syspath+"\\menuwin");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwin.BAK",true);
|
||||
menuwinbak=null;
|
||||
|
||||
// read the whole file, replace the plant title string & save the file.
|
||||
StreamReader sr = File.OpenText(syspath+"\\menuwin");
|
||||
string input;
|
||||
if ((input=sr.ReadToEnd())!=null)
|
||||
{
|
||||
sr.Close();
|
||||
string output = input.Replace(oldtitle,newtitle);
|
||||
StreamWriter sw = new StreamWriter(syspath+"\\menuwin",false);
|
||||
sw.Write(output);
|
||||
sw.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
sr.Close();
|
||||
MessageBox.Show("Could not update menuwin file with new plant title","VE-PROMS");
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin.BAK");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwin",true);
|
||||
menuwinbak.Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
// now do the xml file.
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin.xml");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwinx.BAK",true);
|
||||
menuwinbak=null;
|
||||
|
||||
// read the whole file, replace the plant title string & save the file.
|
||||
sr = File.OpenText(syspath+"\\menuwin.xml");
|
||||
if ((input=sr.ReadToEnd())!=null)
|
||||
{
|
||||
sr.Close();
|
||||
string output = input.Replace(oldtitle,newtitle);
|
||||
StreamWriter sw = new StreamWriter(syspath+"\\menuwin.xml",false);
|
||||
sw.Write(output);
|
||||
sw.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
sr.Close();
|
||||
MessageBox.Show("Could not update menuwin.xml file with new plant title","VE-PROMS");
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwin.BAK");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwin",true);
|
||||
menuwinbak.Delete();
|
||||
menuwinbak = new FileInfo(syspath+"\\menuwinx.BAK");
|
||||
menuwinbak.CopyTo(syspath+"\\menuwin.xml",true);
|
||||
menuwinbak.Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
207
PROMS/ReferencedObjectsOld/LibSource/Utils/Utils.csproj
Normal file
207
PROMS/ReferencedObjectsOld/LibSource/Utils/Utils.csproj
Normal file
@@ -0,0 +1,207 @@
|
||||
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{680054D3-49C4-40E7-92A5-67B97DCE6308}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>Utils</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Utils</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>0.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="dznet">
|
||||
<Name>dznet</Name>
|
||||
<HintPath>f:\DynaZip Max\Redist\dznet.dll</HintPath>
|
||||
<AssemblyFolderKey>hklm\dn\dynazip for .net</AssemblyFolderKey>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<Name>System.Drawing</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="About.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CurSet.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DirSpace.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DTI.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FmtFiles.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MenuXML.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PrivateProfile.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Security.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SerialNo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShrtNm.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SymbDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SymbLst.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UsrRunTime.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VEdt.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZipFuncs.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZipFuncsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SymbDlg.resx">
|
||||
<DependentUpon>SymbDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ZipFuncsDlg.resx">
|
||||
<DependentUpon>ZipFuncsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Content Include="AboutBckgnd_370x209.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Org.Mentalis.Files\Org.Mentalis.Files.csproj">
|
||||
<Project>{A46428FC-1E35-4B8D-8B06-A1DF8BAC7A04}</Project>
|
||||
<Name>Org.Mentalis.Files</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
19
PROMS/ReferencedObjectsOld/LibSource/Utils/Utils.sln
Normal file
19
PROMS/ReferencedObjectsOld/LibSource/Utils/Utils.sln
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "Utils.csproj", "{680054D3-49C4-40E7-92A5-67B97DCE6308}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{680054D3-49C4-40E7-92A5-67B97DCE6308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{680054D3-49C4-40E7-92A5-67B97DCE6308}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{680054D3-49C4-40E7-92A5-67B97DCE6308}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{680054D3-49C4-40E7-92A5-67B97DCE6308}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
98
PROMS/ReferencedObjectsOld/LibSource/Utils/VEdt.cs
Normal file
98
PROMS/ReferencedObjectsOld/LibSource/Utils/VEdt.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VEdt.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:35a $
|
||||
*
|
||||
* $History: VEdt.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:35a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for VEdt.
|
||||
/// </summary>
|
||||
public class VEDateTime
|
||||
{
|
||||
public DateTime dt;
|
||||
public string dtstr;
|
||||
|
||||
public VEDateTime(long tm)
|
||||
{
|
||||
System.Globalization.CultureInfo info =
|
||||
new System.Globalization.CultureInfo("en-US", false);
|
||||
|
||||
System.Globalization.Calendar calendar = info.Calendar;
|
||||
|
||||
|
||||
// do some conversion so that proms will be able to use this
|
||||
// date/time. 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,0); // Jan 1, 1970
|
||||
|
||||
//
|
||||
// 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
|
||||
DateTime cnv = promsdt.AddSeconds(tm-TimeZoneAdj);
|
||||
dtstr = cnv.ToLongDateString() + " " + cnv.ToLongTimeString();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* TimeZone is an Abstract Class. You need to inherit the TimeZone Class
|
||||
* and overload a couple of it's functions in order to use it.
|
||||
* - called in CalculatePromsDate() above.
|
||||
*/
|
||||
public class ThisTimeZone : TimeZone
|
||||
{
|
||||
private TimeZone curTZ;
|
||||
public TimeSpan SpanTZ;
|
||||
|
||||
public ThisTimeZone()
|
||||
{
|
||||
curTZ = CurrentTimeZone; // local timezone
|
||||
}
|
||||
|
||||
// get the UTC (GMT) value for the given date/time
|
||||
public override TimeSpan GetUtcOffset(DateTime ForThisDate)
|
||||
{
|
||||
SpanTZ = curTZ.GetUtcOffset(ForThisDate);
|
||||
return SpanTZ;
|
||||
}
|
||||
|
||||
// Name of the local Daylight savings time zone
|
||||
public override string DaylightName
|
||||
{
|
||||
get
|
||||
{
|
||||
return curTZ.DaylightName;
|
||||
}
|
||||
}
|
||||
|
||||
// Name of the local standard time zone
|
||||
public override string StandardName
|
||||
{
|
||||
get
|
||||
{
|
||||
return curTZ.StandardName;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the start and end dates for daylight savings
|
||||
public override System.Globalization.DaylightTime GetDaylightChanges(int year)
|
||||
{
|
||||
return curTZ.GetDaylightChanges(year);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
647
PROMS/ReferencedObjectsOld/LibSource/Utils/ZipFuncs.cs
Normal file
647
PROMS/ReferencedObjectsOld/LibSource/Utils/ZipFuncs.cs
Normal file
@@ -0,0 +1,647 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: ZipFuncs.cs $ $Revision: 2 $
|
||||
* $Author: Kathy $ $Date: 8/10/04 9:12a $
|
||||
*
|
||||
* $History: ZipFuncs.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 8/10/04 Time: 9:12a
|
||||
* Updated in $/LibSource/Utils
|
||||
* force copy for backup of zip file on checks (was crashing)
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:35a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Zip and UnZip functions.
|
||||
/// </summary>
|
||||
public class ZipFuncs
|
||||
{
|
||||
[DllImport("Kernel32.DLL")] public static extern uint GetDriveType(char[] lpRootPathName);
|
||||
private CDZipNET dzip;
|
||||
private CDUnZipNET duzip;
|
||||
|
||||
private string _strZipPathAndFile; // full path and zip file name
|
||||
private bool _CancelZip;
|
||||
|
||||
private bool _zipOnRemovable; // i.e. floppy disk
|
||||
|
||||
private int _ArchiveType; // Full or Partial
|
||||
|
||||
private string _strZipFileExcludeList; // what not to zip
|
||||
|
||||
private string _strComment; // user's zip comment
|
||||
private string _strFilesToArchive; // what to zip up
|
||||
|
||||
private string _strArcTitle; // user's archive title
|
||||
|
||||
private string _strDestPath; // place to unzip to
|
||||
|
||||
//#define DRIVE_UNKNOWN 0
|
||||
//#define DRIVE_NO_ROOT_DIR 1
|
||||
//#define DRIVE_REMOVABLE 2
|
||||
//#define DRIVE_FIXED 3
|
||||
//#define DRIVE_REMOTE 4
|
||||
//#define DRIVE_CDROM 5
|
||||
//#define DRIVE_RAMDISK 6
|
||||
|
||||
private enum DriveType
|
||||
{
|
||||
DRIVE_UNKNOWN=0,
|
||||
DRIVE_NO_ROOT_DIR,
|
||||
DRIVE_REMOVABLE,
|
||||
DRIVE_FIXED,
|
||||
DRIVE_REMOTE,
|
||||
DRIVE_CDROM,
|
||||
DRIVE_RAMDISK
|
||||
}
|
||||
|
||||
private enum ZipTypes
|
||||
{
|
||||
Full=0,
|
||||
Partial=1
|
||||
}
|
||||
|
||||
// Contstructor for an existing Zip file
|
||||
public ZipFuncs(string iZipFile)
|
||||
{
|
||||
_strZipPathAndFile = iZipFile;
|
||||
SetupDestinationPath();
|
||||
_CancelZip = false;
|
||||
// populate local variables with Zip file's
|
||||
// Title, Archive type, and Comment
|
||||
GetZipCommentInformation();
|
||||
}
|
||||
|
||||
// Constructor for a new Zip file
|
||||
public ZipFuncs()
|
||||
{
|
||||
_strZipPathAndFile = "";
|
||||
_CancelZip = false;
|
||||
}
|
||||
|
||||
//public properties
|
||||
public string strArcTitle
|
||||
{
|
||||
get { return _strArcTitle; }
|
||||
set {_strArcTitle = value.ToString(); }
|
||||
}
|
||||
|
||||
public string strZipPathAndFile
|
||||
{
|
||||
get { return _strZipPathAndFile;}
|
||||
set
|
||||
{
|
||||
_strZipPathAndFile = value.ToString();
|
||||
SetupDestinationPath();
|
||||
// populate local variables with Zip file's
|
||||
// Title, Archive type, and Comment
|
||||
GetZipCommentInformation();
|
||||
}
|
||||
}
|
||||
|
||||
public string strUnZipDestPath
|
||||
{
|
||||
get { return _strDestPath; }
|
||||
set
|
||||
{
|
||||
_strDestPath = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public bool CancelZip
|
||||
{
|
||||
get { return _CancelZip;}
|
||||
set { _CancelZip = value; }
|
||||
}
|
||||
|
||||
public bool zipOnRemovable
|
||||
{
|
||||
get { return _zipOnRemovable;}
|
||||
set { _zipOnRemovable = value;}
|
||||
}
|
||||
|
||||
public int ArchiveType
|
||||
{
|
||||
get { return _ArchiveType;}
|
||||
set { _ArchiveType = value; }
|
||||
}
|
||||
|
||||
public string strFilesToArchive
|
||||
{
|
||||
get { return _strFilesToArchive; }
|
||||
set { _strFilesToArchive = value.ToString(); }
|
||||
}
|
||||
|
||||
public string strZipFileExcludeList
|
||||
{
|
||||
get { return _strZipFileExcludeList; }
|
||||
set { _strZipFileExcludeList = value.ToString(); }
|
||||
}
|
||||
|
||||
public string strComment
|
||||
{
|
||||
get {return _strComment;}
|
||||
set
|
||||
{
|
||||
// if (value == null)
|
||||
// _strComment = "";
|
||||
// else
|
||||
_strComment = (value == null)?"":value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public bool CreateNewZipFile()
|
||||
{
|
||||
return _GenerateZipFile(true);
|
||||
}
|
||||
|
||||
public bool UpdateZipFile()
|
||||
{
|
||||
return _GenerateZipFile(false);
|
||||
}
|
||||
|
||||
|
||||
private bool _GenerateZipFile(bool NewFileFile)
|
||||
{
|
||||
StringBuilder cmntTxt = new StringBuilder();
|
||||
bool rtnval;
|
||||
ZipFuncsDlg zpDlg = new ZipFuncsDlg();
|
||||
|
||||
dzip = new CDZipNET();
|
||||
_CancelZip = false;
|
||||
_zipOnRemovable = IsARemovableDisk();
|
||||
|
||||
// Setup DynaZip
|
||||
|
||||
// build comment field text
|
||||
cmntTxt.Append(_strArcTitle);
|
||||
cmntTxt.Append("\n");
|
||||
if (_ArchiveType == (int)ZipFuncs.ZipTypes.Partial)
|
||||
{
|
||||
// Do not recurse the sub directories when doing a partial archive
|
||||
cmntTxt.Append("PARTIAL\n");
|
||||
dzip.RecurseFlag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmntTxt.Append("FULL\n");
|
||||
dzip.RecurseFlag = true;
|
||||
}
|
||||
cmntTxt.Append(_strComment);
|
||||
dzip.AddCommentFlag = true;
|
||||
dzip.Comment = cmntTxt.ToString(); // zip file comment string
|
||||
|
||||
// CompressionFactors 10 - 19 are not compatable with older zip programs
|
||||
// (i.e WinZip 7.0)
|
||||
dzip.CompressionFactor = 9; // maxium compression
|
||||
dzip.ExcludeFollowingFlag = true;
|
||||
dzip.ExcludeFollowing = _strZipFileExcludeList;
|
||||
dzip.ItemList = _strFilesToArchive;
|
||||
dzip.LargeZIPFilesFlag = true;
|
||||
dzip.ZIPFile = _strZipPathAndFile; // zip file name with full path
|
||||
|
||||
// Is the target zip path on a removable dirve?
|
||||
if (_zipOnRemovable)
|
||||
{
|
||||
dzip.MultiVolumeControl = CDZipNET.MULTIVOLCONTROL.MV_USEMULTI;
|
||||
}
|
||||
else
|
||||
{
|
||||
dzip.MultiVolumeControl = CDZipNET.MULTIVOLCONTROL.MV_NONE;
|
||||
}
|
||||
|
||||
// setup status bars
|
||||
dzip.MajorStatusFlag = true;
|
||||
dzip.MinorStatusFlag = true;
|
||||
dzip.ZipMajorStatus += new CDZipNET.OnZipMajorStatus(zpDlg.ZipMajorStatus_event);
|
||||
dzip.ZipMinorStatus += new CDZipNET.OnZipMinorStatus(zpDlg.ZipMinorStatus_event);
|
||||
_CancelZip = false;
|
||||
|
||||
zpDlg.Show();
|
||||
|
||||
// Do the Zip function
|
||||
if (!NewFileFile)
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_UPDATE; //update existing zip file
|
||||
else
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_ADD; // create new zip file
|
||||
|
||||
rtnval = (zpDlg.DialogResult == System.Windows.Forms.DialogResult.OK);
|
||||
zpDlg.Dispose();
|
||||
|
||||
// check for errors during the zip function.
|
||||
if (rtnval)
|
||||
rtnval = CheckZipErrorCode();
|
||||
|
||||
// if we are zipping to a different location than the current procedure
|
||||
// set directory, we always want to return false so that this newly
|
||||
// created zip file is not placed in the VE-PROMS tree.
|
||||
if (_zipOnRemovable || ZipFileNotInCurrentDirectory())
|
||||
rtnval = false;
|
||||
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
// If there is a problem with the Zip file header, try to fix it.
|
||||
private bool FixZipFile()
|
||||
{
|
||||
bool rtnval;
|
||||
string ZipFileName = _strZipPathAndFile;
|
||||
string backupName = ZipFileName.Substring(0,ZipFileName.LastIndexOf(".")) + ".bku";
|
||||
_CancelZip = false;
|
||||
// save a copy of the zip file
|
||||
File.Copy(ZipFileName,backupName,true);
|
||||
dzip.FixFlag = true;
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_UPDATE;
|
||||
if (dzip.ErrorCode == CDZipNET.ZIPRESPONSE.ZE_FORM )
|
||||
{
|
||||
dzip.FixFlag = false;
|
||||
dzip.FixHarderFlag = true;
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_UPDATE;
|
||||
dzip.FixHarderFlag = false;
|
||||
}
|
||||
rtnval = (dzip.ErrorCode == 0); // 0 = success
|
||||
|
||||
if (!rtnval)
|
||||
{
|
||||
// not successful, so restore from the backup file
|
||||
File.Copy(backupName,ZipFileName,true);
|
||||
}
|
||||
File.Delete(backupName); // delete the backup file
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
private bool CheckZipErrorCode()
|
||||
{
|
||||
bool rtnval;
|
||||
|
||||
switch (dzip.ErrorCode)
|
||||
{
|
||||
case CDZipNET.ZIPRESPONSE.ZE_OK: // ZE_OK
|
||||
rtnval = true;
|
||||
break;
|
||||
case CDZipNET.ZIPRESPONSE.ZE_FORM: // ZE_FORM
|
||||
case CDZipNET.ZIPRESPONSE.ZE_TEST: // ZE_TEST
|
||||
// Internal organization of ZIP file is dammaged.
|
||||
// Try using the Fix function
|
||||
// note that you cannot do the fix on removable media
|
||||
if (!zipOnRemovable)
|
||||
rtnval = FixZipFile();
|
||||
else
|
||||
rtnval = false;
|
||||
break;
|
||||
case CDZipNET.ZIPRESPONSE.ZE_ABORT: // ZE_ABORT
|
||||
rtnval = false;
|
||||
break;
|
||||
default:
|
||||
rtnval = false;
|
||||
break;
|
||||
}
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
// If there is a problem with the Zip file header, try to fix it.
|
||||
private bool FixUnZipFile()
|
||||
{
|
||||
bool rtnval;
|
||||
string ZipFileName = _strZipPathAndFile;
|
||||
string backupName = ZipFileName.Substring(0,ZipFileName.LastIndexOf(".")) + ".bku";
|
||||
_CancelZip = false;
|
||||
dzip = new CDZipNET();
|
||||
dzip.ZIPFile = duzip.ZIPFile;
|
||||
// save a copy of the zip file
|
||||
File.Copy(ZipFileName,backupName,true);
|
||||
dzip.FixFlag = true;
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_UPDATE;
|
||||
if (dzip.ErrorCode == CDZipNET.ZIPRESPONSE.ZE_FORM)
|
||||
{
|
||||
dzip.FixFlag = false;
|
||||
dzip.FixHarderFlag = true;
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_UPDATE;
|
||||
dzip.FixHarderFlag = false;
|
||||
}
|
||||
rtnval = (dzip.ErrorCode == CDZipNET.ZIPRESPONSE.ZE_OK); // 0 = success
|
||||
dzip.Dispose();
|
||||
|
||||
if (!rtnval)
|
||||
{
|
||||
// not successful, so restore from the backup file
|
||||
File.Copy(backupName,ZipFileName,true);
|
||||
}
|
||||
File.Delete(backupName); // delete the backup file
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
private bool CheckUnZipErrorCode()
|
||||
{
|
||||
bool rtnval;
|
||||
switch (duzip.ErrorCode)
|
||||
{
|
||||
case CDUnZipNET.UNZIPRESPONSE.UE_OK: // UE_OK
|
||||
rtnval = true;
|
||||
break;
|
||||
case CDUnZipNET.UNZIPRESPONSE.UE_STRUCT: // UE_STRUCT
|
||||
// Internal organization of ZIP file is dammaged.
|
||||
// Try using the Fix function
|
||||
rtnval = FixUnZipFile();
|
||||
break;
|
||||
case CDUnZipNET.UNZIPRESPONSE.UE_ABORT: // UE_ABORT
|
||||
case CDUnZipNET.UNZIPRESPONSE.UE_CANCEL: // UE_CANCEL
|
||||
rtnval = false;
|
||||
break;
|
||||
default:
|
||||
rtnval = false;
|
||||
break;
|
||||
}
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
public bool AddZipCommentInformation()
|
||||
{
|
||||
StringBuilder cmntTxt = new StringBuilder();
|
||||
dzip = new CDZipNET();
|
||||
_CancelZip = false;
|
||||
// Save the current attributes of the zip file, update zip file
|
||||
// and then restore attributes
|
||||
// - the zip file might be readonly
|
||||
System.IO.FileAttributes saveAttribs = File.GetAttributes(_strZipPathAndFile);
|
||||
File.SetAttributes(_strZipPathAndFile,FileAttributes.Normal);
|
||||
// add comment
|
||||
cmntTxt.Append(_strArcTitle);
|
||||
cmntTxt.Append("\n");
|
||||
if (_ArchiveType == (int)ZipTypes.Partial)
|
||||
cmntTxt.Append("PARTIAL\n");
|
||||
else
|
||||
cmntTxt.Append("FULL\n");
|
||||
cmntTxt.Append(_strComment);
|
||||
dzip.AddCommentFlag = true;
|
||||
dzip.Comment = cmntTxt.ToString();
|
||||
dzip.ZIPFile = _strZipPathAndFile; // zip file name with full path
|
||||
dzip.ActionDZ = CDZipNET.DZACTION.ZIP_ADD;
|
||||
File.SetAttributes(_strZipPathAndFile,saveAttribs);
|
||||
return CheckZipErrorCode();
|
||||
}
|
||||
|
||||
public bool GetZipCommentInformation()
|
||||
{
|
||||
int x;
|
||||
string ZipComment;
|
||||
string strArcType;
|
||||
_CancelZip = false;
|
||||
if (!(File.Exists(_strZipPathAndFile)))
|
||||
return false; // !!! no zip file
|
||||
duzip = new CDUnZipNET();
|
||||
duzip.ZIPFile = _strZipPathAndFile; // zip file name with full path
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_GETCOMMENTSIZE;
|
||||
if (!CheckUnZipErrorCode())
|
||||
return false; // error
|
||||
if (duzip.ReturnCount <= 0)
|
||||
return false; // no comment informat
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_GETCOMMENT;
|
||||
ZipComment = duzip.ReturnString;
|
||||
x = ZipComment.IndexOf("\n");
|
||||
if (x < 0) return false; // nothing in comment
|
||||
_strArcTitle = ZipComment.Substring(0,x);
|
||||
ZipComment = ZipComment.Substring(x+1);
|
||||
x = ZipComment.IndexOf("\n");
|
||||
if (x > 0)
|
||||
{
|
||||
strArcType = ZipComment.Substring(0,x);
|
||||
if (strArcType.Equals("FULL"))
|
||||
_ArchiveType = (int)ZipTypes.Full;
|
||||
else
|
||||
_ArchiveType = (int)ZipTypes.Partial;
|
||||
_strComment = ZipComment.Substring(x+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// at this point, default to a full archive
|
||||
_ArchiveType = (int)ZipTypes.Full;
|
||||
// default to path and filename for the comment
|
||||
_strComment = _strZipPathAndFile;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IsARemovableDisk()
|
||||
{
|
||||
uint DrvType;
|
||||
string tmp = _strZipPathAndFile.Substring(0,2);
|
||||
DrvType = GetDriveType(tmp.ToCharArray());
|
||||
return (DrvType.Equals((uint)DriveType.DRIVE_REMOVABLE));
|
||||
}
|
||||
|
||||
private bool ZipFileNotInCurrentDirectory()
|
||||
{
|
||||
string curdir = Directory.GetCurrentDirectory();
|
||||
string tmpstr = _strZipPathAndFile.ToUpper();
|
||||
if (tmpstr.EndsWith(".ZIP"))
|
||||
tmpstr = tmpstr.Substring(0,tmpstr.LastIndexOf("."));
|
||||
return tmpstr.Equals(curdir);
|
||||
}
|
||||
|
||||
public bool UnzipFromZipFile()
|
||||
{
|
||||
return _UnzipFromZipFile(true); // unzip from the archive
|
||||
}
|
||||
|
||||
public bool TestTheZipFile()
|
||||
{
|
||||
return _UnzipFromZipFile(false); // test the archive
|
||||
}
|
||||
|
||||
private bool _UnzipFromZipFile(bool ExtractFiles)
|
||||
{
|
||||
StringBuilder cmntTxt = new StringBuilder();
|
||||
bool rtnval;
|
||||
ZipFuncsDlg zpDlg = new ZipFuncsDlg();
|
||||
// StringBuilder cmntTxt = new StringBuilder();
|
||||
// VEO_Archive arc = (VEO_Archive) _CurObj;
|
||||
duzip = new CDUnZipNET();
|
||||
_zipOnRemovable = IsARemovableDisk();
|
||||
|
||||
// Setup DynaZip
|
||||
|
||||
// zip file name with full path
|
||||
duzip.ZIPFile = _strZipPathAndFile;
|
||||
|
||||
//root of drive letter
|
||||
// duzip.Destination = Path.GetPathRoot(_strZipPathAndFile);
|
||||
duzip.Destination = _strDestPath;
|
||||
|
||||
// what files to get from the zip file
|
||||
duzip.Filespec = "*.*"; // get all files
|
||||
|
||||
//Replace - this combination of flags results in unzipping all files whether
|
||||
// they were changed or not.
|
||||
duzip.FreshenFlag = false;
|
||||
duzip.UpdateFlag = false;
|
||||
|
||||
// Make a reference to a single byte to avoid null access
|
||||
duzip.MemoryBlock = new Byte[1];
|
||||
|
||||
// true = Overwrite non-read only files without asking
|
||||
duzip.OverwriteFlag = true;
|
||||
|
||||
// true = proceed to unzip by traversing into folders
|
||||
duzip.RecurseFlag = true;
|
||||
|
||||
duzip.UnzipSubOptions = CDUnZipNET.UNZIPSUBOPTION.USO_NONE;
|
||||
|
||||
// set this option to allow the overwriting of ReadOnly Files.
|
||||
// this option only has meaning when the OverwriteFlag property
|
||||
// is set to true
|
||||
duzip.UnzipSubOptions |= CDUnZipNET.UNZIPSUBOPTION.USO_OVERWRITE_RO;
|
||||
|
||||
// allow the MinorCancel event to respond to cancel requests
|
||||
duzip.UnzipSubOptions |= CDUnZipNET.UNZIPSUBOPTION.USO_MINORCANCEL;
|
||||
|
||||
// debug
|
||||
// duzip.DiagnosticFlag = true;
|
||||
// duzip.UnzipSubOptions |= CDUnZipNET.UNZIPSUBOPTION.USO_LOGZIPRESULTS;
|
||||
|
||||
// setup status bars
|
||||
duzip.MajorStatusFlag = true;
|
||||
duzip.MinorStatusFlag = true;
|
||||
duzip.MessageCallbackFlag = true;
|
||||
duzip.UnZipMajorStatus += new CDUnZipNET.OnUnZipMajorStatus(zpDlg.ZipMajorStatus_event);
|
||||
duzip.UnZipMinorStatus += new CDUnZipNET.OnUnZipMinorStatus(zpDlg.ZipMinorStatus_event);
|
||||
|
||||
_CancelZip = false;
|
||||
|
||||
zpDlg.Show(); // display the status dialog
|
||||
|
||||
if (!ExtractFiles)
|
||||
duzip.TestFlag = true; // don't extract, only test each item in zip file
|
||||
|
||||
// Do the UnZip function
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_EXTRACT;
|
||||
rtnval = (zpDlg.DialogResult == System.Windows.Forms.DialogResult.OK);
|
||||
zpDlg.Dispose();
|
||||
|
||||
// check for errors during the unzip function.
|
||||
if (!CheckUnZipErrorCode())
|
||||
return false; // error
|
||||
if (duzip.ReturnCount <= 0)
|
||||
return false; // nothing unzipped
|
||||
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
public StringCollection ZipFileContents()
|
||||
{
|
||||
StringCollection ZipFileList = new StringCollection();
|
||||
StringBuilder cmntTxt = new StringBuilder();
|
||||
duzip = new CDUnZipNET();
|
||||
_zipOnRemovable = false;
|
||||
|
||||
// Setup DynaZip
|
||||
|
||||
// zip file name with full path
|
||||
duzip.ZIPFile = _strZipPathAndFile;
|
||||
|
||||
// what files to get from the zip file
|
||||
duzip.Filespec = "*.*"; // get all files
|
||||
|
||||
//Replace - this combination of flags results in unzipping all files whether
|
||||
// they were changed or not.
|
||||
duzip.FreshenFlag = false;
|
||||
duzip.UpdateFlag = false;
|
||||
|
||||
// Make a reference to a single byte to avoid null access
|
||||
duzip.MemoryBlock = new Byte[1];
|
||||
|
||||
_CancelZip = false;
|
||||
|
||||
// Do the UnZip function
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_COUNTALLZIPMEMBERS;
|
||||
int numItems = duzip.ReturnCount;
|
||||
string str_tmpDate;
|
||||
string str_tmpFileName;
|
||||
for (int i=0;i<numItems;i++)
|
||||
{
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_GETNEXTZIPINFO;
|
||||
str_tmpDate = duzip.zi_DateTime;
|
||||
str_tmpFileName = duzip.zi_FileName;
|
||||
ZipFileList.Add(str_tmpDate + "!" + str_tmpFileName);
|
||||
}
|
||||
|
||||
return ZipFileList;
|
||||
}
|
||||
|
||||
private void SetupDestinationPath()
|
||||
{
|
||||
string strDestPath = "";
|
||||
duzip = new CDUnZipNET();
|
||||
_zipOnRemovable = false;
|
||||
|
||||
// Setup DynaZip
|
||||
|
||||
// zip file name with full path
|
||||
duzip.ZIPFile = _strZipPathAndFile;
|
||||
|
||||
strDestPath = Path.GetDirectoryName(_strZipPathAndFile);
|
||||
strDestPath = strDestPath.ToUpper();
|
||||
|
||||
// what files to get from the zip file
|
||||
duzip.Filespec = "proc.ini"; // get proc.ini file
|
||||
|
||||
//Replace - this combination of flags results in unzipping all files whether
|
||||
// they were changed or not.
|
||||
duzip.FreshenFlag = false;
|
||||
duzip.UpdateFlag = false;
|
||||
duzip.RecurseFlag = true; // so that it can get with or without path
|
||||
|
||||
// Make a reference to a single byte to avoid null access
|
||||
duzip.MemoryBlock = new Byte[1];
|
||||
|
||||
_CancelZip = false;
|
||||
|
||||
// Do the UnZip function
|
||||
int numItems = 0;
|
||||
if (File.Exists(_strZipPathAndFile))
|
||||
{
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_COUNTNAMEDZIPMEMBERS;
|
||||
// See if we found the file
|
||||
numItems = duzip.ReturnCount;
|
||||
}
|
||||
string str_tmpFileName = "";
|
||||
// string curdir = Directory.GetCurrentDirectory();
|
||||
// DestPath = curdir.ToUpper();
|
||||
if (numItems > 0)
|
||||
{
|
||||
// Adjust the destination path based on the full or partial
|
||||
// path in the zip file
|
||||
char [] trmchar = {'\\'};
|
||||
duzip.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_GETNEXTNAMEDZIPINFO;
|
||||
str_tmpFileName = duzip.zi_FileName;
|
||||
// trim off the file name
|
||||
str_tmpFileName = str_tmpFileName.ToUpper();
|
||||
str_tmpFileName = str_tmpFileName.Substring(0,str_tmpFileName.LastIndexOf("PROC.INI"));
|
||||
// trim off any backslash
|
||||
str_tmpFileName = str_tmpFileName.TrimEnd(trmchar);
|
||||
str_tmpFileName = str_tmpFileName.ToUpper();
|
||||
if (str_tmpFileName.Length > 0)
|
||||
{
|
||||
if (strDestPath.LastIndexOf(str_tmpFileName) > 0)
|
||||
strDestPath = strDestPath.Substring(0,strDestPath.Length - str_tmpFileName.Length);
|
||||
}
|
||||
}
|
||||
_strDestPath = strDestPath;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
164
PROMS/ReferencedObjectsOld/LibSource/Utils/ZipFuncsDlg.cs
Normal file
164
PROMS/ReferencedObjectsOld/LibSource/Utils/ZipFuncsDlg.cs
Normal file
@@ -0,0 +1,164 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: ZipFuncsDlg.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:35a $
|
||||
*
|
||||
* $History: ZipFuncsDlg.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:35a
|
||||
* Created in $/LibSource/Utils
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialog used to display the zip/unzip function status
|
||||
/// </summary>
|
||||
public class ZipFuncsDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
private System.Windows.Forms.ProgressBar progressBar2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button button1;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
private bool _CancelZip;
|
||||
|
||||
public ZipFuncsDlg()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
_CancelZip = false;
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
|
||||
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.progressBar2 = new System.Windows.Forms.ProgressBar();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(16, 40);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(360, 23);
|
||||
this.progressBar1.TabIndex = 0;
|
||||
//
|
||||
// progressBar2
|
||||
//
|
||||
this.progressBar2.Location = new System.Drawing.Point(16, 104);
|
||||
this.progressBar2.Name = "progressBar2";
|
||||
this.progressBar2.Size = new System.Drawing.Size(360, 23);
|
||||
this.progressBar2.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(24, 16);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(352, 16);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(16, 80);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(360, 16);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "label2";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(144, 144);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(104, 32);
|
||||
this.button1.TabIndex = 4;
|
||||
this.button1.Text = "Cancel";
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// ZipFuncs
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(400, 190);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.progressBar2);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Name = "ZipFuncs";
|
||||
this.Text = "ZipFuncs";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void button1_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
_CancelZip = true;
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
}
|
||||
|
||||
public void ZipMajorStatus_event(String lpstrItem, int percent, ref int rc)
|
||||
{
|
||||
progressBar1.Value = percent;
|
||||
label1.Text = lpstrItem;
|
||||
|
||||
if (_CancelZip)
|
||||
rc = 1;
|
||||
else
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
public void ZipMinorStatus_event(String lpstrItem, int percent, ref int rc)
|
||||
{
|
||||
progressBar2.Value = percent;
|
||||
label2.Text = lpstrItem;
|
||||
|
||||
if (_CancelZip)
|
||||
rc = 1;
|
||||
else
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
175
PROMS/ReferencedObjectsOld/LibSource/Utils/ZipFuncsDlg.resx
Normal file
175
PROMS/ReferencedObjectsOld/LibSource/Utils/ZipFuncsDlg.resx
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="progressBar1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="progressBar1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="progressBar1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="progressBar2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="progressBar2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="progressBar2.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="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="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.Name">
|
||||
<value>ZipFuncs</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>
|
@@ -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.
|
||||
//
|
@@ -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("")]
|
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace VlnProfiler
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Profiler.
|
||||
/// </summary>
|
||||
public class Profiler
|
||||
{
|
||||
static HybridDictionary dicTiming;
|
||||
static HybridDictionary dicDuration;
|
||||
|
||||
static Profiler()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
public static void Reset()
|
||||
{
|
||||
dicTiming = new HybridDictionary();
|
||||
dicTiming[" Total"]=DateTime.Now;
|
||||
dicDuration = new HybridDictionary();
|
||||
}
|
||||
|
||||
public static void Start(string sName)
|
||||
{
|
||||
dicTiming[sName]=DateTime.Now;
|
||||
}
|
||||
|
||||
public static void End(string sName)
|
||||
{
|
||||
if( dicDuration.Contains(sName))
|
||||
dicDuration[sName]=((TimeSpan) dicDuration[sName]) + (DateTime.Now - ((DateTime) dicTiming[sName]));
|
||||
else
|
||||
dicDuration[sName]=DateTime.Now - ((DateTime) dicTiming[sName]);
|
||||
}
|
||||
|
||||
public static string ToString(string Format)
|
||||
{
|
||||
string str="";
|
||||
string sep="";
|
||||
if(Format.IndexOf("%")>=0)
|
||||
{
|
||||
double ttl = Convert.ToDouble(((TimeSpan) (DateTime.Now - ((DateTime) dicTiming[" Total"]))).Ticks);
|
||||
double ttlOther=ttl;
|
||||
foreach(string strKey in dicDuration.Keys)
|
||||
{
|
||||
ttlOther-=((TimeSpan) dicDuration[strKey]).Ticks;
|
||||
double dt = Convert.ToDouble(((TimeSpan) dicDuration[strKey]).Ticks)/ttl;
|
||||
//TODO: If Percent - Convert to Percent of Total
|
||||
str+=sep+dt.ToString(Format) + " " + strKey;
|
||||
sep="\r\n";
|
||||
}
|
||||
ttlOther = ttlOther/ttl;
|
||||
str+=sep+ttlOther.ToString(Format) + " Other";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach(string strKey in dicDuration.Keys)
|
||||
{
|
||||
str+=sep+((TimeSpan)dicDuration[strKey]).ToString(/*Format*/) + " " + strKey;
|
||||
sep="\r\n";
|
||||
}
|
||||
}
|
||||
str+=sep + "".PadRight(20,'-');
|
||||
str+=sep + ((TimeSpan) (DateTime.Now - ((DateTime) dicTiming[" Total"]))).ToString(/*Format*/) + " Total";
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,102 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{38044313-1E5E-4F20-A9E7-3CBDDDCADCDC}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>VlnProfiler</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>VlnProfiler</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VlnProfiler.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VlnProfiler", "VlnProfiler.csproj", "{38044313-1E5E-4F20-A9E7-3CBDDDCADCDC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{38044313-1E5E-4F20-A9E7-3CBDDDCADCDC}.Debug.ActiveCfg = Release|.NET
|
||||
{38044313-1E5E-4F20-A9E7-3CBDDDCADCDC}.Debug.Build.0 = Release|.NET
|
||||
{38044313-1E5E-4F20-A9E7-3CBDDDCADCDC}.Release.ActiveCfg = Release|.NET
|
||||
{38044313-1E5E-4F20-A9E7-3CBDDDCADCDC}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@@ -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.
|
||||
//
|
@@ -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("")]
|
164
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/SpinnerFrm.cs
Normal file
164
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/SpinnerFrm.cs
Normal file
@@ -0,0 +1,164 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: SpinnerFrm.cs $ $Revision: 2 $
|
||||
* $Author: Kathy $ $Date: 7/26/04 1:20p $
|
||||
*
|
||||
* $History: SpinnerFrm.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 7/26/04 Time: 1:20p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* doevents for cancel button click
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 5/11/04 Time: 9:56a
|
||||
* Created in $/LibSource/VlnStatus
|
||||
* volian spinner control
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VlnStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a status window with a progress bar
|
||||
/// </summary>
|
||||
public class SpinnerFrm : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.Label lblMsg;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
|
||||
private bool abortFlag;
|
||||
public SpinnerFrm(bool ab, bool canCancel)
|
||||
{
|
||||
abortFlag = ab;
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
if (!canCancel) this.btnCancel.Visible=false;
|
||||
|
||||
this.progressBar1.Minimum=0;
|
||||
this.progressBar1.Maximum=100;
|
||||
this.progressBar1.Value=1;
|
||||
}
|
||||
|
||||
/// <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.lblMsg = new System.Windows.Forms.Label();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblMsg
|
||||
//
|
||||
this.lblMsg.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.lblMsg.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblMsg.Location = new System.Drawing.Point(16, 16);
|
||||
this.lblMsg.Name = "lblMsg";
|
||||
this.lblMsg.Size = new System.Drawing.Size(288, 48);
|
||||
this.lblMsg.TabIndex = 2;
|
||||
this.lblMsg.Tag = "msg1";
|
||||
this.lblMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Location = new System.Drawing.Point(128, 112);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(64, 24);
|
||||
this.btnCancel.TabIndex = 3;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(16, 72);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(288, 24);
|
||||
this.progressBar1.TabIndex = 4;
|
||||
//
|
||||
// SpinnerFrm
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(318, 149);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.lblMsg);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SpinnerFrm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "VE-PROMS";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public void UpdateSpin()
|
||||
{
|
||||
if (this.progressBar1.Value==this.progressBar1.Maximum) this.progressBar1.Value=0;
|
||||
this.progressBar1.Value=this.progressBar1.Value++;
|
||||
this.progressBar1.PerformStep();
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
}
|
||||
|
||||
public void UpdateSpinMsg(string txt)
|
||||
{
|
||||
this.lblMsg.Text = txt;
|
||||
this.lblMsg.Refresh();
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
if( abortFlag )
|
||||
{
|
||||
string message = "Are you sure you want to Cancel?";
|
||||
string caption = "Network Update";
|
||||
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
||||
DialogResult result;
|
||||
result = MessageBox.Show(this, message, caption, buttons);
|
||||
|
||||
if(result == DialogResult.Yes)
|
||||
{
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
157
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/SpinnerFrm.resx
Normal file
157
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/SpinnerFrm.resx
Normal 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="lblMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblMsg.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="progressBar1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="progressBar1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="progressBar1.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>SpinnerFrm</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>
|
232
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/StatusBarFrm.cs
Normal file
232
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/StatusBarFrm.cs
Normal file
@@ -0,0 +1,232 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: StatusBarFrm.cs $ $Revision: 3 $
|
||||
* $Author: Jsj $ $Date: 4/08/04 9:50a $
|
||||
*
|
||||
* $History: StatusBarFrm.cs $
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 4/08/04 Time: 9:50a
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* added profile code and try to optimize
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 3:38p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* Added overbounds check
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
//using ROProfiler; //don't forget to add VlnProfiler to the reference list
|
||||
|
||||
namespace VlnStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a status window with a progress bar
|
||||
/// </summary>
|
||||
public class StatusBarFrm : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
private System.Windows.Forms.Label lblBar;
|
||||
private System.Windows.Forms.Label StatMsg;
|
||||
// private string strLblLast="";
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public StatusBarFrm()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
Text = "Status";
|
||||
}
|
||||
|
||||
public StatusBarFrm(string StatusBoxTitle)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
Text = StatusBoxTitle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.lblBar = new System.Windows.Forms.Label();
|
||||
this.StatMsg = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(29, 83);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(297, 27);
|
||||
this.progressBar1.TabIndex = 0;
|
||||
//
|
||||
// lblBar
|
||||
//
|
||||
this.lblBar.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblBar.Location = new System.Drawing.Point(29, 136);
|
||||
this.lblBar.Name = "lblBar";
|
||||
this.lblBar.Size = new System.Drawing.Size(297, 16);
|
||||
this.lblBar.TabIndex = 1;
|
||||
this.lblBar.Text = "% Complete";
|
||||
this.lblBar.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// StatMsg
|
||||
//
|
||||
this.StatMsg.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.StatMsg.Location = new System.Drawing.Point(29, 18);
|
||||
this.StatMsg.Name = "StatMsg";
|
||||
this.StatMsg.Size = new System.Drawing.Size(307, 56);
|
||||
this.StatMsg.TabIndex = 2;
|
||||
this.StatMsg.Text = "Progress Bar";
|
||||
this.StatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// StatusBarFrm
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
||||
this.ClientSize = new System.Drawing.Size(350, 171);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.StatMsg);
|
||||
this.Controls.Add(this.lblBar);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "StatusBarFrm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Status";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.StatusBarFrm_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void StatusBarFrm_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return progressBar1.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value >= progressBar1.Maximum)
|
||||
progressBar1.Value = progressBar1.Maximum;
|
||||
else
|
||||
progressBar1.Value = value;
|
||||
UpateLabel();
|
||||
}
|
||||
}
|
||||
|
||||
public int Maximum
|
||||
{
|
||||
get
|
||||
{
|
||||
return progressBar1.Maximum;
|
||||
}
|
||||
set
|
||||
{
|
||||
progressBar1.Maximum = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Step
|
||||
{
|
||||
get
|
||||
{
|
||||
return progressBar1.Step;
|
||||
}
|
||||
set
|
||||
{
|
||||
progressBar1.Step = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void PerformStep()
|
||||
{
|
||||
progressBar1.PerformStep();
|
||||
}
|
||||
|
||||
private void UpateLabel()
|
||||
{
|
||||
lblBar.Text = (Math.Round((decimal)(progressBar1.Value * 100) / progressBar1.Maximum)).ToString();
|
||||
lblBar.Text += "% Complete";
|
||||
// if( lblBar.Text != strLblLast)
|
||||
// {
|
||||
// Profiler.Start("UpdateLabel");
|
||||
lblBar.Refresh();
|
||||
// lblBar.Update();
|
||||
// Profiler.End("UpdateLabel");
|
||||
// }
|
||||
// strLblLast = lblBar.Text;
|
||||
}
|
||||
|
||||
public string StatusMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatMsg.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatMsg.Text = value;
|
||||
// Profiler.Start("StatusMessage");
|
||||
StatMsg.Refresh();
|
||||
// StatMsg.Update();
|
||||
// Profiler.End("StatusMessage");
|
||||
}
|
||||
}
|
||||
|
||||
public string StatusBoxTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
157
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/StatusBarFrm.resx
Normal file
157
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/StatusBarFrm.resx
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="progressBar1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="progressBar1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="progressBar1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblBar.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblBar.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblBar.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="StatMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="StatMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="StatMsg.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>StatusBarFrm</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,140 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: StatusMessageFrm.cs $ $Revision: 3 $
|
||||
* $Author: Jsj $ $Date: 5/11/04 9:30a $
|
||||
*
|
||||
* $History: StatusMessageFrm.cs $
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 5/11/04 Time: 9:30a
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 3:38p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* Added overbounds check
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VlnStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Create status message window.
|
||||
/// </summary>
|
||||
public class StatusMessageFrm : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Label lblStatMsg;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public StatusMessageFrm()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public StatusMessageFrm(string StatTitle)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
Text = StatTitle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.lblStatMsg = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblStatMsg
|
||||
//
|
||||
this.lblStatMsg.Location = new System.Drawing.Point(19, 20);
|
||||
this.lblStatMsg.Name = "lblStatMsg";
|
||||
this.lblStatMsg.Size = new System.Drawing.Size(420, 81);
|
||||
this.lblStatMsg.TabIndex = 0;
|
||||
this.lblStatMsg.Text = "Put Satus Message Here";
|
||||
this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// StatusMessageFrm
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(7, 19);
|
||||
this.ClientSize = new System.Drawing.Size(457, 117);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.lblStatMsg);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "StatusMessageFrm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Status";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.StatusMessageFrm_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void StatusMessageFrm_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string StatusMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblStatMsg.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblStatMsg.Text = value;
|
||||
lblStatMsg.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public string StatusBoxTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
Text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,139 @@
|
||||
<?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="lblStatMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblStatMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblStatMsg.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>StatusMessageFrm</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
</root>
|
BIN
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/App.ico
Normal file
BIN
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/App.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -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.
|
||||
//
|
@@ -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("")]
|
||||
[assembly: AssemblyKeyName("")]
|
191
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/Form1.cs
Normal file
191
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/Form1.cs
Normal file
@@ -0,0 +1,191 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: Form1.cs $ $Revision: 5 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 11:06a $
|
||||
*
|
||||
* $History: Form1.cs $
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 11:06a
|
||||
* Updated in $/LibSource/VlnStatus/Test
|
||||
* add spinner test
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 4:25p
|
||||
* Updated in $/LibSource/VlnStatus/Test
|
||||
* updated test
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 3:37p
|
||||
* Updated in $/LibSource/VlnStatus/Test
|
||||
* added header
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using VlnStatus;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Test the status windows.
|
||||
/// </summary>
|
||||
public class Form1 : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Button btnTest;
|
||||
private System.Windows.Forms.Button btnStatMsg;
|
||||
private System.Windows.Forms.Button btnSpinner;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
/// <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.btnTest = new System.Windows.Forms.Button();
|
||||
this.btnStatMsg = new System.Windows.Forms.Button();
|
||||
this.btnSpinner = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnTest
|
||||
//
|
||||
this.btnTest.Location = new System.Drawing.Point(208, 64);
|
||||
this.btnTest.Name = "btnTest";
|
||||
this.btnTest.Size = new System.Drawing.Size(120, 23);
|
||||
this.btnTest.TabIndex = 0;
|
||||
this.btnTest.Text = "Test Status Bar";
|
||||
this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
|
||||
//
|
||||
// btnStatMsg
|
||||
//
|
||||
this.btnStatMsg.Location = new System.Drawing.Point(32, 64);
|
||||
this.btnStatMsg.Name = "btnStatMsg";
|
||||
this.btnStatMsg.Size = new System.Drawing.Size(144, 23);
|
||||
this.btnStatMsg.TabIndex = 1;
|
||||
this.btnStatMsg.Text = "Test Status Message";
|
||||
this.btnStatMsg.Click += new System.EventHandler(this.btnStatMsg_Click);
|
||||
//
|
||||
// btnSpinner
|
||||
//
|
||||
this.btnSpinner.Location = new System.Drawing.Point(360, 64);
|
||||
this.btnSpinner.Name = "btnSpinner";
|
||||
this.btnSpinner.Size = new System.Drawing.Size(104, 24);
|
||||
this.btnSpinner.TabIndex = 2;
|
||||
this.btnSpinner.Text = "Test Spinner";
|
||||
this.btnSpinner.Click += new System.EventHandler(this.btnSpinner_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(504, 149);
|
||||
this.Controls.Add(this.btnSpinner);
|
||||
this.Controls.Add(this.btnStatMsg);
|
||||
this.Controls.Add(this.btnTest);
|
||||
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 btnTest_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
int j=0, cnt = 2000;
|
||||
string StatStr = "Processing j= ";
|
||||
string NewStatBoxTitle = "Status left to do: ";
|
||||
// VlnStatusBar StatWindow = new VlnStatusBar(); // defaults to a title of "Status"
|
||||
VlnStatusBar StatWindow = new VlnStatusBar("Test Status Bar Window");
|
||||
StatWindow.BarMax = 2000;
|
||||
StatWindow.BarStepValue = 1;
|
||||
StatWindow.BarValue = 0;
|
||||
|
||||
|
||||
for (j=1; j <= 2000; j++)
|
||||
{
|
||||
StatWindow.StatMsg = StatStr + j.ToString();
|
||||
// can also change the status box title on the fly
|
||||
StatWindow.StatusBoxTitle = NewStatBoxTitle + cnt.ToString();
|
||||
// StatWindow.PerformStep(j);
|
||||
StatWindow.PerformStep();
|
||||
for (int k=0; k<5000; k++);
|
||||
cnt--;
|
||||
}
|
||||
StatWindow.Dispose();
|
||||
}
|
||||
|
||||
private void btnStatMsg_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
int j=0, cnt =2000;
|
||||
string StatStr = "Processing j= ";
|
||||
string NewStatBoxTitle = "Status left to do: ";
|
||||
// VlnStatusMessage StatMsgWindow = new VlnStatusMessage(); // defaults to a title of "Status"
|
||||
VlnStatusMessage StatMsgWindow = new VlnStatusMessage("Test Status Message Window");
|
||||
|
||||
for (j=1; j<= 2000; j++)
|
||||
{
|
||||
StatMsgWindow.StatusMessage = StatStr + j.ToString();
|
||||
// can also change the status box title on the fly
|
||||
StatMsgWindow.StatusBoxTitle = NewStatBoxTitle + cnt.ToString();
|
||||
for (int k=0; k < 5000; k++);
|
||||
cnt--;
|
||||
}
|
||||
StatMsgWindow.Dispose();
|
||||
}
|
||||
|
||||
private void btnSpinner_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
int cnt = 0;
|
||||
VlnSpinner spin = new VlnSpinner(2,25,"- Getting Lock Info for ","filename",true,true,true);
|
||||
while(spin.SpinnerWait(cnt>1000))
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
spin.Dispose();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
157
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/Form1.resx
Normal file
157
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/Form1.resx
Normal 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="btnTest.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnTest.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnTest.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnStatMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnStatMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnStatMsg.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnSpinner.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnSpinner.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnSpinner.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>Form1</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>
|
||||
</root>
|
124
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/Test.csproj
Normal file
124
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/Test/Test.csproj
Normal file
@@ -0,0 +1,124 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{551CB7BA-00B1-11D7-8590-482B59000000}"
|
||||
>
|
||||
<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 = "true"
|
||||
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:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "VlnStatus"
|
||||
Project = "{551CB7B3-00B1-11D7-8590-482B59000000}"
|
||||
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "App.ico"
|
||||
BuildAction = "Content"
|
||||
/>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.resx"
|
||||
DependentUpon = "Form1.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
167
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnSpinner.cs
Normal file
167
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnSpinner.cs
Normal file
@@ -0,0 +1,167 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VlnSpinner.cs $ $Revision: 2 $
|
||||
* $Author: Kathy $ $Date: 7/26/04 1:21p $
|
||||
*
|
||||
* $History: VlnSpinner.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 7/26/04 Time: 1:21p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* add comment
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 5/11/04 Time: 9:56a
|
||||
* Created in $/LibSource/VlnStatus
|
||||
* volian spinner control
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace VlnStatus
|
||||
{
|
||||
/*
|
||||
** The following values are taken by the Spinner class constructor:
|
||||
**
|
||||
** spindelay - is the number of seconds to wait before putting
|
||||
** up the message and spinner.
|
||||
**
|
||||
** spinfreq - is the minimum delay time in milliseconds before
|
||||
** returning to the caller.
|
||||
**
|
||||
** spinmsg1 - is a caller message put up with the spinner
|
||||
** spinmsg2 - is a second caller message concatenated to spinmsg1
|
||||
** both spinmsg1 and spinmsg2 may be NULL for no messages.
|
||||
**
|
||||
** AbortFlag - is a flag. If non-zero takes a DB_Exit(255)
|
||||
** if the user hits the Esc key while spinning.
|
||||
** can be defaulted.
|
||||
**
|
||||
**
|
||||
** SpinnerWait puts up a delayed message with a spinner.
|
||||
**
|
||||
** AutoTermFlag - spinner returns 0 if this value is non-zero
|
||||
** or Esc was pressed and AbortFlag not set.
|
||||
** A 1 is returned if AutoTermFlag is zero.
|
||||
**
|
||||
** The purpose of this function is to generate interruptable/abortable
|
||||
** while or do-while loops in code which is waiting for an event to
|
||||
** occur. Below is a simple example:
|
||||
**
|
||||
** { Spinner spin(2,25,"- Waiting for ", filename, 1);
|
||||
** while( spin.SpinnerWait( stat(filename,&temp) || temp.st_size ) {;}
|
||||
** }
|
||||
**
|
||||
** This loop returns zero if filename does not exist, or if it does
|
||||
** exist and has a non-zero length, otherwise it waits at least
|
||||
** 25 milliseconds, and returns 1 so that the predicate test
|
||||
** stat(filename,&temp) || temp.st_size
|
||||
** is tested again. If the loop continues for 2 seconds, a message
|
||||
** and spinner is posted. If the user presses the Esc key, DB_Exit(255)
|
||||
** is taken.
|
||||
**
|
||||
** Note, that the SpinnerWait function will close the message window
|
||||
** when the Spinner class object goes out of scope, as the desctructor
|
||||
** handles the window closures. Note also, that a new instance of the
|
||||
** object must be generated with each use.
|
||||
*/
|
||||
public class VlnSpinner
|
||||
{
|
||||
SpinnerFrm spinFrm;
|
||||
private int spinstart;
|
||||
private int spindelay;
|
||||
private int spinfreq;
|
||||
private string spinmsg1;
|
||||
private string spinmsg2;
|
||||
private bool abortflag;
|
||||
private bool canCancel;
|
||||
private string msgprefix;
|
||||
private bool firstspin;
|
||||
private bool firstpass;
|
||||
|
||||
public VlnSpinner(int sd, int sf, string sm1, string sm2, bool af, bool prefix, bool showCancel)
|
||||
{
|
||||
spindelay=sd;
|
||||
spinfreq=sf;
|
||||
spinmsg1=sm1;
|
||||
spinmsg2=sm2;
|
||||
abortflag=af;
|
||||
canCancel = showCancel;
|
||||
firstpass=true;
|
||||
firstspin=true;
|
||||
|
||||
spinFrm = null;
|
||||
if(prefix)
|
||||
msgprefix="Database File in Use by another user \n";
|
||||
else
|
||||
msgprefix=" ";
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if(spinFrm!=null) spinFrm.Dispose();
|
||||
}
|
||||
|
||||
public bool SpinnerWait(bool AutoTermFlag)
|
||||
{
|
||||
if( !AutoTermFlag )
|
||||
{
|
||||
if( firstpass )
|
||||
{
|
||||
// Tick is equal to 100 nanoseconds.
|
||||
// nanosecond is 1 billionth of a second.
|
||||
spinstart = (int)(DateTime.Now.Ticks/10000000) + spindelay;
|
||||
firstpass = false;
|
||||
}
|
||||
if( !firstspin )
|
||||
{
|
||||
SpinnerTick();
|
||||
TickTock(spinfreq);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(spinstart <= (int)(DateTime.Now.Ticks/10000000)) SpinnerTick();
|
||||
TickTock(spinfreq);
|
||||
}
|
||||
}
|
||||
return (!AutoTermFlag);
|
||||
}
|
||||
private void TickTock(int spinfreq)
|
||||
{
|
||||
long cur = DateTime.Now.Ticks;
|
||||
long getto = cur+(spinfreq*100);
|
||||
while (cur <= getto)
|
||||
cur = DateTime.Now.Ticks;
|
||||
}
|
||||
|
||||
private void SpinMessage(string msg1,string msg2,string msg3,int len)
|
||||
{
|
||||
StringBuilder buff = new StringBuilder(80);
|
||||
buff.Append(msg1);
|
||||
if (msg2!=null)buff.Append(msg2);
|
||||
if (msg3!=null)buff.Append(msg3);
|
||||
spinFrm.UpdateSpinMsg(buff.ToString());
|
||||
}
|
||||
|
||||
private void SpinnerTick()
|
||||
{
|
||||
int windowcol;
|
||||
if(firstspin)
|
||||
{
|
||||
windowcol=msgprefix.Length+2;
|
||||
if(spinmsg1!=null) windowcol+=spinmsg1.Length;
|
||||
if(spinmsg2!=null) windowcol+=spinmsg2.Length;
|
||||
spinFrm = new SpinnerFrm(abortflag, canCancel);
|
||||
spinFrm.Show();
|
||||
SpinMessage(msgprefix,spinmsg1,spinmsg2,windowcol+1);
|
||||
firstspin = false;
|
||||
}
|
||||
spinFrm.UpdateSpin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
125
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnStatus.csproj
Normal file
125
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnStatus.csproj
Normal file
@@ -0,0 +1,125 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{551CB7B3-00B1-11D7-8590-482B59000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>VlnStatus</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>VlnStatus</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<Name>System.Drawing</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="StatusBarFrm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="StatusMessageFrm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VlnStatusBar.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="VlnStatusMessage.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="StatusBarFrm.resx">
|
||||
<DependentUpon>StatusBarFrm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="StatusMessageFrm.resx">
|
||||
<DependentUpon>StatusMessageFrm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
28
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnStatus.sln
Normal file
28
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnStatus.sln
Normal file
@@ -0,0 +1,28 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VlnStatus", "VlnStatus.csproj", "{551CB7B3-00B1-11D7-8590-482B59000000}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{551CB7BA-00B1-11D7-8590-482B59000000}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug.ActiveCfg = Debug|.NET
|
||||
{551CB7B3-00B1-11D7-8590-482B59000000}.Debug.Build.0 = Debug|.NET
|
||||
{551CB7B3-00B1-11D7-8590-482B59000000}.Release.ActiveCfg = Release|.NET
|
||||
{551CB7B3-00B1-11D7-8590-482B59000000}.Release.Build.0 = Release|.NET
|
||||
{551CB7BA-00B1-11D7-8590-482B59000000}.Debug.ActiveCfg = Debug|.NET
|
||||
{551CB7BA-00B1-11D7-8590-482B59000000}.Release.ActiveCfg = Release|.NET
|
||||
{551CB7BA-00B1-11D7-8590-482B59000000}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
148
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnStatusBar.cs
Normal file
148
PROMS/ReferencedObjectsOld/LibSource/VlnStatus/VlnStatusBar.cs
Normal file
@@ -0,0 +1,148 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VlnStatusBar.cs $ $Revision: 4 $
|
||||
* $Author: Jsj $ $Date: 11/26/02 4:25p $
|
||||
*
|
||||
* $History: VlnStatusBar.cs $
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 4:25p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* fixed problem with counter
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 3:38p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* Added overbounds check
|
||||
*********************************************************************************************/
|
||||
using System;
|
||||
|
||||
namespace VlnStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a Status Window with a progression bar control.
|
||||
///
|
||||
/// This class has two constructors. One allows you to pass in the title
|
||||
/// of the Status Box. The Other provides a default title of "Status".
|
||||
/// The Status Box Title can also be set/changed via the StatusBoxTitle
|
||||
/// property.
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public class VlnStatusBar
|
||||
{
|
||||
StatusBarFrm StatBar;
|
||||
private int Cnt;
|
||||
|
||||
// Create a status window with the default title of "Status"
|
||||
public VlnStatusBar()
|
||||
{
|
||||
StatBar = new StatusBarFrm();
|
||||
StatBar.Show();
|
||||
}
|
||||
|
||||
// Create a status window with the passed in title
|
||||
public VlnStatusBar(string Title)
|
||||
{
|
||||
StatBar = new StatusBarFrm(Title);
|
||||
StatBar.Show();
|
||||
}
|
||||
|
||||
// Increament the the status bar by the passed in value.
|
||||
public void PerformStep(int val)
|
||||
{
|
||||
// StatBar.Value = val;
|
||||
// Cnt = val;
|
||||
BarValue = val;
|
||||
StatBar.PerformStep();
|
||||
}
|
||||
|
||||
// Increament the the status bar by one
|
||||
public void PerformStep()
|
||||
{
|
||||
// StatBar.Value = StatBar.Value + 1;
|
||||
Cnt++;
|
||||
BarValue = Cnt;
|
||||
StatBar.PerformStep();
|
||||
}
|
||||
|
||||
// This property gets or sets the current status bar value.
|
||||
public int BarValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatBar.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatBar.Value = value;
|
||||
Cnt = value;
|
||||
}
|
||||
}
|
||||
|
||||
// This property sets or gets the maximum value that the
|
||||
// BarValue property can be. i.e. when BarValue reaches this
|
||||
// number, the status bar is completely displayed.
|
||||
public int BarMax
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatBar.Maximum;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatBar.Maximum = value;
|
||||
}
|
||||
}
|
||||
|
||||
// This property sets or gets the increamenting value used to
|
||||
// move the status bar. For example, if set to 5, each tick of
|
||||
// the status bar represents a value of 5.
|
||||
public int BarStepValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatBar.Step;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatBar.Step = value;
|
||||
}
|
||||
}
|
||||
|
||||
// This property sets or gets the message above the status bar.
|
||||
public string StatMsg
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatBar.StatusMessage;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatBar.StatusMessage = value;
|
||||
}
|
||||
}
|
||||
|
||||
// This property sets or gets the Status Window Title
|
||||
public string StatusBoxTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatBar.StatusBoxTitle;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatBar.StatusBoxTitle = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StatBar.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,79 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VlnStatusMessage.cs $ $Revision: 3 $
|
||||
* $Author: Jsj $ $Date: 11/26/02 3:38p $
|
||||
*
|
||||
* $History: VlnStatusMessage.cs $
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 11/26/02 Time: 3:38p
|
||||
* Updated in $/LibSource/VlnStatus
|
||||
* Added overbounds check
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
|
||||
namespace VlnStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a Status Window to display a status message.
|
||||
///
|
||||
/// This class has two constructors. One allows you to pass in the title
|
||||
/// of the Status Box. The Other provides a default title of "Status".
|
||||
/// The Status Box Title can also be set/changed via the StatusBoxTitle
|
||||
/// property.
|
||||
///
|
||||
/// </summary>
|
||||
public class VlnStatusMessage
|
||||
{
|
||||
StatusMessageFrm StatusMessageBox;
|
||||
|
||||
// Create a status window with the default title of "Status"
|
||||
public VlnStatusMessage()
|
||||
{
|
||||
StatusMessageBox = new StatusMessageFrm();
|
||||
StatusMessageBox.Show();
|
||||
}
|
||||
|
||||
// Create a status window with the passed in title.
|
||||
public VlnStatusMessage(string StatusBoxTitle)
|
||||
{
|
||||
StatusMessageBox = new StatusMessageFrm(StatusBoxTitle);
|
||||
StatusMessageBox.Show();
|
||||
}
|
||||
|
||||
// This property gets or sets the current status message
|
||||
public string StatusMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatusMessageBox.StatusMessage;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatusMessageBox.StatusMessage = value;
|
||||
}
|
||||
}
|
||||
|
||||
// This property gets or sets the status box title
|
||||
public string StatusBoxTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatusMessageBox.StatusBoxTitle;
|
||||
}
|
||||
set
|
||||
{
|
||||
StatusMessageBox.StatusBoxTitle = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StatusMessageBox.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
@@ -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>
|
@@ -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")]
|
@@ -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("")];
|
||||
|
@@ -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;
|
||||
}
|
@@ -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);
|
||||
};
|
||||
}
|
@@ -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
|
@@ -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>
|
@@ -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.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
@@ -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"
|
@@ -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>
|
||||
|
@@ -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.
|
||||
//
|
@@ -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("")]
|
@@ -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>
|
||||
|
@@ -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
@@ -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
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user