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);
        }
Esempio n. 3
0
        public void TestAddLoggerInterval_Paint_101()
        {
            System.Drawing.Rectangle clipRect = new System.Drawing.Rectangle();
            Accessor oPCSampleGrpConfigStartControllerAccessor = ReflectionAccessor.Wrap(oPCSampleGrpConfigStartController);

            OPCSampleGrpConfig.View.OPCSampleGrpConfigStart mmView = (OPCSampleGrpConfig.View.OPCSampleGrpConfigStart)oPCSampleGrpConfigStartControllerAccessor.GetField("m_view");

            System.Drawing.Graphics             graphics = mmView.CreateGraphics();
            System.Windows.Forms.PaintEventArgs e        = new System.Windows.Forms.PaintEventArgs(graphics, clipRect);
            //Test Procedure Call
            oPCSampleGrpConfigStartController.AddLoggerInterval_Paint_1(null, e);
        }