Commit for development environment setup
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.1.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
|
@@ -0,0 +1,59 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.1.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
|
@@ -0,0 +1,147 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: LockDlg.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:44a $
|
||||
*
|
||||
* $History: LockDlg.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:44a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for LockDlg.
|
||||
/// </summary>
|
||||
public class LockDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.TextBox tbLockReason;
|
||||
private System.Windows.Forms.Label lblLckMsg;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button Cancel;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
private string [] LckTypes = {"SYSTEM", "PLANT", "PROCEDURE"};
|
||||
|
||||
private VELock vlk;
|
||||
public LockDlg(VELock alock)
|
||||
{
|
||||
vlk = alock;
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
this.lblLckMsg.Text = "Please enter PURPOSE and estimated DURATION of " + LckTypes[(int)vlk.LockType-1] + " Lock: ";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LockDlg));
|
||||
this.tbLockReason = new System.Windows.Forms.TextBox();
|
||||
this.lblLckMsg = new System.Windows.Forms.Label();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tbLockReason
|
||||
//
|
||||
this.tbLockReason.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.tbLockReason.Location = new System.Drawing.Point(8, 40);
|
||||
this.tbLockReason.Name = "tbLockReason";
|
||||
this.tbLockReason.Size = new System.Drawing.Size(328, 21);
|
||||
this.tbLockReason.TabIndex = 0;
|
||||
this.tbLockReason.Text = "";
|
||||
this.tbLockReason.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbLockReason_KeyUp);
|
||||
//
|
||||
// lblLckMsg
|
||||
//
|
||||
this.lblLckMsg.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.lblLckMsg.Location = new System.Drawing.Point(0, 0);
|
||||
this.lblLckMsg.Name = "lblLckMsg";
|
||||
this.lblLckMsg.Size = new System.Drawing.Size(280, 32);
|
||||
this.lblLckMsg.TabIndex = 1;
|
||||
this.lblLckMsg.Text = "Please enter PURPOSE and estimated DURATION of Lock: ";
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.btnOK.Location = new System.Drawing.Point(176, 72);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(64, 24);
|
||||
this.btnOK.TabIndex = 2;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Cancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.Cancel.Location = new System.Drawing.Point(264, 72);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(64, 24);
|
||||
this.Cancel.TabIndex = 3;
|
||||
this.Cancel.Text = "Cancel";
|
||||
//
|
||||
// LockDlg
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(376, 102);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.lblLckMsg);
|
||||
this.Controls.Add(this.tbLockReason);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "LockDlg";
|
||||
this.Text = "VE-Proms Lock Purpose";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void btnOK_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
vlk.Why = this.tbLockReason.Text;
|
||||
vlk.WhyDT = System.DateTime.Now;
|
||||
}
|
||||
|
||||
private void tbLockReason_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
|
||||
{
|
||||
// if key pressed was a return - treat as ok button.
|
||||
if (e.KeyCode == Keys.Return) this.btnOK.PerformClick();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="tbLockReason.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbLockReason.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbLockReason.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblLckMsg.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblLckMsg.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblLckMsg.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="Cancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="Cancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="Cancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>LockDlg</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
|
||||
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
|
||||
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
|
||||
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
|
||||
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
|
||||
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
|
||||
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
|
||||
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
|
||||
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,231 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: LockInfoDlg.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:44a $
|
||||
*
|
||||
* $History: LockInfoDlg.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:44a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Form1.
|
||||
/// </summary>
|
||||
public class LockInfoDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox tbUserName;
|
||||
private System.Windows.Forms.TextBox tbLoc;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox tbPhone1;
|
||||
private System.Windows.Forms.TextBox tbWhy;
|
||||
private System.Windows.Forms.TextBox tbWhyDT;
|
||||
private System.Windows.Forms.TextBox tbPhone2;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
private string [] SLockTypes = {"System", "Plant", "Procedure Set"};
|
||||
public LockInfoDlg(VELock lck)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.tbUserName.Text = lck.UserName;
|
||||
this.tbPhone1.Text = lck.Phone1;
|
||||
this.tbPhone2.Text = lck.Phone2;
|
||||
this.tbLoc.Text = lck.Loc1 + " - " + lck.Loc2;
|
||||
this.tbWhy.Text = lck.Why;
|
||||
this.tbWhyDT.Text = lck.WhyDT.ToShortDateString() + " " + lck.WhyDT.ToShortTimeString();
|
||||
this.Text = SLockTypes[(int)lck.LockType-1] + " Lock";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LockInfoDlg));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.tbUserName = new System.Windows.Forms.TextBox();
|
||||
this.tbLoc = new System.Windows.Forms.TextBox();
|
||||
this.tbPhone1 = new System.Windows.Forms.TextBox();
|
||||
this.tbWhy = new System.Windows.Forms.TextBox();
|
||||
this.tbWhyDT = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.tbPhone2 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(0, 8);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(80, 16);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Locked by:";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(8, 40);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(72, 16);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Location:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(0, 72);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(80, 16);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Phone:";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Location = new System.Drawing.Point(0, 136);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(80, 16);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "Information:";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Location = new System.Drawing.Point(0, 168);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(80, 16);
|
||||
this.label5.TabIndex = 4;
|
||||
this.label5.Text = "Lock Created:";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// tbUserName
|
||||
//
|
||||
this.tbUserName.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tbUserName.Location = new System.Drawing.Point(96, 8);
|
||||
this.tbUserName.Name = "tbUserName";
|
||||
this.tbUserName.ReadOnly = true;
|
||||
this.tbUserName.Size = new System.Drawing.Size(304, 20);
|
||||
this.tbUserName.TabIndex = 5;
|
||||
this.tbUserName.Text = "";
|
||||
//
|
||||
// tbLoc
|
||||
//
|
||||
this.tbLoc.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tbLoc.Location = new System.Drawing.Point(96, 40);
|
||||
this.tbLoc.Name = "tbLoc";
|
||||
this.tbLoc.ReadOnly = true;
|
||||
this.tbLoc.Size = new System.Drawing.Size(304, 20);
|
||||
this.tbLoc.TabIndex = 6;
|
||||
this.tbLoc.Text = "";
|
||||
//
|
||||
// tbPhone1
|
||||
//
|
||||
this.tbPhone1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tbPhone1.Location = new System.Drawing.Point(96, 72);
|
||||
this.tbPhone1.Name = "tbPhone1";
|
||||
this.tbPhone1.ReadOnly = true;
|
||||
this.tbPhone1.Size = new System.Drawing.Size(168, 20);
|
||||
this.tbPhone1.TabIndex = 7;
|
||||
this.tbPhone1.Text = "";
|
||||
//
|
||||
// tbWhy
|
||||
//
|
||||
this.tbWhy.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tbWhy.Location = new System.Drawing.Point(96, 136);
|
||||
this.tbWhy.Name = "tbWhy";
|
||||
this.tbWhy.ReadOnly = true;
|
||||
this.tbWhy.Size = new System.Drawing.Size(304, 20);
|
||||
this.tbWhy.TabIndex = 8;
|
||||
this.tbWhy.Text = "";
|
||||
//
|
||||
// tbWhyDT
|
||||
//
|
||||
this.tbWhyDT.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tbWhyDT.Location = new System.Drawing.Point(96, 168);
|
||||
this.tbWhyDT.Name = "tbWhyDT";
|
||||
this.tbWhyDT.ReadOnly = true;
|
||||
this.tbWhyDT.Size = new System.Drawing.Size(208, 20);
|
||||
this.tbWhyDT.TabIndex = 9;
|
||||
this.tbWhyDT.Text = "";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Location = new System.Drawing.Point(168, 200);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(72, 24);
|
||||
this.button1.TabIndex = 10;
|
||||
this.button1.Text = "OK";
|
||||
//
|
||||
// tbPhone2
|
||||
//
|
||||
this.tbPhone2.Location = new System.Drawing.Point(96, 104);
|
||||
this.tbPhone2.Name = "tbPhone2";
|
||||
this.tbPhone2.ReadOnly = true;
|
||||
this.tbPhone2.Size = new System.Drawing.Size(168, 20);
|
||||
this.tbPhone2.TabIndex = 0;
|
||||
this.tbPhone2.Text = "";
|
||||
//
|
||||
// LockInfoDlg
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(424, 230);
|
||||
this.Controls.Add(this.tbPhone2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.tbWhyDT);
|
||||
this.Controls.Add(this.tbWhy);
|
||||
this.Controls.Add(this.tbPhone1);
|
||||
this.Controls.Add(this.tbLoc);
|
||||
this.Controls.Add(this.tbUserName);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "LockInfoDlg";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label5.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label5.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label5.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbUserName.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbUserName.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbUserName.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbLoc.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbLoc.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbLoc.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbPhone1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbPhone1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbPhone1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbWhy.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbWhy.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbWhy.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbWhyDT.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbWhyDT.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbWhyDT.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbPhone2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="tbPhone2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="tbPhone2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>LockInfoDlg</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
|
||||
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
|
||||
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
|
||||
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
|
||||
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
|
||||
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
|
||||
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
|
||||
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
|
||||
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,202 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: LockRlsDlg.cs $ $Revision: 2 $
|
||||
* $Author: Jsj $ $Date: 8/17/04 12:54p $
|
||||
*
|
||||
* $History: LockRlsDlg.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 8/17/04 Time: 12:54p
|
||||
* Updated in $/LibSource/VENetwork
|
||||
* Needed to assign an Icon to the form. It was bombing with a resource
|
||||
* error otherwise.
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:44a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows user to Release Locks on exit.
|
||||
/// </summary>
|
||||
public class LockRlsDlg : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.CheckBox cbSystem;
|
||||
private System.Windows.Forms.CheckBox cbPlant;
|
||||
private System.Windows.Forms.CheckBox cbProcSet;
|
||||
private System.ComponentModel.Container components = null;
|
||||
private VELock LSystem;
|
||||
private VELock LPlant;
|
||||
private VELock LProcSet;
|
||||
|
||||
public LockRlsDlg(VELock lsys, VELock lplt, VELock lps)
|
||||
{
|
||||
LSystem = lsys;
|
||||
LPlant = lplt;
|
||||
LProcSet = lps;
|
||||
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
// Set checkboxes depending on whether a lock exists. Note
|
||||
// that the input locks will be null if not locked by this user.
|
||||
if (lsys != null)
|
||||
cbSystem.Checked = true;
|
||||
else
|
||||
cbSystem.Enabled = false;
|
||||
|
||||
if (lplt != null)
|
||||
{
|
||||
cbPlant.Text = lplt.Path.Substring(0,lplt.Path.LastIndexOf("\\"));
|
||||
cbPlant.Checked = true;
|
||||
}
|
||||
else
|
||||
cbPlant.Enabled = false;
|
||||
if (lps != null)
|
||||
{
|
||||
cbProcSet.Text = lps.Path.Substring(0,lps.Path.LastIndexOf("\\"));
|
||||
cbProcSet.Checked = true;
|
||||
}
|
||||
else
|
||||
cbProcSet.Enabled = false;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LockRlsDlg));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.cbSystem = new System.Windows.Forms.CheckBox();
|
||||
this.cbPlant = new System.Windows.Forms.CheckBox();
|
||||
this.cbProcSet = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(29, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(451, 56);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "The Following Locks Have Been Detected. Please Click The Appropriate Box To Rele" +
|
||||
"ase The Lock.";
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.btnOK.Location = new System.Drawing.Point(173, 194);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(77, 28);
|
||||
this.btnOK.TabIndex = 1;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.btnCancel.Location = new System.Drawing.Point(288, 194);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(77, 28);
|
||||
this.btnCancel.TabIndex = 2;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
//
|
||||
// cbSystem
|
||||
//
|
||||
this.cbSystem.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.cbSystem.Location = new System.Drawing.Point(86, 74);
|
||||
this.cbSystem.Name = "cbSystem";
|
||||
this.cbSystem.Size = new System.Drawing.Size(375, 28);
|
||||
this.cbSystem.TabIndex = 3;
|
||||
this.cbSystem.Text = "System";
|
||||
//
|
||||
// cbPlant
|
||||
//
|
||||
this.cbPlant.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.cbPlant.Location = new System.Drawing.Point(86, 111);
|
||||
this.cbPlant.Name = "cbPlant";
|
||||
this.cbPlant.Size = new System.Drawing.Size(375, 27);
|
||||
this.cbPlant.TabIndex = 4;
|
||||
this.cbPlant.Text = "Plant";
|
||||
//
|
||||
// cbProcSet
|
||||
//
|
||||
this.cbProcSet.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.cbProcSet.Location = new System.Drawing.Point(86, 148);
|
||||
this.cbProcSet.Name = "cbProcSet";
|
||||
this.cbProcSet.Size = new System.Drawing.Size(375, 27);
|
||||
this.cbProcSet.TabIndex = 5;
|
||||
this.cbProcSet.Text = "Data";
|
||||
//
|
||||
// LockRlsDlg
|
||||
//
|
||||
this.AccessibleRole = System.Windows.Forms.AccessibleRole.TitleBar;
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
||||
this.ClientSize = new System.Drawing.Size(537, 228);
|
||||
this.Controls.Add(this.cbProcSet);
|
||||
this.Controls.Add(this.cbPlant);
|
||||
this.Controls.Add(this.cbSystem);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "LockRlsDlg";
|
||||
this.Text = "Release Locks";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void btnOK_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
// unlock any where the check was removed (kind of backwards but duplicates
|
||||
// functionality from vfw.
|
||||
if (this.cbSystem.Visible && this.cbSystem.Enabled && !this.cbSystem.Checked)
|
||||
LSystem.UnLock(false);
|
||||
if (this.cbPlant.Visible && this.cbPlant.Enabled && !this.cbPlant.Checked)
|
||||
LPlant.UnLock(false);
|
||||
if (this.cbProcSet.Visible && this.cbProcSet.Enabled && !this.cbProcSet.Checked)
|
||||
LProcSet.UnLock(false);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cbSystem.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cbSystem.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cbSystem.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cbPlant.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cbPlant.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cbPlant.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cbProcSet.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cbProcSet.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cbProcSet.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>LockRlsDlg</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
|
||||
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
|
||||
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
|
||||
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
|
||||
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
|
||||
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
|
||||
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
|
||||
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
|
||||
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,122 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: MonUsrDlg.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:44a $
|
||||
*
|
||||
* $History: MonUsrDlg.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:44a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using Utils;
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for MonUsrDlg.
|
||||
/// </summary>
|
||||
public class MonUsrDlg : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
private System.Windows.Forms.ListView lvUsers;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private string [] SLockTypes = {"System", "Plant", "Procedure Set"};
|
||||
public MonUsrDlg(ArrayList usr, int ilb)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
this.Text = SLockTypes[ilb] + " : Monitor Users";
|
||||
DoListView(usr);
|
||||
}
|
||||
|
||||
private void DoListView(ArrayList usrlst)
|
||||
{
|
||||
ListViewItem item=null;
|
||||
lvUsers.Columns.Add("User Network ID",100, HorizontalAlignment.Left);
|
||||
lvUsers.Columns.Add("User Phone",100, HorizontalAlignment.Left);
|
||||
lvUsers.Columns.Add("User Name",200, HorizontalAlignment.Left);
|
||||
|
||||
for (int i=0; i<usrlst.Count; i++)
|
||||
{
|
||||
UserData dt = (UserData) usrlst[i];
|
||||
item = new ListViewItem(dt.UserNetworkID);
|
||||
item.SubItems.Add(dt.UserPhone1);
|
||||
item.SubItems.Add(dt.UserName);
|
||||
lvUsers.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if(components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MonUsrDlg));
|
||||
this.lvUsers = new System.Windows.Forms.ListView();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lvUsers
|
||||
//
|
||||
this.lvUsers.Location = new System.Drawing.Point(0, 0);
|
||||
this.lvUsers.Name = "lvUsers";
|
||||
this.lvUsers.Size = new System.Drawing.Size(400, 224);
|
||||
this.lvUsers.TabIndex = 0;
|
||||
this.lvUsers.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.button1.Location = new System.Drawing.Point(176, 232);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(64, 24);
|
||||
this.button1.TabIndex = 1;
|
||||
this.button1.Text = "OK";
|
||||
//
|
||||
// MonUsrDlg
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(400, 266);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.lvUsers);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "MonUsrDlg";
|
||||
this.Text = "Monitor Users";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="lvUsers.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lvUsers.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lvUsers.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>MonUsrDlg</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAADAAADAAAAAwMAAwAAAAMAAwADAwAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||
AAD///8AiIiIiIiIiIiIiIiIiIiIiPF3F3F3F3F3F3d3d3d3d3jxdxdxdxdxdxd3d3d3d3d49xdxdxdx
|
||||
dxdxd3d3d3d3ePcXcXcXcXcXcXd3d3d3d3jxcXcXcXcXcXcXd3d3d3d48XF3F3F3F3F3F3d3d3d3ePdx
|
||||
F3F3F3F3F3F3d3d3d3j3cRdxdxdxdxdxd3d3d3d49xdxdxdxdxdxdxd3d3d3ePcXcXcXcXcXcXcXd3d3
|
||||
d3jxdxcXcXcXcXcXcXd3d3d48XcXF3F3F3F3F3F3d3d3ePdxdxF3F3F3F3F3F3d3d3j3cXcRdxdxdxdx
|
||||
dxd3d3d49xdxdxdxdxdxdxdxd3d3ePcXcXcXcXcXcXcXcXd3d3jxdxdxcXcXcXcXcXcXd3d48XcXcXF3
|
||||
F3F3F3F3F3d3ePdxdxd3F3F3F3F3F3F3d3j3cXcXdxdxdxdxdxdxd3d49xdxd3dxdxdxdxdxdxd3ePcX
|
||||
cXd3cXcXcXcXcXcXd3jxdxd3d3cXcXcXcXcXcXd48XcXd3d3F3F3F3F3F3F3ePdxd3d3d3F3F3F3F3F3
|
||||
F3j3cXd3d3dxdxdxdxdxdxd49xd3d3d3dxdxdxdxdxdxePcXd3d3d3cXcXcXcXcXcXjxd3d3d3d3cXcX
|
||||
cXcXcXcY8Xd3d3d3d3F3F3F3F3F3GP////////////////////gAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,576 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VEConn.cs $ $Revision: 3 $
|
||||
* $Author: Kathy $ $Date: 1/31/05 11:04a $
|
||||
*
|
||||
* $History: VEConn.cs $
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Kathy Date: 1/31/05 Time: 11:04a
|
||||
* Updated in $/LibSource/VENetwork
|
||||
* Fix B2005-005 (connection & delete directory errors)
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 11/12/04 Time: 10:34a
|
||||
* Updated in $/LibSource/VENetwork
|
||||
* Save user's Temp dir path
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:44a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
using Utils;
|
||||
using VlnStatus;
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
// The following enum is used to set/check the mode for which the dat file connection
|
||||
// was made (i.e. when the file was opened.
|
||||
// NWModes:
|
||||
// exclusive, hold, write
|
||||
public enum NWModes {XCLUDMODE=1, HOLDMODE=2, WRITMODE=3};
|
||||
|
||||
// This class manages the connection options for multi-user support, i.e. creation,
|
||||
// connecting to and removing dat files at the system, plant and procedure set levels.
|
||||
public class VEConnection
|
||||
{
|
||||
private VELock m_Lock;
|
||||
private string m_Path;
|
||||
private string CurDir;
|
||||
private long m_Position;
|
||||
|
||||
private NWModes m_Mode;
|
||||
private FileStream datFs;
|
||||
private UserRunTime usrRunTime;
|
||||
const int ProcessRecLen = 140;
|
||||
private VETempFile TempFile;
|
||||
|
||||
public VEConnection(VELock ilck, UserRunTime iusrRT)
|
||||
{
|
||||
TempFile = null;
|
||||
datFs = null;
|
||||
m_Mode = 0;
|
||||
m_Lock = ilck;
|
||||
usrRunTime = iusrRT;
|
||||
SetUserTempDirPath();
|
||||
if (m_Lock.LockType == LockTypes.None) return;
|
||||
string tmp_path = ilck.Path;
|
||||
CurDir = tmp_path.Substring(0,tmp_path.LastIndexOf("\\")+1); // save directory
|
||||
// path is same as lock file except extension is dat not lck.
|
||||
m_Path = tmp_path.Substring(0,tmp_path.Length-3) + "dat";
|
||||
}
|
||||
|
||||
~ VEConnection()
|
||||
{
|
||||
// update the record as inactive & close the file (this gets called on
|
||||
// exit of the program, rather than changing active data in the tree view).
|
||||
Exit();
|
||||
}
|
||||
|
||||
public int GetVfwMode()
|
||||
{
|
||||
//given the current mode, get the required filemode to send back to
|
||||
// vfw. The values were taken from Borland include file
|
||||
// define BASEMODE (O_NOINHERIT|O_NOCRITERR)
|
||||
// 0x80 0x2000
|
||||
// define XCLUDMODE (BASEMODE|O_COMMIT|O_CREAT|O_DENYALL|O_RDWR)
|
||||
// 0x4000 0x0100 0x10 0x4
|
||||
// define HOLDMODE (BASEMODE|O_DENYNONE|O_RDONLY)
|
||||
// 0x40 0x1
|
||||
// define WRITMODE (BASEMODE|O_COMMIT|O_DENYWRITE|O_RDWR)
|
||||
// 0x4000 0x20 0x4
|
||||
int BASEMODE = 0x80|0x2000;
|
||||
if(m_Mode==NWModes.HOLDMODE)
|
||||
return (BASEMODE|0x40|0x1);
|
||||
else if (m_Mode==NWModes.XCLUDMODE)
|
||||
return (BASEMODE|0x4000|0x0100|0x10|0x4);
|
||||
else if (m_Mode==NWModes.WRITMODE)
|
||||
return (BASEMODE|0x4000|0x20|0x4);
|
||||
else
|
||||
return (0);
|
||||
}
|
||||
|
||||
// if file open is done from vfw, need to open file using that mode,
|
||||
// get mode from input.
|
||||
public NWModes GetModeFromVfwMode(int vfwMode)
|
||||
{
|
||||
int BASEMODE = 0x80|0x2000;
|
||||
if (vfwMode==(BASEMODE|0x40|0x1))
|
||||
return NWModes.HOLDMODE;
|
||||
else if (vfwMode==(BASEMODE|0x4000|0x0100|0x10|0x4))
|
||||
return NWModes.XCLUDMODE;
|
||||
else if (vfwMode==(BASEMODE|0x4000|0x20|0x4))
|
||||
return NWModes.WRITMODE;
|
||||
return (NWModes) 0;
|
||||
}
|
||||
|
||||
[Description("File offset")]public long FileOffset
|
||||
{
|
||||
get{return m_Position;}
|
||||
}
|
||||
|
||||
// reads the dat file for this level, and creates a list of ACTIVE users, i.e.
|
||||
// those users whose record's status is set to active.
|
||||
public ArrayList GetUsers()
|
||||
{
|
||||
ArrayList retval = new ArrayList();
|
||||
if (datFs!=null)
|
||||
{
|
||||
// read records in the .dat file and see if any are active.
|
||||
long howbig = datFs.Length;
|
||||
int howmany = (int)(howbig/ProcessRecLen) - 1; // the first record is a dummy
|
||||
for (int rec=1;rec<=howmany;rec++)
|
||||
{
|
||||
UserData usrd = new UserData(datFs, rec);
|
||||
if (usrd.UserStatus==(byte)Utils.UserCStatus.PRACTIVE)
|
||||
retval.Add(usrd);
|
||||
else
|
||||
usrd = null;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
// display the monitor users dialog
|
||||
public void MonitorUsers(int lbstr)
|
||||
{
|
||||
ArrayList al = GetUsers();
|
||||
// temporarily do separate dialog. eventually, this will be a pane with a list
|
||||
// on the main window
|
||||
MonUsrDlg dlg = new MonUsrDlg(al,lbstr);
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
|
||||
// determines whether there are active users, other than myself, currently in this
|
||||
// level of data
|
||||
public bool HasActiveUsers()
|
||||
{
|
||||
int cntactive=0;
|
||||
// read records in the .dat file and see if any are active.
|
||||
long howbig = datFs.Length;
|
||||
int howmany = (int)(howbig/ProcessRecLen) - 1; // the first record is a dummy
|
||||
for (int rec=1;rec<=howmany;rec++)
|
||||
{
|
||||
UserData usrd = new UserData(datFs, rec);
|
||||
// if active record and it does not match my user name, there is another
|
||||
// user in. return true.
|
||||
if (usrd.UserStatus==(byte)Utils.UserCStatus.PRACTIVE)
|
||||
{
|
||||
cntactive++;
|
||||
if (usrd.UserName.ToUpper()!=usrRunTime.myUserData.UserName.ToUpper())return true;
|
||||
}
|
||||
}
|
||||
// if there is more than one active user that is current user, i.e. multiple
|
||||
// sessions, return true
|
||||
if (cntactive>1)return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// This method will attempt to open the *process.dat file in a read/write mode so
|
||||
// that a process record can be added.
|
||||
private bool OpenRW()
|
||||
{
|
||||
bool retval=true;
|
||||
VlnSpinner spn=null;
|
||||
try
|
||||
{
|
||||
spn = new VlnSpinner(2,50,"- Opening Process File ",m_Path,true,true,false);
|
||||
datFs=null;
|
||||
while(spn.SpinnerWait(datFs!=null))
|
||||
{
|
||||
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.ReadWrite,FileShare.Read);
|
||||
}
|
||||
// take this chance to do some cleanup in the procedure set directory
|
||||
if (m_Lock.LockType == LockTypes.ProcSet) DoProcCleanup();
|
||||
datFs.Seek(0L,SeekOrigin.End);
|
||||
m_Position = datFs.Position;
|
||||
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRACTIVE;
|
||||
usrRunTime.myUserData.Write(datFs);
|
||||
m_Mode=NWModes.WRITMODE;
|
||||
datFs.Flush();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//MessageBox.Show(e.Message,"Error on connecting to data - no lock");
|
||||
retval = false;
|
||||
}
|
||||
spn.Dispose();
|
||||
return retval;
|
||||
}
|
||||
|
||||
// used upon expand/select an item in tree - open the connection to the
|
||||
// the dat file. The reenter flag is used when the user is already in at this
|
||||
// level, but a change in lock state may have occurred.
|
||||
public bool Enter(bool reenter)
|
||||
{
|
||||
// for locktype.none, this level has no lock - so just say that
|
||||
// enter succeeded.
|
||||
if (m_Lock.LockType == LockTypes.None) return true;
|
||||
|
||||
bool attchtemp = false;
|
||||
bool success=false;
|
||||
|
||||
VlnSpinner spin = new VlnSpinner(2,10,"- Connecting to Data ",m_Path,true,true,false);
|
||||
while( spin.SpinnerWait( false ) ) // spin until break or return
|
||||
{
|
||||
// if not reenter refresh the lock. if reenter, the locking logic refreshed
|
||||
// the lock.
|
||||
if (!reenter)m_Lock.Refresh();
|
||||
|
||||
// if it's locked, see if it is locked by me and make sure there isn't an
|
||||
// active connection by another user or by myself from another window or network
|
||||
// process
|
||||
if (m_Lock.LockStatus == Status.Locked || m_Lock.LockStatus == Status.LockPending)
|
||||
{
|
||||
// if this is a procedure set lock, also check that the correct temp
|
||||
// file is attached, i.e. the one that is from the locking process.
|
||||
if(m_Lock.LockType==LockTypes.ProcSet)
|
||||
{
|
||||
if (TempFile==null)TempFile = new VETempFile(this.CurDir);
|
||||
attchtemp=TempFile.AttachSpecificTemp(usrRunTime.myUserData.UserNetworkID,m_Lock.UserProcess); //usrRunTime.myUserData.UserProcess);
|
||||
// if failed to connect, but a lock was pending, reset the lock type to
|
||||
// locked by other.
|
||||
if(m_Lock.LockStatus == Status.LockPending && !attchtemp) m_Lock.LockStatus = Status.LockedByOther;
|
||||
}
|
||||
if (m_Lock.LockType != LockTypes.ProcSet || attchtemp)
|
||||
{
|
||||
// try to get exclusive access to it (if I don't already have it)
|
||||
// first step is to exit from current connect
|
||||
if (m_Mode !=0 && m_Mode != NWModes.XCLUDMODE) Exit();
|
||||
|
||||
// try to establish a new exclusive connection. If a new exclusive connection
|
||||
// cannot be made, then a connection must exist from another process (either myself,
|
||||
// or another user if pending lock).
|
||||
// If I'm other user, this should be treated like a nolock for me, i.e. I can
|
||||
// view data but not modify it.
|
||||
if (m_Mode == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
datFs = new FileStream(m_Path,FileMode.Create,FileAccess.ReadWrite,FileShare.None);
|
||||
if(m_Lock.LockType == LockTypes.ProcSet)
|
||||
{ // these files are only used at the procedure set level
|
||||
DeleteFiles("*.own",0); // Cleanup ownership files
|
||||
DeleteFiles("*.wrq",0); // Cleanup write request files
|
||||
}
|
||||
usrRunTime.myUserData.UserProcess=m_Lock.UserProcess;
|
||||
// truncate file
|
||||
datFs.SetLength(0L);
|
||||
m_Mode=NWModes.XCLUDMODE;
|
||||
// write out a dummy record with the status set to inactive.
|
||||
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRINACTIVE;
|
||||
usrRunTime.myUserData.Write(datFs);
|
||||
m_Position = datFs.Position;
|
||||
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRACTIVE;
|
||||
usrRunTime.myUserData.Write(datFs);
|
||||
success=true;
|
||||
m_Lock.LockStatus = Status.Locked; // in case it was pending
|
||||
datFs.Flush();
|
||||
break;
|
||||
}
|
||||
// if an ioexception occurs, the connect is open either by me
|
||||
// or another user. Open a non-exlusive connection.
|
||||
catch (IOException)
|
||||
{
|
||||
// if open by another user, reopen as it was. Else return for
|
||||
// view only mode.
|
||||
spin.Dispose();
|
||||
bool opn = OpenRW();
|
||||
if (!opn)
|
||||
{
|
||||
m_Lock.LockStatus = Status.LockedByOther;
|
||||
return false;
|
||||
}
|
||||
datFs.Close();
|
||||
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
|
||||
success=true;
|
||||
m_Mode=NWModes.HOLDMODE;
|
||||
break;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
spin.Dispose();
|
||||
m_Lock.LockStatus = Status.LockedByOther;
|
||||
MessageBox.Show(e.Message, "Connecting to data failed - lock exists.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Lock.LockStatus = Status.Locked;
|
||||
success=true;
|
||||
break; // already connected.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
success = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle case where there is no lock or the current user is the lock owner,
|
||||
// but they're already connected from another run (either windows session or
|
||||
// network session)
|
||||
if (m_Lock.LockStatus == Status.NoLock)
|
||||
{
|
||||
// check if already connected, i.e. a filestream exists, or that I'm not
|
||||
// changing modes (the mode change occurs when going from locked to unlocked)
|
||||
if (datFs != null && this.m_Mode!=NWModes.XCLUDMODE)
|
||||
{
|
||||
success=true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if at the procedure set level, need to connect to a temp directory
|
||||
// as well.
|
||||
usrRunTime.myUserData.UserProcess="";
|
||||
if(m_Lock.LockType==LockTypes.ProcSet && TempFile==null)
|
||||
{
|
||||
TempFile = new VETempFile(this.CurDir);
|
||||
bool got_tmp = TempFile.FindAvailableTempDir(usrRunTime.myUserData.UserNetworkID);
|
||||
if (got_tmp==false)
|
||||
{
|
||||
TempFile = null;
|
||||
spin.Dispose();
|
||||
return false;
|
||||
}
|
||||
usrRunTime.myUserData.UserProcess=TempFile.TempNum;
|
||||
}
|
||||
// try to get exclusive access to dat file (see following commentary)
|
||||
try
|
||||
{
|
||||
// if this was open with exclusive, exit (this would be the
|
||||
// case where an unlock occurred.
|
||||
if (reenter || m_Mode == NWModes.XCLUDMODE) Exit();
|
||||
|
||||
// if can't get exclusive, an exception is thrown. just continue
|
||||
// on from there, i.e. the file is being used.
|
||||
// if we get exclusive access, cleanup the procset directory (if
|
||||
// this is a procset level enter) and then clean out the dat file
|
||||
datFs = new FileStream(m_Path,FileMode.Create,FileAccess.ReadWrite,FileShare.None);
|
||||
if(m_Lock.LockType == LockTypes.ProcSet)
|
||||
{ // these files are only used at the procedure set level
|
||||
DeleteFiles("*.own",0); // Cleanup ownership files
|
||||
DeleteFiles("*.wrq",0); // Cleanup write request files
|
||||
}
|
||||
|
||||
// truncate file
|
||||
datFs.SetLength(0L);
|
||||
m_Mode=NWModes.XCLUDMODE;
|
||||
// write out a dummy record with the status set to inactive.
|
||||
usrRunTime.myUserData.UserStatus= (byte)Utils.UserCStatus.PRINACTIVE;
|
||||
usrRunTime.myUserData.Write(datFs);
|
||||
datFs.Close();
|
||||
}
|
||||
|
||||
// if it is an IOException, it means the user could not get exclusive access,
|
||||
// just continue on, opening with read/write access to add process record
|
||||
// and then reopen in hold mode.
|
||||
catch (IOException)
|
||||
{
|
||||
}
|
||||
|
||||
// Catch a real error.
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message, "connect->enter failed");
|
||||
spin.Dispose();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to open the file in Read/write mode to add an active process record
|
||||
bool opn = OpenRW();
|
||||
if (!opn)return false;
|
||||
|
||||
// now close the process file & open in hold mode.
|
||||
datFs.Close();
|
||||
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
|
||||
success=true;
|
||||
m_Mode=NWModes.HOLDMODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (m_Lock.LockStatus == Status.LockedByOther)
|
||||
{
|
||||
success = false;
|
||||
if (datFs!=null)Exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin.Dispose(); // end of spinnerwait while loop
|
||||
|
||||
// if successful connection & at the procedure set level, write out number
|
||||
// of bytes to the temp directory file (temps\userid_.p##) to flag which
|
||||
// connection this is associated with. Also, if this is a reenter (locked state change)
|
||||
// then the tempfile is already the correct length, don't write out bytes.
|
||||
if (success==true && m_Lock.LockType==LockTypes.ProcSet && TempFile!=null && !reenter)
|
||||
{
|
||||
TempFile.WriteBytes((int)(m_Position/140));
|
||||
}
|
||||
SetUserTempDirPath();
|
||||
return success;
|
||||
}
|
||||
|
||||
// if len is !0, try to delete files of the specified length.
|
||||
// zero length files are normally in transition and will be
|
||||
// deleted by their owners.
|
||||
public void DeleteFiles(string tmp, int len)
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo(Directory.GetCurrentDirectory());
|
||||
FileInfo [] fis = di.GetFiles(tmp);
|
||||
foreach (FileInfo fi in fis)
|
||||
{
|
||||
if (len==0 || len==fi.Length) fi.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
// cleanup temp files and active record flags in the dat files.
|
||||
private void DoProcCleanup()
|
||||
{
|
||||
// read records in the .dat file and do check for those that are active.
|
||||
long howbig = datFs.Length;
|
||||
int howmany = (int)(howbig/ProcessRecLen);
|
||||
for (int rec=1;rec<howmany;rec++)
|
||||
{
|
||||
UserData usrd = new UserData(datFs, rec);
|
||||
if (usrd.UserStatus==(byte)Utils.UserCStatus.PRACTIVE)
|
||||
{
|
||||
VETempFile tfile = new VETempFile(CurDir);
|
||||
string tfilename = CurDir + "\\" + tfile.MakeTempName(usrd.UserNetworkID,usrd.UserProcess,'P');
|
||||
FileInfo fi = new FileInfo(tfilename);
|
||||
bool tfile_exists = fi.Exists;
|
||||
int len=0;
|
||||
if (tfile_exists) len = (int) fi.Length;
|
||||
// now check if it is an active process (versus an active
|
||||
// record left in dat file by a crashed process).
|
||||
// Do this by checking:
|
||||
// if the record points to the active process file
|
||||
// or the process file doesn't exist
|
||||
// or it's length doesn't match the process number
|
||||
if (usrd.UserStatus == (byte)Utils.UserCStatus.PRACTIVE)
|
||||
{
|
||||
if ((usrd.UserNetworkID.ToUpper()==usrRunTime.myUserData.UserNetworkID.ToUpper() &&
|
||||
usrd.UserProcess==usrRunTime.myUserData.UserProcess) ||
|
||||
!tfile_exists || len!=rec)
|
||||
{
|
||||
datFs.Seek(-ProcessRecLen,SeekOrigin.Current);
|
||||
usrd.UserStatus = (byte)Utils.UserCStatus.PRINACTIVE;
|
||||
usrd.Write(datFs);
|
||||
DeleteFiles("*.own",rec);
|
||||
DeleteFiles("*.wrq",rec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public long Seek(long offset, int fromwhere)
|
||||
{
|
||||
long skpos = 0L;
|
||||
if(datFs!=null)
|
||||
{
|
||||
// fromwhere: 0=beginning;1=current;2=end. Map these from 16-bit code
|
||||
// to .net 32-bit code.
|
||||
SeekOrigin sorig;
|
||||
if (fromwhere==0)
|
||||
sorig = SeekOrigin.Begin;
|
||||
else if (fromwhere==1)
|
||||
sorig = SeekOrigin.Current;
|
||||
else
|
||||
sorig = SeekOrigin.End;
|
||||
skpos = datFs.Seek(offset, sorig);
|
||||
}
|
||||
return skpos;
|
||||
}
|
||||
|
||||
public Int16 GetProcRecBuff(Int16 size, ref byte [] bt)
|
||||
{
|
||||
int retval = datFs.Read(bt,0,(int)size);
|
||||
return (Int16)retval;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
datFs.Close();
|
||||
m_Mode = 0;
|
||||
datFs=null;
|
||||
}
|
||||
|
||||
public Int16 Open(Int16 vfwmode)
|
||||
{
|
||||
Int16 retval = 1;
|
||||
try
|
||||
{
|
||||
if (m_Mode!=0) Close();
|
||||
m_Mode = GetModeFromVfwMode(vfwmode);
|
||||
if(m_Mode==NWModes.HOLDMODE)
|
||||
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
|
||||
else if(m_Mode==NWModes.WRITMODE)
|
||||
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.ReadWrite,FileShare.Read);
|
||||
else if (m_Mode==NWModes.XCLUDMODE)
|
||||
datFs = new FileStream(m_Path,FileMode.Create,FileAccess.ReadWrite,FileShare.None);
|
||||
}
|
||||
catch
|
||||
{
|
||||
retval = -1;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
// purpose: close the connection to the dat file.
|
||||
public void Exit()
|
||||
{
|
||||
// if datFs is null, either we have a lock type of none or the destructor
|
||||
// is being called & an exit may have been done, if collapse occurred
|
||||
if (datFs==null) return; // datFs not set if lock type was none.
|
||||
byte stat=(byte)Utils.UserCStatus.PRINACTIVE;
|
||||
usrRunTime.myUserData.UserStatus=stat;
|
||||
datFs.Close();
|
||||
datFs=null;
|
||||
VlnSpinner spin = new VlnSpinner(2,25,"- Exiting from Connection ",m_Path,true,true,false);
|
||||
while(spin.SpinnerWait(datFs!=null))
|
||||
{
|
||||
datFs = new FileStream(m_Path,FileMode.Open,FileAccess.ReadWrite,FileShare.Read);
|
||||
}
|
||||
spin.Dispose();
|
||||
datFs.Seek(m_Position,SeekOrigin.Begin);
|
||||
BinaryWriter bw = new BinaryWriter(datFs);
|
||||
bw.Write(stat);
|
||||
bw.Close();
|
||||
datFs.Close();
|
||||
if (TempFile!=null)
|
||||
{
|
||||
TempFile.CloseTempProc();
|
||||
TempFile = null;
|
||||
}
|
||||
datFs=null;
|
||||
m_Mode=0;
|
||||
}
|
||||
|
||||
public void SetUserTempDirPath()
|
||||
{
|
||||
if (m_Lock.LockStatus == Status.NoLock && TempFile != null)
|
||||
{
|
||||
// no lock set, use temp directory
|
||||
char [] backslash = {'\\'};
|
||||
usrRunTime.TempDirPath = TempFile.TemporaryDirectoryName.TrimEnd(backslash);
|
||||
}
|
||||
else // lock set, don't use temp directory
|
||||
usrRunTime.TempDirPath = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,361 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VELock.cs $ $Revision: 2 $
|
||||
* $Author: Kathy $ $Date: 6/15/06 8:58a $
|
||||
*
|
||||
* $History: VELock.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Kathy Date: 6/15/06 Time: 8:58a
|
||||
* Updated in $/LibSource/VENetwork
|
||||
* B2006-024 fix - add lock without prompt
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:45a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using Utils;
|
||||
using VlnStatus;
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
// The following two enums are used to check lock types & statuses through the users
|
||||
// of the VELock class.
|
||||
|
||||
// LockTypes:
|
||||
// no lock at level required (dummy nodes, etc), system, plant & set level, i.e.
|
||||
// None, sprocess.dat, pprocess.dat, process.dat
|
||||
public enum LockTypes {None=0, System=1, Plant=2, ProcSet=3};
|
||||
|
||||
// Status:
|
||||
// no lock exists, locked my myself, locked by someelse, I want to lock-but someone else in
|
||||
public enum Status {NoLock=0, Locked=1, LockedByOther=2, LockPending=3};
|
||||
|
||||
// This class manages the locking options for multi-user support, i.e. creation and
|
||||
// removing locks, i.e. lck files at system, plant and procedure set levels.
|
||||
public class VELock
|
||||
{
|
||||
string [] STypes = {"SPROCESS.LCK", "PPROCESS.LCK", "PROCESS.LCK"};
|
||||
|
||||
private VENetwork.LockTypes m_Type; // from type enum (above)
|
||||
private string m_Path;
|
||||
private VENetwork.Status m_Status;
|
||||
private string m_UserNetworkID; // the 'm_' are all from the lck file.
|
||||
private string m_UserName;
|
||||
private string m_UserPhone1;
|
||||
private string m_UserPhone2;
|
||||
private string m_UserLoc1;
|
||||
private string m_UserLoc2;
|
||||
private string m_UserShell; // 1 - vfw, 2 - 16bit browser, 3 - 32-bit ve-proms
|
||||
private String m_UserProcess;
|
||||
private string m_FailureReason;
|
||||
private string m_Why; // reason for the lock, from user
|
||||
private DateTime m_DT;
|
||||
private UserData curUserData; // user data from cfg file
|
||||
private bool HasActiveUsers;
|
||||
|
||||
// this constructor opens the file & reads the data to set the properties
|
||||
public VELock(string iloc, UserData iuserdata, VENetwork.LockTypes ityp)
|
||||
{
|
||||
// HasActiveUsers is used when a lock is created, to determine whether
|
||||
// there are active users for the current level. Otherwise, it is not used.
|
||||
HasActiveUsers = true;
|
||||
m_Type = ityp;
|
||||
// if there is no lock at this level, just return.
|
||||
if (ityp==VENetwork.LockTypes.None) return;
|
||||
curUserData = iuserdata;
|
||||
m_Path = iloc + "\\" + STypes[(int)ityp-1];
|
||||
LoadLockProperties();
|
||||
}
|
||||
|
||||
// this method creates a lock for the current user. It is used when the user
|
||||
// selects to place a lock at a given level.
|
||||
public bool CreateLock(VEConnection myconn, bool prompt)
|
||||
{
|
||||
bool success=false;
|
||||
if (!prompt)
|
||||
success=CreateLockFileNoPrompt(myconn);
|
||||
else
|
||||
success=CreateLockFile(myconn);
|
||||
if (success)LoadLockProperties();
|
||||
return success;
|
||||
}
|
||||
|
||||
[Description("UserName"),Category("LockInfo"),]public string UserName
|
||||
{
|
||||
get{return m_UserName;}
|
||||
set{m_UserName=value;}
|
||||
}
|
||||
[Description("UserNetworkID"),Category("LockInfo"),]public string UserNetworkID
|
||||
{
|
||||
get{return m_UserNetworkID;}
|
||||
set{m_UserNetworkID=value;}
|
||||
}
|
||||
[Description("UserProcess"),Category("LockInfo"),]public string UserProcess
|
||||
{
|
||||
get{return m_UserProcess;}
|
||||
set{m_UserProcess=value;}
|
||||
}
|
||||
[Description("Loc1"),Category("LockInfo"),]public string Loc1
|
||||
{
|
||||
get{return m_UserLoc1;}
|
||||
set{m_UserLoc1=value;}
|
||||
}
|
||||
[Description("Loc2"),Category("LockInfo"),]public string Loc2
|
||||
{
|
||||
get{return m_UserLoc2;}
|
||||
set{m_UserLoc2=value;}
|
||||
}
|
||||
[Description("Phone1"),Category("LockInfo"),]public string Phone1
|
||||
{
|
||||
get{return m_UserPhone1;}
|
||||
set{m_UserPhone1=value;}
|
||||
}
|
||||
[Description("Phone2"),Category("LockInfo"),]public string Phone2
|
||||
{
|
||||
get{return m_UserPhone2;}
|
||||
set{m_UserPhone2=value;}
|
||||
}
|
||||
[Description("LockPath"),Category("LockInfo"),]public string Path
|
||||
{
|
||||
get{return m_Path;}
|
||||
set{m_Path=value;}
|
||||
}
|
||||
|
||||
[Description("FailureReason"),Category("LockInfo"),]public string FailureReason
|
||||
{
|
||||
get{return m_FailureReason;}
|
||||
set{m_FailureReason=value;}
|
||||
}
|
||||
|
||||
[Description("Why"),Category("Reason"),]public string Why
|
||||
{
|
||||
get{return m_Why;}
|
||||
set{m_Why=value;}
|
||||
}
|
||||
[Description("WhyDate"),Category("Reason"),]public DateTime WhyDT
|
||||
{
|
||||
get{return m_DT;}
|
||||
set{m_DT=value;}
|
||||
}
|
||||
[Description("LockStatus"), Category("LockInfo"),]public VENetwork.Status LockStatus
|
||||
{
|
||||
get{return m_Status;}
|
||||
set{m_Status=value;}
|
||||
}
|
||||
[Description("LockType"),Category("LockInfo"),]public VENetwork.LockTypes LockType
|
||||
{
|
||||
get{return m_Type;}
|
||||
set{m_Type=value;}
|
||||
}
|
||||
|
||||
private bool WriteToLockFile()
|
||||
{
|
||||
FileStream fs = null;
|
||||
BinaryWriter bw = null;
|
||||
try
|
||||
{
|
||||
// set the user data
|
||||
m_UserNetworkID = curUserData.UserNetworkID;
|
||||
m_UserName = curUserData.UserName;
|
||||
m_UserPhone1 = curUserData.UserPhone1;
|
||||
m_UserPhone2 = curUserData.UserPhone2;
|
||||
m_UserLoc1 = curUserData.UserLoc1;
|
||||
m_UserLoc2 = curUserData.UserLoc2;
|
||||
m_UserShell = curUserData.UserShell;
|
||||
m_UserProcess = curUserData.UserProcess;
|
||||
// A reason was entered. Create the file with user's data
|
||||
fs = new FileStream(m_Path,FileMode.CreateNew,FileAccess.ReadWrite,FileShare.None);
|
||||
bw = new BinaryWriter(fs);
|
||||
byte tmp=(byte)Utils.UserCStatus.PRACTIVE; // status
|
||||
bw.Write(tmp);
|
||||
char [] xbuf = new char[9];
|
||||
xbuf = m_UserNetworkID.PadRight(9,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[31];
|
||||
xbuf = m_UserName.PadRight(31,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[16];
|
||||
xbuf = m_UserPhone1.PadRight(16,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[16];
|
||||
xbuf = m_UserPhone2.PadRight(16,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[31];
|
||||
xbuf = m_UserLoc1.PadRight(31,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[31];
|
||||
xbuf = m_UserLoc2.PadRight(31,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[2];
|
||||
xbuf = m_UserShell.PadRight(2,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[3];
|
||||
xbuf = m_UserProcess.PadRight(3,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
xbuf = new char[60];
|
||||
xbuf = m_Why.PadRight(60,'\0').ToCharArray();
|
||||
bw.Write(xbuf);
|
||||
bw.Close();
|
||||
fs.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message,"Could not set a lock at this time.");
|
||||
if (bw!=null) bw.Close();
|
||||
if (fs!=null) fs.Close();
|
||||
if (File.Exists(m_Path)) File.Delete(m_Path);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool CreateLockFileNoPrompt(VEConnection veconn)
|
||||
{
|
||||
HasActiveUsers = veconn.HasActiveUsers();
|
||||
if (HasActiveUsers) return false;
|
||||
if (File.Exists(m_Path)==true) return false;
|
||||
// a string should be passed in with the reason, but this was
|
||||
// added to fix an approval bug & will have to do for now.
|
||||
m_Why = "Approval";
|
||||
WriteToLockFile();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create the lock file.
|
||||
private bool CreateLockFile(VEConnection veconn)
|
||||
{
|
||||
// check for active users. if we have them, we can only create a pending lock
|
||||
HasActiveUsers = veconn.HasActiveUsers();
|
||||
if (HasActiveUsers)
|
||||
{
|
||||
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
||||
DialogResult result;
|
||||
|
||||
// Displays the MessageBox.
|
||||
|
||||
result = MessageBox.Show("There are other users in the system, a pending lock will be used until other users are no longer in the system. Do you want this type of lock?", "Ve-PROMS Pending Lock", buttons);
|
||||
if(result == DialogResult.No)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if one exists, can't do it.
|
||||
if (File.Exists(m_Path)==false)
|
||||
{
|
||||
// Get user's reason for creating lock & make the file based on
|
||||
// user's configuration data (UserData read in from the user's environment.)
|
||||
LockDlg dlg = new LockDlg(this);
|
||||
dlg.ShowDialog();
|
||||
if (dlg.DialogResult == DialogResult.OK && (Why != null && Why !=""))
|
||||
{
|
||||
m_Why = Why;
|
||||
WriteToLockFile();
|
||||
}
|
||||
else if (dlg.DialogResult != DialogResult.Cancel)
|
||||
{
|
||||
MessageBox.Show("You must enter a message to perform a lock.","VE-PROMS");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Read in lock information & Determine lock status based on information
|
||||
private void LoadLockProperties()
|
||||
{
|
||||
FileStream fs = null;
|
||||
BinaryReader br = null;
|
||||
if (File.Exists(m_Path))
|
||||
{
|
||||
VlnSpinner spin = new VlnSpinner(2,25,"- Getting Lock Info for ",m_Path,true,true,false);
|
||||
while(spin.SpinnerWait(fs!=null))
|
||||
{
|
||||
try
|
||||
{
|
||||
this.m_DT = File.GetCreationTime(m_Path);
|
||||
fs = new FileStream(m_Path,FileMode.Open,FileAccess.Read,FileShare.Read);
|
||||
br = new BinaryReader(fs);
|
||||
|
||||
byte tmp;
|
||||
tmp = br.ReadByte();
|
||||
m_UserNetworkID = new string(br.ReadChars(9)).Replace('\0',' ').Trim();
|
||||
m_UserName = new string(br.ReadChars(31)).Replace('\0',' ').Trim();
|
||||
m_UserPhone1 = new string(br.ReadChars(16)).Replace('\0',' ').Trim();
|
||||
m_UserPhone2 = new string(br.ReadChars(16)).Replace('\0',' ').Trim();
|
||||
m_UserLoc1 = new string(br.ReadChars(31)).Replace('\0',' ').Trim();
|
||||
m_UserLoc2 = new string(br.ReadChars(31)).Replace('\0',' ').Trim();
|
||||
m_UserShell = new string(br.ReadChars(2)).Replace('\0',' ').Trim();
|
||||
m_UserProcess = new string(br.ReadChars(3)).Replace('\0',' ').Trim();
|
||||
m_Why = new string(br.ReadChars(60)).Replace('\0',' ').Trim();
|
||||
br.Close();
|
||||
fs.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message, "Could not read locking information");
|
||||
br.Close();
|
||||
fs.Close();
|
||||
fs = null;
|
||||
}
|
||||
|
||||
// if owned by me, it's a pending lock, i.e. I set to lock it, but
|
||||
// someone else may be in. This gets reset when the dat file is
|
||||
// connected to (if a lock exists).
|
||||
if (curUserData.UserName == m_UserName)
|
||||
m_Status = Status.LockPending;
|
||||
else
|
||||
m_Status = Status.LockedByOther;
|
||||
}
|
||||
spin.Dispose();
|
||||
}
|
||||
else
|
||||
m_Status = Status.NoLock;
|
||||
}
|
||||
|
||||
// this method unlocks by deleting the lock file & reloading properties
|
||||
public bool UnLock(bool doprompt)
|
||||
{
|
||||
if (m_Status!=Status.Locked && m_Status!=Status.LockPending) return true;
|
||||
if (doprompt)
|
||||
{
|
||||
string [] msg = {"System", "Plant", "Procedure Set"};
|
||||
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
||||
DialogResult result;
|
||||
result = MessageBox.Show("Are you sure you want to release your "+msg[(int)this.m_Type-1]+ " lock?", "Ve-PROMS Lock Removal", buttons);
|
||||
if(result == DialogResult.No)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (File.Exists(m_Path))
|
||||
{
|
||||
VlnSpinner spin = new VlnSpinner(2,25,"- Unlinking ",m_Path,true,true,false);
|
||||
while(spin.SpinnerWait(!File.Exists(m_Path)))
|
||||
{
|
||||
File.Delete(m_Path);
|
||||
}
|
||||
spin.Dispose();
|
||||
}
|
||||
LoadLockProperties();
|
||||
return true;
|
||||
}
|
||||
|
||||
// refresh reloads the lock properties (if I didn't lock it-if I locked it, they
|
||||
// won't change).
|
||||
public void Refresh()
|
||||
{
|
||||
LoadLockProperties();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,172 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{01986CD0-4C52-4592-881D-0502FCF55A46}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "VENetwork"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "VENetwork"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "..\..\..\Ve-proms.net\BIN\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "..\..\..\Ve-proms.net\BIN\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Utils"
|
||||
AssemblyName = "Utils"
|
||||
HintPath = "..\..\..\Ve-proms.net\BIN\Utils.dll"
|
||||
Private = "False"
|
||||
/>
|
||||
<Reference
|
||||
Name = "VlnStatus"
|
||||
AssemblyName = "VlnStatus"
|
||||
HintPath = "..\..\..\Ve-proms.net\BIN\VlnStatus.dll"
|
||||
Private = "False"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "LockDlg.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "LockDlg.resx"
|
||||
DependentUpon = "LockDlg.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "LockInfoDlg.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "LockInfoDlg.resx"
|
||||
DependentUpon = "LockInfoDlg.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "LockRlsDlg.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "LockRlsDlg.resx"
|
||||
DependentUpon = "LockRlsDlg.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "MonUsrDlg.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "MonUsrDlg.resx"
|
||||
DependentUpon = "MonUsrDlg.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "VEConn.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "VELock.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "VETempFile.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VENetwork", "VENetwork.csproj", "{01986CD0-4C52-4592-881D-0502FCF55A46}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{01986CD0-4C52-4592-881D-0502FCF55A46}.Debug.ActiveCfg = Debug|.NET
|
||||
{01986CD0-4C52-4592-881D-0502FCF55A46}.Debug.Build.0 = Debug|.NET
|
||||
{01986CD0-4C52-4592-881D-0502FCF55A46}.Release.ActiveCfg = Release|.NET
|
||||
{01986CD0-4C52-4592-881D-0502FCF55A46}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@@ -0,0 +1,199 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VETempFile.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 7/27/04 8:45a $
|
||||
*
|
||||
* $History: VETempFile.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 7/27/04 Time: 8:45a
|
||||
* Created in $/LibSource/VENetwork
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace VENetwork
|
||||
{
|
||||
// this class manages the temps directory for multi-user support in ve-proms.
|
||||
// The temps directory is used to handle a user's temporary files in support of
|
||||
// printing, etc.
|
||||
public class VETempFile
|
||||
{
|
||||
public string TemporaryDirectoryName;
|
||||
private string TemporaryFileName;
|
||||
public string TempNum;
|
||||
FileStream tmpFs;
|
||||
private string CurrentDir;
|
||||
|
||||
public VETempFile(string cd)
|
||||
{
|
||||
CurrentDir = cd;
|
||||
tmpFs=null;
|
||||
}
|
||||
|
||||
~ VETempFile()
|
||||
{
|
||||
CloseTempProc();
|
||||
}
|
||||
|
||||
// Converts the userid, num & PorD (characters 'P' or 'D') into a file-
|
||||
// name to be used for temporary file support. This creates the file-
|
||||
// name. The userid is extended to 8 characters with '_'s.
|
||||
public string MakeTempName(string userid, string num, char PorD)
|
||||
{
|
||||
// first, make the temp directory, i.e. temps, if it doesn't
|
||||
// exist.
|
||||
DirectoryInfo di = new DirectoryInfo(CurrentDir + "temps");
|
||||
if (!di.Exists) di.Create();
|
||||
string tmpuid = userid.PadRight(8,'_');
|
||||
string tpath = "temps" + "\\" + tmpuid + "." + PorD.ToString() + num;
|
||||
return tpath;
|
||||
}
|
||||
|
||||
// This method truncates the temp file (user___.P##) and then closes it.
|
||||
public void CloseTempProc()
|
||||
{
|
||||
if(tmpFs!=null)
|
||||
{
|
||||
try
|
||||
{
|
||||
// if called from a destructor, the file may have been closed - reopen
|
||||
// it if we can't write
|
||||
if (tmpFs.CanWrite==false)
|
||||
{
|
||||
tmpFs=null;
|
||||
tmpFs = new FileStream(TemporaryFileName,FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.None);
|
||||
}
|
||||
tmpFs.Seek(0L,SeekOrigin.Begin);
|
||||
tmpFs.SetLength(0L); // truncate the file
|
||||
tmpFs.Close();
|
||||
tmpFs=null;
|
||||
TemporaryDirectoryName=null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message,this.TemporaryDirectoryName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make all subdirectories, if not exist
|
||||
private void MakeAllNecessaryDirectories(string path)
|
||||
{
|
||||
if (Directory.Exists(CurrentDir + path)) return;
|
||||
|
||||
// Create the directory, and any subdirectories
|
||||
DirectoryInfo di = Directory.CreateDirectory(CurrentDir + path);
|
||||
}
|
||||
|
||||
// sets class variables based on input.
|
||||
private void SetUpTempDir(string userid, string num)
|
||||
{
|
||||
string TempPath = MakeTempName(userid,num,'D');
|
||||
MakeAllNecessaryDirectories(TempPath);
|
||||
TemporaryDirectoryName = TempPath + "\\";
|
||||
}
|
||||
|
||||
// This method attempts to attach to the specified temp file.
|
||||
// Userid and num are combined to create a process name and
|
||||
// TempPathDirectory. If the file is successfully opened and
|
||||
// a connection is established, a byte count matching the process
|
||||
// number is written to the file and the file is held open. (This
|
||||
// byte count is actually written in the connection logic,
|
||||
// veconn.cs, after a connection is successfully made.)
|
||||
public bool AttachSpecificTemp(string userid, string num)
|
||||
{
|
||||
// if already open, close.
|
||||
CloseTempProc();
|
||||
string pname = CurrentDir + MakeTempName(userid,num,'P');
|
||||
|
||||
// check to see if this user can use the file, i.e. open
|
||||
// exclusively.
|
||||
try
|
||||
{
|
||||
tmpFs = new FileStream(pname,FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.None);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
TemporaryFileName = pname;
|
||||
TempNum = num;
|
||||
SetUpTempDir(userid,num);
|
||||
return true;
|
||||
}
|
||||
|
||||
// if len is !0, try to delete files of the specified length.
|
||||
// zero length files are normally in transition and will be
|
||||
// deleted by their owners.
|
||||
public void DeleteFiles(string tmp, int len)
|
||||
{
|
||||
DirectoryInfo di = new DirectoryInfo(Directory.GetCurrentDirectory());
|
||||
FileInfo [] fis = di.GetFiles(tmp);
|
||||
foreach (FileInfo fi in fis)
|
||||
{
|
||||
if (len==0 || len==fi.Length) fi.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
// find the next available temp directory for a given userid.
|
||||
public bool FindAvailableTempDir(string userid)
|
||||
{
|
||||
// first look for existing temp files for this user to see if any
|
||||
// can be used.
|
||||
int i;
|
||||
string ptmp = MakeTempName(userid,"*",'P'); // create a template
|
||||
|
||||
// check to see if any exist.
|
||||
DirectoryInfo di = new DirectoryInfo(CurrentDir);
|
||||
FileInfo [] fis = di.GetFiles(ptmp);
|
||||
for (i=0;i<fis.Length;i++)
|
||||
{
|
||||
FileInfo fi = fis[i];
|
||||
string ptr = fi.Name.Substring(fi.Name.IndexOf(".")+2);
|
||||
if (AttachSpecificTemp(userid,ptr))
|
||||
{
|
||||
if (fi.Length>0)
|
||||
{
|
||||
// this was left from a reboot or something.
|
||||
// delete ownership and wrq files of the
|
||||
// specified size. Check to see if it is
|
||||
// consistent with the process file first.
|
||||
DeleteFiles("*.own",(int)fi.Length);
|
||||
DeleteFiles("*.wrq",(int)fi.Length);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
fis = null;
|
||||
|
||||
// Couldn't use an existing one, find a new one.
|
||||
for (i=0;i<99;i++)
|
||||
if (AttachSpecificTemp(userid,i.ToString("d2"))) return true;
|
||||
|
||||
// if the user got this far, something's wrong - report error & exit.
|
||||
MessageBox.Show("Too many temporary process files for user.","VE-PROMS error");
|
||||
return false;
|
||||
}
|
||||
|
||||
// this method writes out the requested number of bytes to the file.
|
||||
public void WriteBytes(int num)
|
||||
{
|
||||
if (tmpFs != null)
|
||||
{
|
||||
while (num>0)
|
||||
{
|
||||
tmpFs.WriteByte((byte)'x');
|
||||
num--;
|
||||
}
|
||||
tmpFs.Flush();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user