Пример #1
0
        public ServerCore(EDFIPServerConsole serverConsole)
        {
            ServerConsole = serverConsole;

            // Set up the Journal feeds to be passed to clients
            var userHome = Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%");

            JournalFileFolder = userHome + Constants.GameStateFolder;
            Log.Instance.Info("Tracking game data from folder: {journalfilefolder}", JournalFileFolder);
            StatusWatcher  = new StatusWatcher(JournalFileFolder);
            JournalWatcher = new JournalWatcher(JournalFileFolder);


            // Add events to watch list
            StatusEventHandler           = new StatusEventHandler(this);
            StatusWatcher.StatusUpdated += StatusEventHandler.HandleEvent;

            TargetEventHandler = new TargetEventHandler(this);
            JournalWatcher.GetEvent <ShipTargetedEvent>().Fired += TargetEventHandler.HandleEvent;

            // Start Matric Integration
            matricapi.Connect();

            // If Immediate start is enabled, start the server
            if (Properties.Settings.Default.ImmediateStart == true)
            {
                this.Start();
            }
        }
Пример #2
0
 public Settings(Form caller)
 {
     InitializeComponent();
     this.Caller = caller as EDFIPServerConsole;
 }