The information contained here are property of DIGITAX Automotive Electronics Italy, and extremely confidential. Any disclosure, copying, distribution to third
party is strictly prohibited.
40
default
:
btnDial.Enabled =
false
;
btnHangUp.Enabled =
false
;
break
;
}
}
#endregion
#region
Link events handlers
/* This region contains the handlers for the events fired by the RAS Link manager
*/
void
_rasLink_IpAddressChanged(
IPAddress
ipAddress)
{
if
(InvokeRequired)
{
BeginInvoke(
new
IpAddressChangedHandler
(_rasLink_IpAddressChanged),
new
object
[] { ipAddress });
return
;
}
if
(ipAddress ==
null
)
txtIpAddress.Text =
""
;
else
txtIpAddress.Text = ipAddress.ToString();
}
#endregion
private
void
btnClose_Click(
object
sender,
EventArgs
e)
{
btnClose.Enabled =
false
;
Close();
}
private
void
btnSmsSend_Click(
object
sender,
EventArgs
e)
{
btnSmsSend.Enabled =
false
;
_modem.SendSMS(txtSmsRecipient.Text, txtSmsText.Text, SmsSendCallback);
}
private
void
SmsSendCallback(
AT_Rx
rx)
{
MessageBox
.Show(
"Send result: "
+ rx.Type.ToString(),
"SMS"
);
BeginInvoke(
new
ThreadStart
(
delegate
()
{
btnSmsSend.Enabled =
true
;
}));
}
private
void
btnDial_Click(
object
sender,
EventArgs
e)
{
btnDial.Enabled =
false
;
_rasEntry.BeginDial();
}
private
void
btnHangUp_Click(
object
sender,
EventArgs
e)
{
btnHangUp.Enabled =
false
;
_rasEntry.BeginHangUp();
}
private
void
chkRasLinkManagerEnabled_CheckStateChanged(
object
sender,
EventArgs
e)
{
_rasLink.Enabled = chkRasLinkManagerEnabled.Checked;
if
(chkRasLinkManagerEnabled.Checked ==
false
)
txtIpAddress.Text =
"N/A"
;
}
}
}