2014-11-23 17:04:22 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Calculators
|
|
|
|
|
{
|
|
|
|
|
public class TI83LinkPort
|
|
|
|
|
{
|
|
|
|
|
// Emulates TI linking software.
|
|
|
|
|
// See http://www.ticalc.org/archives/files/fileinfo/294/29418.html for documentation
|
|
|
|
|
|
|
|
|
|
// Note: Each hardware read/write to the link port calls tthe update method.
|
2017-04-17 20:23:04 +00:00
|
|
|
|
private readonly TI83 Parent;
|
|
|
|
|
private readonly Queue<byte> CurrentData = new Queue<byte>();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
private FileStream _currentFile;
|
|
|
|
|
private byte[] _variableData;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
private Action _nextStep;
|
|
|
|
|
|
|
|
|
|
private ushort _bytesToSend;
|
|
|
|
|
private byte _bitsLeft;
|
|
|
|
|
private byte _currentByte;
|
|
|
|
|
private byte _stepsLeft;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
private Status _currentStatus = Status.Inactive;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
|
|
|
|
private enum Status
|
|
|
|
|
{
|
|
|
|
|
Inactive,
|
|
|
|
|
PrepareReceive,
|
|
|
|
|
PrepareSend,
|
|
|
|
|
Receive,
|
|
|
|
|
Send
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
public TI83LinkPort(TI83 parent)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
Parent = parent;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Update()
|
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (_currentStatus == Status.PrepareReceive)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Get the first byte, and start sending it.
|
|
|
|
|
_currentByte = CurrentData.Dequeue();
|
|
|
|
|
_currentStatus = Status.Receive;
|
|
|
|
|
_bitsLeft = 8;
|
|
|
|
|
_stepsLeft = 5;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (_currentStatus == Status.PrepareSend && Parent.LinkState != 3)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentStatus = Status.Send;
|
|
|
|
|
_bitsLeft = 8;
|
|
|
|
|
_stepsLeft = 5;
|
|
|
|
|
_currentByte = 0;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (_currentStatus == Status.Receive)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
switch (_stepsLeft)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
|
|
|
|
case 5:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Receive step 1: Lower the other device's line.
|
|
|
|
|
Parent.LinkInput = ((_currentByte & 1) == 1) ? 2 : 1;
|
|
|
|
|
_currentByte >>= 1;
|
|
|
|
|
_stepsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 4:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Receive step 2: Wait for the calc to lower the other line.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
if ((Parent.LinkState & 3) == 0)
|
2017-04-17 20:23:04 +00:00
|
|
|
|
{
|
|
|
|
|
_stepsLeft--;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 3:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Receive step 3: Raise the other device's line back up.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
Parent.LinkInput = 0;
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_stepsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 2:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Receive step 4: Wait for the calc to raise its line back up.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
if ((Parent.LinkState & 3) == 3)
|
2017-04-17 20:23:04 +00:00
|
|
|
|
{
|
|
|
|
|
_stepsLeft--;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 1:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Receive step 5: Finish.
|
|
|
|
|
_bitsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (_bitsLeft == 0)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
|
|
|
|
if (CurrentData.Count > 0)
|
2017-04-17 20:23:04 +00:00
|
|
|
|
{
|
|
|
|
|
_currentStatus = Status.PrepareReceive;
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentStatus = Status.Inactive;
|
|
|
|
|
_nextStep?.Invoke();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
2017-04-17 20:23:04 +00:00
|
|
|
|
{
|
|
|
|
|
// Next bit in the current byte.
|
|
|
|
|
_stepsLeft = 5;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-04-17 20:23:04 +00:00
|
|
|
|
else if (_currentStatus == Status.Send)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
switch (_stepsLeft)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
|
|
|
|
case 5:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Send step 1: Calc lowers a line.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
if (Parent.LinkState != 3)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
int bit = Parent.LinkState & 1;
|
|
|
|
|
int shift = 8 - _bitsLeft;
|
|
|
|
|
_currentByte |= (byte)(bit << shift);
|
|
|
|
|
_stepsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
2017-04-17 20:23:04 +00:00
|
|
|
|
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 4:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Send step 2: Lower our line.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
Parent.LinkInput = Parent.LinkOutput ^ 3;
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_stepsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 3:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Send step 3: wait for the calc to raise its line.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
if ((Parent.LinkOutput & 3) == 0)
|
2017-04-17 20:23:04 +00:00
|
|
|
|
{
|
|
|
|
|
_stepsLeft--;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 2:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Send step 4: raise the other devices lines.
|
2015-02-07 14:46:02 +00:00
|
|
|
|
Parent.LinkInput = 0;
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_stepsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 1:
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Send step 5: Finish
|
|
|
|
|
_bitsLeft--;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (_bitsLeft == 0)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_bytesToSend--;
|
|
|
|
|
CurrentData.Enqueue(_currentByte);
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (_bytesToSend > 0)
|
|
|
|
|
{
|
|
|
|
|
_currentStatus = Status.PrepareSend;
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentStatus = Status.Inactive;
|
|
|
|
|
_nextStep?.Invoke();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Next bit in the current byte.
|
|
|
|
|
_stepsLeft = 5;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
2017-04-17 20:23:04 +00:00
|
|
|
|
|
2014-11-23 17:04:22 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
public void SendFileToCalc(FileStream fs, bool verify)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (verify)
|
|
|
|
|
{
|
|
|
|
|
VerifyFile(fs);
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
fs.Seek(55, SeekOrigin.Begin);
|
|
|
|
|
_currentFile = fs;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
SendNextFile();
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
private void VerifyFile(FileStream fs)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Verify the file format.
|
|
|
|
|
byte[] expected = { 0x2a, 0x2a, 0x54, 0x49, 0x38, 0x33, 0x2a, 0x2a, 0x1a, 0x0a, 0x00 };
|
|
|
|
|
byte[] actual = new byte[11];
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
fs.Seek(0, SeekOrigin.Begin);
|
|
|
|
|
fs.Read(actual, 0, 11);
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Check the header.
|
2014-11-23 17:04:22 +00:00
|
|
|
|
for (int n = 0; n < 11; n++)
|
2017-04-17 20:23:04 +00:00
|
|
|
|
{
|
|
|
|
|
if (expected[n] != actual[n])
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
fs.Close();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
throw new IOException("Invalid Header.");
|
|
|
|
|
}
|
2017-04-17 20:23:04 +00:00
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Seek to the end of the comment.
|
|
|
|
|
fs.Seek(53, SeekOrigin.Begin);
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
int size = fs.ReadByte() + (fs.ReadByte() * 256);
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (fs.Length != size + 57)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
fs.Close();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
throw new IOException("Invalid file length.");
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Verify the checksum.
|
|
|
|
|
ushort checksum = 0;
|
|
|
|
|
for (int n = 0; n < size; n++)
|
|
|
|
|
{
|
|
|
|
|
checksum += (ushort)fs.ReadByte();
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
ushort actualChecksum = (ushort)(fs.ReadByte() + (fs.ReadByte() * 256));
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
if (checksum != actualChecksum)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
fs.Close();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
throw new IOException("Invalid Checksum.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SendNextFile()
|
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
byte[] header = new byte[13];
|
|
|
|
|
if (!_currentFile.CanRead || _currentFile.Read(header, 0, 13) != 13)
|
2014-11-23 17:04:22 +00:00
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// End of file.
|
|
|
|
|
_currentFile.Close();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
int size = header[2] + (header[3] * 256);
|
|
|
|
|
_variableData = new byte[size + 2];
|
|
|
|
|
_currentFile.Read(_variableData, 0, size + 2);
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Request to send the file.
|
2014-11-23 17:04:22 +00:00
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
CurrentData.Enqueue(0x03);
|
|
|
|
|
CurrentData.Enqueue(0xC9);
|
2017-04-17 20:23:04 +00:00
|
|
|
|
foreach (byte b in header)
|
|
|
|
|
{
|
|
|
|
|
CurrentData.Enqueue(b);
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Calculate the checksum for the command.
|
|
|
|
|
ushort checksum = 0;
|
|
|
|
|
for (int n = 2; n < header.Length; n++)
|
|
|
|
|
{
|
|
|
|
|
checksum += header[n];
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
CurrentData.Enqueue((byte)(checksum % 256));
|
|
|
|
|
CurrentData.Enqueue((byte)(checksum / 256));
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Finalize the command.
|
|
|
|
|
_currentStatus = Status.PrepareReceive;
|
|
|
|
|
_nextStep = ReceiveReqAck;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
Parent.LinkActive = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ReceiveReqAck()
|
|
|
|
|
{
|
|
|
|
|
Parent.LinkActive = false;
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
// Prepare to receive the Aknowledgement response from the calculator.
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_bytesToSend = 8;
|
|
|
|
|
_currentStatus = Status.PrepareSend;
|
|
|
|
|
_nextStep = SendVariableData;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SendVariableData()
|
|
|
|
|
{
|
|
|
|
|
// Check to see if out of memory first.
|
|
|
|
|
CurrentData.Dequeue();
|
|
|
|
|
CurrentData.Dequeue();
|
|
|
|
|
CurrentData.Dequeue();
|
|
|
|
|
CurrentData.Dequeue();
|
|
|
|
|
CurrentData.Dequeue();
|
|
|
|
|
|
|
|
|
|
if (CurrentData.Dequeue() == 0x36)
|
|
|
|
|
{
|
|
|
|
|
OutOfMemory();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
CurrentData.Enqueue(0x03);
|
|
|
|
|
CurrentData.Enqueue(0x56);
|
|
|
|
|
CurrentData.Enqueue(0x00);
|
|
|
|
|
CurrentData.Enqueue(0x00);
|
|
|
|
|
|
|
|
|
|
CurrentData.Enqueue(0x03);
|
|
|
|
|
CurrentData.Enqueue(0x15);
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Add variable data.
|
|
|
|
|
foreach (byte b in _variableData)
|
|
|
|
|
{
|
|
|
|
|
CurrentData.Enqueue(b);
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
// Calculate the checksum.
|
|
|
|
|
ushort checksum = 0;
|
|
|
|
|
for (int n = 2; n < _variableData.Length; n++)
|
|
|
|
|
{
|
|
|
|
|
checksum += _variableData[n];
|
|
|
|
|
}
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
CurrentData.Enqueue((byte)(checksum % 256));
|
|
|
|
|
CurrentData.Enqueue((byte)(checksum / 256));
|
2014-11-23 17:04:22 +00:00
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentStatus = Status.PrepareReceive;
|
|
|
|
|
_nextStep = ReceiveDataAck;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
Parent.LinkActive = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ReceiveDataAck()
|
|
|
|
|
{
|
|
|
|
|
Parent.LinkActive = false;
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
// Prepare to receive the Aknowledgement response from the calculator.
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_bytesToSend = 4;
|
|
|
|
|
_currentStatus = Status.PrepareSend;
|
|
|
|
|
_nextStep = EndTransmission;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void EndTransmission()
|
|
|
|
|
{
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
// Send the end transmission command.
|
|
|
|
|
CurrentData.Enqueue(0x03);
|
|
|
|
|
CurrentData.Enqueue(0x92);
|
|
|
|
|
CurrentData.Enqueue(0x00);
|
|
|
|
|
CurrentData.Enqueue(0x00);
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentStatus = Status.PrepareReceive;
|
|
|
|
|
_nextStep = FinalizeFile;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
Parent.LinkActive = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OutOfMemory()
|
|
|
|
|
{
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentFile.Close();
|
2014-11-23 17:04:22 +00:00
|
|
|
|
Parent.LinkActive = false;
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
// Prepare to receive the Aknowledgement response from the calculator.
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_bytesToSend = 3;
|
|
|
|
|
_currentStatus = Status.PrepareSend;
|
|
|
|
|
_nextStep = EndOutOfMemory;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void EndOutOfMemory()
|
|
|
|
|
{
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
|
|
|
|
|
// Send the end transmission command.
|
|
|
|
|
CurrentData.Enqueue(0x03);
|
|
|
|
|
CurrentData.Enqueue(0x56);
|
|
|
|
|
CurrentData.Enqueue(0x01);
|
|
|
|
|
CurrentData.Enqueue(0x00);
|
|
|
|
|
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_currentStatus = Status.PrepareReceive;
|
|
|
|
|
_nextStep = FinalizeFile;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
Parent.LinkActive = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void FinalizeFile()
|
|
|
|
|
{
|
|
|
|
|
// Resets the link software, and checks to see if there is an additional file to send.
|
|
|
|
|
CurrentData.Clear();
|
|
|
|
|
Parent.LinkActive = false;
|
2017-04-17 20:23:04 +00:00
|
|
|
|
_nextStep = null;
|
2014-11-23 17:04:22 +00:00
|
|
|
|
SendNextFile();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|