Support for other encodings besides ASCII. Constructors available in BMXNetLib and and BMXNetConnectInfo.

Comments in several files.
This commit is contained in:
sam 2010-07-06 12:09:10 +00:00
parent af388d6c6f
commit 130cc97d16
10 changed files with 461 additions and 272 deletions

View File

@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMXNetTest", "BMXNetTest\BM
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMXNet", "BMXNet\BMXNet.csproj", "{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMXCmdTester", "BMXCmdTester\BMXCmdTester.csproj", "{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -21,6 +23,10 @@ Global
{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Release|Any CPU
{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Binary file not shown.

View File

@ -10,7 +10,7 @@
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>BMXNet20</AssemblyName>
<AssemblyName>BMXNet21</AssemblyName>
<AssemblyOriginatorKeyFile>wv.key.snk</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
@ -51,7 +51,7 @@
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>DEBUG</DefineConstants>
<DocumentationFile>bmxnet.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
@ -72,7 +72,8 @@
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>
</DefineConstants>
<DocumentationFile>bmxnet.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>

View File

@ -76,9 +76,7 @@ namespace IndianHealthService.BMXNet
* Implement abstract methods inherited from DbDataAdapter.
*/
public override int Fill(
DataSet ds
)
public override int Fill(DataSet ds)
{
//The inital call to base.fill calls the RPC which loads up the array
//After base.fill returns, create a datareader

View File

@ -56,16 +56,27 @@ namespace IndianHealthService.BMXNet
}
}
public BMXNetConnectInfo()
{
m_BMXNetLib = new BMXNetLib();
/// <summary>
/// BMXNetConnector With Default Encoding (invokes BMXNetLib)
/// </summary>
public BMXNetConnectInfo() : this("") { }
//Initialize BMXNetEvent timer
m_timerEvent = new System.Timers.Timer();
m_timerEvent.Elapsed+=new ElapsedEventHandler(OnEventTimer);
m_timerEvent.Interval = 10000;
m_timerEvent.Enabled = false;
}
/// <summary>
/// BMXNetConnector with a specific encoding
/// </summary>
/// <param name="encoding">String representation of encoding (e.g. windows-1256 for arabic).
/// If encoding is not found, we fall back to the default windows encoding. A debug message
/// is printed to that effect.</param>
public BMXNetConnectInfo(string encoding)
{
if (encoding == String.Empty) m_BMXNetLib = new BMXNetLib();
else m_BMXNetLib = new BMXNetLib(encoding);
m_timerEvent = new System.Timers.Timer();
m_timerEvent.Elapsed += new ElapsedEventHandler(OnEventTimer);
m_timerEvent.Interval = 10000;
m_timerEvent.Enabled = false;
}
#region BMXNetEvent

View File

@ -20,7 +20,10 @@ namespace IndianHealthService.BMXNet
[DnsPermission(SecurityAction.Assert, Unrestricted = true)]
public class BMXNetLib
{
public BMXNetLib()
/// <summary>
/// Main constructor with default machine encoding
/// </summary>
public BMXNetLib()
{
m_sWKID = "BMX";
m_sWINH = "";
@ -29,6 +32,32 @@ namespace IndianHealthService.BMXNet
m_cHDR = ADEBHDR(m_sWKID,m_sWINH,m_sPRCH,m_sWISH);
}
/// <summary>
/// Constructor specifiying encoding
/// </summary>
/// <param name="charset">String name of character set</param>
public BMXNetLib(string charset) : this()
{
//char[] arabic_nm_ch = arabic_name.ToCharArray();
//byte[] arabic_nm_by = cp1256.GetBytes(arabic_nm_ch);
//string arabic_name2 = "";
//foreach (byte eachbyte in arabic_nm_by)
//{
// arabic_name2 += ((char)eachbyte);
//}
try
{
m_Encoding = System.Text.Encoding.GetEncoding(charset);
}
catch (ArgumentException)
{
Debug.Write("Invalid Code Page... Falling back to default system encoding");
m_Encoding = Encoding.GetEncoding(0);
}
}
#region Piece Functions
@ -139,6 +168,8 @@ namespace IndianHealthService.BMXNet
private string m_sNameSpace = "";
private int m_nReceiveTimeout = 30000;
private Encoding m_Encoding = Encoding.GetEncoding(0);
#endregion RPX Fields
#region Encryption Keys
@ -801,7 +832,7 @@ namespace IndianHealthService.BMXNet
cSendString = cSendString + cMult;
NetworkStream ns = tcpClient.GetStream();
byte[] sendBytes = Encoding.ASCII.GetBytes(cSendString);
byte[] sendBytes = m_Encoding.GetBytes(cSendString);
ns.Write(sendBytes,0,sendBytes.Length);
if (this.m_bLogging == true)
{
@ -851,7 +882,6 @@ namespace IndianHealthService.BMXNet
string sAppError = "";
do
{
numberOfBytesRead = ns.Read(bReadBuffer, 0, bReadBuffer.Length);
if ((numberOfBytesRead == 1)&&(bStarted == false))
{
@ -868,12 +898,12 @@ namespace IndianHealthService.BMXNet
{ //special case: M error trap invoked in SND^XWBTCPC
lpBuf += 2;
}
sError = Encoding.ASCII.GetString(bReadBuffer, lpBuf + 1, nErrLen);
sError = m_Encoding.GetString(bReadBuffer, lpBuf + 1, nErrLen);
if (sError != "")
{
throw new BMXNetException(sError);
}
sAppError = Encoding.ASCII.GetString(bReadBuffer, lpBuf+1+nErrLen+1, nAppLen);
sAppError = m_Encoding.GetString(bReadBuffer, lpBuf+1+nErrLen+1, nAppLen);
lpBuf += (nErrLen + nAppLen + 2);
numberOfBytesRead -= (nErrLen + nAppLen + 2);
bStarted = true;
@ -883,7 +913,7 @@ namespace IndianHealthService.BMXNet
if (nFind > -1)
bFinished = true;
Debug.Assert(numberOfBytesRead > -1);
sReadBuffer = Encoding.ASCII.GetString(bReadBuffer, lpBuf, numberOfBytesRead);
sReadBuffer = m_Encoding.GetString(bReadBuffer, lpBuf, numberOfBytesRead);
lpBuf = 0;
if (nFind > -1)
{
@ -1314,6 +1344,21 @@ namespace IndianHealthService.BMXNet
}
}
/// <summary>
/// Gets or Sets the Default Encoder to use
/// </summary>
public Encoding Encoder
{
get
{
return this.m_Encoding;
}
set
{
this.m_Encoding = Encoder;
}
}
#endregion RPX Properties
}

View File

@ -164,16 +164,21 @@ namespace IndianHealthService.BMXNet
int nMaxSize;
Type tType;
int nTemp = 10;
int nTemp = 10; //length of @@@meta@@@
//actual header
sHeader = sHeader.Substring(10,(sHeader.Length - nTemp));
string[] sRecordSetInfo = sHeader.Split(cFldDelim);
//substract one because 1st item is RecordId|File# -- rest is columns
numCols = sRecordSetInfo.GetLength(0)-1;
m_aResultSets[nSet].metaData = new RPMSDbResultSet.MetaData[numCols];
//First ^-Piece is recordset-level info: RecordIdentifier|File#
//Set FileID
//First ^-Piece is recordset-level info: RecordIdentifier|File#
string[] sRecordInfo = sRecordSetInfo[0].Split(cBar);
m_aResultSets[nSet].fmFileID = sRecordInfo[1];
//What is the seed???
if (sRecordInfo.GetLength(0) > 2)
{
sSeed = sRecordInfo[2];
@ -189,6 +194,7 @@ namespace IndianHealthService.BMXNet
}
}
// Foreign key is included
if (sRecordInfo.GetLength(0) > 3)
{
m_aResultSets[nSet].fmForeignKey = sRecordInfo[4];
@ -196,7 +202,7 @@ namespace IndianHealthService.BMXNet
}
m_aResultSets[nSet].fmKeyField = "";
//2nd through nth ^-Pieces are Column info: Fileman File#FileMan Field#|DataType|Field Length|Column Name|IsReadOnly|IsKeyField
//2nd through nth ^-Pieces are Column info: Fileman File#|FileMan Field#|DataType|Field Length|Column Name|IsReadOnly|IsKeyField|????
for (j=1; j < sRecordSetInfo.GetLength(0); j++)
{
string[] sColumnInfo = sRecordSetInfo[j].Split(cBar);
@ -207,6 +213,7 @@ namespace IndianHealthService.BMXNet
//Field 4 = ColumnName
//Field 5 = IsReadOnly
//Field 6 = IsKeyField
//Field 7 {MISSING}
sFileID = sColumnInfo[0];
string sFieldID = sColumnInfo[1];
@ -301,6 +308,7 @@ namespace IndianHealthService.BMXNet
string sFldDelim = "^";
char[] cFldDelim = sFldDelim.ToCharArray();
// nRecords-1 because last record is empty (Where $C(31) (end of record) is)
m_aResultSets[nSet].data = new object[nRecords-1, numCols];
string[] saRecord;
int j;
@ -309,6 +317,8 @@ namespace IndianHealthService.BMXNet
saRecord = sResultArray[j].Split(cFldDelim);
for (int k = 0; k< saRecord.GetLength(0); k++)
{
//Date Time validation
//TODO: Support Fileman DateTime
if (m_aResultSets[nSet].metaData[k].type == typeof(DateTime))
{
if (saRecord[k] == "")
@ -384,7 +394,9 @@ namespace IndianHealthService.BMXNet
int[] naHeaderIndex; //Location (index) of header records in sResultArray
int nRecordSetCount; //Count of recordsets
//Gets Records[sets] (val is number of records for each set), Headers[sets] (val is header location in array), and number of record sets.
IndexRecords(sResultArray, out naRecords, out naHeaderIndex, out nRecordSetCount);
//Create array of result sets
m_aResultSets = new RPMSDbResultSet[nRecordSetCount];
for (int nSet = 0; nSet < nRecordSetCount; nSet++)

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BMXNet20</name>
<name>BMXNet21</name>
</assembly>
<members>
<member name="T:IndianHealthService.BMXNet.DServerInfo">
@ -82,6 +82,17 @@
BMXNetLib to connect.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor">
<summary>
Main constructor with default machine encoding
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor(System.String)">
<summary>
Constructor specifiying encoding
</summary>
<param name="charset">String name of character set</param>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.PieceLength(System.String,System.String)">
<summary>
Corresponds to M's $L(STRING,DELIMITER)
@ -189,6 +200,11 @@
Throws an exception if unable to set the context.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.Encoder">
<summary>
Gets or Sets the Default Encoder to use
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.BMXNetException">
<summary>
Custom exception class for BMXNet
@ -247,6 +263,19 @@
Contains methods and properties to support RPMS Login for .NET applications
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor">
<summary>
BMXNetConnector With Default Encoding (invokes BMXNetLib)
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor(System.String)">
<summary>
BMXNetConnector with a specific encoding
</summary>
<param name="encoding">String representation of encoding (e.g. windows-1256 for arabic).
If encoding is not found, we fall back to the default windows encoding. A debug message
is printed to that effect.</param>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.SubscribeEvent(System.String)">
<summary>
Register interest in an RPMS event.

View File

@ -1,9 +1,215 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BMXNet20</name>
<name>BMXNet21</name>
</assembly>
<members>
<member name="T:IndianHealthService.BMXNet.DServerInfo">
<summary>
Prompts for RPMS Server address and port
Obtains current values, if any, from isolated storage
and uses them as defaults.
If OK, then writes values to isolated storage and returns
Address and Port as properties.
</summary>
</member>
<member name="F:IndianHealthService.BMXNet.DServerInfo.components">
<summary>
Required designer variable.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DServerInfo.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DServerInfo.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DServerInfo.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data
otherwise, moves control data into member vars
</summary>
<param name="b"></param>
</member>
<member name="P:IndianHealthService.BMXNet.DServerInfo.MServerAddress">
<summary>
Gets/sets the internet address of the RPMS Server
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.DServerInfo.MServerNamespace">
<summary>
Gets/sets the namespace of the RPMS Server
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.DServerInfo.MServerPort">
<summary>
Gets/sets the TCP/IP Port of the RPMS Server
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.DSelectDivision">
<summary>
Summary description for DSelectDivision.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DSelectDivision.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DSelectDivision.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data
otherwise, moves control data into member vars
</summary>
<param name="b"></param>
</member>
<member name="M:IndianHealthService.BMXNet.DSelectDivision.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.BMXNetLib">
<summary>
BMXNetLib implements low-level socket connectivity to RPMS databases.
The VA RPC Broker must be running on the RPMS server in order for
BMXNetLib to connect.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor">
<summary>
Main constructor with default machine encoding
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor(System.String)">
<summary>
Constructor specifiying encoding
</summary>
<param name="charset">String name of character set</param>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.PieceLength(System.String,System.String)">
<summary>
Corresponds to M's $L(STRING,DELIMITER)
</summary>
<param name="sInput"></param>
<param name="sDelim"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.Piece(System.String,System.String,System.Int32)">
<summary>
Corresponds to M's $$Piece function
</summary>
<param name="sInput"></param>
<param name="sDelim"></param>
<param name="nNumber"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String)">
<summary>
Given strInput = "13" builds "013" if nLength = 3. Default for nLength is 3.
</summary>
<param name="strInput"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String,System.Int32)">
<summary>
Given strInput = "13" builds "013" if nLength = 3 Default for nLength is 3.
</summary>
<param name="strInput"></param>
<param name="nLength">Default = 3</param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String)">
<summary>
Concatenates zero-padded length of sInput to sInput
Given "Hello" returns "004Hello"
If nSize = 5, returns "00004Hello"
Default for nSize is 3.
</summary>
<param name="sInput"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String,System.Int32)">
<summary>
Concatenates zero-padded length of sInput to sInput
Given "Hello" returns "004Hello"
If nSize = 5, returns "00004Hello"
Default for nSize is 3.
</summary>
<param name="sInput"></param>
<param name="nSize"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBHDR(System.String,System.String,System.String,System.String)">
<summary>
Build protocol header
</summary>
<param name="sWKID"></param>
<param name="sWINH"></param>
<param name="sPRCH"></param>
<param name="sWISH"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.FindSubString(System.String,System.String)">
<summary>
Returns index of first instance of sSubString in sString.
If sSubString not found, returns -1.
</summary>
<param name="sString"></param>
<param name="sSubString"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.Lock(System.String,System.String,System.String)">
<summary>
Lock a local or global M variable
Returns true if lock is obtained during TimeOut seconds
Use + to increment, - to decrement lock.
</summary>
<param name="Variable"></param>
<param name="Increment"></param>
<param name="TimeOut"></param>
<returns></returns>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.BMXRWL">
<summary>
Returns a reference to the internal ReaderWriterLock member.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.RWLTimeout">
<summary>
Sets and returns the timeout in milliseconds for locking the transmit port.
If the transmit port is unavailable an ApplicationException will be thrown.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.ReceiveTimeout">
<summary>
Set and retrieve the timeout, in milliseconds, to receive a response from the RPMS server.
If the retrieve time exceeds the timeout, an exception will be thrown and the connection will be closed.
The default is 30 seconds.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.AppContext">
<summary>
Gets/sets the Kernel Application context
Throws an exception if unable to set the context.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.Encoder">
<summary>
Gets or Sets the Default Encoder to use
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.BMXNetException">
<summary>
Custom exception class for BMXNet
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.RPMSDb.ResultSets">
<summary>
Returns the array of RMPSResultSets retrieved from RPMS
@ -14,11 +220,62 @@
Sets and Returns the current recordset
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.DLoginInfo">
<summary>
Summary description for DLoginInfo.
</summary>
</member>
<member name="F:IndianHealthService.BMXNet.DLoginInfo.components">
<summary>
Required designer variable.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DLoginInfo.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DLoginInfo.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DLoginInfo.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data
otherwise, moves control data into member vars
</summary>
<param name="b"></param>
</member>
<member name="P:IndianHealthService.BMXNet.DLoginInfo.AccessCode">
<summary>
Gets the access code entered by the user.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.DLoginInfo.VerifyCode">
<summary>
Gets the verify code entered by the user.
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.BMXNetConnectInfo">
<summary>
Contains methods and properties to support RPMS Login for .NET applications
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor">
<summary>
BMXNetConnector With Default Encoding (invokes BMXNetLib)
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor(System.String)">
<summary>
BMXNetConnector with a specific encoding
</summary>
<param name="encoding">String representation of encoding (e.g. windows-1256 for arabic).
If encoding is not found, we fall back to the default windows encoding. A debug message
is printed to that effect.</param>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.SubscribeEvent(System.String)">
<summary>
Register interest in an RPMS event.
@ -186,233 +443,5 @@
Serializes RPMS server address and port
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.DServerInfo">
<summary>
Prompts for RPMS Server address and port
Obtains current values, if any, from isolated storage
and uses them as defaults.
If OK, then writes values to isolated storage and returns
Address and Port as properties.
</summary>
</member>
<member name="F:IndianHealthService.BMXNet.DServerInfo.components">
<summary>
Required designer variable.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DServerInfo.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DServerInfo.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DServerInfo.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data
otherwise, moves control data into member vars
</summary>
<param name="b"></param>
</member>
<member name="P:IndianHealthService.BMXNet.DServerInfo.MServerAddress">
<summary>
Gets/sets the internet address of the RPMS Server
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.DServerInfo.MServerNamespace">
<summary>
Gets/sets the namespace of the RPMS Server
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.DServerInfo.MServerPort">
<summary>
Gets/sets the TCP/IP Port of the RPMS Server
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.DSelectDivision">
<summary>
Summary description for DSelectDivision.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DSelectDivision.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DSelectDivision.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data
otherwise, moves control data into member vars
</summary>
<param name="b"></param>
</member>
<member name="M:IndianHealthService.BMXNet.DSelectDivision.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.BMXNetLib">
<summary>
BMXNetLib implements low-level socket connectivity to RPMS databases.
The VA RPC Broker must be running on the RPMS server in order for
BMXNetLib to connect.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.PieceLength(System.String,System.String)">
<summary>
Corresponds to M's $L(STRING,DELIMITER)
</summary>
<param name="sInput"></param>
<param name="sDelim"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.Piece(System.String,System.String,System.Int32)">
<summary>
Corresponds to M's $$Piece function
</summary>
<param name="sInput"></param>
<param name="sDelim"></param>
<param name="nNumber"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String)">
<summary>
Given strInput = "13" builds "013" if nLength = 3. Default for nLength is 3.
</summary>
<param name="strInput"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String,System.Int32)">
<summary>
Given strInput = "13" builds "013" if nLength = 3 Default for nLength is 3.
</summary>
<param name="strInput"></param>
<param name="nLength">Default = 3</param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String)">
<summary>
Concatenates zero-padded length of sInput to sInput
Given "Hello" returns "004Hello"
If nSize = 5, returns "00004Hello"
Default for nSize is 3.
</summary>
<param name="sInput"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String,System.Int32)">
<summary>
Concatenates zero-padded length of sInput to sInput
Given "Hello" returns "004Hello"
If nSize = 5, returns "00004Hello"
Default for nSize is 3.
</summary>
<param name="sInput"></param>
<param name="nSize"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBHDR(System.String,System.String,System.String,System.String)">
<summary>
Build protocol header
</summary>
<param name="sWKID"></param>
<param name="sWINH"></param>
<param name="sPRCH"></param>
<param name="sWISH"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.FindSubString(System.String,System.String)">
<summary>
Returns index of first instance of sSubString in sString.
If sSubString not found, returns -1.
</summary>
<param name="sString"></param>
<param name="sSubString"></param>
<returns></returns>
</member>
<member name="M:IndianHealthService.BMXNet.BMXNetLib.Lock(System.String,System.String,System.String)">
<summary>
Lock a local or global M variable
Returns true if lock is obtained during TimeOut seconds
Use + to increment, - to decrement lock.
</summary>
<param name="Variable"></param>
<param name="Increment"></param>
<param name="TimeOut"></param>
<returns></returns>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.BMXRWL">
<summary>
Returns a reference to the internal ReaderWriterLock member.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.RWLTimeout">
<summary>
Sets and returns the timeout in milliseconds for locking the transmit port.
If the transmit port is unavailable an ApplicationException will be thrown.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.ReceiveTimeout">
<summary>
Set and retrieve the timeout, in milliseconds, to receive a response from the RPMS server.
If the retrieve time exceeds the timeout, an exception will be thrown and the connection will be closed.
The default is 30 seconds.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.BMXNetLib.AppContext">
<summary>
Gets/sets the Kernel Application context
Throws an exception if unable to set the context.
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.DLoginInfo">
<summary>
Summary description for DLoginInfo.
</summary>
</member>
<member name="F:IndianHealthService.BMXNet.DLoginInfo.components">
<summary>
Required designer variable.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DLoginInfo.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DLoginInfo.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
</member>
<member name="M:IndianHealthService.BMXNet.DLoginInfo.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data
otherwise, moves control data into member vars
</summary>
<param name="b"></param>
</member>
<member name="P:IndianHealthService.BMXNet.DLoginInfo.AccessCode">
<summary>
Gets the access code entered by the user.
</summary>
</member>
<member name="P:IndianHealthService.BMXNet.DLoginInfo.VerifyCode">
<summary>
Gets the verify code entered by the user.
</summary>
</member>
<member name="T:IndianHealthService.BMXNet.BMXNetException">
<summary>
Custom exception class for BMXNet
</summary>
</member>
</members>
</doc>

