TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Phaneendra Chakravaram
NA
490
101.7k
How to get system latitude longitute records every one hour?
Feb 22 2017 12:33 AM
hi friends here iam tracking systems latitute and longitude every one hour. i created one exe and installed some systems
iam getting records every one hour if systems are open. some times system is sleeping mode also iam getting two records one hour so.my problem is how to get records every one hour i dnt want to save records when system is sleeping mode
here my code(working every one hr but sleeping mode iam getting two records so can u clarify this one)
if (e.Status == GeoPositionStatus.Ready)
{
// Display the latitude and longitude.
if (Watcher.Position.Location.IsUnknown)
{
//txtLat.Text = "Cannot find location data";
}
else
{
for (; ; )
{
FML fm = new FML();
GeoCoordinate location = Watcher.Position.Location;
var d = location.Latitude.ToString();
var ef = location.Longitude.ToString();
var name = Environment.MachineName;
fm.systemname = Environment.MachineName;
fm.latitude = d;
fm.longitude = ef;
fm.datetime = DateTime.Now;
db.FMLs.InsertOnSubmit(fm);
db.SubmitChanges();
Thread.Sleep(1000 * 60 * 60); // 60 Minutes
}
}
}
Reply
Answers (
4
)
Pdf Builder with new preview page
Sea trying to change the RichTextBox does not work ?