Ejemplo n.º 1
0
 public TetherPresenter(ITetherModel model, ITetherView view)
 {
     this.model = model;
     this.view = view;
     model.CurrentMessageChanged += new EventHandler(model_CurrentMessageChanged);
     model.ProgressChanged += new EventHandler(model_ProgressChanged);
     model.ProcessFinished += new EventHandler(model_ProcessFinished);
 }
Ejemplo n.º 2
0
        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;
        }