Tim Hibbard

Software Architect for EnGraph software


News





Add to Google



My Stats

  • Posts - 593
  • Comments - 337
  • Trackbacks - 507

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


EnGraph Blogs


Links


Other


Roll


August 2005 Entries

Fly To With Google Earth


Inspired by what Rob did with geotagging Flickr, I built something similar with Where's Tim that I talked about yesterday.  You can click the “Fly To With Google Earth” button and it will generate a .kml file that will open inside of Google Earth.

It wasn't that hard to generate.  I used a XmlDocument to load the core .kml file (I actually renamed the base.kml file to base.xml because XmlDocument will not load a file that doesn't end in .xml)  I then use a XmlNodeList to find the specific tags that need to be changed, save the xml file with an unique name and rename it back to .kml.  I use a Response. Redirect to send the file back to the user and when they select “Open” in the file download dialog box, Google Earth loads and displays the location.

 

 

posted @ Wednesday, August 31, 2005 6:50 AM | Feedback (14) | Filed Under [ EnGraph .NET GPS Mapping Where's Tim ]


Where's Tim?


Using EnGraph's GPSParserAir-Trak's Cloudberry AVL data and Google Maps, I built a web page that shows my real time location.

It took a little over an hour to put together.  That shows the ease of EnGraph GPS Management tools and Google Maps.

Here's the page - www.timhibbard.com/wherestim.aspx

posted @ Tuesday, August 30, 2005 1:55 PM | Feedback (5) | Filed Under [ EnGraph .NET GPS Mapping Where's Tim ]


Quicktime Killer buzz


It's not really a “buzz”, but Quicktime Killer is getting some people talking here, here and here.

 

posted @ Tuesday, August 30, 2005 7:28 AM | Feedback (0) | Filed Under [ EnGraph .NET Controls ]


VB .NET - Limit the size of a directory


We use this code to limit the size of directories in our Logger control.  The control will automatically export itself to an .xml file after it reaches a certain number of entries.  However we don't what that folder to get too big.  So this function gets the size of the directory and if it is larger than a certain size of MB, it will delete the oldest file.  It works recursively, so the directory size will always stay at a certain size.  It actually runs surprisingly quickly.

Private Sub TrimArchiveFolder(ByVal FilePath As String, ByVal MBLimit As Integer)
   Try
      
Dim Size As Long = 0
      
Dim LastFile As String = ""
      
Dim LastDate As Date = Now
      
Dim DI As New IO.DirectoryInfo(FilePath)
      
Dim FIS As IO.FileInfo() = DI.GetFiles
      
Dim FI As IO.FileInfo
      
      
For Each FI In FIS
         
If FI.LastWriteTime < LastDate Then
             
LastDate = FI.LastWriteTime
              LastFile = FI.FullName
         
End If
         
Size += FI.Length
      
Next

      
If Size > MBLimit * 1000 * 1000 Then
         
If LastFile <> "" Then
            
Kill(LastFile)
             TrimArchiveFolder(FilePath, MBLimit)
         
End If
      
End If

 
Catch ex As Exception
      MsgBox(ex.ToString)
 
End Try

End Sub

posted @ Wednesday, August 24, 2005 9:09 AM | Feedback (2) | Filed Under [ EnGraph .NET Controls ]