Welcome

I'm a student and this blogg has been created to keep information on a daily to weekly basis about my project that i am doing to get my Bachelor of Information Technology. This is based on my progress, and a place to put all of my information, not entirely a proper blogg. Though sometimes i feel like i'll be talking to myself... Any ways, enjoy and feel free to comment. If your wondering what this project is and dont want to read every single post, just go to the Proposal link, or any of the "posts worth looking at" below.

Thursday, June 5, 2008

5/6 ZOMG

_________________________________________________________
Start 9.00 a.m.
_________________________________________________________


Hmmmm by today i was supposed to pretty much have had everything done... so much for that idea, i havent even got to figuring out the routing yet. SIGH. well back to the grind. Have project meeting at 1.30 p.m.

_________________________________________________________
Finish ?? 7 hours
_________________________________________________________

Wednesday, June 4, 2008

4/6 Stupid Lack of Space

_________________________________________________________
Start 9.00 a.m.
_________________________________________________________


Basically ive spent all morning and early afternoon trying to increase my virtual machine size... funny how if we set things up initially we can save ourselves hours of wasted time when time is important. IF i get time to write about all of this i will... any ways.

After looking at many posts on how to increase the virtual machine space, i decided there must be a easier way? I came accross an application by VMware called "VMware Converter 3.0.3". This tool allows you to do many things, but mainly you can convert a virtual machine and save it in a new location as a new machine.

I downloaded the tool, but then my comp wouldnt let me install it due to a "error 1327. invalid drive H:\". I was like noooo another problem? Had already spent so long trying to figuer this out. So off to Google i went. I found this post, which said to check my registry and where some files are pointing. So i had a look at the items it told me too, and alas! something was pointing to this stupid H drive. So changed it i did.


Next i moved onto figuring out how to use this new tool. I had to download the sysprep files for server 2003 SP1 for the converter to use. I created a new "convert" and pointed it to my current virtual machine, said where to locate the new one and set the amount of space i wanted on the new machine. I changed it from 8GB to 15GB. Should be enough. So yeah.. spent 6 hours tearing my hair out over that one, no good, then spent 3 hours on my project management assignment.




_________________________________________________________
7.00 p.m.
_________________________________________________________


Carry on with my project, I have to fix my job and newJob forms and logic. I will then start on the map page which will list jobs, so i need to figure out a way for the users to select the records they want to map, shouldnt be a problem, then i'll start on the basics of getting the geocodes for those addresses and putting them into a new array that i will then pass to maybe another class? to do the logic and sorting on.

SO MUCH FOR THAT IDEA. Sigh... 13 hours of project time and i still havent started on mapping. Kinda disapointed i wasted 6 hours on one problem i didnt fully forsee as being a major problem. Anyways, i'm excausted and tired for some reason... (lol). Shall carry on in the morning before project meeting at 1.30... also need to finish couple of bits and pieces for my project management assignment due in tomorow.

_________________________________________________________
Finish 1.00 a.m. 13 hours
_________________________________________________________

Tuesday, June 3, 2008

3/6 Basic Stuff

Just thought i'd do quick blogg. Spent most of today on project management... assignment still not done, but shouldnt take too much longer. I'm planning on doing a very long day tomorow because i need to get that done, as well as get a HUGE chunk of project done so i can know where i am before my meeting on thurs. Spent tonight on project, basically just fixing some of the deleting, and editing, as well as basic layout and spent a small few minutes making it slightly prettier....... muahaha. Well sleep time for once.

6 hours.

Monday, June 2, 2008

2/6 Google Maps In Addresses

_________________________________________________________
Start 11.00 a.m.
_________________________________________________________

Yesterday i played around with Subgurim, a tool that you can add that allows you to use ASP to code maps instead of javascript. So today i will be using that to get the geocodes of locations when a user adds an address.

http://en.googlemaps.subgurim.net/

Today i did the geocoding of addresses. At the moment it puts together all the data from the text boxes and gets the geocode from that. If the user clicks on check geocode it will show them on teh map where that location is. If they click on save they will get a warning asking if they are sure they dont want to check the geocode first. If they dont there is a possibilty that its the wrong place, and either way there might be an error.

I added in a small amount of validation on the text boxes using RequiredFieldValidators (thanks cheekymohnkey! for the suggestion vs writing checks). I havent done any error checking or validation with the geocoding yet however.

The Subgurim controles are fantastic, just like programming c sharp. Below ive added some code to show how easy it is to do all this. Basically it just passes in the address, then creates a new lat lng object which is passed into a marker, and setting the map to centre.


public void getGeocode()
{
string code = txtStreetNumber.Text + "," + txtStreetName.Text + "," + txtSuburb.Text + "," + txtCity.Text + "," + txtCity.Text + "," + txtCountry.Text;
string Key = System.Configuration.ConfigurationManager.AppSettings.Get("http://maps.google.com/maps");
GeoCode geocode = GMap.geoCodeRequest(code, Key);
GLatLng latlng = new GLatLng(geocode.Placemark.coordinates.lat, geocode.Placemark.coordinates.lng);
GMarker marker = new GMarker(latlng);
GMap1.addGMarker(marker);
GMap1.setCenter(latlng, 8);
lblGeocodeText.Text = Convert.ToString(latlng);
}



Ive now finished off the adding and editing of both management and client addresses with all the geocoding going all fine as it appears. This isnt including the error checking i havent done yet.. doo dee doo. I also made a point to load up the map to the location when users goes to edit, this way the map is showing the address, and also i wanted to learn how to split the text and turn int a double, because i'm going to have to do that very soon. One day when the copy and paste from virtual machine works i might get around to putting code in here... /sigh. For the rest of the night, now that ive met that one small milestone, i will update my UML diagram. If i manage to comer out before i finish it, i'll upload it tomorow night. I also have a little bit of renaming to do... hard to keep to your own naming conventions when your in a rush. I also understand that some of the design, as in where ive put code isnt the best, so i'll play around with some of that (providing i get time of course....).

Theres alot of things I cant portray and show in this UML, mainly because i am using some grid views and form views, so i'm not writing my own functions to do the saving deleting and updating. Some however i am. This isnt anywhere near done, but by looking at it you can see exactly what ive done on the system so far.

Saved string to geocode code

string geocode = lcManagementAddress.propertyGeocode;
string[] codePart = geocode.Split(new char[] { ',' });
string lat = codePart[0];
string lng = codePart[1];
GMap1.resetMarkers();
GLatLng latlng = new GLatLng(Convert.ToDouble(lat), Convert.ToDouble(lng));
GMarker marker = new GMarker(latlng);
GMap1.addGMarker(marker);
GMap1.setCenter(latlng, 14);

So i just grab the geocode, split it in half, assign two variable to the array values, then pass those into the GLatLng object. Then i can use this to add markers etc. Or in the case of getting routes, i can get directions, then use those directions to do calculations on which order to get the route from Google.

Tomorow i wont be doing much project work until late at night, as i have INF to do all day, then class.
_________________________________________________________
Finish 4.00 a.m. 14 hours
_________________________________________________________


http://www.csharp-station.com/HowTo/StringJoinSplit.aspx