Open Source .NET Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Open Source .NET Development [Electronic resources] - نسخه متنی

Brian Nantz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


Didgets Project


Didgets is another Open Source project from http:/sourceforge.net/projects/didgets. Figure 12-3 shows the GDI+ application for drawing and modifying shapes using GDI+.

Figure 12-3. Didgets UI.

[View full size image]

Didgets provides much more functionality than System.Drawing.Drawing2D. The project has a fairly sophisticated architecture, with Workspaces, Widgets, Tools, Properties, Connections, and Commands. This allows Didgets to have its own Shapes and Commands in addition to the ones provided by GDI+. For instance, the Primitive Widgets (rectangles, circles, etc.) know how to size and draw themselves, and the Primitive Tools allow rotation and stretching of the Primitive Widgets using a rubber-band style interface. The Properties allows a Widget to change the Lineweight and color, as well as many other properties like background and foreground colors. Didgets also allows for plug-ins so that additional assemblies can create their own custom Shapes and Widgets that can even be added to the toolbar. There are extension examples included with the Didgets distributions for Parallelogram Shapes. These assemblies inherit from a normal Didget's Widget class and extend the properties like Brushstyles and Lineweights. Didgets also uses the [Tool("Parallelogram","base.101","graphics.ToolParallelogram.ico")] custom attribute to mark the class (in this case, the ParallelogramTool class) that contains the code to put up on a toolbar. The custom attribute contains the icon to be displayed on the toolbar, thus creating a very extendable toolbar. By putting these custom assemblies into a specified directory, Didgets creates a very extendable Shape plug-in architecture using System.Reflection and custom attribute tags.


    / 275