コード例 #1
0
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);

            if (this.state != ReloaderState.RecoverFromRestart)
            {
                this.OnBeforeBeginReload();
                this.state = ReloaderState.ReloadPlugins;
            }
            //this.owner.MainContextControl.Context.MakeCurrent(null);

            this.progressTimer.Start();
            this.owner.SetTaskbarOverlayIcon(GeneralResCache.IconCog, GeneralRes.TaskBarOverlay_ReloadCorePlugin_Desc);

            this.workerInterface            = new WorkerInterface();
            this.workerInterface.MainForm   = this.owner;
            this.workerInterface.ReloadDone = new List <string>();
            if (this.state != ReloaderState.RecoverFromRestart)
            {
                this.workerInterface.ReloadSched = new List <string>(this.reloadSchedule);
            }
            else
            {
                this.workerInterface.RecoverMode = true;
            }

            this.worker = new Thread(WorkerThreadProc);
            this.worker.Start(this.workerInterface);

            this.state = ReloaderState.ReloadPlugins;
        }
コード例 #2
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            if (this.workerInterface.Shutdown)
            {
                return;
            }

            this.owner.SetTaskbarProgress(0.0f);
            this.owner.SetTaskbarProgressState(Windows7Taskbar.ThumbnailProgressState.NoProgress);
            this.owner.SetTaskbarOverlayIcon(null, null);
            if (this.workerInterface.ReloadDone != null)
            {
                foreach (string done in this.workerInterface.ReloadDone)
                {
                    this.reloadSchedule.Remove(done);
                }
            }
            else
            {
                this.reloadSchedule.Clear();
            }

            //this.owner.MainContextControl.MakeCurrent();
            this.state = ReloaderState.Idle;
            this.OnAfterEndReload();

            // If some change messages were late, begin secondary reload.
            if (this.reloadSchedule.Count > 0)
            {
                this.State = ReloaderState.WaitForPlugins;
            }
        }
コード例 #3
0
		protected override void OnClosed(EventArgs e)
		{
			base.OnClosed(e);
			if (this.workerInterface.Shutdown) return;

			this.owner.SetTaskbarProgress(0.0f);
			this.owner.SetTaskbarProgressState(ThumbnailProgressState.NoProgress);
			this.owner.SetTaskbarOverlayIcon(null, null);
			if (this.workerInterface.ReloadDone != null)
			{
				foreach (string done in this.workerInterface.ReloadDone)
					this.reloadSchedule.Remove(done);
			}
			else
			{
				this.reloadSchedule.Clear();
			}

			//this.owner.MainContextControl.MakeCurrent();
			this.state = ReloaderState.Idle;
			this.OnAfterEndReload();

			// If some change messages were late, begin secondary reload.
			if (this.reloadSchedule.Count > 0)
				this.State = ReloaderState.WaitForPlugins;
		}
コード例 #4
0
		protected override void OnShown(EventArgs e)
		{
			base.OnShown(e);

			if (this.state != ReloaderState.RecoverFromRestart)
			{
				this.OnBeforeBeginReload();
				this.state = ReloaderState.ReloadPlugins;
			}
			//this.owner.MainContextControl.Context.MakeCurrent(null);

			this.progressTimer.Start();
			this.owner.SetTaskbarOverlayIcon(GeneralResCache.IconCog, GeneralRes.TaskBarOverlay_ReloadCorePlugin_Desc);

			this.workerInterface = new WorkerInterface();
			this.workerInterface.MainForm = this.owner;
			this.workerInterface.ReloadDone = new List<string>();
			if (this.state != ReloaderState.RecoverFromRestart)
				this.workerInterface.ReloadSchedule = new List<string>(this.reloadSchedule);
			else
				this.workerInterface.RecoverMode = true;

			this.worker = new Thread(WorkerThreadProc);
			this.worker.Start(this.workerInterface);

			this.state = ReloaderState.ReloadPlugins;
		}
コード例 #5
0
		protected override void OnClosed(EventArgs e)
		{
			base.OnClosed(e);
			if (this.workerInterface.Shutdown) return;

			this.owner.SetTaskbarProgress(0.0f);
			this.owner.SetTaskbarProgressState(Windows7Taskbar.ThumbnailProgressState.NoProgress);
			this.owner.SetTaskbarOverlayIcon(null, null);
			this.reloadSchedule.Clear();

			//this.owner.MainContextControl.MakeCurrent();
			this.state = ReloaderState.Idle;
			this.OnAfterEndReload();
		}