Commit for development environment setup

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

View File

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

View File

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

View File

@@ -0,0 +1,211 @@
using System;
using System.Xml;
using System.Text;
namespace VlnXml
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class VlnXmlDocument:XmlDocument
{
public VlnXmlDocument():base()
{
}
public override XmlElement CreateElement( string prefix, string localname, string nsURI)
{
VlnXmlElement elem = new VlnXmlElement(prefix, localname, nsURI, this);
return elem;
}
}
public class VlnXmlElement:XmlElement
{
public VlnXmlElement( string prefix, string localname, string nsURI, XmlDocument doc ):base( prefix,localname,nsURI, doc )
{
}
public string GetMenuString(string grpmenuitm, bool isgrp)
{
VlnXmlElement elm = this;
StringBuilder strbld = new StringBuilder();
bool usespecial; // flags need for (Table) or (Graph)
string strspecial="";
// use grpmenuitm, parse for field(s) and generate a string to return
int left = grpmenuitm.IndexOf("<");
int right;
int stindx = 0;
if (left > 0) strbld.Append(grpmenuitm.Substring(0,left));
while (left != -1)
{
// get right bracket and then check for valid field & if commas with
// this, check for integer values.
right = grpmenuitm.IndexOf(">",stindx);
string substring = grpmenuitm.Substring(left+1,right-left-1);
// do comma parts now.
string inusename;
substring = substring.Replace(" ","_");
int comma1 = substring.IndexOf(",");
int frmt1=0, frmt2=0;
if (comma1 != -1)
{
// get any numbers for formatting & check for ints.
int comma2 = substring.IndexOf(",",comma1+1);
if (comma2 != -1) // two ints.
{
if (comma2-comma1 > 1) // first format field - not empty
{
string int1 = substring.Substring(comma1+1,comma2-comma1-1);
frmt1 = System.Convert.ToInt32(int1);
}
if (comma2<substring.Length) // second part - not empty
{
string int2 = substring.Substring(comma2+1,substring.Length-comma2-1);
frmt2 = System.Convert.ToInt32(int2);
}
}
else // just one format
{
string int1 = substring.Substring(comma1,comma2-comma1);
frmt1 = System.Convert.ToInt32(int1);
}
inusename = substring.Substring(0,comma1);
}
else // no commas, it's just a field name.
inusename = substring;
// get contents of field & append it onto the string builder.
usespecial = false;
XmlNode elmnode = (XmlNode) elm;
XmlNode nd = elmnode.SelectSingleNode(inusename);
// if not found it may be a combination, try this.
if (nd == null)
{
string tmp = inusename + "a";
nd = elmnode.SelectSingleNode(tmp);
}
if (nd == null)
{
string tmp = inusename + "b";
nd = elmnode.SelectSingleNode(tmp);
}
if (nd == null)
{
string tmp = inusename + "c";
nd = elmnode.SelectSingleNode(tmp);
if (nd!=null)
{
usespecial = true;
strspecial = "(Table)";
}
}
if (nd == null)
{
string tmp = inusename + "d";
nd = elmnode.SelectSingleNode(tmp);
if (nd!=null)
{
usespecial = true;
strspecial = "(Graph)";
}
}
if(nd != null)
{
string text;
if (usespecial)
text = strspecial;
else
text = nd.InnerText;
if (isgrp)
{
if (frmt2 != 0)
strbld.Append(text.Replace("_"," ").PadRight(frmt2,' '));
else
strbld.Append(text.Replace("_"," "));
}
else
{
if (frmt1 == 0)
{
if (frmt2>0)
strbld.Append(text.PadRight(frmt2,' '));
else
strbld.Append(text);
}
else if (frmt1 != frmt2)
{
char[] tmp = text.ToCharArray();
int cnt = 0;
while (tmp[cnt] <= '9' && tmp[cnt] >= '0') cnt++;
int padcnt = (cnt>frmt1)?0:frmt1-cnt;
StringBuilder strtmp = new StringBuilder();
cnt = 0;
while(cnt<padcnt)
{
strtmp.Append(" ");
cnt++;
}
strtmp.Append(text);
string tmpstr = strtmp.ToString();
strbld.Append(tmpstr.PadRight(frmt2,' '));
}
else
strbld.Append(text.PadLeft(frmt2,' '));
}
}
stindx = right+1;
left = grpmenuitm.IndexOf("<",left+1);
if (left != -1 && left > right+1) // append any plain text.
strbld.Append(grpmenuitm.Substring(right+1,left-right-1));
}
return strbld.ToString();
}
public string GetMenuValueTemplate(string menuitm)
{
VlnXmlElement parent;
string grpmenuitm;
VlnXmlElement tmp;
if (menuitm == "GroupMenuItem")
{
// if at top of tree, use this top GroupMenuItem. but if not,
// the parent node defines the GroupMenuItem for the subgroups.
if (this.ParentNode.Name == "RO_Root")
{
tmp = (VlnXmlElement) this.ParentNode;
grpmenuitm=tmp.GetAttribute(menuitm);
return(grpmenuitm);
}
else
parent = (VlnXmlElement) this.ParentNode;
while (parent != null)
{
if (parent.HasAttribute(menuitm) == true) break;
parent = (VlnXmlElement) parent.ParentNode;
}
if (parent == null) return null;
grpmenuitm = parent.GetAttribute(menuitm);
return grpmenuitm;
}
// Now just do 'MenuItem', which is for ROs
parent = (VlnXmlElement) this;
grpmenuitm = parent.GetAttribute(menuitm);
while (parent != null && grpmenuitm == "")
{
// walk up tree to get parent.
grpmenuitm = parent.GetAttribute(menuitm);
parent = (VlnXmlElement) parent.ParentNode;
}
return grpmenuitm;
}
}
}

View File

@@ -0,0 +1,100 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{9CE514CA-C4C5-11D6-84E8-00A0CC271352}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "VlnXml"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "VlnXml"
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.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "VlnXml.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>