Thursday, June 29, 2006

Progress So Far

I guess I have to stop working for the day. So, I want to log what has been accomplisshed and what I can see still needs doing.

First off, I used Weifen Luo's Dockable Windows available at http://sourceforge.net/projects/dockpanelsuite

This allows me to have those nifty Dockable windows. Here's how to use them(or at least how I did it) First you need to import the .dll as a resource, then add a DockPanel to the window that will act as the container(the DockPanel should fill the window - Dock.Fill) Then just have all your docking windows inherit from the DockContent class instead of the standard Windows.Forms.Form. To load the windows with docking behavior, call their Show() method, with the DockPanel as the first param. then you have a couple of options, you cans set the DockState as the second paramater(if you want it as a document or on the left or right) If, however, you want it to float and the default float size is too small, use a Rectangle as the second param to ensure the size is what you want.(a call to ClientSize on the window doesn't seem to work)

So far, I have definitions for the following: Adventure, Armor, Attack, Character, CharacterClass, Feat, Item, Power, Race, Saga, Setting, Skill, SpecialABility, Speed, Spell, STBonus, Weapon, and a group of helper classes and enums. Some of these files need to be cleaned up and comments and documentation need to be standardized.

So the basic design pattern. There is a main window, that serves as a central point for all the others, The main window holds references to all the opened windows(they are not created dynamically, so, only one instance of each) these are given public properties and all windows take a reference to the main window as a param in their constructor. this way all windows have access to all the other windows' public properties and methods. I think there must be a better way to do this, but I haven't thought of it yet.

I'm tired of writing now so I will try to write some more later.

0 Comments:

Post a Comment

<< Home