Example #1
0
        public bool Run()
        {
            if (!IsRunning)
            {
                IsRunning = true;
                cancel    = false;

                PatchUtils.CreateBackgroundThread(new ThreadStart(ThreadCreatePatchFunction)).Start();
                return(true);
            }

            return(false);
        }
        public bool Run(bool selfPatching)
        {
            if (!IsRunning)
            {
                IsRunning    = true;
                Operation    = selfPatching ? PatchOperation.SelfPatching : PatchOperation.Patching;
                PatchMethod  = PatchMethod.None;
                comms.Cancel = false;

                PatchUtils.CreateBackgroundThread(new ThreadStart(ThreadPatchFunction)).Start();
                return(true);
            }

            return(false);
        }
        public bool CheckForUpdates(bool checkVersionOnly = true)
        {
            if (!IsRunning)
            {
                IsRunning    = true;
                Operation    = PatchOperation.CheckingForUpdates;
                PatchMethod  = PatchMethod.None;
                comms.Cancel = false;

                PatchUtils.CreateBackgroundThread(new ParameterizedThreadStart(ThreadCheckForUpdatesFunction)).Start(checkVersionOnly);
                return(true);
            }

            return(false);
        }
Example #4
0
 protected virtual void Initialize()
 {
     PatchUtils.CreateBackgroundThread(new ThreadStart(ThreadRefresherFunction)).Start();
 }