|
Hi All,
The solution seems to work. The Using Statement caused the Dispose function of the Webbrowser to be called. This solution was already implemented, but the problem remained.
Because the old version of the software, where the Dispose was not called, was running before, old "resource claims" probably were still active.
A reboot of the system seems to have solved the problem by releasing those claimed resources. The system is running fine now for a month now, while before to the problem occured every 4 or 5 days at least.
Luc, thanx for the help!
Paul
|
|
|
|
|
Hi Paul, you're welcome.
|
|
|
|
|
Afternoon All
I was wondering if anyone knew of any articles relating to GIS programming specifically for C#?
I would like to know more about plotting longitude and lattitude coordinates onto a vector diagram but am unsure how to go about rendering these vector diagrams in the first instance. Basically I suppose I am looking to build a GIS Vector viewer using C# but am at a loss as to where I should begin.
Any help greatfully appreciated
All the best
Col
|
|
|
|
|
|
Eh yeah already tried that but was hoping someone may have something a bit more specific
|
|
|
|
|
Well you'll have to be a bit more specific yourself. Firstly do you know C#, and secondly do you know anything about GIS?
If we can establish how much you know then perhaps we can help you more.
Also if you can be more specific on what you are trying to accomplish then that'd be helpful too, i.e. is this a just for fun project or does it have an ultimate goal at the end?
|
|
|
|
|
Hi Ed
I have a pretty good understanding of C#. I understand GIS to a degree but what I suppose I am not clear on is displaying the information. By that I mean if I have a dxf file, I would know how to read the file, plot the points and join these up. But the thing I cannot get my head around is if I had a vector diagram (dxf format again, say a shot of the Grand Canyon), obviously this is Geo-positioned, but if I was to plot a point on that diagram, how would I do that? How would I set my viewer up to handle well 'space' I guess. I could plot a point, but would it be displayed accurately on the diagram?
I know we have various coordinate systems, but I am unsure how to code this into an actual viewer.
This project is something I have wanted to do for a long time. Basically I want to take a vector image of a town and load on top of that coordinates from a GPS session plotting the route taken. It is purely for, ahem, 'fun' although it is currently driving me a bit potty. If I could just get to grips with how I present images within a coordinate system, I think I would be in a slightly better position.
I realise this is a bit fragmented and aplogise for this. If you have any further questions, please let me know and I will do my best to answer these clearly.
Many thanks
Colin
|
|
|
|
|
Well I've done a lot of work with Ordnance Survey Grid References[^] but these deal only with Cartesian coordinates, i.e. an X and a Y. The first major question to ask yourself is are you going to deal with 2D data or 3D. I realise that coordinate systems aren't that straight forward because of the skews etc.
But basically what you would want is if you can load your image of the town with a known coordinate, e.g. the top-left corner of the town-hall is so many degress/minutes/seconds north and west then when you read in your GIS data you can use this as your origin for calculations.
cols2910 wrote: but I am unsure how to code this into an actual viewer.
So if I've understood you correctly you can read the vector files but don't know how to display them?
If you don't know how to draw them then you have 3 possibilities (well actually two), you can use GDI+ with C#, Managed DirectX or WPF. What I meant by having 2 is that WPF uses DirectX internally and even is easily capable of 2D or 3D data very simply as well as all the graphics transformations. However if you're not on Vista or XP SP2 then you're stuck on that front.
For example I've got portions of Great Britain in the OS format 1:25000 (1km = 4cm), these are stored as pictures 200 pixels by 200 pixels. With this information I know that the name of the picture refers to the Grid Reference in the bottom left corner of the picture. 200 pixels then equals 1km.
So if I wanted to plot the point SN512876 I would draw the pictures stored in file SN510870.png (this is the point 51km west and 87km north of the origin for the grid code SN, see linked article if you want to know more). That's the base image loaded (the town in your case), I then have to plot the more accurate point.
So for the X coordinate (in pixels) from the bottom-left of the picture:
x = (512 - xOffset) * ScalingFactor
y = (876 - yOffset) * ScalingFactor Where the xOffset = 510 and yOffset = 870. The scaling factor in this instance is 20 because 200 pixels = 1km so 0.1 of a km = 20 pixels.
So in summary the most important things to get are a known coordinate on the image and the scaling of the image, for example you need to know how wide / tall the image is so that you can scale things accordingly.
|
|
|
|
|
Excellent Ed
I see where you are coming from. I had in my mind something along those lines, but your explanation has cemented a few ideas I had.
I have dealt with Rasters before, but mostly in the likes of MapInfo or SmallWorld but on the basis of what you said I think I could now develop a viewer for that. I would assume Vector wouldshare the same principles
Many hanks
Colin
|
|
|
|
|
|
How can i do to integrate The Visual Studio 2003 for using a CVSRepo?
|
|
|
|
|
In my application, there is a datagrid control and there are several columns on it. You know that datagrid control applies sorting data but I want to sort as multiple columns.
For example, two columns are date and username. Firstly datagrid sort by date and after sort by username. Sorting priority of date greater than username.
Date UserName
12.03.07 Mehmet
12.01.06 John
24.05.08 Michael
24.05.08 Anna
12.03.07 Becham
Sorting by only date
Date UserName
12.01.06 John
12.03.07 Mehmet
12.03.07 Becham
24.05.08 Michael
24.05.08 Anna
Sorting by firstly date and after, by UserName
Date UserName
12.01.06 John
12.03.07 Becham
12.03.07 Mehmet
24.05.08 Anna
24.05.08 Michael
Thanks for your helps.
|
|
|
|
|
I think you can sort by the following codes.
// Only UserName
MyDateGrid.Source = MyDataView;
MyDataGrid.Sort = "UserName";
MyDataGrid.DataBind();
// First UserName than date:
MyDateGrid.Source = MyDataView;
MyDataGrid.Sort = "UserName, theDate";
MyDataGrid.DataBind();
// First date than UserName:
MyDateGrid.Source = MyDataView;
MyDataGrid.Sort = "theDate, UserName";
MyDataGrid.DataBind();
You also need a property that knows what the last sorthing
method was.
private string lastSortCommand = "";
<br />
if(lastSortCommand == "UserName" && currentSortCommand == "theDate")<br />
{<br />
MyDateGrid.Source = MyDataView;<br />
MyDataGrid.Sort = "theDate, UserName";<br />
MyDataGrid.DataBind();<br />
}<br />
else if(lastSortCommand == "theDate" && currentSortCommand == "UserName")<br />
{<br />
MyDateGrid.Source = MyDataView;<br />
MyDataGrid.Sort = "UserName, theDate";<br />
MyDataGrid.DataBind();<br />
}<br />
else<br />
{<br />
MyDateGrid.Source = MyDataView;<br />
MyDataGrid.Sort = currentSortCommand;<br />
MyDataGrid.DataBind();<br />
}<br />
lastSortCommand = currentSortCommand;<br />
Haven't tryed it out, but I'll think i works.
|
|
|
|
|
hi all, i am gonna deploy my windows project using clickonce feature of VS2005
for that i am trying to create an instance to application.deployment
but i left with result, error------ InvalidDeploymentException{"Application identity is not set."}
its also giving click once application is not istalled
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
how can we check whether the click once application is installed or not...Programatically
Thnx in advance,
prashanth
|
|
|
|
|
Try this [^]forum set of questions / responses.
|
|
|
|
|
How to register COM object when created in VS2005 Express ?
I've tried checking Register for COM interop in Project Properties->Build , i've tried Regasm.exe utility and still when I try Add Refrence -> COM , that object is not there...
|
|
|
|
|
Now when I checked warnings, there is a Warning: "C:\Documents and Settings\stefanz\My Documents\Visual Studio 2005\Projects\Test45_COM\bin\Release\Test45_COM.dll" does not contain any types that can be registered for COM Interop. I've done everything according to Creating simple COM objects using interop
|
|
|
|
|
Hey Guys,
I've got a asp.net web application. Its a simple application which connects to a SQL Server 2005 Mobile database. I would now like to write a windows application which will wrap this asp.net web application and allow it to be executed normally.
I was thinking of using the in-build webdev server somehow in the windows application. Then, add the webdev.exe to the setup project of the windows app.
Can this be done? If so, how would I go about doing this? I have been searching on google, and will continue to do so. I haven't found a info on this topic.
Thanks.
|
|
|
|
|
Hi!
I am facing problem when inserting large amount of data in XML file. I am using C# 2005. I am using XML file as a replacement of database table. My application stores as many as 100000 or more records in XML file, but it takes too much time in inserting/retrieving these records (almost 1-2 minutes).
I have made such insertion before but at that time structure of each node of XML was very simple with no child nodes, it took 1-2 seconds to insert 100000 records at that time. But now structure of each node is different. Each node contains 5-6 child nodes..
Previously i used MS Access for this purpose but faced same problem so switched to XML, now the data insertion/retrieval time is reduced almost 5 times but my problem is not solved, i want to insert/retrieve 100000 records in maximum 15 seconds.
Please tell me why this problem is occuring, can XML be used as alternative of database? If not then how can i obtain required results...? is there any thing else available for this, other than database and XML...
I put this question in XML/XSD board but i was adviced to consult C# group..
Thanks in advance...
Regards,
Affan Ahmad Toor
|
|
|
|
|
Affan Toor wrote: can XML be used as alternative of database?
No. XML should be used as a data transport mechanism between disparate systems. It should not be used as a database.
Affan Toor wrote: If not then how can i obtain required results...?
Perhaps you database schema was not optimised for what you want to do.
|
|
|
|
|
The amount of records you are trying to process seems a bit excessive for a xml file. I would rather look into something like mysql or sql 2005 express. Both are excelent and should have no trouble in handling a lot of data.
|
|
|
|
|
Although this an old article it may enlighten you http://www.codeproject.com/soap/xmltiming.asp[^]
XML can be used as a small datastore. Note the SMALL, yours is to large for this to be a viable option, as you have found out. I would suggest using SQL Server Express or SQL Server COmpact Edition.
only two letters away from being an asset
|
|
|
|
|
I would certainly suggest you to look at SQL server 2005, At first place it come with XML data type which is much easier. You can do all the operations on SQL server and if required convert it to XML ...
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
hi all ,
I'm working with listview to insert and update data directly into that listview (so you can imagine that user wants to fill data just like using MS.Excel). Oh ya, actually it's a simple purchasing and sales program and I'm using listview to input, update the records of every Item that has been purchased or sold and below the listview, I add one textbox to count the total of purchasing/sales of all items in the listview.
thanx in advance,
dani99el
-- modified at 21:57 Wednesday 11th April, 2007
|
|
|
|
|
Hi there,
Following link explains what you require with example
http://www.c-sharpcorner.com/UploadFile/mgold/ListViewInCSharp11172005021741AM/ListViewInCSharp.aspx
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|