Ballot Debris

Thoughts on Agile Management, Leadership and Software Engineering

Dynamic DNS client

clock July 8, 2006 12:05 by author Chad Albrecht
For those of you who use a dynamic DNS service (DynDNS, no-ip, etc.), I wrote a C# based updater client. The project contains a class library, console app and service. It is designed to be extended to other mechanisms for fetching the IP and reporting it to the DNS server. Right now it uses the checkip service of dynDNS and updates RegisterFly.com. Full VS2005 project and source code available here.


Using Alpha in .NET

clock January 30, 2006 11:12 by author Chad Albrecht
I was asked again today how to draw "translucent" stuff in .NET (GDI+). My response was "Use the Alpha channel." Noting that this was not the first time I had been asked about this, I thought a brief explanation here was appropriate. From Wikipedia:

The value of alpha in the color code ranges from 0.0 to 1.0, where 0.0 represents a fully transparent color, and 1.0 represents a fully opaque color.

In .NET the range of the value is in byte form (0-255), with 255 representing 1.0. Thus there are 256 alpha channel settings. When drawing, one can adjust the value of the alpha channel to allow other colors to show through.
private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
	e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(255,Color.Yellow)), new Rectangle(50,50,100,100));
	e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(150,Color.Blue)), new Rectangle(0,0,100,100));
}

This simple example draws two boxes in a picturebox. The point at which they intersect makes a kind of green. This is due to the alpha channel setting of 150 on the blue box. This is a simplistic overview since alpha channels can be used for dialogs, images and a few other things. Watch for more on alpha channels in the future.


TFTP Server Example

clock December 18, 2005 06:57 by author Chad Albrecht
I've been getting a lot of emails on the TFTP server I wrote. Some people are having troubles understanding how to use it. So I wrote a quick app to demonstrate it. Get it here.


Simple C# TFTP server

clock May 17, 2005 07:07 by author Chad Albrecht
A few of my embedded devices around the office use TFTP as a means of upgrading their firmware. Since I wanted some control of what/how these firmware files got sent, I wrote a C# class to act as a TFTP server. It's pretty simple and still needs work, but here it is: TFTPServer.cs
You'll also want to get the zip file, as it has the ExTrace support.TFTPServer.zip


About me...

bio_headshot

I am a leader, entrepreneur, software engineer, husband, father, pilot and athlete. Over the last 17 years of my career I have built numerous successful companies and software development teams. This amazing journey has taken me all over the world and allowed me to work in a number of diverse industries. I have had the privilege to meet and work with thousands of unique and talented people. As you will see from my blog I am a strong believer in Agile SDLC techniques and the Kaizen corporate culture. I am always looking to grow myself, my teams and the companies I am partnered with.

Contact me... View Chad Albrecht's profile on LinkedIn Follow Chad Albrecht on Twitter Subscribe to this blog

Scrum Developer Trainer Professional Scrum Developer Professional ScrumMaster Certified ScrumMaster

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Sign in