コード例 #1
0
ファイル: SettingsPage.xaml.cs プロジェクト: jacalata/pax
        /// <summary>
        /// set the data context of the page 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void PageLoaded(object sender, RoutedEventArgs e)
        {
            _allowUpdate = IsoStoreSettings.IsAllowedAutoCheckForUpdates();
            _setReminders =  IsoStoreSettings.IsAllowedSetReminders();
            string lastScheduleUpdate = IsoStoreSettings.GetLastUpdatedTime();
            TextBlock_scheduleUpdateTime.Text = lastScheduleUpdate;
            int scheduleVersion = IsoStoreSettings.GetScheduleVersion();
            TextBlock_scheduleVersion.Text = scheduleVersion.ToString();
            schedule = new Schedule();
            schedule.evt_updateCheckComplete += askUserToUpdate;
            schedule.evt_downloadScheduleComplete +=  notifyUserScheduleUpdated;

            AnalyticsTracker tracker = new AnalyticsTracker();
            tracker.Track("Settings", "Loaded");
        }
コード例 #2
0
ファイル: ScheduleViewModel.cs プロジェクト: jacalata/pax
        /// <summary>
        /// This method is set in the constructor to be triggered by the ScheduleLoadingComplete event 
        /// which is thrown when the Schedule member finishes loading. 
        /// It calls the relevant 'filter' method to create the event slices for viewing
        /// It will then call the UI dispatcher to display the events. s
        /// It will also throw its own event for non-UI tests to react to. 
        /// </summary>
        internal void Schedule_ScheduleLoadingComplete(object sender, ScheduleLoadingEventArgs e)
        {
            AnalyticsTracker tracker = new AnalyticsTracker();
            tracker.Track("ScheduleViewModel", "Loaded", pivot);

            // Add the new Events
            foreach (Event evt in e.Results)
                events.Add(evt);
            //filter according to current pivot
            if (pivot.Equals((PivotView.EventType).ToString()))
                filterEventsByEventType();
            else if (pivot.Equals((PivotView.Location).ToString()))
                filterEventsByLocation();
            else if (pivot.Equals((PivotView.Stars).ToString()))
                filterEventsByStars();
            else if (pivot.Equals((PivotView.Search).ToString()))
                filterEventsBySearch();
            else if (pivot.Equals((PivotView.Expo).ToString()))
                filterEventsToExpo();
            else // default is by day (pivot.Equals(PivotView.Day.ToString())  )
                filterEventsByDay();

            if (mocking)
            {
                // Fire event for test code to know we're all done
                if (VM_ScheduleLoadingComplete != null)
                {
                    VM_ScheduleLoadingComplete(this, e);
                }
            }
            else
            {
                // Fire Event on UI Thread
                view.Dispatcher.BeginInvoke(() =>
                {
                    view.OnLoadComplete();
                });
            }
        }
コード例 #3
0
ファイル: AboutPage.xaml.cs プロジェクト: jacalata/pax
 public AboutPage()
 {
     InitializeComponent();
     AnalyticsTracker tracker = new AnalyticsTracker();
     tracker.Track("AboutPage", "Loaded");
 }