Exemplo n.º 1
0
        void Initialize()
        {
            bool isFirstLoad = false;

            if (!_hasInitialized)
            {
                isFirstLoad = true;

                _model     = new PmModel();
                _viewModel = new PmView.Model();

                for (int i = 0; i < (int)DragListTypes.Count; i++)
                {
                    _viewModel.ListModels.Add(new DragList.Model());
                }
            }

            _root = new PmCompositionRoot(_model, _viewModel, isFirstLoad);
            _root.Initialize();

            // Put the _hasInitialized here so that if it fails to initialize it will try again next assembly reload
            // Otherwise it might serialize half-initialized data
            _hasInitialized = true;
        }
Exemplo n.º 2
0
        void OnEnable()
        {
            bool isFirstLoad = false;

            if (!_hasInitialized)
            {
                _hasInitialized = true;
                isFirstLoad = true;

                Assert.IsNull(_model);
                Assert.IsNull(_viewModel);

                _model = new PmModel();
                _viewModel = new PmView.Model();

                for (int i = 0; i < (int)DragListTypes.Count; i++)
                {
                    _viewModel.ListModels.Add(new DragList.Model());
                }
            }

            _root = new PmCompositionRoot(_model, _viewModel, isFirstLoad);
            _root.Initialize();
        }
Exemplo n.º 3
0
        void OnEnable()
        {
            bool isFirstLoad = false;

            if (!_hasInitialized)
            {
                _hasInitialized = true;
                isFirstLoad     = true;

                Assert.IsNull(_model);
                Assert.IsNull(_viewModel);

                _model     = new PmModel();
                _viewModel = new PmView.Model();

                for (int i = 0; i < (int)DragListTypes.Count; i++)
                {
                    _viewModel.ListModels.Add(new DragList.Model());
                }
            }

            _root = new PmCompositionRoot(_model, _viewModel, isFirstLoad);
            _root.Initialize();
        }
Exemplo n.º 4
0
 public PmCompositionRoot(PmModel model, PmView.Model viewModel, bool isFirstLoad)
 {
     _model = model;
     _viewModel = viewModel;
     _isFirstLoad = isFirstLoad;
 }
Exemplo n.º 5
0
        void Initialize()
        {
            bool isFirstLoad = false;

            if (!_hasInitialized)
            {
                isFirstLoad = true;

                _model = new PmModel();
                _viewModel = new PmView.Model();

                for (int i = 0; i < (int)DragListTypes.Count; i++)
                {
                    _viewModel.ListModels.Add(new DragList.Model());
                }
            }

            _root = new PmCompositionRoot(_model, _viewModel, isFirstLoad);
            _root.Initialize();

            // Put the _hasInitialized here so that if it fails to initialize it will try again next assembly reload
            // Otherwise it might serialize half-initialized data
            _hasInitialized = true;
        }
Exemplo n.º 6
0
 public PmCompositionRoot(PmModel model, PmView.Model viewModel, bool isFirstLoad)
 {
     _model       = model;
     _viewModel   = viewModel;
     _isFirstLoad = isFirstLoad;
 }