Esempio n. 1
0
        private void InstantiateModelsAndViews()
        {
            _startControl            = IoC.Resolve <IStartView>();
            _downloadModel           = IoC.Resolve <IDownloadModel>();
            _downloadView            = IoC.Resolve <IDownloadView>();
            _patchControl            = IoC.Resolve <IPatchView>();
            _patchModel              = IoC.Resolve <IPatchModel>();
            _dfuControl              = IoC.Resolve <IDfuView>();
            _dfuModel                = IoC.Resolve <IDfuModel>();
            _dfuSuccessControl       = IoC.Resolve <IDfuSuccessControl>();
            _tetherSuccessControl    = IoC.Resolve <ITetherSuccessControl>();
            _mainModel               = IoC.Resolve <IMainModel>();
            _firmwareVersionModel    = IoC.Resolve <IFirmwareVersionModel>();
            _tetherView              = IoC.Resolve <ITetherView>();
            _tetherModel             = IoC.Resolve <ITetherModel>();
            _firmwareVersionDetector = IoC.Resolve <IFirmwareVersionDetector>();
            _freeSpaceModel          = IoC.Resolve <IFreeSpaceModel>();

            _mainModel.SetFirmwareVersionModel(_firmwareVersionModel);
            _downloadModel.SetFirmwareVersionModel(_firmwareVersionModel);
            _patchModel.SetFirmwareVersionModel(_firmwareVersionModel);
            _dfuModel.SetFirmwareVersionModel(_firmwareVersionModel);
            _tetherModel.SetFirmwareVersionModel(_firmwareVersionModel);

            _tetherPresenter = new TetherPresenter(_tetherModel, _tetherView);
            _tetherPresenter.ProcessFinished += tetherPresenter_ProcessFinished;
            _patchPresetner                     = new PatchPresenter(_patchControl, _patchModel);
            _patchPresetner.Finished           += patchPresetner_Finished;
            _dfuPresenter                       = new DfuPresenter(_dfuModel, _dfuControl);
            _dfuPresenter.ProcessFinished      += dfuPresenter_ProcessFinished;
            _downloadPresenter                  = new DownloadPresenter(_downloadModel, _downloadView);
            _downloadPresenter.ProcessFinished += downloadPresenter_ProcessFinished;
        }
Esempio n. 2
0
 public PatchPresenter(IPatchView view, IPatchModel model)
 {
     this._view                   = view;
     this._model                  = model;
     model.ProgressUpdated       += model_ProgressUpdated;
     model.CurrentMessageChanged += model_CurrentMessageChanged;
     model.Finished              += model_Finished;
 }
