Пример #1
0
        protected override IEnumerator EventRoutine()
        {
            /// 플레이어에게 이동
            yield return(StartCoroutine(MoveToPlayerRoutine()));

            Talk(false);
            yield return(WaitUntillTalkEnd());

            string pokemon = "C++";

            _pokemonSelector._pokemonRegisterAction.AddListener((data) => { pokemon = data; });
            _pokemonSelector.StartSelecting();
            yield return(WaitUntilSelectEnd());

            PokemonBattleManager.Instance.StartBattle(pokemon, "동방컴");
            yield return(WaitUntilBattleEnd());

            List <DialoguePage> textPages = new List <DialoguePage>();

            textPages.Add(DialoguePage.CreatePage("코딩하느라 고생했어. 와! 정말 잘 만들었는걸"));
            textPages.Add(DialoguePage.CreatePage("잠시 의자에 앉아서 기다려줄래? 지원서를 찾아야해서"));
            textPages.Add(DialoguePage.CreatePage("뭐? 관심없다고? 에이 팅기지말고 기다려봐"));
            _textPages = textPages;
            Talk(false);
            yield return(WaitUntillTalkEnd());

            yield return(new WaitForSeconds(1f));

            LoadingSceneManager.LoadScene("동방");
            yield break;
        }
        public ActionResult Create(DialoguePage page)
        {
            if (UserIsAuthenticated)
            {
                using (UnitOfWorkManager.NewUnitOfWork())
                {
                    var allowedCategories = ServiceFactory.CategoryService.GetAllowedCategories(_membersGroup).ToList();
                    if (allowedCategories.Any() && CurrentMember.DisablePosting != true)
                    {
                        var viewModel = new CreateTopic(page)
                        {
                            Categories       = allowedCategories,
                            LoggedOnUser     = CurrentMember,
                            SubscribeToTopic = true,
                            PageTitle        = Lang("Topic.CreateTopic")
                        };

                        // Pre-Select category user is in
                        var cat = Request["cat"];
                        if (!string.IsNullOrEmpty(cat))
                        {
                            var catId = Convert.ToInt32(cat);
                            if (catId > 0)
                            {
                                viewModel.Category = catId;
                            }
                        }

                        return(View(PathHelper.GetThemeViewPath("Create"), viewModel));
                    }
                }
            }
            return(ErrorToHomePage(Lang("Errors.NoPermission")));
        }
 public ActionResult PrivateMessages(DialoguePage page)
 {
     if (CurrentMember.DisablePrivateMessages)
     {
         var message = new GenericMessageViewModel
         {
             Message     = Lang("Errors.NoPermission"),
             MessageType = GenericMessages.Danger
         };
         ShowMessage(message);
         return(Redirect(Settings.ForumRootUrl));
     }
     using (UnitOfWorkManager.NewUnitOfWork())
     {
         var pageIndex     = AppHelpers.ReturnCurrentPagingNo();
         var pagedMessages = ServiceFactory.PrivateMessageService.GetPagedReceivedMessagesByUser(pageIndex, AppConstants.PrivateMessageListSize, CurrentMember);
         var viewModel     = new PageListPrivateMessageViewModel(page)
         {
             ListPrivateMessageViewModel = new ListPrivateMessageViewModel
             {
                 Messages   = pagedMessages,
                 PageIndex  = pageIndex,
                 TotalCount = pagedMessages.TotalCount
             },
             PageTitle = Lang("PM.ReceivedPrivateMessages")
         };
         return(View(PathHelper.GetThemeViewPath("PrivateMessages"), viewModel));
     }
 }
Пример #4
0
    private void SetActiveByDialogue()
    {
        DialoguePage page = _pages.Dequeue();

        SetTitle(page.Title);
        SetContent(page.Content);
        gameObject.SetActive(true);
    }
        public ActionResult ChangePassword(DialoguePage page)
        {
            var viewModel = new PageChangePasswordViewModel(page)
            {
                PageTitle = Lang("Members.ChangePassword.Title")
            };

            return(View(PathHelper.GetThemeViewPath("ChangePassword"), viewModel));
        }
