Beispiel #1
0
        public override List <Object> solution()
        {
            m_returnObjects = new List <object>();;
            Progress progressForm = new Progress();

            progressForm.Cancel += new Progress.EventHandlerCancel(onFormCancel);
            Started             += new EventHandlerStart(progressForm.onStarted);
            Progress            += new EventHandlerProgress(progressForm.onProgress);
            Finished            += new EventHandlerFinish(progressForm.onFinished);

            m_worker = new Thread(new ThreadStart(solutionThread));

            progressForm.Shown += new EventHandler(onFormShow);
            progressForm.ShowDialog();

            m_worker.Join();

            return(m_returnObjects);
        }
Beispiel #2
0
        public override bool make(List <Object> objects)
        {
            m_objects = objects;
            Progress progressForm = new Progress();

            progressForm.Cancel += new Progress.EventHandlerCancel(onFormCancel);

            Started   += new EventHandlerStart(progressForm.onStarted);
            Progress  += new EventHandlerProgress(progressForm.onProgress);
            ProgressA += new EventHandlerProgressA(progressForm.onProgressA);
            ProgressB += new EventHandlerProgressB(progressForm.onProgressB);
            Finished  += new EventHandlerFinish(progressForm.onFinished);
            m_worker   = new System.Threading.Thread(new System.Threading.ThreadStart(worker));

            progressForm.Shown += new EventHandler(onDialogShown);
            progressForm.ShowDialog();

            m_worker.Join();
            progressForm.Close();
            return(true);
        }
Beispiel #3
0
        public override List <Object> opened(bool noSavedOnly)
        {
            m_returnObjects = new List <object>();;
            Progress progressForm = new Progress();

            progressForm.Cancel += new Progress.EventHandlerCancel(onFormCancel);
            Started             += new EventHandlerStart(progressForm.onStarted);
            Progress            += new EventHandlerProgress(progressForm.onProgress);
            ProgressA           += new EventHandlerProgressA(progressForm.onProgressA);
            Finished            += new EventHandlerFinish(progressForm.onFinished);

            m_worker = new Thread(new ParameterizedThreadStart(openedThread));

            progressForm.Tag    = noSavedOnly;
            progressForm.Shown += new EventHandler(onFormShow);
            progressForm.ShowDialog();

            m_worker.Join();

            return(m_returnObjects);
        }