Esempio n. 3
0
 public PatchPresenter(IPatchView view, IPatchModel model)
 {
     this.view                    = view;
     this.model                   = model;
     model.ProgressUpdated       += new EventHandler(model_ProgressUpdated);
     model.CurrentMessageChanged += new EventHandler(model_CurrentMessageChanged);
     model.Finished              += new EventHandler(model_Finished);
 }
        public PatchPresenter(IPatchView view, IPatchModel model)
        {
            this.view = view;
            this.model = model;            
            model.ProgressUpdated += new EventHandler(model_ProgressUpdated);
            model.CurrentMessageChanged += new EventHandler(model_CurrentMessageChanged);
            model.Finished += new EventHandler(model_Finished);

        }
        private void InstantiateModelsAndViews()
        {
            startControl            = IoC.Resolve <IStartView>();
            syncContext             = startControl.SyncContext;
            downloadModel           = IoC.Resolve <IDownloadModel>();
            downloadView            = IoC.Resolve <IDownloadView>();
            patchControl            = IoC.Resolve <IPatchView>();
            patchModel              = IoC.Resolve <IPatchModel>();
            dfuControl              = IoC.Resolve <IDFUView>();
            dfuModel                = IoC.Resolve <IDFUModel>();
            dfuSuccessControl       = IoC.Resolve <IDFUSuccessControl>();
            tetherSuccessControl    = IoC.Resolve <ITetherSuccessControl>();
            mainModel               = IoC.Resolve <IMainModel>();
            firmwareVersionModel    = IoC.Resolve <IFirmwareVersionModel>();
            tetherView              = IoC.Resolve <ITetherView>();
            tetherModel             = IoC.Resolve <ITetherModel>();
            firmwareVersionDetector = IoC.Resolve <IFirmwareVersionDetector>();
            freeSpaceModel          = IoC.Resolve <IFreeSpaceModel>();
            iTunesInfoProvider      = IoC.Resolve <IITunesInfoProvider>();

            iTunesAutomationModel = IoC.Resolve <IITunesAutomationModel>();
            iTunesAutomationModel.FirmwareVersionModel = firmwareVersionModel;
            iTunesAutomationModel.SyncContext          = syncContext;
            iTunesAutomationModel.ITunesInfoProvider   = iTunesInfoProvider;

            mainModel.SetFirmwareVersionModel(firmwareVersionModel);
            downloadModel.SetFirmwareVersionModel(firmwareVersionModel);
            patchModel.SetFirmwareVersionModel(firmwareVersionModel);
            dfuModel.SetFirmwareVersionModel(firmwareVersionModel);
            tetherModel.SetFirmwareVersionModel(firmwareVersionModel);

            tetherPresenter = new TetherPresenter(tetherModel, tetherView);
            tetherPresenter.ProcessFinished += tetherPresenter_ProcessFinished;
            patchPresetner                     = new PatchPresenter(patchControl, patchModel);
            patchPresetner.Finished           += patchPresetner_Finished;
            dfuPresenter                       = new DFUPresenter(dfuModel, dfuControl);
            dfuPresenter.ProcessFinished      += dfuPresenter_ProcessFinished;
            downloadPresenter                  = new DownloadPresenter(downloadModel, downloadView);
            downloadPresenter.ProcessFinished += downloadPresenter_ProcessFinished;
        }
        private void InstantiateModelsAndViews()
        {
            startControl = IoC.Resolve<IStartView>();
            syncContext = startControl.SyncContext;
            downloadModel = IoC.Resolve<IDownloadModel>();
            downloadView = IoC.Resolve<IDownloadView>();
            patchControl = IoC.Resolve<IPatchView>();
            patchModel = IoC.Resolve<IPatchModel>();
            dfuControl = IoC.Resolve<IDFUView>();
            dfuModel = IoC.Resolve<IDFUModel>();
            dfuSuccessControl = IoC.Resolve<IDFUSuccessControl>();
            tetherSuccessControl = IoC.Resolve<ITetherSuccessControl>();
            mainModel = IoC.Resolve<IMainModel>();
            firmwareVersionModel = IoC.Resolve<IFirmwareVersionModel>();
            tetherView = IoC.Resolve<ITetherView>();
            tetherModel = IoC.Resolve<ITetherModel>();
            firmwareVersionDetector = IoC.Resolve<IFirmwareVersionDetector>();
            freeSpaceModel = IoC.Resolve<IFreeSpaceModel>();
            iTunesInfoProvider = IoC.Resolve<IITunesInfoProvider>();

            iTunesAutomationModel = IoC.Resolve<IITunesAutomationModel>();
            iTunesAutomationModel.FirmwareVersionModel = firmwareVersionModel;
            iTunesAutomationModel.SyncContext = syncContext;
            iTunesAutomationModel.ITunesInfoProvider = iTunesInfoProvider;

            mainModel.SetFirmwareVersionModel(firmwareVersionModel);
            downloadModel.SetFirmwareVersionModel(firmwareVersionModel);
            patchModel.SetFirmwareVersionModel(firmwareVersionModel);
            dfuModel.SetFirmwareVersionModel(firmwareVersionModel);
            tetherModel.SetFirmwareVersionModel(firmwareVersionModel);

            tetherPresenter = new TetherPresenter(tetherModel, tetherView);
            tetherPresenter.ProcessFinished += tetherPresenter_ProcessFinished;
            patchPresetner = new PatchPresenter(patchControl, patchModel);
            patchPresetner.Finished += patchPresetner_Finished;
            dfuPresenter = new DFUPresenter(dfuModel, dfuControl);
            dfuPresenter.ProcessFinished += dfuPresenter_ProcessFinished;
            downloadPresenter = new DownloadPresenter(downloadModel, downloadView);
            downloadPresenter.ProcessFinished += downloadPresenter_ProcessFinished;
        }