Example #1
0
        /// <summary>
        /// Continuously calls the ComputeReaction method, until interrupted
        /// by a call to the Stop method.
        /// </summary>
        void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker bw = sender as BackgroundWorker;
            ReactionVessel   rv = e.Argument as ReactionVessel;

            double[, ,] reaction = null;

            while (!bw.CancellationPending)
            {
                reaction = rv.ComputeReaction();

                bw.ReportProgress(0, reaction);
            }
        }
Example #2
0
        public ReactionDiffusionControl()
        {
            InitializeComponent();

            this._reactionVessel = new ReactionVessel();
        }