View File

@ -52,7 +52,7 @@ namespace IndianHealthService.BMXNet
/// </summary>
private void InitializeComponent()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.mlTests = new System.Windows.Forms.TabControl();
this.tpaQuery = new System.Windows.Forms.TabPage();
this.panGrid = new System.Windows.Forms.Panel();
this.dataGrid2 = new System.Windows.Forms.DataGrid();
@ -134,7 +134,11 @@ namespace IndianHealthService.BMXNet
this.cmdAcquireLock = new System.Windows.Forms.Button();
this.cmdReleaseLock = new System.Windows.Forms.Button();
this.cmdEventPollingInterval = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.txtML = new System.Windows.Forms.TextBox();
this.lblML = new System.Windows.Forms.Label();
this.btnML = new System.Windows.Forms.Button();
this.mlTests.SuspendLayout();
this.tpaQuery.SuspendLayout();
this.panGrid.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
@ -146,20 +150,22 @@ namespace IndianHealthService.BMXNet
((System.ComponentModel.ISupportInitialize)(this.grdAsyncResult)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudEventPollingInterval)).BeginInit();
this.grpPiece.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
// mlTests
//
this.tabControl1.Controls.Add(this.tpaQuery);
this.tabControl1.Controls.Add(this.tpaControls);
this.tabControl1.Controls.Add(this.tpaConnection);
this.tabControl1.Controls.Add(this.tpaOther);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(736, 566);
this.tabControl1.TabIndex = 0;
this.mlTests.Controls.Add(this.tpaQuery);
this.mlTests.Controls.Add(this.tpaControls);
this.mlTests.Controls.Add(this.tpaConnection);
this.mlTests.Controls.Add(this.tpaOther);
this.mlTests.Controls.Add(this.tabPage1);
this.mlTests.Dock = System.Windows.Forms.DockStyle.Fill;
this.mlTests.Location = new System.Drawing.Point(0, 0);
this.mlTests.Name = "mlTests";
this.mlTests.SelectedIndex = 0;
this.mlTests.Size = new System.Drawing.Size(736, 566);
this.mlTests.TabIndex = 0;
//
// tpaQuery
//
@ -494,7 +500,7 @@ namespace IndianHealthService.BMXNet
this.tpaConnection.Controls.Add(this.cmdChangeServer);
this.tpaConnection.Location = new System.Drawing.Point(4, 22);
this.tpaConnection.Name = "tpaConnection";
this.tpaConnection.Size = new System.Drawing.Size(605, 465);
this.tpaConnection.Size = new System.Drawing.Size(728, 540);
this.tpaConnection.TabIndex = 1;
this.tpaConnection.Text = "Connection";
//
@ -634,7 +640,7 @@ namespace IndianHealthService.BMXNet
this.tpaOther.Controls.Add(this.cmdEventPollingInterval);
this.tpaOther.Location = new System.Drawing.Point(4, 22);
this.tpaOther.Name = "tpaOther";
this.tpaOther.Size = new System.Drawing.Size(605, 465);
this.tpaOther.Size = new System.Drawing.Size(728, 540);
this.tpaOther.TabIndex = 2;
this.tpaOther.Text = "Events";
//
@ -946,16 +952,55 @@ namespace IndianHealthService.BMXNet
this.cmdEventPollingInterval.TabIndex = 93;
this.cmdEventPollingInterval.Text = "Event Polling Interval";
//
// tabPage1
//
this.tabPage1.Controls.Add(this.btnML);
this.tabPage1.Controls.Add(this.lblML);
this.tabPage1.Controls.Add(this.txtML);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(728, 540);
this.tabPage1.TabIndex = 4;
this.tabPage1.Text = "Multi Lingual Tests";
this.tabPage1.UseVisualStyleBackColor = true;
//
// txtML
//
this.txtML.Location = new System.Drawing.Point(177, 66);
this.txtML.Name = "txtML";
this.txtML.Size = new System.Drawing.Size(100, 20);
this.txtML.TabIndex = 0;
//
// lblML
//
this.lblML.AutoSize = true;
this.lblML.Location = new System.Drawing.Point(51, 66);
this.lblML.Name = "lblML";
this.lblML.Size = new System.Drawing.Size(110, 13);
this.lblML.TabIndex = 1;
this.lblML.Text = "Type Something Here";
//
// btnML
//
this.btnML.Location = new System.Drawing.Point(132, 112);
this.btnML.Name = "btnML";
this.btnML.Size = new System.Drawing.Size(75, 23);
this.btnML.TabIndex = 2;
this.btnML.Text = "Store Data";
this.btnML.UseVisualStyleBackColor = true;
this.btnML.Click += new System.EventHandler(this.btnML_Click);
//
// frmBMXNetTest
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(736, 566);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.mlTests);
this.Name = "frmBMXNetTest";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "BMXNet Test Application";
this.Load += new System.EventHandler(this.frmBMXNetTest_Load);
this.tabControl1.ResumeLayout(false);
this.mlTests.ResumeLayout(false);
this.tpaQuery.ResumeLayout(false);
this.panGrid.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).EndInit();
@ -972,6 +1017,8 @@ namespace IndianHealthService.BMXNet
((System.ComponentModel.ISupportInitialize)(this.nudEventPollingInterval)).EndInit();
this.grpPiece.ResumeLayout(false);
this.grpPiece.PerformLayout();
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.ResumeLayout(false);
}
@ -997,7 +1044,7 @@ namespace IndianHealthService.BMXNet
}
private BMXNetConnectInfo m_ci;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabControl mlTests;
private System.Windows.Forms.DataGrid dataGrid2;
private System.Windows.Forms.Button cmdCancelChanges;
private System.Windows.Forms.TextBox txtCommand;
@ -1079,6 +1126,10 @@ namespace IndianHealthService.BMXNet
private Button cmdTestReceiveTimeout;
private Button cmdStopLogging;
private Button cmdStartLogging;
private TabPage tabPage1;
private Button btnML;
private Label lblML;
private TextBox txtML;
BMXNetDataAdapter m_da = new BMXNetDataAdapter();
@ -1925,6 +1976,13 @@ namespace IndianHealthService.BMXNet
}
}
private void btnML_Click(object sender, EventArgs e)
{
string cmd = "KBAN BMX";
string result = m_ci.bmxNetLib.TransmitRPC(cmd, txtML.Text);
MessageBox.Show("What got sent and back is:" + result);
}
}