Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the CommandCenter class using the specified missile launcher model and HID library implementation.
        /// </summary>
        /// <param name="launcher">missile launcher model you want to control</param>
        /// <param name="device">HID library that will be used</param>
        /// <remarks>This is only for testing - HidLibrary is the default library for production use</remarks>
        internal CommandCenter(ILauncherModel launcher, IHidDevice device)
        {
            if (launcher == null)
            {
                throw new ArgumentException(Resources.LauncherIsNull);
            }

            if (device == null)
            {
                throw new ArgumentException(Resources.DeviceIsNull);
            }

            this.launcher = launcher;
            this.device   = device;
            this.sets     = new CommandSetList();

            device.Initialize(launcher.VendorId, launcher.DeviceId);
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the CommandCenter class using the specified missile launcher model.
 /// </summary>
 /// <param name="launcher">missile launcher model you want to control</param>
 public CommandCenter(ILauncherModel launcher) : this(launcher, new HidLibraryDevice())
 {
 }
Esempio n. 3
0
 public LauncherViewModel(ILauncherModel launcherModel)
 {
     _launcherModel = launcherModel;
     _init();
 }