public IView CreateView(string type, string id)
        {
            IView       view       = null;
            IController controller = null;
            IModel      model      = null;

            switch (type)
            {
            case OPCSampleGrpConfigStart.OPCSAMPLEGRPCONFIGSTARTFRM:
                view          = new OPCSampleGrpConfigStart();
                view.ViewType = OPCSampleGrpConfigStart.OPCSAMPLEGRPCONFIGSTARTFRM;
                controller    = new OPCSampleGrpConfigStartController();
                model         = new OPCSampleGrpConfigStartModel();
                controller.Attach(model, view);
                break;

            case OPCDataSelector.OPCDATASELECTORFRM:
                view          = new OPCDataSelector();
                view.ViewType = OPCDataSelector.OPCDATASELECTORFRM;
                controller    = new OPCDataSelectorController();
                model         = new OPCDataSelectorModel();
                controller.Attach(model, view);
                view.PutObject(OPCDataSelector.OPCSAMPLEGRPDIC, ((OPCDataSelectorModel)model).GetSampleGrps());
                break;

            default:
                break;
            }
            return(view);
        }
Esempio n. 2
0
        public void FixtureSetUp()
        {
            oPCSampleGrpConfigStartController = new OPCSampleGrpConfigStartController();
            IModel model = new OPCSampleGrpConfig.Model.OPCSampleGrpConfigStartModel();

            OPCSampleGrpConfig.View.OPCSampleGrpConfigStart viewob = OPCSampleGrpConfigStartFactory.CreateOPCSampleGrpConfigStart01();
            oPCSampleGrpConfigStartController.Attach(model, viewob);
        }