Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, March 03, 2010

SliderList control


kinetic scrollable list with functional items

the list items can be simple text, check items with and without thumbnail and radio items. All items can be grouped, but do not have to. If you use grouping, you can decide, if the group is collapsible/expandable or not (see also screen shots)
Each item may have ChildItems (despite to the group items, which have *SubItems*). The child items slide in view either by using a ParentItem, which has a "button" to scroll the children in view, or by sliding the finger from right to left after tapping on the item.

If you need another functionality for your item, you can either inherit and extend the item that fits best, or implement IItem on your own.

Some annotations and sources...

- To skin the control you can use PNG graphics. The transparent color will be the bottom right pixel.
- If you use a graphic as background the height of the item is determined my the bitmap.
- If you inherit from TextItem (as it is done by CheckItem) you have to specify the textRect for the underlying item to render the text correctly.
- the SliderList has an event OnFocusedControl that is fired after tipping on an IItem. After this event the event chain for the items is fired.


SLIDERLIST EVENTS:
event OnItemFocused
is fired when an item is clicked


SLIDERLIST PROPERTIES:
List Items { get; }
Retrieves the list of items.

bool ShowIndicator
Determines if the indicator bar (Scrollbar) is shown

Color IndicatorColor
The color of the indicator.

Bitmap IndicatorBitmap
Is used as the list indicator. If this is used, the height of the indicator is determined by the height of the bitmap. The indicator color is ignored.

int TopIndex
The index of the IItem that is shown on top of the list.

IItem FocusedItem
The IItem that is currently focused.

Image BackgroundImage
The background image to use.


SLIDERLIST METHODS:
void AddItem( IItem Item )
Add one item to the list

void RemoveItem( IItem Item )
Removed the item from the list

void IndexOf( IItem Item )
Get the index of the item.

void InsertItem( int Index, IItem Item )
Inserts the Item at Index position.

void Clear()
Clears the list of items.

void SlideToChildren()
If the focused IItem has children, the list slides to the left and from the right the list with the children appears.

void SlideToParent()
When a list with children is displayed, it slides out to the right and the list with its parent item appears from the left.

void ScrollInView( IItem Item )
Ensure that the IItem is visible (this could be improved, because the IItem will always be the top item)

void BeginUpdate()
Prevent the list from updating while adding/removing items. If you call it twice, you also have to call EndUpdate twice before the list invalidates itself.

void EndUpdate()
Internally counts back how many BeginUpdate were called. If non is left the control invalidates.

internal Recalculate()
Used by GroupItem to be sure after adding/removing SubItems to have the internal list parameters recalculated



ITEMS
IItem interface
Implement this interface for own items.
Additional to the events and properties of IItem the items can have own events, methods and propertis

BaseItem
Bitmap Background : the background image that is used. If background image is used, the item height is determined by the image. Otherwise it can be set by property or constructor.

TextItem
string Text : the text to draw.
Font Font : the font to draw the text.
Color TextColor : the text color.
protected Rectangle textRect : internal used rectangle in which the text is drawn.

RadioItem (derived from TextItem)
Bitmap IconUnchecked : the bitmap displayed right hand side of the item as unchecked state
Bitmap IconChecked : the bitmap displayed right hand side of the item as checked state.
bool Checked : get/set checked state.

CheckItem (derived from TextItem)
event ItemChecked OnItemChecked : fired by cheking/unchecking the item
event ThumbnailClicked OnThumbnailClicked : fired by clicking on the thumbnail (if set)
Bitmap Thumbnail : the image that is displayed left hand side (if not set the corresponding event cannot be fired)
Bitmap IconUnchecked : the bitmap displayed right hand side of the item as unchecked state
Bitmap IconChecked : the bitmap displayed right hand side of the item as checked state.
bool Checked : get/set checked state.
bool CompleteItemCheck : get/set whether to check/uncheck the item by clicking anywhere (not thumbnail) on the item

ParentItem (derived from TextItem)
event ThumbnailClicked OnThumbnailClicked : fired by clicking on the thumbnail (if set)
Bitmap Thumbnail : the image that is displayed left hand side (if not set the corresponding event cannot be fired)
Bitmap IconShowMore : the icon used to indicate that children are available.
when clicked on that bitmap the list slides automatically to the childrens list.

GroupItem (derived from TextItem)
Bitmap IconExpanded : the icon used to indicate the list can be collapsed.
Bitmap IconCollapsed : the icon used to indicate the list can be expanded.
bool Expanded : get/set the expanded/collapsed state
AddSubItem( IItem SubItem ) : add a new item to the group.
RemoveSubItem( IItem SubItem ) : remove an item from the group

RadioGroupItem (derived from GroupItem)
takes care that only one RadioItem can be checked. Other items are allowed in that list.

The most common problems
using the items and not setting the Font property!
Using GroupItems and not adding them to the SliderList before adding SubItems to the group

SliderList control

Thursday, May 28, 2009

Code Snippet Viewer


With this tool you can lookup CodeSnippets on the Go!

Just add them to the Access Database, convert it with the included tool "Code Snippet Creator" and copy it to your Device and start "Code Snippet Viewer"

The Viewer is Tested on my Stock HTC Kaiser - But it should run on any Touchscreen powered WM Device with netcfv2

Code Snippet Viewer

Wednesday, December 03, 2008

LME for Pocket PC


LME for Pocket PC is LME, the programming language of Sysquake, compiled in an application for Windows Mobile ARM-based handheld devices.

It has been tested mainly on a Dell Axim X30 device, but should also run on other Axim, HP iPaq and compatible devices.

LME for Pocket PC is a technology preview. Its user interface is basic, and there is support only for static graphics, not for interactive graphics. It is based on LME, a Matlab-compatible programming language aimed at numerical computing used in Sysquake and other products of Calerga since 1997. You should install it only if you want to bring Matlab compatibility in your pocket.

LME for Pocket PC

Wednesday, February 20, 2008

Mobilmon


File system access monitoring utility for Windows Mobile 5 and 6.

If you are a developer, sysadmin, or tweaker, you have probably used utilities that monitor file system activity. Sometime that’s just the only way to figure out what’s really going on. Well, I was trying to figure some things out on my Windows Mobile device and said to myself, “A file monitoring utility sure would be handy for this.”

Mobilmon

Wednesday, February 06, 2008

PythonCE


Python is a dynamic object-oriented programming language that can be used for many kinds of software development.

It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.

Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. Python has also been ported to the Java and .NET virtual machines.

PythonCE

Thursday, September 27, 2007

C# IDE Mobile


C# IDE Mobile, as its name implies, is a C# Integrated Development Environment which executes on Windows Mobile 5 or 6 with .NET Compact Framework 2. t allows you to write programs using the C# language and the .NET 2.0 Compact Framework (.NET2CF). The program is parsed and executed at runtime (there is no compilation or link required).

Important note: No .NET SDK IS REQUIRED: Unlike other tools which do "C# Scripting" by wrapping CSC.EXE, C# IDE Mobile doesn't require you to have the .NET SDK (which includes the compilers). It only requires having the .NET 2.0 (Compact or not) Framework Redistributable (i.e. the runtime .NET). It isn't a wrapper around the Microsoft CSC.EXE compiler.

Harvey ROWSON's Windows Mobile page

Friday, April 13, 2007

CID & LAC & signal level micro wrapper CF.NET

TeoG released a free CF.NET DLL wrapper to get CID, LAC and Signal Strenght

hi,
I've developed a simple dll wrapper to get Local area network (LAC), cellular Id (CID) and Signal Sternght on a windows mobile 2005 Pocketpc.
- TeoG

READ MORE and DOWNLOAD HERE

Saturday, March 03, 2007

Open File & Save File Dialogs


This dll is a total solution for interacting with the user to obtain path information. It can be configured to act as a File Open Dialog or a File Save Dialog.

additional features:
* This dll has been designed to be dynamically loaded at run time when needed. This allows for memory efficiency from programs that use it. The total stored size of the dll is 119K.

* The dialog has most of the capabilities of a more powerful file browser. The only thing left out when compared to a browser is the ability to run programs.

* There is a search utility built in that can locate files fast and then open the folder containing that file, much like in a desktop search.

* For those who have used GSMbeam, this will look like the built in open file dialog. This is based on that code but has been mad more efficient, faster and has more features. It now has full support for screen rotation on newer devices. The only concession made was to build this as a windows ce 3.0 dll. this means that it will run on any device but in newer operating systems the automatically added scroll bars will still appear if the screen is rotated after a dialog is created. The dialogs will adjust their own characteristics to match orientation.

* This dll is free to use for non commercial applications. It has no codes, passwords or crippled features. Any one may redistribute this dll as part of a larger project, so long as the distribution is not primarily concerned with this work and is free. This means that you must be doing something with it and not just redistributing the files I have made available. The attribution information in the About Dialog must not be altered or remove.


READ MORE and DOWNLOAD HERE