Пример #1
0
        private void OnApplicationStartup(object sender, StartupEventArgs e)
        {
            Instance = this;

            Net = new EditorServer();
            Net.Init(OnConnectedCallback, this);

            timer = new DispatcherTimer();
            timer.Tick += OnTimerTick;
            timer.Start();
        }
Пример #2
0
        public void CreateBuiltinServer()
        {
            Log.Info("Initializing the built-in editor server...");

            serverCreatedEvent = new ManualResetEventSlim();

            var endPoint = new HostEndPoint(Settings.Host, Settings.RPCPort);

            Server = new EditorServer(endPoint);

            System.Threading.Tasks.Task.Run((Action)RunBuiltinServer);
            serverCreatedEvent.Wait();
        }