Пример #6
0
        public void AddNextPage(string newText, bool isStopping = false)
        {
            DialoguePage newPage = new DialoguePage();

            newPage._text = newText;

            _textPages.Add(newPage);
            _stopPoints.Add(isStopping);
        }
Пример #7
0
    public void AppendDialogue(string title, string content)
    {
        DialoguePage page = new DialoguePage
        {
            Title   = title,
            Content = content
        };

        _pages.Enqueue(page);
    }
Пример #8
0
    public float  _duration; // 실행후 지속시간

    public static DialoguePage CreatePage(string text, float delay = 0.1f, float duration = 0.1f)
    {
        DialoguePage page = new DialoguePage();

        page._text     = text;
        page._delay    = delay;
        page._duration = duration;

        return(page);
    }
        public ActionResult EditPost(DialoguePage page)
        {
            using (UnitOfWorkManager.NewUnitOfWork())
            {
                // Got to get a lot of things here as we have to check permissions
                // Get the post
                var id = Request["id"];
                if (string.IsNullOrEmpty(id))
                {
                    return(ErrorToHomePage(Lang("Errors.GenericMessage")));
                }
                var post = ServiceFactory.PostService.Get(new Guid(id));

                // Get the topic
                var topic    = post.Topic;
                var category = ServiceFactory.CategoryService.Get(topic.CategoryId);

                // get the users permissions
                var permissions = ServiceFactory.PermissionService.GetPermissions(category, _membersGroup);

                if (post.MemberId == CurrentMember.Id || permissions[AppConstants.PermissionModerate].IsTicked)
                {
                    var viewModel = new EditPostViewModel {
                        Content = Server.HtmlDecode(post.PostContent), Id = post.Id, Permissions = permissions
                    };

                    // Now check if this is a topic starter, if so add the rest of the field
                    if (post.IsTopicStarter)
                    {
                        viewModel.Category       = topic.CategoryId;
                        viewModel.IsLocked       = topic.IsLocked;
                        viewModel.IsSticky       = topic.IsSticky;
                        viewModel.IsTopicStarter = post.IsTopicStarter;


                        viewModel.Name       = topic.Name;
                        viewModel.Categories = ServiceFactory.CategoryService.GetAllowedCategories(_membersGroup).ToList();
                        if (topic.Poll != null && topic.Poll.PollAnswers.Any())
                        {
                            // Has a poll so add it to the view model
                            viewModel.PollAnswers = topic.Poll.PollAnswers;
                        }
                    }

                    var pageViewModel = new EditPostPageViewModel(page)
                    {
                        EditPostViewModel = viewModel,
                        PageTitle         = Lang("Post.EditPostPageTitle")
                    };

                    return(View(PathHelper.GetThemeViewPath("EditPost"), pageViewModel));
                }
                return(NoPermission(topic));
            }
        }
        public ActionResult ActivityRss(DialoguePage page)
        {
            using (UnitOfWorkManager.NewUnitOfWork())
            {
                // get an rss lit ready
                var rssActivities = new List <RssItem>();

                var activities = ServiceFactory.ActivityService.GetAll(20).OrderByDescending(x => x.ActivityMapped.Timestamp);

                var activityLink = Urls.GenerateUrl(Urls.UrlType.Activity);

                // Now loop through the topics and remove any that user does not have permission for
                foreach (var activity in activities)
                {
                    if (activity is BadgeActivity)
                    {
                        var badgeActivity = activity as BadgeActivity;
                        rssActivities.Add(new RssItem
                        {
                            Description   = badgeActivity.Badge.Description,
                            Title         = string.Concat(badgeActivity.User.UserName, " ", Lang("Activity.UserAwardedBadge"), " ", badgeActivity.Badge.DisplayName, " ", Lang("Activity.Badge")),
                            PublishedDate = badgeActivity.ActivityMapped.Timestamp,
                            RssImage      = AppHelpers.ReturnBadgeUrl(badgeActivity.Badge.Image).Replace("~", ""),
                            Link          = activityLink
                        });
                    }
                    else if (activity is MemberJoinedActivity)
                    {
                        var memberJoinedActivity = activity as MemberJoinedActivity;
                        rssActivities.Add(new RssItem
                        {
                            Description   = string.Empty,
                            Title         = Lang("Activity.UserJoined"),
                            PublishedDate = memberJoinedActivity.ActivityMapped.Timestamp,
                            RssImage      = memberJoinedActivity.User.MemberImage(AppConstants.GravatarPostSize),
                            Link          = activityLink
                        });
                    }
                    else if (activity is ProfileUpdatedActivity)
                    {
                        var profileUpdatedActivity = activity as ProfileUpdatedActivity;
                        rssActivities.Add(new RssItem
                        {
                            Description   = string.Empty,
                            Title         = Lang("Activity.ProfileUpdated"),
                            PublishedDate = profileUpdatedActivity.ActivityMapped.Timestamp,
                            RssImage      = profileUpdatedActivity.User.MemberImage(AppConstants.GravatarPostSize),
                            Link          = activityLink
                        });
                    }
                }

                return(new RssResult(rssActivities, Lang("Rss.LatestActivity.Title"), Lang("Rss.LatestActivity.Description")));
            }
        }
        public ActionResult TopicsRss(DialoguePage page)
        {
            //page.PageTitle = Lang("Page.TopicsRss.PageTitle");

            using (UnitOfWorkManager.NewUnitOfWork())
            {
                // get an rss lit ready
                var rssTopics = new List <RssItem>();

                // Get only the cats from this forum
                var cats = ServiceFactory.CategoryService.GetAll();

                // Get the latest topics
                var topics = ServiceFactory.TopicService.GetRecentRssTopics(AppConstants.ActiveTopicsListSize, cats.Select(x => x.Id).ToList());

                // Get all the categories for this topic collection
                var categories = topics.Select(x => x.Category).Distinct();

                // create permissions
                var permissions = new Dictionary <Category, PermissionSet>();

                // loop through the categories and get the permissions
                foreach (var category in categories)
                {
                    var permissionSet = ServiceFactory.PermissionService.GetPermissions(category, _membersGroup);
                    permissions.Add(category, permissionSet);
                }

                // Now loop through the topics and remove any that user does not have permission for
                foreach (var topic in topics)
                {
                    // Get the permissions for this topic via its parent category
                    var permission = permissions[topic.Category];

                    // Add only topics user has permission to
                    if (!permission[AppConstants.PermissionDenyAccess].IsTicked)
                    {
                        if (topic.Posts.Any())
                        {
                            var firstOrDefault = topic.Posts.FirstOrDefault(x => x.IsTopicStarter);
                            if (firstOrDefault != null)
                            {
                                rssTopics.Add(new RssItem {
                                    Description = firstOrDefault.PostContent, Link = topic.Url, Title = topic.Name, PublishedDate = topic.CreateDate
                                });
                            }
                        }
                    }
                }

                return(new RssResult(rssTopics, Lang("Rss.LatestTopics.Title"), Lang("Rss.LatestTopics.Description")));
            }
        }
