Esempio n. 1
0
        public static string NoRecordsMessage(this HtmlHelper html, Application app, bool isLanguageSet)
        {
            if (app.Tweets.Count > 0)
            {
                RouteBuilder routeBuilder = html.CurrentRoute();

                bool hasSearch = routeBuilder.ContainsKey("search");
                bool isLatestPage = routeBuilder.Action.Equals("latest", StringComparison.InvariantCultureIgnoreCase);

                if (!isLatestPage && !hasSearch && !isLanguageSet)
                {
                    return "No one has voted yet.";
                }
                else
                {
                    string message = "No tweets found. Try broadening your search criteria";

                    if (isLanguageSet)
                    {
                        message += ", or selecting a different language";
                    }

                    message += ".";

                    return message;
                }
            }
            else
            {
                return "No tweets have been indexed yet. Please wait a while, I'm sure there will be some soon.";
            }
        }
Esempio n. 2
0
 public Tweet(Application app, Tweeter tweeter)
     : this()
 {
     this.App = app;
     this.Tweeter = tweeter;
 }
Esempio n. 3
0
 public MasterFrontEndView(Application app, LanguageSelectForm languages, TagCloudView tagCloud)
 {
     this.App = app;
     this.Languages = languages;
     this.TagCloud = tagCloud;
 }
Esempio n. 4
0
 public Stylesheet(Application app)
 {
     this.App = app;
 }
Esempio n. 5
0
        private Tweet CreateTweet()
        {
            Application app = new Application();
            Tweeter tweeter = new Tweeter();

            return new Tweet(app, tweeter);
        }