Beispiel #1
0
        /// <summary>
        /// Locates the magnifying glass inside the templates, and binds an event to it.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UnlockedAchievementsList_LayoutUpdated(object sender, EventArgs e)
        {
            if (isEventsBound)
            {
                return;
            }

            isEventsBound = true;

            foreach (Achievement item in UnlockedAchievementsList.Items)
            {
                var dataItem       = item;
                var gotoCodebutton = FindItemControl(UnlockedAchievementsList, "PART_MagnifierGlassPath", item) as FrameworkElement;

                if (gotoCodebutton == null)
                {
                    continue;
                }

                if (dataItem.CodeLocation == null)
                {
                    gotoCodebutton.IsEnabled = false;
                }
                else
                {
                    gotoCodebutton.MouseDown += (se, args) =>
                    {
                        var achevementDescriptor = dataItem;

                        AchievementContext.OnAchievementClicked(gotoCodebutton, new AchievementClickedEventArgs
                        {
                            AchievementDescriptor = achevementDescriptor,
                            UIElement             = new AchievementViewportControl()
                            {
                                DataContext = achevementDescriptor
                            }
                        });
                    };
                }
            }
        }
 public SupervisorController(AchievementContext context)
 {
     _context = context;
 }
 public AccountSettingsController(AchievementContext context)
 {
     _context = context;
 }
 public AchievementService(AchievementContext context)
 {
     _context = context;
 }
Beispiel #5
0
        public HomeController(AchievementContext context)

        {
            _context = context;
        }
 public AccomplishmentsController(AchievementContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public AccountCreationController(AchievementContext context)
 {
     _context = context;
 }
Beispiel #8
0
 public LoginController(AchievementContext context)
 {
     _context = context;
 }