Пример #12
0
        public ActionResult EmailConfirmation(DialoguePage page)
        {
            var id = Request["id"];

            if (id != null)
            {
                try
                {
                    var user = MemberService.Get(Convert.ToInt32(id));

                    // Checkconfirmation
                    if (user != null)
                    {
                        // Set the user to active
                        user.IsApproved = true;

                        // Delete Cookie and log them in if this cookie is present
                        if (Request.Cookies[AppConstants.MemberEmailConfirmationCookieName] != null)
                        {
                            var myCookie = new HttpCookie(AppConstants.MemberEmailConfirmationCookieName)
                            {
                                Expires = DateTime.Now.AddDays(-1)
                            };
                            Response.Cookies.Add(myCookie);

                            // Login code
                            FormsAuthentication.SetAuthCookie(user.UserName, false);
                        }

                        // Show a new message
                        // We use temp data because we are doing a redirect
                        ShowMessage(new GenericMessageViewModel
                        {
                            Message     = Lang("Members.NowApproved"),
                            MessageType = GenericMessages.Success
                        });

                        // Redirects to the forum home page
                        return(RedirectToUmbracoPage(Settings.ForumId));
                    }
                }
                catch (Exception ex)
                {
                    LogError(ex);
                }
            }

            return(ErrorToHomePage(Lang("Errors.GenericMessage")));
        }
        public ActionResult Favourites(DialoguePage page)
        {
            using (UnitOfWorkManager.NewUnitOfWork())
            {
                var viewModel = new ViewFavouritesViewModel(page)
                {
                    PageTitle = Lang("Favourites.PageTitle")
                };

                var postIds  = ServiceFactory.FavouriteService.GetAllByMember(CurrentMember.Id).Select(x => x.PostId);
                var allPosts = ServiceFactory.PostService.Get(postIds.ToList());
                viewModel.Posts = allPosts;
                return(View(PathHelper.GetThemeViewPath("Favourites"), viewModel));
            }
        }
        public ActionResult Badges(DialoguePage page)
        {
            using (UnitOfWorkManager.NewUnitOfWork())
            {
                var allBadges = ServiceFactory.BadgeService.GetallBadges();

                var badgesListModel = new AllBadgesViewModel(page)
                {
                    AllBadges = allBadges,
                    PageTitle = Lang("Badge.AllBadges.PageTitle")
                };

                return(View(PathHelper.GetThemeViewPath("Badges"), badgesListModel));
            }
        }
        public ActionResult SpamOverview(DialoguePage page)
        {
            if (User.IsInRole(AppConstants.AdminRoleName))
            {
                var viewModel = new SpamOverviewModel
                {
                    DodgyMembers = ServiceFactory.MemberPointsService.GetLatestNegativeUsers(Settings.PostsPerPage),
                    DodgyPosts   = ServiceFactory.PostService.GetLowestVotedPost(Settings.PostsPerPage),
                    PageTitle    = Lang("Spam.OverViewPageTitle")
                };

                return(View(PathHelper.GetThemeViewPath("SpamOverview"), viewModel));
            }
            return(ErrorToHomePage(Lang("Errors.GenericMessage")));
        }
        public ActionResult ViewPrivateMessage(DialoguePage page)
        {
            using (var unitOfWork = UnitOfWorkManager.NewUnitOfWork())
            {
                var id = Request["id"];
                if (string.IsNullOrEmpty(id))
                {
                    return(ErrorToHomePage(Lang("Errors.GenericMessage")));
                }

                var message = ServiceFactory.PrivateMessageService.Get(new Guid(id));

                if (message.MemberToId == CurrentMember.Id | message.MemberFromId == CurrentMember.Id)
                {
                    //Mark as read if this is the receiver of the message
                    if (message.MemberToId == CurrentMember.Id)
                    {
                        // Update message as read
                        message.IsRead = true;

                        // Get the sent version and update that too
                        var sentMessage = ServiceFactory.PrivateMessageService.GetMatchingSentPrivateMessage(message.Subject, message.DateSent, message.MemberFromId, message.MemberToId);
                        if (sentMessage != null)
                        {
                            sentMessage.IsRead = true;
                        }

                        try
                        {
                            unitOfWork.Commit();
                        }
                        catch (Exception ex)
                        {
                            unitOfWork.Rollback();
                            LogError(ex);
                        }
                    }
                    var viewModel = new ViewPrivateMessageViewModel(page)
                    {
                        Message   = message,
                        PageTitle = message.Subject
                    };
                    return(View(PathHelper.GetThemeViewPath("PrivateMessageView"), viewModel));
                }

                return(ErrorToHomePage(Lang("Errors.NoPermission")));
            }
        }
        public ActionResult Authorise(DialoguePage page)
        {
            if (User.IsInRole(AppConstants.AdminRoleName))
            {
                var viewModel = new AuthoriseViewModel
                {
                    PageTitle = Lang("Authorise.PageTitle"),
                    Members   = ServiceFactory.MemberService.GetUnAuthorisedMembers(),
                    Posts     = ServiceFactory.PostService.GetAllPendingPosts(),
                    Topics    = ServiceFactory.TopicService.GetAllPendingTopics()
                };

                return(View(PathHelper.GetThemeViewPath("Authorise"), viewModel));
            }
            return(ErrorToHomePage(Lang("Errors.GenericMessage")));
        }
