using NDependencyInjection.interfaces;
using UISpike.Application;
using UISpike.Controls;
namespace UISpike.Scenario3.InjectionApproach
{
public class PageBuilder : ISubsystemBuilder
{
public void Build(ISystemDefinition system)
{
using (var page = new ActionResultsPanelBuilder(system))
{
using (var actions = page.Actions)
{
actions.HasButton<IFrontCamera>("frontCameraHomeButton", "Home Camera");
}
using (var content = page.Content)
{
using(var splitPanel = content.HasSplitPanel())
{
using (var panel = splitPanel.LeftPanel)
{
panel.HasNumericLabel<IFrontCamera>("fronCameraPosition", "Front camera pos", "#,###");
panel.HasNumericLabel<IRearCamera>("rearCameraMotorPosition", "Rear camera pos", "#,###");
}
using (var panel = splitPanel.RightPanel)
{
panel.HasCustomControl(new BigGraphBuilder());
}
}
}
}
}
}
}
Rob Smyth
Thursday, 28 May 2009
For non-trivial applications I'm finding Visual Studio's designer to be a bit of honey pot for corruption. Great for a trivial app but it exposes just too many options. Once the application design has been defined I'm wondering if some think the following code is simpler and simpler to maintain than traditional designer generated code.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment