Beispiel #1
0
        private void btnNav_Click(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            if (btn.Tag.ToString() == "CommunityPage")
            {
                if (CP == null)
                {
                    CP = new CommunityPage();
                    mainFrame.Content = CP;
                }
                else
                {
                    mainFrame.Content = CP;
                }
            }
            else
            {
                if (TP == null)
                {
                    TP = new TransPage();
                    mainFrame.Content = TP;
                }
                else
                {
                    mainFrame.Content = TP;
                }
            }

            //      CommunityPage = new Uri("Pages/" + btn.Tag.ToString() + ".xaml", UriKind.Relative);
            //       mainFrame.Navigate(CommunityPage);
        }
Beispiel #2
0
        private void LoginSuccess()
        {
            LoginGrid.Visibility = Visibility.Collapsed;
            UserGrid.Visibility = Visibility.Visible;

            Cloud = new CloudFilePage();
            Community = new CommunityPage();
            Setting = new SettingPage();

            Utils.RunningDatas.MainPage = this;
            Utils.RunningDatas.FriendsTable = new ConcurrentDictionary<string, TemporaryFriendsList>();
            Utils.RunningDatas.GroupsTable = new ConcurrentDictionary<string, Utils.TemporaryGroupsList>();
            Utils.RunningDatas.ApplyLists = new ConcurrentBag<AppliesResponse.ApplyPackage>();
        }
Beispiel #3
0
 public void SearchInCommunity(string keyword)
 {
     if (CP == null)
     {
         CP = new CommunityPage();
         mainFrame.Content = CP;
         CP.SearchKeyWord(keyword);
     }
     else
     {
         mainFrame.Content = CP;
         CP.SearchKeyWord(keyword);
     }
 }
Beispiel #4
0
        /// <summary>
        /// This method is used to seed the content for the Reseller Community Pages.
        /// </summary>
        /// <param name="contentRepository"></param>
        /// <param name="urlSegmentCreator"></param>
        private void ResellerCommunitySeeding(IContentRepository contentRepository, IUrlSegmentCreator urlSegmentCreator)
        {
            //Checking to see if the reseller title page already exists. If no reseller title page can be found a new one will be created on application start.
            var resellerTitlePage = contentRepository.GetBySegment(PageReference.StartPage, "reseller-community", CultureInfo.CurrentCulture);

            if (resellerTitlePage == null)
            {
                StandardPage communityPage = contentRepository.GetDefault <StandardPage>(PageReference.StartPage);
                communityPage.PageName      = "Reseller Community";
                communityPage.URLSegment    = urlSegmentCreator.Create(communityPage);
                communityPage.MainBody      = new XhtmlString("<p>This is the homepage for all reseller community pages.</p>");
                communityPage.VisibleInMenu = true;
                contentRepository.Save(communityPage, EPiServer.DataAccess.SaveAction.Publish, AccessLevel.NoAccess);
            }

            resellerTitlePage = contentRepository.GetBySegment(PageReference.StartPage, "reseller-community", CultureInfo.CurrentCulture);
            //If the title reseller page exists there is a check if there are any child pages. If no child pages exist then create example reseller pages.
            if (resellerTitlePage != null)
            {
                var parentReference           = resellerTitlePage.ContentLink;
                var resellerTitlePageChildren = contentRepository.GetChildren <CommunityPage>(parentReference);
                if (resellerTitlePageChildren != null && resellerTitlePageChildren.Any() != true)
                {
                    var listOfGroups = new List <string> {
                        "Platinum Reseller Group", "Gold Reseller Group", "Silver Reseller Group"
                    };
                    foreach (var group in listOfGroups)
                    {
                        CommunityPage resellerGroupPage = contentRepository.GetDefault <CommunityPage>(parentReference);
                        resellerGroupPage.PageName      = group;
                        resellerGroupPage.URLSegment    = urlSegmentCreator.Create(resellerGroupPage);
                        resellerGroupPage.VisibleInMenu = true;
                        contentRepository.Save(resellerGroupPage, EPiServer.DataAccess.SaveAction.Publish, AccessLevel.NoAccess);
                    }
                }
            }
        }
 public CommunitySteps()
 {
     communityPage = new CommunityPage();
 }