Archive for April, 2008|Monthly archive page

WPF IDataErrorInfo and DataBinding

This is by far the best example of IDataErrorInfo and DataBinding that any beginner can easily grasp.

read more | digg story

Why Use Linux?

The other day I got into a somewhat heated discussion about why Linux is a viable alternative desktop OS. Despite my best efforts, I was unable to move the other side past the rhetoric and myths that seem to surround Linux. It is because of this discussion that I am writing this…as a way to give accurate information.
read more | digg story

How to create a EeePCLinuxOS LiveUSB with VirtualBox

I was having all types of trouble trying to create a bootable CD from the eeePCLinuxOS iso file, so I decided to try installing from the iso directly to a USB flash drive. I am running a Windows Vista PC and decided I would try using VirtualBox to boot the iso and attach the USB drive. This also helps everyone by not creating an additional CD that will shortly end in the trash.

What you will need.

VirtualBox
eeePCLinuxOS ISO

Once you have installed VirtualBox, you are ready to create a new virtual machine.

VBox1

Read more »

How to use USB727 with Pendrive Linux

I was extremely surprised with how easy it was to configure my Verizon EVDO connection on the USB727 from Pendrive Linux. You will want to start with the USB727 unconnected to your PC.

I am not positive that you have to do this but with Ubuntu you have to use the sudo command when entering all of the following commands, so I went ahead and switched to root.
$ su
You should be prompted to enter the root password, which on the default install is root.

Unload the usbserial serial driver.
# modprobe -r usbserial

Insert your USB727 and load the driver for the device. I am using the USB727, therefore my command looked like below. If you are using a different device, see the Sprint Mobile Broadband document to find your vendor and product id. Simply select the Linux option from the dropdown box and you can then use the PDF.
# modprobe usbserial vendor=0x1410 product=0x4100

# dmesg|grep -i ttyUSB
Should give you something similar to below.
[ 1863.832000] usb 2-1: generic converter now attached to ttyUSB0
[ 1863.836000] usb 2-1: generic converter now attached to ttyUSB1
[ 1863.836000] usb 2-1: generic converter now attached to ttyUSB2
[ 1863.840000] usb 2-1: generic converter now attached to ttyUSB3

Now you are ready to setup the dialup connection. Navigate to the `Configure Your Computer` menu option as seen in the screenshot below.

Pendrive Linux Menu

Read more »

How to create a generic method to get selected value from WPF ListBox Control

On a recent project, I had several listbox controls and needed to pass values to a web service. Since all my listboxs used the same template, I wanted a generic method to handle the events.

Start by creating a new project named ListBoxDemo in Blend or Visual Studio. I use V# 2008 Express for my projects and prefer starting my projects there.

Add a new class file to your project and name it Contact.cs

using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Text;

namespace ListBoxDemo
{
    public class Contact : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void Notify(string propertyName)
        {
            if (this.PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        int pID;
        public int ID
        {
            get { return this.pID; }
            set
            {
        if (this.pID == value)
                    return;
            this.pID = value;
            Notify(“ID”);
            }
        }

        string pFirstName;
    public string FirstName
        {
            get { return this.pFirstName; }
            set
            {
                if (this.pFirstName == value)
                    return;
                this.pFirstName = value;
                Notify(“FirstName”);
            }
        }

        string pLastName;
        public string LastName
        {
            get { return this.pLastName; }
            set
            {
                if (this.pLastName == value)
                    return;
                this.pLastName = value;
                Notify(“LastName”);
            }
        }

        public string Name
        {
            get { return this.pFirstName + ” ” + this.pLastName; }
        }

        public Contact() { }

        public Contact(int Id, string FirstName, string LastName)
        {
            this.ID = Id;
            this.FirstName = FirstName;
            this.LastName = LastName;
        }
    }

    public class Contacts : ObservableCollection { }

    public class ContactsKeeper
    {
        Contacts pContacts = new Contacts();

        public Contacts Contacts
        {
            get { return pContacts; }
        }

        public ContactsKeeper()
        {
            // This will populate the control with data. You could use this
            // to load from a database or a webservice
            pContacts.Add(new Contact(1, “John”, “Smith”));
            pContacts.Add(new Contact(2, “Mike”, “Wallace”));
            pContacts.Add(new Contact(3, “Sally”, “Miller”));
            pContacts.Add(new Contact(4, “Albert”, “Einstein”));
        }
    }
}

Read more »

Some thoughts on Puppy Linux

Recently many of the Linux magazines have been doing articles on Puppy Linux. If you have been reading this blog on a regular basis, you already know that I own an ASUS eeePC. One of the main reasons I bought it was so that I could use it when I travel. There was one big flaw with my plans, I still need to carry my Dell 830 to use for work. The more I work with Windows, the more I despise it but I have to use it for work. Normally I would have just partitioned the drive and installed a Linux distro and Windows, but we are not allowed to do that any longer. A friend recommended buying a second drive and just carrying that along. I was preparing to do that when I read all the hype about PL (Puppy Linux). The first thing I did was download it and install it on a USB flash drive from my home PC. It seemed to work great and on that PC I have a standard connection. Then I decided to carry it with me to visit my family. That is when I had my first problem with it, which seems to be related to using WPA on the wireless router. But it wasn’t very important to me at the time, so I just showed off how cool PL was. Now I am on my first trip with PL and am going to share my thoughts.

  • Not sure why this is happening, but I can’t get Xorg to work with my laptop. I ended up using Xvesa instead, which for me seems to be fine.
  • Pup packages are fast and easy to download and install, but sometimes they don’t show up in the menu. No a problem if you are comfortable with the command line, but for those people coming from a Windows environment it would very discouraging.
  • The touchpad is too sensitive. I never use a mouse when I travel and have often had people comment on how efficient I am with the touchpad. But with Puppy, and maybe this is something with all distros, it is very difficult. As a result, I had to go buy a mouse.
  • Connecting to the hotel wireless network took a little bit of time to nail down, but once I did it worked great.
  • Changing WMs (Window Managers) was very easy. I opted to use IceWM, which has a ton of themes that are fairly easy to apply. Several of the ones available on the pup package site appear to be corrupted, but I was still able to find one I liked.
  • Gaim worked great for several days but then after a reboot, it would show the login process and disappear where I could not locate it.
  • The UI fairly plain, but completely acceptable as PL was designed to run on very old hardware. See hardware requirements.

Overall PL is very nice and has many uses. I could see value in carrying it around on a small USB flash drive or on a CD in order to recover files from a corrupted OS. If you had an old PC that wasn’t really up to par for running some of the newer OSs that are on the market, it would be a great way to get some use out of it, especially if you wanted to give that PC to someone who couldn’t afford to buy a new PC.