Example #1
0
        private void OnWriteClick(object sender, RoutedEventArgs e)
        {
            SerializeConfig();

            NdefMessage message = new NdefMessage();

            Payload payload;

            if (tabNdefData.SelectedIndex == (int)Tab.Text)
            {
                payload = new TextPayload("en", textTextData.Text, false);
            }
            else
            {
                payload = new UriPayload((UriPrefix)comboUriData.SelectedIndex, textUriData.Text);
            }

            message.AddRecord(new NdefRecord(payload));


            controller.WriteNdefMessage(readerList[0], message, (byte)config.UserMemoryPage, (byte)config.UpdateMemorySize);
        }