Exemplo n.º 1
0
        private void RefreshHelper()
        {
            if (!memory.HookProcess())
            {
                refreshTimer.Stop();
                processControl.OnUnhook();
                dataControl.Enabled   = false;
                hotkeyControl.Enabled = false;

                return;
            }

            memory.Refresh();
        }
        public void UpdateMemoryRead()
        {
            bool processHooked = memory.HookProcess();

            if (!processHooked)
            {
                if (timerStarted)
                {
                    var currentGameTime = timer.CurrentState.CurrentTime.GameTime;
                    currentGameTime       += timer.CurrentState.CurrentTime.RealTime - loadStartTime;
                    framesSinceStartOfLoad = 0;
                    UpdateLoadingState(1, 0, true);
                    timer.CurrentState.SetGameTime(currentGameTime);
                    UpdateGameTimerState();
                    loadStartTime = null;
                }
                return;
            }

            memory.Refresh();
        }
Exemplo n.º 3
0
        // This function is public for use in the tester class.
        public void Autosplit()
        {
            bool processPreviouslyHooked = memory.ProcessHooked;
            bool processHooked           = memory.HookProcess();

            if (!processHooked)
            {
                if (processPreviouslyHooked)
                {
                    if (settings.DisplayBoxes)
                    {
                        boxDisplay.Active = false;
                    }

                    relicDisplay?.Clear();
                }

                return;
            }

            memory.Refresh();
        }