private void InitConfig() { Logger.Info("Initializing configuration"); if (_config.GameExe == "") { Logger.Debug("Getting default game exe path"); _config.GameExe = GameUtility.DefaultGameExe(); } if (_config.ToolCfg == "") { Logger.Debug("Getting default tool cfg path"); _config.ToolCfg = GameUtility.DefaultToolCfg(); } if (_config.ProfileName == "") { Logger.Debug("Getting default profile name"); _config.ProfileName = GameUtility.DefaultProfileName(); } if (_config.ProfileCfg == "") { Logger.Debug("Getting default profile cfg path"); _config.ProfileCfg = GameUtility.DefaultProfileCfg(); } if (_config.ServerUrl == "") { Logger.Debug("Getting default server url"); _config.ServerUrl = ServerUtility.DefaultServerUrl(); } if (_config.SerialPort == "") { Logger.Debug("Getting default serial port"); var portNames = SerialPort.GetPortNames(); var portName = portNames.Length > 0 ? portNames[0] : ""; _config.SerialPort = portName; } }