Beispiel #1
0
        public GarbageTerminal(Pulverizer pulverizer,
                               GrayFan grayFan, PrimaryPump pump, PlasmaGeneratorGroup plasmaGenerator,
                               ExhaustMain exhaustMain, ExhaustSlave exhaustSlave, Transfer transfer,
                               ReactionCabin reactionCabin, UVLight uvLight, SecondaryPump secondary,
                               IPowerController powerController, IOptionsMonitor <DeviceSetting> deviceSetting)
        {
            Transfer   = transfer;
            Pulverizer = pulverizer;

            GrayFan = grayFan;

            this.PrimaryPump   = pump;
            this.SecondaryPump = secondary;

            ExhaustMain  = exhaustMain;
            ExhaustSlave = exhaustSlave;

            ReactionCabin         = reactionCabin;
            UVLight               = uvLight;
            this.controller       = powerController;
            DeviceSetting         = deviceSetting;
            this.GrayFan.Terminal = this;

            PlasmaGeneratorGroup     = plasmaGenerator;
            plasmaGenerator.Terminal = this;
        }
Beispiel #2
0
        public override string Speak()
        {
            base.Speak();
            Dialog           phrase             = CurrentDialog;
            IPowerController lightSwitchControl = ConfigManager.FindAllComponentsOfType <IPowerController>().FirstOrDefault(s => s.Name.Equals(phrase.GetPropertyValue("SwitchName")));

            ConversationIsOver = true;
            if (lightSwitchControl == null)
            {
                return(String.Empty);
            }
            else if (phrase.GetPropertyValue("Direction").Equals("on"))
            {
                CommandTask = Task.Run(() =>
                {
                    lightSwitchControl.TurnOn();
                });
                return("OK");
            }
            else if (phrase.GetPropertyValue("Direction").Equals("off"))
            {
                CommandTask = Task.Run(() =>
                {
                    lightSwitchControl.TurnOff();
                });
                return("OK");
            }
            return("Sorry, that is not a valid light switch command.");
        }
Beispiel #3
0
 public ShutdownCommand(
     IPowerController powerController,
     ShutdownArgs shutdownArgs)
 {
     this.powerController = powerController;
     this.shutdownArgs    = shutdownArgs;
 }
Beispiel #4
0
 public PrimaryPump(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="processor"></param>
 /// <param name="powerController"></param>
 public DeviceController(GarbageTerminal processor, IPowerController powerController)
 {
     this.terminal        = processor;
     this.powerController = powerController;
 }
Beispiel #6
0
 public Transfer(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }
 /// <summary>
 /// Reinitializes the IPowercontroller singleton
 /// </summary>
 public static void Clear()
 {
     _powerController = null;
 }
Beispiel #8
0
 public ParameterizedShutdownCommandFactory(
     IPowerController powerController)
 {
     this.powerController = powerController;
 }
Beispiel #9
0
 public PowerEquipment(IPowerController controller, IOptionsMonitor <DeviceSetting> setting)
 {
     this.controller = controller;
     this.setting    = setting;
 }
Beispiel #10
0
 public UVLight(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }
Beispiel #11
0
 public CancelShutdownCommand(IPowerController powerController)
 {
     this.powerController = powerController;
 }
Beispiel #12
0
 public ExhaustMain(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
     Controller = controller;
 }
Beispiel #13
0
 public Pulverizer(IPowerController controller, IOptionsMonitor <DeviceSetting> setting)
     : base(controller, setting)
 {
 }
 /// <summary>
 /// Reinitializes the IPowercontroller singleton
 /// </summary>
 public static void Clear()
 {
   _powerController = null;
 }
Beispiel #15
0
 public HibernateCommand(IPowerController powerController)
 {
     this.powerController = powerController;
 }
Beispiel #16
0
 public GrayFan(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
     timer = new Timer(GrayFanTimer, null, 5000, 5000);
 }
Beispiel #17
0
 public PrimaryPlasmaGenerator(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }