Example #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            IDictionary<string, string> parameters = e.InitParams;

            if (parameters.Count > 0)
            {
                ActionType = parameters["Action"];
                PersonId = parameters["Person"];
                EventId = parameters["Event"];
            }
            if (!string.IsNullOrEmpty(EventId))
            {
                var context = new CodeCampDomainContext();

                var lo = context.Load(context.GetEventQuery(Int32.Parse(EventId)));
                lo.Completed += delegate
                {
                    Event = lo.Entities.SingleOrDefault();

                    if (lo.HasError)
                    {
                        this.LoggingService.LogException(lo.Error.GetBaseException());
                        ErrorWindow.CreateNew(lo.Error.Message,StackTracePolicy.OnlyWhenDebuggingOrRunningLocally);                        
                    }
                    // TODO: Do we still need this?
                    this.LoggingService.LogMessage(string.Format("Action:{0} | Person:{1} | EventId:{2}", ActionType, PersonId, EventId));
                };
            }
        }
Example #2
0
        private void ShellLoaded(object sender, RoutedEventArgs e)
        {

            context = new CodeCampDomainContext();
            GetPreferenceCount(Int32.Parse(App.EventId));

 
            switch (App.ActionType)
            {
                case "agenda":
                    ContentFrame.Navigate(new System.Uri("/AgendaView", System.UriKind.Relative));
                    break;
                case "sponsor":
                    ContentFrame.Navigate(new System.Uri("/SponsorView", System.UriKind.Relative));
                    break;
                case "profile":
                    ContentFrame.Navigate(new System.Uri("/ProfileView", System.UriKind.Relative));
                    break;
                case "present":
                    ContentFrame.Navigate(new System.Uri("/SpeakerView", System.UriKind.Relative));
                    break;
                case "volunteer":
                    ContentFrame.Navigate(new System.Uri("/VolunteerView", System.UriKind.Relative));
                    break;
                case "about":
                    ContentFrame.Navigate(new System.Uri("/AboutView", System.UriKind.Relative));
                    break;
            }
        }