Ejemplo n.º 1
0
        public void Start()
        {
            Log.LogInformation("Loading queues from persistant storage");

            int queueCount   = 0;
            int messageCount = 0;

            foreach (var queueName in Persistence.GetQueueNames())
            {
                var queue = Persistence.LoadQueue(queueName);

                Log.LogInformation($"Loading messages for {queueName}");

                foreach (var message in Persistence.LoadMessages(queueName))
                {
                    queue.Enqueue(message);
                    messageCount = 0;
                }

                Queues.Add(queue);

                queueCount++;
            }

            Log.LogInformation($"Loaded {queueCount} queues with a total of {messageCount} messages");

            Log.LogInformation("Starting listener");

            ServerSocket.Bind(EndPoint);

            RunThread.Start();

            QueueProcessThread.Start();
        }
Ejemplo n.º 2
0
        public CustomScreenVignette(Session session, XmlElement xml = null, MapMetaCompleteScreen meta = null)
        {
            this.session = session;
            session.Audio.Apply();
            this.meta = meta;
            this.xml  = xml;

            RunThread.Start(LoadCompleteThread, "SUMMIT_VIGNETTE");
        }
        /// <summary>
        /// Do not use outside of multiplayer mods. Allows more than 2 processes to communicate.
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public static StudioCommunicationClient RunExternal(string target)
        {
            if (Environment.OSVersion.Platform != PlatformID.Win32NT)
            {
                return(null);
            }
            var client = new StudioCommunicationClient(target);

            RunThread.Start(instance.UpdateLoop, "StudioCom Client_" + target);

            return(client);
        }
        public static bool Run()
        {
            if (Environment.OSVersion.Platform != PlatformID.Win32NT)
            {
                return(false);
            }
            instance = new StudioCommunicationClient();

#if DEBUG
            SetupDebugVariables();
#endif

            RunThread.Start(instance.UpdateLoop, "StudioCom Client");

            return(true);
        }
 public WallbouncePresentation(EventInstance usingSfx = null, string dialogKeyPrefix = "WAVEDASH", string graphicsKeyPrefix = "", string playbackKeyPrefix = "")
 {
     GraphicsKeyPrefix = graphicsKeyPrefix;
     DialogKeyPrefix   = dialogKeyPrefix;
     PlaybackKeyPrefix = playbackKeyPrefix;
     ScaleInPoint      = new Vector2(1920f, 1080f) / 2f;
     ScreenWidth       = 1920;
     ScreenHeight      = 1080;
     pages             = new List <WallbouncePresentationPage>();
     verts             = new VertexPositionColorTexture[6];
     Tag     = Tags.HUD;
     Viewing = true;
     loading = true;
     Add(new Coroutine(Routine(), true));
     this.usingSfx = usingSfx;
     RunThread.Start(new Action(LoadingThread), "Wallbounce Presentation Loading", true);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Save all mod and user settings. Use this instead of UserIO.SaveHandler(false, true)
        /// </summary>
        /// <returns>The routine enumerator.</returns>
        public static IEnumerator SaveSettings()
        {
            bool saving = true;

            RunThread.Start(() => {
                Invoke("SaveSettings");
                saving = false;
            }, "MOD_IO", false);

            SaveLoadIcon.Show(Engine.Scene);
            while (saving)
            {
                yield return(null);
            }
            yield return(UserIO.SaveHandler(false, true));

            SaveLoadIcon.Hide();
        }
Ejemplo n.º 7
0
        private static IEnumerator _SaveSettings()
        {
            bool saving = true;

            RunThread.Start(() => {
                foreach (EverestModule mod in _Modules)
                {
                    mod.SaveSettings();
                }
                saving = false;
            }, "MOD_IO", false);

            SaveLoadIcon.Show(Engine.Scene);
            while (saving)
            {
                yield return(null);
            }
            yield return(patch_UserIO.SaveHandlerLegacy(false, true));

            SaveLoadIcon.Hide();

            _SavingSettings = false;
        }
        public static bool Run()
        {
            if (Environment.OSVersion.Platform != PlatformID.Win32NT)
            {
                return(false);
            }
            instance = new StudioCommunicationClient();

#if DEBUG
            //SetupDebugVariables();
#endif

            RunThread.Start(Setup, "StudioCom Client");

            void Setup()
            {
                instance.thread = Thread.CurrentThread;
                Celeste.Celeste.Instance.Exiting += (o, e) => Destroy();
                instance.UpdateLoop();
            }

            return(true);
        }
Ejemplo n.º 9
0
 public void Start()
 {
     RunThread.Start();
 }