Example #1
0
            public void DoRefresh(int currentCategoryId)
            {
                if (this.threadExecute != null)
                {
                    this.threadExecute.Dispose();
                }

                this.currentCategoryId = currentCategoryId;

                //Package the class' method entry point up in a delegate
                ThreadExecuteTask.ExecuteMeOnAnotherThread delegateCallCode;
                delegateCallCode = new ThreadExecuteTask.ExecuteMeOnAnotherThread(this.Refresh);

                //Tell the thread to get going!
                this.threadExecute = new ThreadExecuteTask(delegateCallCode);
            }
Example #2
0
            private void prepareNextGx(int minutes)
            {
                this.nextMinute = minutes;

                if (this.threadExecute != null)
                {
                    this.threadExecute.Dispose();
                }

                //Package the class' method entry point up in a delegate
                ThreadExecuteTask.ExecuteMeOnAnotherThread delegateCallCode;
                delegateCallCode = new ThreadExecuteTask.ExecuteMeOnAnotherThread(this.prepareGxAsync);

                //Tell the thread to get going!
                this.threadExecute = new ThreadExecuteTask(delegateCallCode);
            }
Example #3
0
        public void Load(bool sync, int pageNumber)
        {
            if (this.lastLoadedPage != pageNumber)
            {
                firstRecordindex = pageNumber * this.countPerPage;

                if (sync)
                {
                    LoadData(null);
                }
                else
                {
                    //Package the class' method entry point up in a delegate
                    ThreadExecuteTask.ExecuteMeOnAnotherThread delegateCallCode;
                    delegateCallCode = new ThreadExecuteTask.ExecuteMeOnAnotherThread(this.LoadData);

                    //Tell the thread to get going!
                    threadExecute = new ThreadExecuteTask(delegateCallCode);
                }

                this.lastLoadedPage = pageNumber;
            }
        }