SharpWired: Initialization of GUI Componets

SharpWired, Software Development No Comments »

The initialization of the different components in SharpWired has, uptil now, been quite a mess. Different parts has been initialized in different ways (e.g. some manager classes for the GUI has been initialized after the GUI class it managed). It was when we started to work on the issue with disconnection and re connection we found out that the current solution had to be standardized. Over the last months we have done quite a lot of refactoring work and even though we aren’t finnished we’re seeing the light in the tunnel. Today I started to work on the initialization of the chat tab.

I introduced a simple base class (SharpWiredGuiBase) that all GUI component that needs to have any knowledge of when the connection to the server changes. It extends the Windows.Form.UserControl class and provides a reference to the controller and model classes.

Each class that extends SharpWiredGuiBase should override the following methods:

  • OnOnline - Event handler method that SharpWiredGuiBase connects to the Online event in the model. Gets notified when the client is online to a server.
  • OnOffline - The same as OnOnline except that it tells if the client is offline instead of online.
  • Init - Since Visual Studio seems to require all GUI classes to have a constructor without any arguments I’ve created an Init method that’s similar to the constructor. If anyony has any better idea for this please tell me!

I’m not sure if this solution is good, but I’ve tried it on the chat and news part and it seems to work. All comments are welcome though! I’ll continue this work tomorrow.

Move Your Operating System to a New Hard Disk

Hardware, Software No Comments »

Some years ago I wrote about how to create a Windows Rescue CD. Today I was stuck with a similar problem. I wanted to merge all data from one disk to another without needing to re-install my computer.

My first thought was to create a new rescue CD that I could restore to my new drive. But that didn’t seem like the easiest solution so I looked up a tool called Clonezilla. I started out by setting up similar partitions using GParted and boy am I glad I did? It turned out that you can use GParted to copy one partition to another. It took some minutes, I rebooted and it didn’t work.

I was a bit clueless until I remembered that you need to write a Master Boot Record (MBR) to the disk before it’s possible to boot from it. I booted up from an old DOS cd and wrote fdisk /mbr. Rebooted and still no luck so I fired up GParted again and saw that I had forgotten to set the bootable flag on the drive. I rebooted and everything went fine.

When knowing about MBR and the boot flag it’s a no brainer and I can’t recomend it enough! At least if you aren’t on a mac where Carbon Copy Cloner is available!

Stop Chasing Your Buttons!

Software, Usability No Comments »

As a quick sidenote; I just found out about an option in Windows that allows to move the mouse cursor to one of the buttons in dialog boxes automatically.

Ubuntu Hardy Heron (8.04) Released!

Linux, Open Source, Software No Comments »

Lovely!

Ubuntu Hardy Heron (V 8.04) is now available on the official release servers!

Ubuntu Logo

As the last time; roll up your sleeves and help seeding the files! Don’t forget to configure that Quality of Service in your router! I attached the torrent files for Hardy Heron if the servers become unavailable.

Enjoy!

Your Favourite Online Comics on Your XBOX

Sound & Vision No Comments »

Yesterday I found a great add-on for Xbox Media Center that allows you to read your favourite online comics on your XBOX. It’s called Comics and is availabe through the script installer program.

I added Little Gamers to my comics list. Since the feed from Little Gamers doesn’t contain the images I had to put the following information in the XML-file for the script.

http://www.little-gamers.com/rss.xml
    &lt; ![CDATA[<img src="(http://www.little-gamers.com/comics/.+?\.gif)" alt="" />
    Hot swedish love

Thanks a lot to BigBellyBilly (the author of the Comics script) for helping me out on this!

If you havn’t Xbox Media Center on you Xbox read: Geek To Live: Transfor Your Classic Xbox into a Killer Media Center.

See About page for credits.
Entries RSS Comments RSS Log in