Sometimes you want to wait for other things than socket handles. It's common to have EventWaitHandles for signalling conditions to threads. If a thread needs to monitor both sockets and events, then one must find a way to do it the "C++ way". Still looking.
I'm comp.engineering student making a project for company having about 1600 PCs, my task in this software is to collect client PC hardware info and then send it to server,compare ,then to database.
I have already made a console application which extracts hardware info through c# . Now I'm making a GUI based app which would be running on server.
Well I'm thinking of asynchronous sockets for accepting incoming connections would that be OK ?
Also how should i enclose the info from client and send it to server where it is compared to data from SQL server and then committed if relevant . Is XML used for this purpose ?
And yeah also the company people say that need a feature on server that would allow the server to pick this hardware info from any client(s) at that particular instant . Would that require a listener on client side as well ? as i plan to disconnect client as soon it sends the relevant data ?
I'm sorry for my noobish questions as I'm new to this type of software as i have been bit more on hardware side Thanks in advance !
*EDIT* i forgot important thing! and that is the software would not be connected to internet in anycase! whole thing is on the network
Well, there are many ways you could do the job.
Using sockets directly or using Web Services.
Web Services will do the job for you and, internally, they use XML. If you use the sockets directly you will need to build the message, so you can build it in XML, or you can use the BinaryFormatter (my preferred one).
The biggest problem is that "need a feature on server that would allow the server to pick this hardware info from any client(s) at that particular instant". To do that you will really need to keep your clients connected.
The software would not be connected to web at all . so in that case what is better ? sockets (i have programmed them before ,so it won't be a big problem i guess) ? XML ? Binary (Why do you prefer it ) ?
How much network bandwidth would 1200-1600 TCP/IP client programs connected would cost ?
Well, using sockets you will still need to use binary/xml or other format.
I usually prefer BinaryFormatter (binary data) as it is smaller and generates less traffic. But, about the cost of 1200 to 1600 programs connected I really don't know the information.
But, if they don't send information all at the same time, I think it will not be a problem at all.
What kind of hardware info? Most such info doesn't change often, and not while the computer is running. How about a small program that gathers and sends the information at system startup? I would likely write the server side with WCF (mainly because I'm just learning it now).
pick this hardware info from any client(s) at that particular instant
I don't see why, unless it should know about USB devices and such.
Hardware info like Processor ,RAM , Hard-disk and others , i have already made the program using C# and relevant classes . Yes I'm also thinking to make this program run on the start-up
Yes the company wants to detect the removable USBs as well! so can you tell me how much would bandwidth 1200-1600 inactive TCP/IP connections would cost? its the only way to keep them connected all the time i guess
allScriptImage[e.RowIndex] = new Byte[scriptImage.Length);
allScriptImage[e.RowIndex] = scriptImage;
You have declared allScriptImage as having two dimensions but you have not reserved any space for it. I'm also not sure what you expect the above two lines to do since you assign a buffer to the entry and then immediately replace it.
I have datagridview that displays a list of entries pulled from a database. This part works.
The datagridview has 'ScrollBars' set to 'Both'.
The setup is as follows...
TabControlMain has 2 pages, TabControlMain.page1 has a tabcontrol of which its first page contains the DGV in question.
TabControlMain.page2 also has a tabcontrol.
When the entries load (added via 'ReportProgress' event of background worker) then scroll bars appear as desired.
However, If the entries are loaded when TabControlMain.page2 is displayed and the user selects TabControlMain.page1, then the scroll bars are disabled, even thou the content is larger than the display area. If the user click a button to reload the list, then they appear again.
Basically, if the datagridview is populated while it is not visible then the problem occurs.
Also to note, that the DGV is part of a userControl.
Has anybody come across this issue before?
So far I have had no luck, my best idea was to try to update the DGV whenever the page is reselected. But I have tried .Refresh, .Update, .Invalidate...
...Just tried setting 'ScrollBars' to 'None' and then back to 'Both' when the DGV is reselected and the scrollbars are enabled again. This is what I want but is not the ideal solution. Can anybody offer a better alternative? Or reason why it happens in the first place?
Life goes very fast. Tomorrow, today is already yesterday.
I want to create a simple GUI designer for users. The designer should be very simple and user can select some components such as text boxes , labels and others from tool window and than they can place this components on windows form during run time.
Please give me or name of such articles or which topic should I search in google..