Пример #18
0
    void ReadPage(DialoguePage page)
    {
        DialogueBoxInProgress = true;
        DialogueBox.Write(page.Text, this);
        DialogueBox.SetFace(page.Face());

        if (page.HasVoiceLine())
        {
            Player.clip = page.VoiceLine();
            Player.Play();
        }
        else
        {
            Player.Stop();
        }
    }
    public void Clear()
    {
        IsVisible = false;
        m_lineRenderer.positionCount = 0;
        m_lineRenderer.SetPositions(new Vector3[0]);
        SetColor(Color.clear);

        if (m_curDialogue != null)
        {
            if (m_curDialogue.OptionList.Count == 1)
            {
                m_curDialogue.ChooseOption(0, m_speaker);
            }
            m_curDialogue = null;
        }
    }
 public ActionResult PrivateMessagesSent(DialoguePage page)
 {
     using (UnitOfWorkManager.NewUnitOfWork())
     {
         var pageIndex     = AppHelpers.ReturnCurrentPagingNo();
         var pagedMessages = ServiceFactory.PrivateMessageService.GetPagedSentMessagesByUser(pageIndex, AppConstants.PrivateMessageListSize, CurrentMember);
         var viewModel     = new PageListPrivateMessageViewModel(page)
         {
             ListPrivateMessageViewModel = new ListPrivateMessageViewModel
             {
                 Messages = pagedMessages
             },
             PageTitle = Lang("PM.SentPrivateMessages")
         };
         return(View(PathHelper.GetThemeViewPath("PrivateMessagesSent"), viewModel));
     }
 }
