Exemplo n.º 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;
        }
Exemplo n.º 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.");
        }
Exemplo n.º 3
0
 public ShutdownCommand(
     IPowerController powerController,
     ShutdownArgs shutdownArgs)
 {
     this.powerController = powerController;
     this.shutdownArgs    = shutdownArgs;
 }
Exemplo n.º 4
0
 public PrimaryPump(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="processor"></param>
 /// <param name="powerController"></param>
 public DeviceController(GarbageTerminal processor, IPowerController powerController)
 {
     this.terminal        = processor;
     this.powerController = powerController;
 }
Exemplo n.º 6
0
 public Transfer(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }
Exemplo n.º 7
0
 /// <summary>
 /// Reinitializes the IPowercontroller singleton
 /// </summary>
 public static void Clear()
 {
     _powerController = null;
 }
Exemplo n.º 8
0
 public ParameterizedShutdownCommandFactory(
     IPowerController powerController)
 {
     this.powerController = powerController;
 }
Exemplo n.º 9
0
 public PowerEquipment(IPowerController controller, IOptionsMonitor <DeviceSetting> setting)
 {
     this.controller = controller;
     this.setting    = setting;
 }
Exemplo n.º 10
0
 public UVLight(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }
Exemplo n.º 11
0
 public CancelShutdownCommand(IPowerController powerController)
 {
     this.powerController = powerController;
 }
Exemplo n.º 12
0
 public ExhaustMain(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
     Controller = controller;
 }
Exemplo n.º 13
0
 public Pulverizer(IPowerController controller, IOptionsMonitor <DeviceSetting> setting)
     : base(controller, setting)
 {
 }
Exemplo n.º 14
0
 /// <summary>
 /// Reinitializes the IPowercontroller singleton
 /// </summary>
 public static void Clear()
 {
   _powerController = null;
 }
Exemplo n.º 15
0
 public HibernateCommand(IPowerController powerController)
 {
     this.powerController = powerController;
 }
Exemplo n.º 16
0
 public GrayFan(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
     timer = new Timer(GrayFanTimer, null, 5000, 5000);
 }
Exemplo n.º 17
0
 public PrimaryPlasmaGenerator(IPowerController controller, IOptionsMonitor <DeviceSetting> setting) : base(controller, setting)
 {
 }