Archive for May, 2009

[Silverlight 2, C#] Writing to and Reading from an IsoStorage File at the Same Time!

Tags:

As I’ve mentioned in past posts, I have augmented the Silverlight Unit Test Framework to log errors it finds into a file in IsoStorage. This file is then read by a python script and results are sent via email if need be.
I ran into a problem today where my python script was [...]

Continue reading » 2 Comments

[C#] My StreamWriter isn’t Writing Properly!

Tags:

I have a StreamWriter which is responsible for writing out to my test file, however, there is a chance that my test app may be killed before completed. Whenever this occurred, it seemed that my test file was blank! Even though I knew that I had written some data to the stream…
Turns out [...]

Continue reading » No comments

[C#] Using Reflection to Find a Function Name

Tags:

I have a test script which will run and log errors found into a file in isolated storage. I wanted to be able to also log the name of the function that was being tested, and after a quick search I see that this can easily be found using Reflection.

System.Reflection.MethodBase thisFunction = System.Reflection.MethodBase.GetCurrentMethod();

string functionName [...]

Continue reading » No comments

[Silverlight 2, C#] Implementing an Observable Collection [on a custom class]

Tags: ,

In order to improve some performance issues we were having, I needed to make a custom class that we were using become observable so that when we changed an item in the class the datagrid that the class was bound to would update automatically.
The datasource we were using was a custom class of ours, so [...]

Continue reading » 3 Comments

[Silverlight 2, C#] Creating Custom Events

Tags:

I’d just like to say, that figuring out how to create custom events has completely opened my eyes. For awhile I was struggling with having multiple classes that seemed to need information from each other, but something seemed wrong with having to keep [or pass in reference to] the “other” class.
Enter events… by creating [...]

Continue reading » 3 Comments

[C#, VS2008] Adding an external file to a project [Link]

Tags: , ,

Something like this should be so simple, but the way to do it eluded me. I had a shared file [version.cs] that I wanted to share with multiple projects. I would do my normal method of adding an existing item to the project and then selecting that file, however, every time I did [...]

Continue reading » 2 Comments

[Silverlight 2, C#] Animating a GridLength

Tags: , ,

It’s been awhile I’m afraid and my topics to post on have been piling up!  My work hard drive crashed on me and I’ve spent a lot of time just getting things back up to speed.  Anyhoot… feels good to be back.
This last timebox at work I shifted onto a different project – but still [...]

Continue reading » No comments