The information contained here are property of DIGITAX Automotive Electronics Italy, and extremely confidential. Any disclosure, copying, distribution to third
party is strictly prohibited.
42
private
void
btStatus_Click(
object
sender,
EventArgs
e)
{
bool
res;
//reques Taximeter status
res = _ct2.SendMsg((
ushort
)ComTax2.Wrapper41.
EnumDest
.DEST_TAX,
new
byte
[] { (
byte
)
'R'
, (
byte
)
'M'
},
new
byte
[0], 0);
WriteLog(
"Taximeter Status Request Deliverd: "
+ res.ToString());
}
private
void
btClock_Click(
object
sender,
EventArgs
e)
{
bool
res;
//request Taximeter Clock
res = _ct2.SendMsg((
ushort
)ComTax2.Wrapper41.
EnumDest
.DEST_TAX,
new
byte
[] { (
byte
)
'C'
, (
byte
)
'R'
},
new
byte
[0], 0);
WriteLog(
"Taximeter Clock Request Deliverd: "
+ res.ToString());
}
private
void
btOdometer_Click(
object
sender,
EventArgs
e)
{
bool
res;
//Request Odometer data to the taximeter without reset
res = _ct2.SendMsg((
ushort
)ComTax2.Wrapper41.
EnumDest
.DEST_TAX,
new
byte
[] { (
byte
)
'O'
, (
byte
)
'Q'
},
new
byte
[1] {0x00}, 1);
WriteLog(
"Odometer Data Request Deliverd: "
+ res.ToString());
}
private
void
btClear_Click(
object
sender,
EventArgs
e)
{
lbxLog.Items.Clear();
}
private
delegate
void
delWriteLog
(
string
text);
private
void
WriteLog(
string
text)
{
if
(InvokeRequired)
{
this
.BeginInvoke(
new
delWriteLog
(WriteLog),
new
object
[] { text });
return
;
}
lbxLog.Items.Add(
"-> "
+ text);
}
void
Comtax2TestForm_Closing(
object
sender,
CancelEventArgs
e)
{
_ct2.Release();
}
}
}