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

            switch (type)
            {
            case TrainTimeTableConst.TrainTimeTableView:
                view          = new TrainTimeTableView();
                view.ViewType = TrainTimeTableConst.TrainTimeTableView;
                controller    = new TimeTableViewController();
                model         = new TimeTableViewModel();
                controller.Attach(model, view);
                break;

            case TrainTimeTableConst.TimeTableWindowView:
                view          = new TimeTableWindow();
                view.ViewType = TrainTimeTableConst.TimeTableWindowView;
                controller    = new TimeTableWindowController();
                model         = new TimeTableWindowModel();
                controller.Attach(model, view);
                break;

            default:
                break;
            }
            view.ViewID = id;
            return(view);
        }
Example #2
0
        public override void onInitGenericGUICompleted()
        {
            string FUNCTION_NAME     = "onInitGenericGUICompleted";
            string exclude_stationId = getGuiEntityParameterValue(EXCLUDE_STATION_ID);

            LogHelperCli.GetInstance().Log_Generic(CLASS_NAME + "." + FUNCTION_NAME, LogHelperCli.GetInstance().GetLineNumber(), EDebugLevelManaged.DebugInfo, "Exclude_stationId - " + exclude_stationId);
            TrainTimeTableViewer.View.TrainTimeTableView frm = (TrainTimeTableViewer.View.TrainTimeTableView)m_pMainFrm;
            frm.SetParameters(exclude_stationId);
        }
Example #3
0
 public override void AttachCallBack(IModel model, IView view)
 {
     m_Model = (TrainTimeTableViewer.Model.TimeTableViewModel)model;
     m_View  = (TrainTimeTableViewer.View.TrainTimeTableView)view;
 }
Example #4
0
 public override void PreApplicationClose()
 {
     TrainTimeTableViewer.View.TrainTimeTableView frm = (TrainTimeTableViewer.View.TrainTimeTableView)m_pMainFrm;
     frm.TrainTimeTableView_FormClosed();
 }