Beispiel #1
0
        private void SetReusables(HttpContext context)
        {
            if (_cs != null)
            {
                return;
            }

            _cs = (ColourSquareGenerator)context.Cache["cs"];
            if (_cs == null)
            {
                _cs = new ColourSquareGenerator();
            }
        }
Beispiel #2
0
        protected void btnStart_Click(object sender, EventArgs e)
        {
            double startOffset = Convert.ToDouble(ConfigurationManager.AppSettings["StartOffset"]);
            double adjustSize  = Convert.ToDouble(ConfigurationManager.AppSettings["AdjustmentSize"]);

            _engine            = new DataSetStepEngine(1, startOffset, adjustSize);
            Session["cengine"] = _engine;

            if (Cache.Get("cs") == null)
            {
                Cache["cs"] = new ColourSquareGenerator();
            }

            Response.Redirect("~/StepPage.aspx?new=1");
        }