using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Microsoft.Practices.CompositeUI; using Microsoft.Practices.CompositeUI.EventBroker; using Integrator.UI.Common; using Integrator.Framework.ServiceManagerModel; using Integrator.Framework.Sequencer; namespace Integrator.UI.Sequencer { public class SequencerController : Controller { private SequencerView view = null; private Integrator.Framework.Sequencer.Sequencer sequencer = null; public SequencerController(SequencerView view) { if (view == null) { throw new ArgumentNullException(); } this.view = view; this.sequencer = Integrator.Framework.Sequencer.Sequencer.Instance(); } public int Count { get { return this.sequencer.Count; } } public StatusEnum GetState(int index) { return this.sequencer.GetOperation(index).State; } public Operation GetOperation(int index) { return this.sequencer.GetOperation(index); } public new SequencerWorkItem WorkItem { get { return base.WorkItem as SequencerWorkItem; } } [EventSubscription(EventTopicConstants.ADD_OPERATION, Thread = ThreadOption.UserInterface)] public void OnServiceLoaded(object sender, OperationEventArgs e) { this.sequencer.AddOperation(e.Operation); this.view.AddRow(); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)