|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionTo be honest, Star Trek is one of the mainly reasons why I love technology. Since I was a child I dreamed with these ships and its talking computers. Today, in several Star Trek related websites we can see the look & feel of the ship's computers, named LCARS (Library Computer Access and Retrieval System). But in all of them the interfaces were developed in flash or HTML. Searching on the internet I couldn't find any components for another platforms. Thinking about that, I developed a simple set of LCARS controls for the Microsoft.NET framework 1.1. BackgroundThe components included in the "LCARS_Toolbox.DLL" assembly are:
NOTES: All the design, like colors and components, were based on the information available in http://www.lcarsdeveloper.com/. All the components that uses text, requires the LCARS font that can be downloaded here. The code to generate stardate dates was based over the free javascript source code available from http://www.javascriptkit.com/script/script2/stardates.shtml Using the codeAll the properties required are grouped in the "LCARS" category. To build a LCARS terminal, you must drag & drop the different controls over the form and adjust them using your own style (all the design is visual). Then, you can add some interaction like sounds and clicks. Sounds: To add sounds, you must drag a LCARS_Sound component. Then, you must add some code. There are three ways to play a sound:
IMPORTANT: Because the sounds are played using threads, if you are using a background sound be sure to stop them before to close the application. Clicks: To add some click actions, you must drag a LCARS_Button component. Then, you must implements the "OnClick" event in the usual way. void LCARS_Button5Click(object sender, System.EventArgs e) { if (lCARS_Button5.Blink) { lCARS_Sound1.Stop(); lCARS_Button5.Caption = "SOUND ON"; lCARS_Button5.Blink = false; lCARS_Button5.BaseColor = lCARS_Button2.BaseColor; } else { lCARS_Sound1.PlayLoop("212.wav"); lCARS_Button5.Caption = "SOUND OFF"; lCARS_Button5.Blink = true; lCARS_Button5.BaseColor = "330000"; } } The LCARS_Button also includes some cool properties like the internal optional sound ("SoundFile"), the text property ("Caption"), and the blink feature (“Blink”). Points of InterestIn the included sample you will see a simple LCARS terminal that shows an image viewer with sounds. To compile, execute the “c.bat” file. Don't forget to install the LCARS font. If you are a Star Trek fan, I hope that you enjoy this controls and build a really awesome 24th century systems. Links
History
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||