Richard, thank you. Very much! An excellent suggestion! However after a sleepless night (anybody know why stuff like this always happens on site during acceptance testing?) a good friend this morning showed me error of my ways. You, see, the only problem was I have a wretched case of idiotitis. In my zeal to explore the nooks and crannies of this Windows world I made the decision that a nice clean way to allow objects to get information from other objects was exposé an event and delegate. Seemed reasonable to me at the time. Having spent most of my life in a world where objects on different threads have REAL boundaries I assumed that if some object from another thread registered a handler that naturally when that handler was invoked from thread 2 that the event would interrupt thread 1 it would process the event and thread 2 would go merrily on its way. Nope. Thread 2 runs the event handler. Well when the thread that is minding your comms is now suddenly executing code in MainWindow which consists of putting up a dialog guess who isn't watching his comms.
Error of my ways #2 has to do with where one starts threads, which is the point you are making. I was informed that launching critical long running tasks from the MainWindow code was not a very good idea. Suggestion was to move them to the App class and override OnStartup. Which I have now done. That does create several questions but I will save them for another day.
Error of my ways #3 was to foolishly mentally assign characteristics to objects in threads as I would to a process of lightweight thread in other operating systems. Not a good analogy.
Sorry for the length but somebody out there will make the same boo-boo someday.
I have 3 richtextboxes I want to save all 3 in the same rtf file and load the file with the specific text in the apropriate richtextbox
How can you load specific part of the text file in a richtextbox then load another specific in another.
Like read the rtf file and when a certain string is found add the text below that in richtextbox1 and if another specific string is found stop adding to richtextbox1 and start adding to richtextbox2 and lastly when another specific string is found stop adding to richtextbox2 and start adding to richtextbox3
I am using Entity Framework 4.5, I have to join 5 table entities and get result of Complex Type CT. This Complex Type contains other list of objects as its members.
For example: we have entities A, B, C, D and E, which are having any one column related to each other entities. There are 5 other Classes which are derived from the above entities. Like class A1 is using some columns of A and B1 is using few columns of B and C1, D1 and E1 are using some of the columns of C, D and E respectively.
The complex type CT is having list of A1, list of B1, list of C1, list of D1 and list of E1.
Now I want to join or include on Entity Framework entities and get the result as CT object but it contains lists of different objects.
Can anybody please help me in writing this complex join or include query whichever is better for the performance. Any help is great supportive any link or any code snippet etc.
For multiple employees (one or more), I have to generate report
--Report will be same for all employees
--Each page of report viewer will contain a single report for a single employe.
For example, for 10 employees ten report will be in ten pages of a single report viewer.
But what i need is, you know report viewer has paging. So when i will click for next page it will show same report for 2nd employee.
In this way i want to show multiple employees information where each page contain same report for separate employee
I have a customized WPF button control and I want to use this control with a WinForm application. I know how to use WPF user controls with WinForm using ElementHost. But I have no idea to use any single control (not a user control) with all its members with a WinForm application. Can you suggest me a good way to achieve this