I have previous experience using WinForms and the DataGridView control. I am trying to re-code a previous program using WPF that reads a parts list from a delimited text file and displays results in a DataGrid control.
In WinForms, I was able to assign a tag to the DataGrid row that I used to link individual URLs to our company's HTML-based inventory program. However, I am unsure how to do this (if it's even possible) in WPF. Currently, I read from the text file and load its contents into a List. From there, I filter the List by whatever the user selects, then display the results in a DataGrid control. I want to open up the browser when the user selects a row, but can't figure out how to bind the URL to the row. Is this possible? If so, can someone help point me in the right direction?
I have a C# 2010 console application calling a second console application. I want the main calling console application to wait for the e_Process1 console application to quit running before the second console application is called with different parameter.
I want the main calling console application to look at values in a sql server 2008 database before calling the second console application with different parameters.
When you look at the 2 lines of code listed below, you will see that the main console program is watiting for the second console application to run. However the main console application is stilling waiting.
Code referecing to:
Thus can you tell me what you suggest I do to solve my problem? Either the second console application never quits executing and/or I need to use diferent statements.
Thus can you tell me what you suggest I do to solve my problem?
Sounds like the first application is doing exactly what you want it to do. You should be investigating why the second application never exits.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
Maybe the "second console" application never stops running? Is there a way that I can tell if the "second console" application ever stops running? If so, how can I tell when the "second console" application has finished executing?
Basically the second console application calls a web service to obtain information. The "second" console application has a proxy in it to communicate with the web service.
There is an 'xsd' file that communicates with the web services via xml. Do proxies always keep running?
You should forget about using Process.Start for the moment and make sure that you understand how the second application behaves when run manually in a command window.
Hopefully after typing in the correct command line, the application will run and then exit. If the running application requires user interaction, e.g. "Press a key to exit", then it may be a poor candidate for automation via Process.Start.
If the manual run is ok can you post the code used to initialise the Process object.
I want to make the following comments:
1. When I stepped through the code using a visual studio.net 2008 debugger, the application did finish executing when the main procedure finished executing. Basically there was no where for me to step through the code again.
However the debugger was still active and ready to continue debugging.
Does this the application is still executing?
2. As far as I can tell, the application runs fine from the dos window. It does not ask me to enter any information. Does that mean it has finished executing?
How should be used these objects,
- do I have to create an object every time in an using block
(creating connection every time I need a query)
- I can create the object globally and reused for every query I need? Will the server close this connection if it is idle, and I will have an exception when trying to reuse it?
What do you mean by using delegates. To create some functions where I open the connection with using ?
Sorry, I didn't told the truth, I mixed it up with something completely different. The SqlConnection is threadsave. Therefore no delegates aren't needed. I used some other communication at the same time and this wasn't threadsafe, so delegates were needed.