Exemplo n.º 1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            _engine = (DataSetStepEngine)Session["cengine"];
            if (_engine == null)
            {
                throw new ApplicationException("could not get engine");
            }
        }
Exemplo n.º 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");
        }
Exemplo n.º 3
0
        public StepPage()
        {
            InitializeComponent();

            //DbUtils.ActualConnectionString =
            //"data source=mlcsrv1;initial catalog=DeltaRGBsss;integrated security=SSPI;persist security info=False;packet size=4096";

            try
            {
                _engine = new DataSetStepEngine(1);
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.ToString());
                Application.Current.Shutdown();
            }

            SetColours();

            btnPrevColour.IsEnabled = false;
            btnMatch.IsEnabled      = false;
        }