Пример #21
0
 void Update()
 {
     if (GameManager.Instance.UI.IsBusy && Input.GetKeyDown(KeyCode.Space) && _pages.Count == 0)
     {
         gameObject.SetActive(false);
         if (OnFinish != null)
         {
             OnFinish();
         }
     }
     else if (GameManager.Instance.UI.IsBusy && Input.GetKeyDown(KeyCode.Space) && _pages.Count > 0)
     {
         DialoguePage page = _pages.Dequeue();
         SetTitle(page.Title);
         SetContent(page.Content);
     }
 }
        public ActionResult EditMember(DialoguePage page)
        {
            var id = Request["id"];

            if (id != null)
            {
                using (UnitOfWorkManager.NewUnitOfWork())
                {
                    var user = ServiceFactory.MemberService.Get(Convert.ToInt32(id));
                    if (!User.IsInRole(AppConstants.AdminRoleName))
                    {
                        if (CurrentMember == null || (CurrentMember != null && CurrentMember.Id.ToString() != id))
                        {
                            return(ErrorToHomePage("Unauthorised"));
                        }
                    }

                    var viewModel = new PageMemberEditViewModel(page)
                    {
                        MemberEditViewModel = new MemberEditViewModel
                        {
                            Id        = user.Id,
                            UserName  = user.UserName,
                            Email     = user.Email,
                            Signature = user.Signature,
                            Website   = user.Website,
                            Twitter   = user.Twitter,
                            Avatar    = user.Avatar,
                            Comments  = user.Comments,

                            DisableFileUploads        = user.DisableFileUploads,
                            DisableEmailNotifications = user.DisableEmailNotifications,
                            DisablePosting            = user.DisablePosting,
                            DisablePrivateMessages    = user.DisablePrivateMessages,
                            CanEditOtherMembers       = user.CanEditOtherMembers
                        },
                        PageTitle = string.Format("Edit Profile for {0}", user.UserName)
                    };

                    return(View(PathHelper.GetThemeViewPath("EditMember"), viewModel));
                }
            }

            return(ErrorToHomePage("Edit member error"));
        }
        public ActionResult CategoryRss(DialoguePage page)
        {
            using (UnitOfWorkManager.NewUnitOfWork())
            {
                // get an rss lit ready
                var rssTopics = new List <RssItem>();

                var catId = Request["id"];
                if (!string.IsNullOrEmpty(catId))
                {
                    // Get the category
                    var category = ServiceFactory.CategoryService.Get(Convert.ToInt32(catId));

                    // check the user has permission to this category
                    var permissions = ServiceFactory.PermissionService.GetPermissions(category, _membersGroup);

                    if (!permissions[AppConstants.PermissionDenyAccess].IsTicked)
                    {
                        var topics = ServiceFactory.TopicService.GetRssTopicsByCategory(AppConstants.ActiveTopicsListSize, category.Id);

                        rssTopics.AddRange(topics.Select(x =>
                        {
                            var firstOrDefault =
                                x.Posts.FirstOrDefault(s => s.IsTopicStarter);
                            return(firstOrDefault != null
                                       ? new RssItem
                            {
                                Description = firstOrDefault.PostContent,
                                Link = x.Url,
                                Title = x.Name,
                                PublishedDate = x.CreateDate
                            }
                                       : null);
                        }
                                                         ));

                        return(new RssResult(rssTopics, string.Format(Lang("Rss.Category.Title"), category.Name),
                                             string.Format(Lang("Rss.Category.Description"), category.Name)));
                    }
                }

                return(ErrorToHomePage(Lang("Errors.NothingToDisplay")));
            }
        }
