Ejemplo n.º 1
0
 public Model( ProgramInfoViewModel programInfoVM, 
               InstalledProgramViewModel installedProgramVM,
               IFactory<SemiautomaticSync.Model, SemiautomaticSync.IModelParameters> semiautoSyncModelFactory )
 {
     Initialize( programInfoVM, installedProgramVM, semiautoSyncModelFactory );
     RegisterPropertyChangedEvents();
 }
        private void LoadProgramInfos()
        {
            var currentExecutionPath = ".";
            var uri = Path.Combine( currentExecutionPath, "CloudSyncHelper.xml" );

            var serializationMgr = new SerializationManager( uri );
            var syncData = serializationMgr.Deserialize();
            var programInfoVMs = new List<ProgramInfoViewModel>();
            foreach ( var applicationInfo in syncData.ApplicationInfos )
            {
                var programInfoVM = new ProgramInfoViewModel( applicationInfo );
                programInfoVMs.Add( programInfoVM );
            }
            this.ProgramInfoVMs = programInfoVMs;
        }
Ejemplo n.º 3
0
 public Model( ProgramInfoViewModel programInfoVM,
               IFactory<SemiautomaticSync.Model, SemiautomaticSync.IModelParameters> semiautoSyncModelFactory )
     : this(programInfoVM, null, semiautoSyncModelFactory)
 {
 }
Ejemplo n.º 4
0
        private void Initialize( ProgramInfoViewModel programInfoVM, 
                                 InstalledProgramViewModel installedProgramVM, 
                                 IFactory<SemiautomaticSync.Model, SemiautomaticSync.IModelParameters> semiautoSyncModelFactory )
        {
            this._installedProgramVM = installedProgramVM;
            this._programInfoVM = programInfoVM;

            var fully = this.CreateFullyAutoSyncModelCtorParams();
            this.FullyAutoSyncModel = new FullyAutomaticSync.Model( fully );
            var semi = this.CreateSemiautoSyncModelParams();
            this.SemiautomaticSyncModel = semiautoSyncModelFactory.Get( semi );
        }
Ejemplo n.º 5
0
        private void InitializePrivateProperties( IModelParameters parameters, 
                                                  IModelDependencies dependencies )
        {
            this._isInstalled = parameters.IsInstalled;
            this._osConfigModelFactory = dependencies.OsConfigurationModelFactory;
            this._programInfoVM = parameters.ProgramInfoVM;

            var definitionParams = new Win32.Model.DefinitionParametersDTO
            {
                ApplicationInfo = this._programInfoVM.ApplicationInfo,
                OsConfigurationInfos = this._programInfoVM.OsConfigs
            };
            this._definition = dependencies.DefinitionFactory.Get( definitionParams );
        }