AGENT.Contrib - AGENT, Community and you!
- Posted: Aug 09, 2013 at 6:00AM
- 4,386 views
- 1 comment
Loading user information from Channel 9
Something went wrong getting user information from Channel 9
Loading user information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Today's Hardware Friday post is one that I promised to do a couple weeks ago, The AGENT Emulator & Bluetooth and again takes us back to the AGENT SmartWatch, You don't have to be a Secret Agent to develop for the AGENT SmartWatch (You just have to read this...)
But today, it's code. And you. And community. And code...
A set of useful class libraries which should help folks create amazing Faces and Apps for AGENT SmartWatch.
I'm taking pull requests, and ideas for contributions.
If you browse the source real quick I have added a few Samples as to how to start using some of the features:
- SimpleWatchFace - just a super simple example as to how to print the time on the screen.
- SimpleWatchFaceWithButtons - simple time on the screen, and responds to the MiddleRight button to toggle showing the date on the screen.
- Style Guide
- Development Guides
- Micro Tips for .NET Developers
- Hardware Specs
- Smartphone Device Support
- Internationalization & Localization
- Building your own prototype
- A bunch of useful methods for drawing watch hands (for analog watch faces)
- A method to draw a batter, with correct filler depending on the % of battery life
- Drawing text or images at the center of the screen
- Measuring Text width, based on fonts
- All sorts of string to number parsing methods, and converting byte to string
- Initial set of interfaces for defining location and position data. If we all can agree on an interface, then it will just make it easier for the entire community to create apps and faces...
- ButtonHelper class is a threadsafe way for dealing with buttons. Can just wire up an event for the buttons you care about. No need to deal with InterruptPorts, and the class will automatically tell you which button and direction was clicked.
- More advanced class, used to load up other types dynamically, etc..
- Download and build the Agent.Contrib project.
- Create a new "Micro .NET Framework" "Command line" application
- Import your favourite font as a resource, here we will use NinaB
- Add a reference to Microsoft.SPOT.Graphics
- Add a reference to AGENT.Contrib project
- Add a new file to the project, called "BasicFace.cs"
- Update BasicFace.cs to the following code:
By default, watch faces only support the middle button the default for the button helper is to only enable the single button. If you want to enable all of the buttons on the right side, just use this prior to any calls to the button helper:
For example, place it at the top of your Main() in Program.cs
So what are we talking about here? About a ton of great helpers, utilities and samples too!
Here's some of the samples...
In short, if you're doing AGENT Dev, you've got to check out this project... um.. now...