Пример #24
0
        private void AddNextPage()
        {
            // 텍스트 추가
            List <DialoguePage> list = new List <DialoguePage>();

            for (int i = 0; i < _pages.Count; i++)
            {
                list.Add(DialoguePage.CreatePage(_pages[i]._text, _pages[i]._delay, _pages[i]._duration));
            }

            _introDialogue._textPages = list;

            // 이미지 추가
            _animImage.SpriteInitialize(_pages.Count);

            for (int i = 0; i < _pages.Count; i++)
            {
                _animImage.AddNext(_pages[i]._sprite, i);
            }
        }
        public ActionResult Activity(DialoguePage page)
        {
            using (UnitOfWorkManager.NewUnitOfWork())
            {
                // Set the page index
                var pageIndex = AppHelpers.ReturnCurrentPagingNo();

                // Get the topics
                var activities = ServiceFactory.ActivityService.GetPagedGroupedActivities(pageIndex, Settings.ActivitiesPerPage);

                // create the view model
                var viewModel = new AllRecentActivitiesViewModel(page)
                {
                    Activities = activities,
                    PageIndex  = pageIndex,
                    TotalCount = activities.TotalCount,
                    PageTitle  = Lang("Activity.PageTitle")
                };

                return(View(PathHelper.GetThemeViewPath("Activity"), viewModel));
            }
        }
    public void Display(Speaker a_speaker   = null, DialoguePage a_page = null, float a_delayTimeSec = 0.0f,
                        float a_stayTimeSec = 0.0f)
    {
        if (a_speaker != null)
        {
            m_speaker = a_speaker;
        }
        if (m_speaker == null)
        {
            Debug.LogErrorFormat("Tried to show page in Speech Bubble {0} with null speaker", name);
            return;
        }

        if (a_page != null)
        {
            m_curDialogue = a_page;
        }
        if (m_curDialogue == null)
        {
            Debug.LogErrorFormat("Tried to show null page in Speech Bubble {0}", name);
            return;
        }

        if (a_stayTimeSec > 0.0f)
        {
            StartCoroutine(DelayClear(a_delayTimeSec + a_stayTimeSec));
        }

        if (a_delayTimeSec > 0.0f)
        {
            StartCoroutine(DelayDisplay(a_delayTimeSec));
            return;
        }

        IsVisible       = true;
        m_textMesh.text = m_curDialogue.Text;
        SetColor(m_color);
    }
 public ActionResult Report(DialoguePage page)
 {
     if (Settings.EnableSpamReporting)
     {
         using (UnitOfWorkManager.NewUnitOfWork())
         {
             var id = Request["id"];
             if (!string.IsNullOrEmpty(id))
             {
                 var post      = ServiceFactory.PostService.Get(new Guid(id));
                 var viewModel = new ReportPostPageViewModel(page)
                 {
                     PostId = post.Id,
                     Post   = post,
                     PostCreatorUsername = post.Member.UserName,
                     PageTitle           = string.Concat(Lang("Report.ReportPostBy"), post.Member.UserName)
                 };
                 return(View(PathHelper.GetThemeViewPath("PostReport"), viewModel));
             }
         }
     }
     return(ErrorToHomePage(Lang("Errors.GenericMessage")));
 }
        public ActionResult EditMember(DialoguePage page)
        {
            var id = Request["id"];

            if (id != null)
            {
                using (UnitOfWorkManager.NewUnitOfWork())
                {
                    var user      = ServiceFactory.MemberService.Get(Convert.ToInt32(id));
                    var viewModel = new PageMemberEditViewModel(page)
                    {
                        MemberEditViewModel = new MemberEditViewModel
                        {
                            Id        = user.Id,
                            UserName  = user.UserName,
                            Email     = user.Email,
                            Signature = user.Signature,
                            Website   = user.Website,
                            Twitter   = user.Twitter,
                            Avatar    = user.Avatar,
                            Comments  = user.Comments,

                            DisableFileUploads        = user.DisableFileUploads,
                            DisableEmailNotifications = user.DisableEmailNotifications,
                            DisablePosting            = user.DisablePosting,
                            DisablePrivateMessages    = user.DisablePrivateMessages,
                            CanEditOtherMembers       = user.CanEditOtherMembers
                        },
                        PageTitle = string.Format(Lang("Members.EditProfile"), user.UserName)
                    };

                    return(View(PathHelper.GetThemeViewPath("EditMember"), viewModel));
                }
            }

            return(ErrorToHomePage(Lang("Errors.GenericMessage")));
        }
        public ActionResult ReportMember(DialoguePage page)
        {
            var id = Request["id"];

            if (string.IsNullOrEmpty(id))
            {
                return(ErrorToHomePage(Lang("Errors.GenericMessage")));
            }
            if (Settings.EnableMemberReporting)
            {
                using (UnitOfWorkManager.NewUnitOfWork())
                {
                    var user      = ServiceFactory.MemberService.Get(Convert.ToInt32(id));
                    var viewModel = new PageReportMemberViewModel(page)
                    {
                        MemberId  = user.Id,
                        Username  = user.UserName,
                        PageTitle = Lang("Report.MemberReport")
                    };
                    return(View(PathHelper.GetThemeViewPath("ReportMember"), viewModel));
                }
            }
            return(ErrorToHomePage(Lang("Errors.GenericMessage")));
        }
        public ActionResult Leaderboard(DialoguePage page)
        {
            page.PageTitle = Lang("Page.Leaderboard.PageTitle");

            return(View(PathHelper.GetThemeViewPath("Leaderboard"), page));
        }