Inheritance: ICommandHandler
 public void Configure(ProxyCommandHandler proxy, IMeasurementLoader loader)
 {
     this.handler = proxy;
     this.loader = loader;
     this.handler.BinaryCommandAccepted += handler_BinaryCommandAccepted;
     this.handler.AnalogCommandAccepted += handler_AnalogCommandAccepted;
 }
        public OutstationForm(IOutstation outstation, ProxyCommandHandler commandHandler)
        {
            InitializeComponent();

            this.outstation = outstation;
            this.commandHandler = commandHandler;

            commandHandler.CommandProxy = this; // proxy commands to the form
        }
        public OutstationForm(IOutstation outstation, EventedOutstationApplication application, MeasurementCache cache, ProxyCommandHandler proxy, String alias)
        {
            InitializeComponent();

            this.outstation = outstation;
            this.application = application;
            this.cache = cache;
            this.proxy = proxy;

            this.loader = new ProxyLoader(outstation, cache);

            this.Text = String.Format("DNP3 Outstation ({0})", alias);
            this.comboBoxTypes.DataSource = System.Enum.GetValues(typeof(MeasType));

            this.commandHandlerControl1.Configure(proxy, loader);

            this.comboBoxColdRestartMode.DataSource = System.Enum.GetValues(typeof(RestartMode));

            this.application.ColdRestart += application_ColdRestart;
            this.application.TimeWrite += application_TimeWrite;

            this.CheckState();
        }
        public OutstationInstance(ProxyCommandHandler handler, EventedOutstationApplication application, IOutstation outstation, OutstationStackConfig config, string alias)
        {
            this.handler = handler;
            this.application = application;
            this.outstation = outstation;
            this.alias = alias;

            this.cache = new MeasurementCache(config.databaseTemplate);
        }
        public OutstationInstance(ProxyCommandHandler handler, EventedOutstationApplication application, IOutstation outstation, OutstationStackConfig config, string alias)
        {
            this.handler = handler;
            this.application = application;
            this.outstation = outstation;
            this.alias = alias;

            this.form = new OutstationForm(outstation, handler);
        }