February 16, 2002 tools

Welcome to Genghis!

Welcome to Genghis

Genghis is a set of extensions built on top of .NET and integrated with WinForms to provide application-level services in the same flavor as the Microsoft Foundation Classes. Genghis gets its name as the functional heir to Attila, a similar set of functionality built on top of ATL.

Disclaimer

Most of the Genghis classes were built by different folks and while every effort was made to keep things consistent by choosing .NET and WinForms design techniques, everyone does things their own way.

This work is the work of the individuals involved and does not represent any contribution of their respective employers. You are under no obligation to use any of Genghis at any time, but if you do, you are required to abide by the License.

Installation

You can download the latest Genghis source code from here. The Genghis archive includes this page, the source code to the Genghis class library, a series of samples showing off the various classes and a pre-built, signed version of genghis.dll in the redist folder. Notice that some of the samples use the Genghis files directly instead of using the compiled Genghis assembly. Either usage is supported by Genghis (except where it drives the WinForms Designer nuts).

Source Code Control

Genghis source code control has been moved to the Genghis CodePlex workspace. Thanks to GotDotNet and Rob MacFadyen for hosting the previous versions.

Building Genghis

Genghis is written in C#. Building Genghis requires Visual C# or Visual Studio.NET. Visual Studio.NET solution and project files (*.sln and *.csproj) are provided to build Genghis and all the samples. You should be able to load any solution file into Visual C#/Visual Studio.NET and build the project for yourself.

A NAnt build script (Genghis.build) is also provided. It is used to make the snapshot for Genghis, and is not designed for general use. You may wish to use this file to simulate the snapshot build process; please be aware that you will not be able to properly sign the release mode Genghis DLL (the private key is not provided in this distribution).

For Visual Studio.NET related build issues, please contact the Off Topic Windows mailing list. This is where the Genghis contributors have their discussions, and most of them will be familiar with Visual Studio.NET builds of Genghis. If you have NAnt related build issues, you should contact Mike Marshall (the Genghis build master) directly.

Thanks to Brad Wilson for the NAnt build scripts for folks without VS.NET.

Bug Reports

Bugs will now be kept in the Bug Tracker section of the GDN Workspace.

Please do not send Chris Sells or any of the other contributors personal email complaining about Genghis. Also please do not post Genghis bug reports to any mailing list. A much better way to contribute to the life of Genghis is to submit the fix along with the bug report.

Submission Guidelines

  • Submissions should be in the Genghis namespace (I don’t think we’ll have to worry about collisions… : ).
  • Submissions should be single-file and stand-alone as much as possible. The goal is that Genghis can be built as a DLL and used as a whole or that bits of its source can be pulled into individual projects as needed ala atl.dll vs. atlwin.h.
  • All code should be commenting using C# doc comments so that docs can be generated via Tools->Generate Source Comments.
  • All source code files should include the copyright and license notice.
  • All code shall be set to use spaces, not tabs, and a vanilla coding style.
  • When hacking on existing code, thou shall conform to the existing coding standard of the file. Many coding standards are readable, but not when mixed.

The Genghis Group

This group is made up of official Genghis contributors:

Who Does What

If you’d got something you’d like to see contribute to Genghis, please let me know (multiple people are free to collaborate on a single feature).

Feature

Owner(s)

Progress

Screen Shot(s)

Command line parser

Chris Sells

included

screenshot

Completion combo

Chris Sells

included

screenshot

Control hosting status bar

Ethan Smith

included

screenshot

Cursor changer

Shawn Wildermuth

included

screenshot

Custom check state treeview

Chris Sells

included

screenshot

Custom XP theming controls

Matthew W. Adams et. al.

included

screenshot

File Search Engine

Mike Marshall

included

screenshot

FileDocument class (doc/dirty bit management)

Chris Sells

included

screenshot

FindReplaceDialog

Ramakrishna Vavilala

included

screenshot

FolderNameDialog

Chris Sells

included

screenshot

HandleCollector for the world

Ethan Brown

included

screenshot

Header group box control

Matthew Adams

included

screenshot

Image combo

Horst Veith

included

screenshot

More robust validation ala WebForms

Michael Weinhardt

included

screenshot

Most-Recently-Used (MRU) files support

Michael Weinhardt

included

screenshot

MSN Messenger-style popup window

Mike Marshall

included

screenshot

Multiple Top-Level Windows

Chris Sells

included

screenshot

Multiple-instance detection

Chris Sells

included

Path resolution b/w UNC, local (including SUBST, etc)

Ethan Brown

included

screenshot

Retrieving mapped drives

Ethan Brown

included

screenshot

Retrieving shares

Ethan Brown

included

screenshot

Screen Saver class

Shawn Van Ness

included

screenshot (sorta : )

Scrollable Picture Box

Husein Choroomi

included

screenshot

Sorting listview (including the little triangle thingy)

