Beispiel #1
0
 void ISimulatorNodeCallbacks.ChangeState(NodeState state)
 {
     if (control.InvokeRequired)
     {
         ISimulatorNodeCallbacks temp = this;
         control.BeginInvoke(new Action(() => { temp.ChangeState(state); }));
     }
     else
     {
         node.ForeColor = GetForeColor(state);
         node.BackColor = GetBackColor(state);
     }
 }
        public ChannelNode(IDNP3Config config, IChannel channel, ISimulatorNodeCallbacks callbacks, string alias)
        {
            this.config = config;
            this.channel = channel;
            this.callbacks = callbacks;
            this.alias = alias;

            this.callbacks.ChangeImage(IconIndex.Channel);

            this.masterFactory = new ActionNodeFactory("Add Master", cb => CreateMaster(cb));
            this.outstationFactory = new ActionNodeFactory("Add Outstation", cb => CreateOutstation(cb));

            this.channel.AddStateListener(state => callbacks.ChangeState(GetNodeState(state)));
        }
Beispiel #3
0
        public ChannelNode(IDNP3Config config, IChannel channel, ISimulatorNodeCallbacks callbacks, string alias)
        {
            this.config    = config;
            this.channel   = channel;
            this.callbacks = callbacks;
            this.alias     = alias;

            this.callbacks.ChangeImage(IconIndex.Channel);

            this.masterFactory     = new ActionNodeFactory("Add Master", cb => CreateMaster(cb));
            this.outstationFactory = new ActionNodeFactory("Add Outstation", cb => CreateOutstation(cb));


            this.channel.AddStateListener(state => callbacks.ChangeState(GetNodeState(state)));
        }