Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="provider"></param>
        public HeliosClient(IServiceProvider provider)
        {
            var loggerFactory = provider.GetRequiredService <ILoggerFactory>();

            _helios     = new Helios(loggerFactory.CreateLogger <Helios>());
            TcpSlave.ID = 180;
        }
Ejemplo n.º 2
0
 protected override void OnPropertyChanged(Helios.ComponentModel.PropertyNotificationEventArgs args)
 {
     if (args.PropertyName.Equals("Visual"))
     {
         _indicator = args.NewValue as Indicator;
     }
     base.OnPropertyChanged(args);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RootCommand"/> class.
        /// The RootCommand sets default values for some properties using the application settings.
        /// </summary>
        /// <param name="logger">The logger instance.</param>
        /// <param name="helioslogger">The logger instance.</param>
        /// <param name="options">The setting options instance.</param>
        /// <param name="environment">The hosting environment instance.</param>
        public RootCommand(ILogger <RootCommand> logger,
                           ILogger <Helios> helioslogger,
                           IOptions <AppSettings> options,
                           IHostingEnvironment environment)
            : base(logger, options, environment)
        {
            _logger?.LogDebug("RootCommand()");

            Address = _settings.Address;
            Port    = _settings.Port;
            Slave   = _settings.Slave;
            Data    = _settings.Data;
            Helios  = new Helios(helioslogger);
        }
Ejemplo n.º 4
0
        protected override void OnInterfaceChanged(Helios.HeliosInterface oldInterface, Helios.HeliosInterface newInterface)
        {
            EosDirectSerial oldSerialInterface = oldInterface as EosDirectSerial;
            if (oldSerialInterface != null)
            {
                oldSerialInterface.Bus.ResponseReceived -= Bus_ResponseReceived;
            }

            EosDirectSerial serialInterface = newInterface as EosDirectSerial;
            if (serialInterface != null)
            {
                serialInterface.Dispatcher = Dispatcher;
                serialInterface.ResponseReceived += Bus_ResponseReceived;
            }
        }
Ejemplo n.º 5
0
 public static void OpenSteamGame(
     HeliosStartupAction action = HeliosStartupAction.None,
     Profile profile            = null,
     uint steamAppId            = 0)
 {
     try
     {
         Helios.OpenSteamGame(action, profile, steamAppId);
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString(), string.Format(Language.Failed_to_execute_action_Error_Message, e.Message),
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 6
0
 public static void Open(
     HeliosStartupAction action = HeliosStartupAction.None,
     Profile profile            = null,
     string programAddress      = null,
     bool asAdmin = false)
 {
     try
     {
         Helios.Open(action, profile, programAddress, asAdmin);
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString(), string.Format(Language.Failed_to_execute_action_Error_Message, e.Message),
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 7
0
 public ObjectiveTemplate()
 {
     Type   = "Helios";
     Helios = new Helios();
     ObjectivesAllStructures = new EmptyClass();
 }
Ejemplo n.º 8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="provider"></param>
 public HeliosClient(ILogger <Helios> logger)
 {
     _helios     = new Helios(logger);
     TcpSlave.ID = 180;
 }
Ejemplo n.º 9
0
 void Start()
 {
     soundFX = GameObject.Find("SoundFX").GetComponent <SoundFX>();
     helios  = GameObject.Find("Helios").GetComponent <Helios>();
 }