Esempio n. 1
0
        void NVAAnalyticsClick(NVALinkEventArgs evarg)
        {
            ReleaseViewModels(RegionNames.reg_property);

            ContentColumn column = new ContentColumn();

            ShowView(column, "AnalyticsClick", RegionNames.reg_property);
            column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.analytics);
            var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

            //TODO: Stub fix for #225 Remove this with plugin functionality
            ILastChangedModule lmodule = new LastChangedModule();

            ctx.RegisterInstance <ILastChangedModule>(lmodule);
            //
            StreamInfoHelper strinfo = new StreamInfoHelper();

            strinfo.streamInfo = () => {
                return(Apm.Iterate(LoadStreamInfoNVA(evarg, strinfo)));
            };
            ctx.RegisterInstance <IStreamInfoHelper>(strinfo);

            Ctxdisp = ctx;

            //ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);
            ctx.RegisterInstance <odm.ui.activities.AnalyticsView.AnalyticType>(odm.ui.activities.AnalyticsView.AnalyticType.ALL);

            //evarg.controlToken

            string token = null;

            if (evarg.control != null)
            {
                token = evarg.control.engineConfigToken;
            }

            UIdisp = AnalyticsActivity
                     .Run(ctx, token)           //evarg.profileToken)
                     .Subscribe(x => {
                //TODO: handle return from activity
            }, err => {
                dbg.Error(err);
            });
        }
		void RulesClick(ChannelLinkEventArgs evarg) {
			ReleaseViewModels(RegionNames.reg_property);

			ContentColumn column = new ContentColumn();
			ShowView(column, "RulesClick", RegionNames.reg_property);
			column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.ruleEngine);
			var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column);

			//TODO: Stub fix for #225 Remove this with plugin functionality
			ILastChangedModule lmodule = new LastChangedModule();
			ctx.RegisterInstance<ILastChangedModule>(lmodule);
			//

			StreamInfoHelper strinfo = new StreamInfoHelper();
			strinfo.streamInfo = () => {
				return Apm.Iterate(LoadStreamInfoNVT(evarg, strinfo));
			};
			ctx.RegisterInstance<IStreamInfoHelper>(strinfo);

			Ctxdisp = ctx;

			ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo);
			ctx.RegisterInstance<odm.ui.activities.AnalyticsView.AnalyticType>(odm.ui.activities.AnalyticsView.AnalyticType.RULE);

			string token = null;
			if (evarg.profile.videoAnalyticsConfiguration != null)
				token = evarg.profile.videoAnalyticsConfiguration.token;
			UIdisp = AnalyticsActivity
				.Run(ctx, token)
				.Subscribe(x => {
					//TODO: handle return from activity
				}, err => {
					dbg.Error(err);
				});
		}