public MainPageView(MainPageViewModel viewModel, IEventInterface _iev)
        {
            InitializeComponent();
            BindingContext = viewModel;

            iev = _iev;

            using (var scope = App.container.BeginLifetimeScope())
            {
                this.Children.Add(App.container.Resolve <TrendingPageView>());
                this.Children.Add(App.container.Resolve <StatsPageView>());
            }

            this.CurrentPageChanged += (object sender, EventArgs e) =>
            {
                if (((MainPageView)sender).CurrentPage.Title == "Trends")
                {
                    iev.OnTrendsTabOpened();
                }
                if (((MainPageView)sender).CurrentPage.Title == "Your Vote")
                {
                    iev.OnYourVoteTapOpened();
                }
            };
        }
Exemple #2
0
	public void AddInvoker(IEventInterface<N> invoker)
	{
		Invokers.Add(invoker);
		foreach (UnityAction<N> listener in Listeners)
		{
			invoker.AddListener(listener);
		}
	}
Exemple #3
0
        public StatsPageViewModel(IEventInterface iev)
        {
            using (var scope = App.container.BeginLifetimeScope()) {
                dataService = App.container.Resolve <AzureDataService> ();
                cache       = App.container.Resolve <Cache>();
            }

            iev.TrendsTabOpened += TabOpenedMethod;
        }
 public TrendingViewModel(IEventInterface iev)
 {
     cacheObjectOld = new CacheObject();
     using (var scope = App.container.BeginLifetimeScope()) {
         cache       = App.container.Resolve <Cache> ();
         dataService = App.container.Resolve <AzureDataService> ();
     }
     //iev.YourVoteTabOpened += TabOpenedMethod;
     TabOpenedMethod();
 }
Exemple #5
0
        public APIHandler()
        {
            events = new EventClass();
            events.ValidTagEvent   += new ValidTagDetected(Events_ValidTagHandler);
            events.InvalidTagEvent += new InvalidTagDetected(Events_InvalidTagHandler);

            eventActions = new EventActionClass();
            eventActions.EnableOutputRelayEvent  += new EnableOutputRelay(eventActions_EnableOutputRelayEvent);
            eventActions.DisableOutputRelayEvent += new DisableOutputRelay(eventActions_DisableOutputRelayEvent);
        }
Exemple #6
0
 public static void Unhook(IEventInterface eventInterface) {
     eventInterface.MyEvent -= new SimpleDelegate(CallMe);
 }
Exemple #7
0
 public static void Unhook(IEventInterface eventInterface)
 {
     eventInterface.MyEvent -= new SimpleDelegate(CallMe);
 }