المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : work with a-GPS



C# Programming
01-30-2010, 01:00 AM
Hi. anybody pleas tell me how work with a-gps on windows mobile.

private void button1_Click(object sender, EventArgs e)
{
try
{
serialPort1.BaudRate = 4800;
serialPort1.PortName = comboBox1.SelectedItem.ToString();
serialPort1.Open();
timer1.Enabled = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

}

private void timer1_Tick(object sender, EventArgs e)
{
try
{
string data = serialPort1.ReadExisting();
listBox1.Items.Add(data);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}



this code work with gps device, but if I run app on phone with a-gps - it crash with OutOfMemoryException