I have got some assembly in my sub folder and I know how to load it.
The problem is with other assemblies in this folder that this assembly is depending on.
I'm guessing that application would search for them only in it's own directory when loading assembly and not at assembly location.
Now I know about AppDomain.AssemblyResolve, but how can I subscribe to it in my assembly so I don't have to mess around with it in my main application.
Or how can I load all dependent assemblies when my assembly is loaded.
I have the following table, i can join this table to others to build a bigger dataset but I only wnat to run one query to get the data and then build a data model shown below. I can build a Single model but i want to do more like a JSON serialization.
Can anybody show me a LINQ or other method that would be efficient and could be expanded to use generics?
School Class Student
Bakers 19A Bob
Bakers 19A Jim
Bakers 17A Gary
Bakers 17A Stuart
here is another example data set, i want to go one more level down and group by username and EventTime, but i don't know how to expand the linq, plus i will have to remove the time stamp from the event dattime
Notice: Never mind the space in the middle of "address" for the first and second TextBlock. The code-view here at CodeProject failes to display the address. It tries, and fails, to fetch the correct symbols by that address - if I remove the space in the addresses...
The result are displayed in the four TextBlocks. From top to bottom:
* First: This fails. I get an empty rectangle, like these rectangles.
* Second: This line works. You should be able to copy this line into your own application with success.
* Third: Same as the first TextBlock. An empty rectangle.
* Forth: This "works". I get the correct symbol as well as an empty rectangle.
Thanks for the reply.
Unfortunately it didn't work. Changing the syntax for the reference of the Font didn't solve the problem. Thanks for suggesting that anyway. It was worth a try.
For this question I have created a simple application where the Fonts are stored in the same project as my executable. I can reproduce the error in this small application for myself and to post in this forum.
In my real project I have all this is in a WPF User Control Library. That is way I have the exact path to the font with the assembly reference.
In the code, I have tried these different ways to set the FontFamily property. I have just listed them here. But have run them separately. All failed...
privatevoid Window_Loaded(object sender, RoutedEventArgs e)
txt1.FontFamily = new FontFamily("pack://application:,,,/Main;component/Fonts/#MyFont");
txt1.FontFamily = new FontFamily(new Uri("pack://application:,,,/Fonts/"), "./#MyFont");
txt1.FontFamily = new FontFamily("MyFont");
txt1.Text = "\xe905";
Notice the txt1.FontFamily = new FontFamily("MyFont");
I have installed the font from it's ttf-file.
If I open the Character map application in Windows I can see all symbols that I require.
I just can't understand what is going on...
Debuggers don't "stop on errors" they stop either because they hit a breakpoint you set, or an exception occurs that you aren't handling (or that is in the "break on this exception" list your project has set).
It's worth checking two things:
1) That you are actually running your app in the debugger. Yes, yes - I know that's obvious. But you'd be surprised how many people ignore the obvious ...
2) That you haven't switched exceptions off: Go to "Debug...Windows...Exception Settings" and check that "Common Language Runtime Exceptions" is a solid black.
But logic errors in your code the debugger won't automatically stop on - it has no idea what you are trying to do, so it can't! (But you knew that anyway ...)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!