Exemplo n.º 1
0
        public override void Execute( Dictionary<String, Object> executionData )
        {
            if( this.Executing ) return;
            this.Executing = true;

            AbstractModel Model = new AbstractModel();
            Model.PropertyChanged += new PropertyChangedEventHandler( this.OnPropertyChanged );

            Model.Update( new Dictionary<String, Object>(){
                { "Id", 123 },
                { "Name", "Alex" }
            } );

            MediatorFactory.GetInstance( this.Context )
                .Create(
                        StartupIdentifier.MediatorIdentifier.STARTUP_SCREEN_MEDIATOR,
                        new Object[]{ this.Context, OaseSkeletonFacade.GetInstance( this.Context ).Component } )
                .Initialize(  new Dictionary<String, Object>(){
                    { "Model", Model }
                 } );

            this.Notify( this, new BaseProjectNotification( StartupIdentifier.NoteTypesIn.SHOW_STARTUP_SCREEN, this.Context, null ) );

            this.TriggerExecuted( new EventArgs() );
        }
Exemplo n.º 2
0
        public override IMediator Initialize( Dictionary<String, Object> InitProperties)
        {
            if( this.Initialized ) return this;
            base.Initialize( InitProperties );

            if( this.initProperties.ContainsKey( "Model" ) )this.Model = this.initProperties[ "Model" ] as AbstractModel;

            Debug.WriteLine( "Model Id: " + this.Model.Id + "; Name: " + this.Model.Name );

            return this;
        }