private void ShowView()
    {
        string state = Session["state"] as string;
        Simplex simplex;
        switch (state)
        {
            case "phase3nextstep":
                this.field = (SimplexField) Session["field"];

                simplex = new Simplex(this.field);
                simplex.NextStep();
                this.field = simplex.Field;

                this.DrawField();
                this.MultiView1.SetActiveView(this.View3);
                Session["field"] = this.field;
                if (simplex.isComplete())
                {
                    this.nextButton.Enabled = false;
                }

                break;
            case "phase3refresh":
                this.field = (SimplexField) Session["field"];
                this.DrawField();
                this.MultiView1.SetActiveView(this.View3);
                break;
            case "phase3":
                this.GenerateField();
                simplex = new Simplex(this.field);
                simplex.SetPivotElement();
                this.field = simplex.Field;
                this.DrawField();
                this.MultiView1.SetActiveView(this.View3);
                break;
            case "phase2":
                this.MultiView1.SetActiveView(this.View2);
                break;
            case "start":
            case null:
            default:
                Application["state"] = "start";
                this.MultiView1.SetActiveView(this.View1);
                break;
        }
    }