コード例 #1
0
ファイル: DummySystem.cs プロジェクト: gllortc/railwaystudio
        /// <summary>
        /// Set an accessory output.
        /// </summary>
        /// <param name="address">DecoderInput address.</param>
        /// <param name="status">Value to set.</param>
        public override void SetAccessoryStatus(int address, bool turned, bool activate)
        {
            Logger.LogDebug(this, "[CLASS].SetAccessoryStatus(#{0:D4}, {1}, {2})", address, turned, activate);

            DummyEmergencyStop command = new DummyEmergencyStop();

            this.OnCommandReceived(new SystemCommandEventArgs(command));

            System.Windows.Forms.Application.DoEvents();
        }
コード例 #2
0
ファイル: DummySystem.cs プロジェクト: gllortc/railwaystudio
        /// <summary>
        /// Request stopping all locomotives.
        /// </summary>
        public override void EmergencyStop()
        {
            Logger.LogDebug(this, "[CLASS].EmergencyStop()");

            this.EmergencyStopEnabled = true;

            DummyEmergencyStop command = new DummyEmergencyStop();

            this.OnCommandReceived(new SystemCommandEventArgs(command));

            System.Windows.Forms.Application.DoEvents();
        }