From a1072ec9d5de59ae603c4407c40919d864c4aeed Mon Sep 17 00:00:00 2001 From: Cory Todd Date: Mon, 24 Aug 2015 13:51:39 -0700 Subject: [PATCH] alpha release --- .gitignore | 7 + .../Apex7000_BillValidator.csproj | 57 +++ Apex7000_BillValidator/ApexValidator.cs | 324 ++++++++++++++++++ Apex7000_BillValidator/Commands.cs | 23 ++ Apex7000_BillValidator/DataContracts.cs | 107 ++++++ Apex7000_BillValidator/Events.cs | 24 ++ .../Properties/AssemblyInfo.cs | 36 ++ .../Apex7000_BillValidator_Test.csproj | 110 ++++++ Apex7000_BillValidator_Test/App.config | 6 + Apex7000_BillValidator_Test/App.xaml | 8 + Apex7000_BillValidator_Test/App.xaml.cs | 17 + Apex7000_BillValidator_Test/MainWindow.xaml | 8 + .../MainWindow.xaml.cs | 75 ++++ .../Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 71 ++++ .../Properties/Resources.resx | 117 +++++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + Pyramid.sln | 28 ++ README.md | 8 + 20 files changed, 1118 insertions(+) create mode 100644 .gitignore create mode 100644 Apex7000_BillValidator/Apex7000_BillValidator.csproj create mode 100644 Apex7000_BillValidator/ApexValidator.cs create mode 100644 Apex7000_BillValidator/Commands.cs create mode 100644 Apex7000_BillValidator/DataContracts.cs create mode 100644 Apex7000_BillValidator/Events.cs create mode 100644 Apex7000_BillValidator/Properties/AssemblyInfo.cs create mode 100644 Apex7000_BillValidator_Test/Apex7000_BillValidator_Test.csproj create mode 100644 Apex7000_BillValidator_Test/App.config create mode 100644 Apex7000_BillValidator_Test/App.xaml create mode 100644 Apex7000_BillValidator_Test/App.xaml.cs create mode 100644 Apex7000_BillValidator_Test/MainWindow.xaml create mode 100644 Apex7000_BillValidator_Test/MainWindow.xaml.cs create mode 100644 Apex7000_BillValidator_Test/Properties/AssemblyInfo.cs create mode 100644 Apex7000_BillValidator_Test/Properties/Resources.Designer.cs create mode 100644 Apex7000_BillValidator_Test/Properties/Resources.resx create mode 100644 Apex7000_BillValidator_Test/Properties/Settings.Designer.cs create mode 100644 Apex7000_BillValidator_Test/Properties/Settings.settings create mode 100644 Pyramid.sln create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91757b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +Apex7000_BillValidator\bin\* +Apex7000_BillValidator\obj\* +Apex7000_BillValidator_Test\bin\* +Apex7000_BillValidator_Test\obj\* +Apex7000_BillValidator/obj/ +Apex7000_BillValidator_Test/bin/ +Apex7000_BillValidator_Test/obj/ diff --git a/Apex7000_BillValidator/Apex7000_BillValidator.csproj b/Apex7000_BillValidator/Apex7000_BillValidator.csproj new file mode 100644 index 0000000..0dbee9c --- /dev/null +++ b/Apex7000_BillValidator/Apex7000_BillValidator.csproj @@ -0,0 +1,57 @@ + + + + + Debug + AnyCPU + {735220BB-D8E8-4E21-80D9-AEA6E41B13ED} + Library + Properties + Apex7000_BillValidator + Apex7000_BillValidator + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Apex7000_BillValidator/ApexValidator.cs b/Apex7000_BillValidator/ApexValidator.cs new file mode 100644 index 0000000..427048a --- /dev/null +++ b/Apex7000_BillValidator/ApexValidator.cs @@ -0,0 +1,324 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System.IO; +using System.IO.Ports; +using System.Globalization; + +namespace Apex7000_BillValidator +{ + public partial class ApexValidator + { + private SerialPort port = null; + private byte lastResponse = Response.Idle; + private COMPort comPort = COMPort.COM1; + private readonly object mutex = new object(); + public bool isConnected = false; + private int reconnectAttempts = 0; + private DateTime escrowTimeout = DateTime.MinValue; + private CultureInfo currentCulture; + private CurrencyMap currentCurrencyMap; + + + public ApexValidator(string comm) + { + comPort = (COMPort)Enum.Parse(typeof(COMPort), comm); + } + + public ApexValidator(COMPort comm) + { + comPort = comm; + } + + public ApexValidator(COMPort comm, string culture) + { + comPort = comm; + currentCulture = new CultureInfo(culture); + } + + public ApexValidator(COMPort comm, CultureInfo culture) + { + comPort = comm; + currentCulture = culture; + } + + public ApexValidator(string comm, CultureInfo culture) + { + comPort = (COMPort)Enum.Parse(typeof(COMPort), comm); + currentCulture = culture; + } + + + public void Close() + { + port.Close(); + } + + public void Connect() + { + //if (port != null) + // port.DataReceived -= port_DataReceived; + + port = new SerialPort(comPort.ToString(), 9600, Parity.Even, 7, StopBits.One); + port.ReadTimeout = 500; + //port.DataReceived += port_DataReceived; + + try + { + port.Open(); + } + catch(Exception e) + { + /* Handle this better? */ + if (OnError != null) + { + OnError(this, ErrorTypes.PortError); + } + else + { + throw e; + } + } + + byte[] wakeup = Request.BaseMessage; + + lock(mutex) + { + Write(wakeup); + Read(); + } + + Thread ackThread = new Thread((fn) => + { + while(true) + { + lock (mutex) + { + Write(Request.BaseMessage); + Read(); + } + + Thread.Sleep(200); + } + }); + ackThread.IsBackground = true; + ackThread.Start(); + + } + + private void Reconnect() + { + lock(mutex) + { + port = new SerialPort(comPort.ToString(), 9600, Parity.Even, 7, StopBits.One); + port.ReadTimeout = 500; + + try + { + port.Open(); + } + catch (Exception e) + { + //return; + if (OnError != null) + { + OnError(this, ErrorTypes.PortError); + } + } + + byte[] wakeup = Request.BaseMessage; + + lock (mutex) + { + Write(wakeup); + Read(); + } + } + } + + private void Write(byte[] data) + { + data = Checksum(data); + + if (port != null) + { + try + { + port.Write(data, 0, data.Length); + reconnectAttempts = 0; + } + catch(Exception e) + { + isConnected = false; + Thread.Sleep(1000); + reconnectAttempts++; + if (reconnectAttempts < 3) + { + Reconnect(); + Write(data); + } + else + { + reconnectAttempts = 0; + if (OnError != null) + { + OnError(this, ErrorTypes.WriteError); + } + } + } + } + else + { + if (OnError != null) + { + OnError(this, ErrorTypes.PortError); + } + } + } + + private byte[] Checksum(byte[] msg) + { + List tmp = new List(msg); + byte checksum = (byte)(msg[1] ^ msg[2]); + for(int i = 3; i < msg.Length - 1; i++) + { + checksum ^= msg[i]; + } + + tmp.Add(checksum); + return tmp.ToArray(); + } + + private void Read() + { + if (port.IsOpen) + { + int waitCount = 0; + while (port.BytesToRead < 11) + { + waitCount++; + if (waitCount >= 5) + { + /* Don't report error if validator is in accepting state as this can take some time */ + //if (OnError != null && lastResponse != Response.Accepting) + //{ + OnError(this, ErrorTypes.Timeout); + //} + + return; + } + + Thread.Sleep(100); + } + + byte[] buffer = new byte[11]; + + port.Read(buffer, 0, 11); + + byte t3 = buffer[3]; + byte t4 = buffer[4]; + + if ((t3 & 1) == Response.Idle) + { + //Only if the box has been recently removed + if ((t4 & 0x10) == Response.CassetteRemoved) + { + if (lastResponse != Response.CassetteRemoved) + { + lastResponse = Response.CassetteRemoved; + if (CashboxRemoved != null) + { + CashboxRemoved(this, null); + } + } + } + else + { + + //Normal idle response + if (lastResponse == Response.CassetteRemoved) + { + if (CashboxAttached != null) + { + CashboxAttached(this, null); + } + } + + if (!isConnected) + { + isConnected = true; + if (PowerUp != null) + { + PowerUp(this, null); + } + } + + lastResponse = Response.Idle; + } + + Write(Request.Ack); + } + if ((t3 & 2) == Response.Accepting) + { + if (lastResponse != Response.Accepting) + { + lastResponse = Response.Accepting; + } + } + if ((t3 & 4) == Response.Escrow) + { + + if (lastResponse != Response.Escrow) + { + if (escrowTimeout == DateTime.MinValue) + { + escrowTimeout = DateTime.Now; + } + else + { + TimeSpan ts = DateTime.Now - escrowTimeout; + if (ts.TotalSeconds >= 10) + { + //Let's reconnect and make sure everything is still good + Reconnect(); + Reject(); + } + } + + lastResponse = Response.Escrow; + + byte bill = (byte)((buffer[5] & 0x38) >> 3); + + if (OnEscrow != null) + OnEscrow(this, BillParser.getDenomFromByte(bill, currentCulture)); + } + } + if ((t3 & 8) == Response.Stacking) + { + if (lastResponse != Response.Stacking) + { + lastResponse = Response.Stacking; + + if (BillStacked != null) + { + BillStacked(this, null); + } + } + } + if ((t3 & 0x20) == Response.Returned) + { + if (lastResponse != Response.Returned) + { + //This screws with the box when it is removed + //lastResponse = Response.Returned; + Write(Request.Ack); + } + } + } + } + } +} diff --git a/Apex7000_BillValidator/Commands.cs b/Apex7000_BillValidator/Commands.cs new file mode 100644 index 0000000..299c759 --- /dev/null +++ b/Apex7000_BillValidator/Commands.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Apex7000_BillValidator +{ + public partial class ApexValidator + { + public void Stack() + { + escrowTimeout = DateTime.MinValue; + Write(Request.Stack); + } + + public void Reject() + { + escrowTimeout = DateTime.MinValue; + Write(Request.Reject); + } + } +} diff --git a/Apex7000_BillValidator/DataContracts.cs b/Apex7000_BillValidator/DataContracts.cs new file mode 100644 index 0000000..3a27a2d --- /dev/null +++ b/Apex7000_BillValidator/DataContracts.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Globalization; + +namespace Apex7000_BillValidator +{ + public enum COMPort + { + COM1, + COM2, + COM3, + COM4, + COM5, + COM6, + COM7, + COM8, + COM9, + COM10, + COM11, + COM12 + } + + public enum ErrorTypes + { + MotorFailure, + CheckSumError, + BillJam, + BillRemove, + StackerOpen, + SensorProblem, + BillFish, + StackerProblem, + BillReject, + InvalidCommand, + StackFailure, + Timeout, + WriteError, + PortError + } + + public struct Response + { + public static readonly byte Idle = 0x01; + public static readonly byte Accepting = 0x02; + public static readonly byte Escrow = 0x04; + public static readonly byte Stacking = 0x08; + public static readonly byte Returned = 0x20; + + public static readonly byte CassetteRemoved = 0x00; + } + + public struct Request + { + public static readonly byte[] BaseMessage = { 0x02, 0x08, 0x10, 0x7F, 0x10, 0x00, 0x03 }; + public static readonly byte[] Ack = { 0x02, 0x08, 0x10, 0x7F, 0x10, 0x00, 0x03 }; + //public static readonly byte[] Ack = { 0x02, 0x08, 0x11, 0x7F, 0x10, 0x00, 0x03 }; + public static readonly byte[] Escrow = { 0x02, 0x08, 0x11, 0x7F, 0x10, 0x00, 0x03 }; + public static readonly byte[] Stack = { 0x02, 0x08, 0x11, 0x7F, 0x30, 0x00, 0x03 }; + public static readonly byte[] Reject = { 0x02, 0x08, 0x11, 0x7F, 0x50, 0x00, 0x03 }; + } + + public struct CurrencyMap + { + public static readonly Dictionary US = new Dictionary() { { 0x01, 1 }, { 0x03, 5 }, { 0x04, 10 }, { 0x05, 20 }, { 0x06, 50 }, { 0x07, 100 } }; + public static readonly Dictionary CA = new Dictionary() { { 0x01, 5 }, { 0x02, 10 }, { 0x03, 20 }}; + + } + + public class BillParser + { + public static int getDenomFromByte(byte b, CultureInfo currentCulture) + { + if (currentCulture != null) + { + var r = new RegionInfo(currentCulture.LCID); + string region = r.TwoLetterISORegionName; + + CurrencyMap m = new CurrencyMap(); + var currencyMaps = m.GetType().GetFields().ToList(); + foreach (var cm in currencyMaps) + { + if (cm.Name == region) + { + + foreach(var kvp in (Dictionary)cm.GetValue(null)) + { + if (b == kvp.Key) + return kvp.Value; + } + break; + } + } + } + else + { + currentCulture = new CultureInfo("en-US"); + return getDenomFromByte(b, currentCulture); + } + + return 0; + + } + } +} diff --git a/Apex7000_BillValidator/Events.cs b/Apex7000_BillValidator/Events.cs new file mode 100644 index 0000000..773e4f4 --- /dev/null +++ b/Apex7000_BillValidator/Events.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Apex7000_BillValidator +{ + public partial class ApexValidator + { + public event EventHandler PowerUp; + public event EventHandler BeginEscrow; + public event EventHandler BillStacked; + public event EventHandler ClearLastError; + public event EventHandler CashboxRemoved; + public event EventHandler CashboxAttached; + + public delegate void OnEscrowEventHandler(object sender, int denomination); + public event OnEscrowEventHandler OnEscrow; + + public delegate void OnErrorEventHandler(object sender, ErrorTypes type); + public event OnErrorEventHandler OnError; + } +} diff --git a/Apex7000_BillValidator/Properties/AssemblyInfo.cs b/Apex7000_BillValidator/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..29881d1 --- /dev/null +++ b/Apex7000_BillValidator/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NET Pyramid RS-232")] +[assembly: AssemblyDescription("RS-232 API by Pyramid Technologies")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Pyramid Technologies Inc")] +[assembly: AssemblyProduct("NET Pyramid RS-232")] +[assembly: AssemblyCopyright("© Pyramid Technologies Inc. 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("380ac9e2-635d-4547-a090-4e0e25663de9")] + +// 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 Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Apex7000_BillValidator_Test/Apex7000_BillValidator_Test.csproj b/Apex7000_BillValidator_Test/Apex7000_BillValidator_Test.csproj new file mode 100644 index 0000000..60665b6 --- /dev/null +++ b/Apex7000_BillValidator_Test/Apex7000_BillValidator_Test.csproj @@ -0,0 +1,110 @@ + + + + + Debug + AnyCPU + {AB3A48C8-4996-4E45-8DE9-2F960D22C27F} + WinExe + Properties + Apex7000_BillValidator_Test + Apex7000_BillValidator_Test + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + {735220bb-d8e8-4e21-80d9-aea6e41b13ed} + Apex7000_BillValidator + + + + + \ No newline at end of file diff --git a/Apex7000_BillValidator_Test/App.config b/Apex7000_BillValidator_Test/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/Apex7000_BillValidator_Test/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Apex7000_BillValidator_Test/App.xaml b/Apex7000_BillValidator_Test/App.xaml new file mode 100644 index 0000000..fdb1ebb --- /dev/null +++ b/Apex7000_BillValidator_Test/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Apex7000_BillValidator_Test/App.xaml.cs b/Apex7000_BillValidator_Test/App.xaml.cs new file mode 100644 index 0000000..b20efe5 --- /dev/null +++ b/Apex7000_BillValidator_Test/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Apex7000_BillValidator_Test +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Apex7000_BillValidator_Test/MainWindow.xaml b/Apex7000_BillValidator_Test/MainWindow.xaml new file mode 100644 index 0000000..326b8e1 --- /dev/null +++ b/Apex7000_BillValidator_Test/MainWindow.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Apex7000_BillValidator_Test/MainWindow.xaml.cs b/Apex7000_BillValidator_Test/MainWindow.xaml.cs new file mode 100644 index 0000000..9acfe80 --- /dev/null +++ b/Apex7000_BillValidator_Test/MainWindow.xaml.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Apex7000_BillValidator; + +namespace Apex7000_BillValidator_Test +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public ApexValidator validator; + public MainWindow() + { + InitializeComponent(); + Loaded += MainWindow_Loaded; + } + + void MainWindow_Loaded(object sender, RoutedEventArgs e) + { + //validator = new ApexValidator(COMPort.COM10, "en-US"); + validator = new ApexValidator(COMPort.COM2); + validator.PowerUp += validator_PowerUp; + validator.OnEscrow += validator_OnEscrow; + validator.BillStacked += validator_BillStacked; + validator.OnError += validator_OnError; + validator.CashboxAttached += validator_CashboxAttached; + validator.CashboxRemoved += validator_CashboxRemoved; + + validator.Connect(); + } + + void validator_OnError(object sender, ErrorTypes type) + { + Console.WriteLine("Error has occured: {0}", type.ToString()); + } + + void validator_CashboxRemoved(object sender, EventArgs e) + { + Console.WriteLine("Box removed"); + } + + void validator_CashboxAttached(object sender, EventArgs e) + { + Console.WriteLine("Box Attached"); + } + + void validator_BillStacked(object sender, EventArgs e) + { + Console.WriteLine("Bill Stacked"); + } + + void validator_OnEscrow(object sender, int denomination) + { + validator.Stack(); + } + + void validator_PowerUp(object sender, EventArgs e) + { + + } + } +} diff --git a/Apex7000_BillValidator_Test/Properties/AssemblyInfo.cs b/Apex7000_BillValidator_Test/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..83cc8d0 --- /dev/null +++ b/Apex7000_BillValidator_Test/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("API Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Pyramid Technologies Inc")] +[assembly: AssemblyProduct("API Test")] +[assembly: AssemblyCopyright("© Pyramid Technologies Inc. 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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 Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Apex7000_BillValidator_Test/Properties/Resources.Designer.cs b/Apex7000_BillValidator_Test/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b52b898 --- /dev/null +++ b/Apex7000_BillValidator_Test/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Apex7000_BillValidator_Test.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Apex7000_BillValidator_Test.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Apex7000_BillValidator_Test/Properties/Resources.resx b/Apex7000_BillValidator_Test/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Apex7000_BillValidator_Test/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Apex7000_BillValidator_Test/Properties/Settings.Designer.cs b/Apex7000_BillValidator_Test/Properties/Settings.Designer.cs new file mode 100644 index 0000000..97d9baa --- /dev/null +++ b/Apex7000_BillValidator_Test/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Apex7000_BillValidator_Test.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Apex7000_BillValidator_Test/Properties/Settings.settings b/Apex7000_BillValidator_Test/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Apex7000_BillValidator_Test/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Pyramid.sln b/Pyramid.sln new file mode 100644 index 0000000..f027caa --- /dev/null +++ b/Pyramid.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apex7000_BillValidator", "Apex7000_BillValidator\Apex7000_BillValidator.csproj", "{735220BB-D8E8-4E21-80D9-AEA6E41B13ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apex7000_BillValidator_Test", "Apex7000_BillValidator_Test\Apex7000_BillValidator_Test.csproj", "{AB3A48C8-4996-4E45-8DE9-2F960D22C27F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {735220BB-D8E8-4E21-80D9-AEA6E41B13ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {735220BB-D8E8-4E21-80D9-AEA6E41B13ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {735220BB-D8E8-4E21-80D9-AEA6E41B13ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {735220BB-D8E8-4E21-80D9-AEA6E41B13ED}.Release|Any CPU.Build.0 = Release|Any CPU + {AB3A48C8-4996-4E45-8DE9-2F960D22C27F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB3A48C8-4996-4E45-8DE9-2F960D22C27F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB3A48C8-4996-4E45-8DE9-2F960D22C27F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB3A48C8-4996-4E45-8DE9-2F960D22C27F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..a9c8f15 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +Pyramid CSharp RS-232 API +========================= + +This the alpha release of the C# port of the Pyramid Java Library, +It is not 100% tested but we're working on it. Please report bugs and feature requests so we can bring this to an official release. + + +