This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows.Navigation; | |
namespace RegistrationKiosk | |
{ | |
/// <summary> | |
/// Interaction logic for MainWindow.xaml | |
/// </summary> | |
public partial class MainWindow : Page | |
{ | |
public MainWindow() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Input; | |
using System.Windows.Navigation; | |
using System.Windows.Threading; | |
using SocketSender; | |
using IntercardLogging; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void WriteRequest(object data, Stream stream) | |
{ | |
var serializer = SerializerHelper.Get(data.GetType()); | |
var ns = new XmlSerializerNamespaces(new[] { new XmlQualifiedName("", "") }); //strip all default namespaces. | |
var settings = new XmlWriterSettings { Encoding = new UTF8Encoding(false), OmitXmlDeclaration = false }; | |
using (var xw = XmlTextWriter.Create(stream, settings)) | |
{ | |
if (settings.OmitXmlDeclaration) | |
{ | |
//'encoding' in the xml declaration used to be forced to all-caps. As far as I can tell, there's no reason for it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// acct number + site code: %6074=4369371343068064237?;6074=0000000000303942? | |
public static string FormatAcctNumber(string cardNumber, out string siteCode) | |
{ | |
// split data by | |
string[] array = cardNumber.Split(';'); | |
string data = array[1]; | |
string[] dataArray = data.Split('='); | |
siteCode = dataArray[0]; | |
string acctNumber = dataArray[1]; | |
// remove question mark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page x:Class="RegistrationKiosk.FirstName" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:TermControls="clr-namespace:TermControls;assembly=TermControls" | |
xmlns:adorners="http://gu.se/Adorners" | |
mc:Ignorable="d" | |
d:DesignHeight="{Binding SystemParameters.PrimaryScreenHeight }" d:DesignWidth="{Binding SystemParameters.PrimaryScreenWidth }" | |
Title="FirstName"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using IntercardLogging; | |
using System.IO; | |
using System.Net; | |
using System.IO.Ports; | |
using System.Reflection; | |
using System.Text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
// methods encapsulated by the interface method of various return types can be placed inside of the void interface methods | |
// could use a public global class property to out a return value | |
namespace Dispenser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define USE_DEBUG | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
using System.IO.Ports; | |
using Microsoft.Win32.SafeHandles; | |
using System.Reflection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO.Ports; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using CardDispenser; | |
namespace CardDispenserTests | |
{ | |
[TestClass] | |
public class CardDispenerTests | |
{ |