Horst Veith

included

screenshot

Splash Screen class

Peter Foreman

included

screenshot

Status Bar Extender

Chris Sells

included

screenshot

WebCommandLineHelper

Chris Sells

included

screenshot

Window serializer

Paul Bartrum

included

screenshot

Wizard framework

Shawn Wildermuth

included

screenshot

HtmlLinkLabel class Jeff Key included screenshot
User-resizable panel Ethan Brown included screenshot

Gradient Progress Bar

Mike Marshall

included

screenshot

Command updating

Paul Bartrum

sample

screenshot

Cool bars/Cool menus

Chris Burrows

sample

screenshot

Docking App Bar

Dean Cleaver

sample

screenshot

A real image list control

Matt Wilson (of Attila fame!)

pending

Advanced layout managers, e.g. grid/table

Matthew Adams

pending

Command routing

Paul Bartrum

pending

Dynamically docking/undocking windows

TBD

pending

href exe-safe serialization framework

Chris Sells

pending

Managed HTML display ala a C# port of Mozilla?

TBD

pending

Menu/toolbar editing ala Office or VS.NET

Paul Bartrum, Chris Burrows

pending

Outlook-style Bar

Richard Birkby

pending

SDI, MDI and Explorer-style application wizard

TBD

pending

Tab-based MDI implementation (ala VS.NET)

TBD

pending

Tear-off menus

Matt Wilson

pending

Note: Anything marked with sample means that there’s a sample included with Genghis that shows the current implementation of a feature but that it’s not done enough to be part of the official Genghis component. Mostly the hold-up is integration with the WinForms Designer.

Documentation

The Genghis documentation is composed of the C# documentation comments as part of the automated build. Check redist\Genghis.chm for the latest.

SimplePad

SimplePad is an MFC application that should serve as a simple baseline for what Genghis should enable to be built easily. We currently need a raw WinForms implementation to help guide the Genghis development efforts. After building it, use Help->Help Topics to see the list of features that the MFC SimplePad application provides straight out of the wizard (also duplicated here):

  • MDI application
  • Multiple documents
  • Multiple views per document that are updated as the document changes
  • Dirty” bit handling
  • Title bar that shows the document with the current focus along with a dirty indicator, i.e. the asterix.
  • File New, Open, Save, Save As, Exit and MRU
  • MDI Window menu
  • Separate icons for the application and the documents
  • Association of the icons with the documents in the shell
  • Dockable, floating toolbar
  • Print, Print Preview, Print Setup
  • Edit Undo, Cut, Copy and Paste.
  • View Toolbar and Status bar
  • Help Topics and About
  • Context-sensitive help
  • Status bar that updates when menu items or toolbar items are in focus”, as well as showing NUM, SCROLL and CAPS as these keys change. Since Microsoft has shown that no one looks at the status bar much, the auto-update as items come into focus is not a feature that needs to be duplicated in WinForms/Genghis.
  • Command line launching of the application based on the application’s file extension
  • Drag-n-drop from the file explorer
  • Double-click support from the file explorer (including routing open requests to a currently open application)

The current .NET implementation of SimplePad is now available as one of the Genghis samples. Thanks to Paul Bartrum and Chris Burrows for all their hard work on this!

