diff --git a/Example/MainWindow.xaml b/Example/MainWindow.xaml index dcaad10..b9ac762 100644 --- a/Example/MainWindow.xaml +++ b/Example/MainWindow.xaml @@ -10,7 +10,7 @@ xmlns:demo="clr-namespace:TapTrack.Demo" mc:Ignorable="d" WindowStartupLocation="CenterScreen" - Title="Tappy Demo 3.0" Height="650" Width="800" Foreground="{x:Null}" Background="{StaticResource LightBackground}"> + Title="Tappy Demo 3.1" Height="650" Width="800" Foreground="{x:Null}" Background="{StaticResource LightBackground}"> @@ -382,10 +382,14 @@ - + + + @@ -471,7 +475,7 @@ Batch Encode NFC Tags - This is used to encode a batch of tags based on an imported file. + This is used to encode a batch of tags based on an imported file. The imported file should be a .csv or .txt file, and contain a single column for the URI or text for the NDEF with each entry appearing on a new line as follows: @@ -601,10 +605,10 @@ - + + Export to spreadsheet + @@ -619,7 +623,7 @@ Export a spreadsheet of all tags batch encoded on this station - + diff --git a/Example/MainWindow.xaml.cs b/Example/MainWindow.xaml.cs index 72b6634..1bc638a 100644 --- a/Example/MainWindow.xaml.cs +++ b/Example/MainWindow.xaml.cs @@ -41,6 +41,7 @@ public partial class MainWindow : Window bool keyboardModeLineBreak = false; bool keyboardModeTab = false; bool keyboardModeTabLineBreakLast = false; + bool keyboardModeUid = false; int numTagsEncodedInThisBatch = 0; string batchPassword = null; @@ -897,9 +898,18 @@ private void chbxAddlineBreak_Unchecked(object sender, RoutedEventArgs e) private void tgbtnLaunchKeyboardFeature_Checked(object sender, RoutedEventArgs e) { + keyboardModeUid = false; + StreamNdef streamNdef = new StreamNdef(0, DetectTagSetting.Type2Type4AandMifare); + tappy.SendCommand(streamNdef, InvokeKeyboardFeature); + - StreamNdef stream = new StreamNdef(0, DetectTagSetting.Type2Type4AandMifare); - tappy.SendCommand(stream, InvokeKeyboardFeature); + } + + private void tgbtnLaunchKeyboardFeatureUid_Checked(object sender, RoutedEventArgs e) + { + keyboardModeUid = true; + StreamUid streamUid = new StreamUid(0, DetectTagSetting.Type2Type4AandMifare); + tappy.SendCommand(streamUid, InvokeKeyboardFeature); } @@ -918,6 +928,7 @@ private void InvokeKeyboardFeature(ResponseFrame frame, Exception e) if (temp.Length > 0) { + if (keyboardModeUid == false) { Array.Copy(data, 2 + data[1], temp, 0, temp.Length); NdefMessage message = NdefMessage.FromByteArray(temp); @@ -954,6 +965,21 @@ private void InvokeKeyboardFeature(ResponseFrame frame, Exception e) }; Dispatcher.BeginInvoke(EnterKeystrokes); + } + else //keyboard UID mode + { + Tag tag = new Tag(frame.Data); + + Action EnterKeystrokesUid = () => + { + System.Windows.Forms.SendKeys.SendWait(BitConverter.ToString(tag.UID)); + if (keyboardModeLineBreak) + System.Windows.Forms.SendKeys.SendWait("{ENTER}"); + if (keyboardModeTab) + System.Windows.Forms.SendKeys.SendWait("{TAB}"); + }; + Dispatcher.BeginInvoke(EnterKeystrokesUid); + } } } @@ -964,6 +990,12 @@ private void tgbtnLaunchKeyboardFeature_Unchecked(object sender, RoutedEventArgs tappy.SendCommand(); } + private void tgbtnLaunchKeyboardFeatureUid_Unchecked(object sender, RoutedEventArgs e) + { + tappy.SendCommand(); + } + + void TextBox_KeyPressed(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key.ToString() == "Tab") diff --git a/Example/Properties/AssemblyInfo.cs b/Example/Properties/AssemblyInfo.cs index 958cf0c..8df0bad 100644 --- a/Example/Properties/AssemblyInfo.cs +++ b/Example/Properties/AssemblyInfo.cs @@ -51,7 +51,7 @@ // 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("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyVersion("3.1.0.0")] +[assembly: AssemblyFileVersion("3.1.0.0")] [assembly: NeutralResourcesLanguage("en-CA")] diff --git a/Example/Tappy Tcmp Demo.csproj b/Example/Tappy Tcmp Demo.csproj index d881966..165de99 100644 --- a/Example/Tappy Tcmp Demo.csproj +++ b/Example/Tappy Tcmp Demo.csproj @@ -8,7 +8,7 @@ WinExe Properties TapTrack.Demo - Tappy Demo 3.0 + Tappy Demo 3.1 v4.5.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -49,7 +49,7 @@ DEBUG;TRACE prompt 4 - bin\Debug\Tappy Demo 3.0.xml + bin\Debug\Tappy Demo 3.1.xml AnyCPU @@ -59,7 +59,7 @@ TRACE prompt 4 - bin\Release\Tappy Demo 3.0.xml + bin\Release\Tappy Demo 3.1.xml DA55EDA3D657C041EF308F9D8CDF1B5A4950F2E4