History

  • 03/09/04: Release v0.5:
    • New HtmlLinkLabel class from Jeff Key that knows how to launch IE and EXEs directly w/o requiring you to handle the event
    • Much prettier images in SimplePad from Chris Burrows
    • Updated MRU code from Michael Weinhardt to match .NET event signature conventions and to fix a problem when using more than one MRU components on a single menu
    • Updated FileSearchEngine code from Mike Marshall to check for whole words at beginning and end of line correctly
    • Updated validation code from Michael Weinhardt with support for validating controls at a container level, e.g. validating controls on a tab instead of on an entire form
    • New gradient progress bar from Mike Marshall
    • Updated FileDocument from Chris Sells to match text of Windows Forms Programming to include more MFC-like features like a pluggable scheme for serialization handling, registration of document extension with the shell, and adding to recent docs, i.e. Start->Documents
    • Updated HandleCollector from Ethan Brown to work with .NET 1.0 and .NET 1.1
    • Performance enhancements from Ethan Brown in the MappedDrives and SystemShares classes
    • New user-resizable panel from Ethan Brown
    • Updated WebCommandLineHelper from Andrew Duncan to fix System.IO.FileLoadException in ieexec.exe
    • Updated AniForm from Mike Marshall to support stacking ala SharpReader and fix a terminal server-related bug
    • Updated cool menu sample from Chris Burrows with additional support for abstracting commands from click even handlers
  • 4/25/03: Release v0.4:
    • Everything tested under VS.NET 2002 & 2003 (except HandleCollector, which doesn’t work under VS.NET 2003)
    • Mike Marshall’s AniForm -an MSN Messanger-style popup window
    • Chris Burrows’ Image Index Editor - a UI Type Editor for use with ImageList index selection
    • Dean Cleaver’s .NET AppBar implementation (a C# port of original code from Jeffrey Richter)
    • Mike Marshall’s File Search Engine: a text file search implementation with behavior similar to dev studio’s Find In Files”
    • Matthew W. Adams’ et. al. Themed controls
    • Chris Sells’s InitialInstanceActivator. The InitialInstanceActivator makes sure that only one instance of an application is started and when another instance is started, the first instance is passed the command line arguments passed to the initial instance
    • Chris Sells’s MultiSdiApplicationContext class for allowing multiple top-level Windows Forms
    • Peter Stephens’ changes to the CommandlineParser that fix some bugs as well as add the ability to skip the first argument
    • Matt Berther’s additions to the CompletionComboBox to fire an event when the text typed does not match any items in the dropdown
    • Peter Foreman’s splash screen implementation
    • Chris Sells’s newly improved WebCommandLineHelper class which now works with .NET 1.0 and 1.1, includes URL decoding and requires no additional permissions (although it does require a server-side HTTP handler, included as the ConfigFileHandler class that maps requests for foo.exe?bar=quux.config to the foo.exe.config file).
    • Shawn Wildermuth’s WizardSheet updates
    • Chris Sells’s Status Bar Extender for mapping status messages to Windows Forms controls
    • Andre Van Der Merwe’s CommandLineParser changes as described below:
      • Added ValueDelimiters: enum for ValueUsageAttribute which lets the user specify which (combination) of delimiters (space, : or =) will be allowed
      • Added AllowOnOff: bool in FlagUsageAttribute to specify if a +/- suffixes can be used on the flag
      • Added EnvironmentDefaults: string in ParserUsageAttribute, allows the user to specify defaults in an environment variable (ala DIRCMD).
      • Modified the Long&Short help generation functions to
        • Format/pad flag/param names correctly regardless of length
        • Show [+|-] prefix (if applicable) for flags
        • Show [sp|:|=] delimiters (as applicable) for values
  • 08/18/02: Release v0.3:
    • Screen shots for everything.
    • CVS repository available, as provided by our rmTrack sponsor, along with extensive CVS docs from Brad Wilson.
    • MRU support from Michael Weinhardt, including both in-menu and sub-menu support.
    • A much more robust set of validation components from Michael Weinhardt (Michael’s been busy : ) modeled along the lines of the ASP.NET validation components, including required, regex, range and comparison validators.
    • FileDocument component from Chris Sells for document/dirty bit handling.
    • Wizard support from Shawn Wildermuth, including changing page groups on the fly!
    • Custom state treeview from Chris Sells so that you can set and show all three checkbox states.
    • A class to expose the WinForms HandleCollector from Ethan Brown so that you can put your own custom resources into it.
    • A Screen Saver class from Shawn Van Ness.
    • A bunch of file utility classes from Ethan Brown, including retrieving mapped drives, retrieving shares and path resolution b/w UNC, local (including SUBST, etc).
    • A cursor changer class that works with the using block by Shawn Wildermuth.
    • A WebCommandLineHelper class from Chris Sells to parse command line arguments from the URL used to launch href-exes.
    • Update to the FileNameDialog from Deepak Shenoy to include newish flags.
  • 6/10/02: Release v0.2:
    • Updated ListViewSorter to be declarative. Look for Designer support ASAP.
    • Generated new genghis.key and removed it from the distribution.
    • Brad Wilson, our new Build Master, contributed a Nant build.
    • Paul Bartrum and Chris Burrows contributed a mostly-complete .NET implementation of SimplePad, along with some sample command updating and cool menus implementations.
    • Paul Bartrum also provided a window serializer and a preference class.
    • Michael Weinhardt contributed an MRU sample.
    • I contributed a custom state treeview useful for things like tri-state checkboxes.
    • Minor bug fixes.
  • 4/3/02: Released v0.1.
  • 2/28/02: Set the license.
  • 2/16/02: Posted this page.

Sponsors

rmTrack provided the initial hosting space and administration support for Genghis bug tracking and source code control.

License

Copyright © 2002-2004 The Genghis Group

Th is software is provided as-is’, without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required, as shown here:

    Portions copyright © 2002-2004 The Genghis Group (http://www.genghisgroup.com/).
     
  2. No substantial portion of the source code of this library may be redistributed without the express written permission of the copyright holders, where substantial” is defined as enough code to be recognizably from this library.

License Note

This license based on the open source zlib/libpng license. The idea was to keep the license as simple as possible to encourage use of Genghis in free and commercial applications and libraries, but to keep the source code together and to give credit to the Genghis contributors for their efforts. While this license allows shipping Genghis in binary form, if shipping a Genghis variant is the sole purpose of your product, please contact The Genghis Group for a new license.