示例#1
0
        public string OnHeadlinesense_OnFind()
        {
            string value;

            value  = @"■" + this.sReference(0) + @"\_q\n\n[half]\_n";
            value += this.sReference(3) + @"\_n\n[half]\_q";
            if (Regex.IsMatch(this.reference(2), "^(First|Next)$"))
            {
                value += @"\![*]\q[" + AYATemplate.MakeJustText("next page", 46) + ",]\n";
            }
            value += AYATemplate.MenuItem("open browser", this.reference(1)) + @"\n";
            value += AYATemplate.MenuItem("cancel", "Menu_CANCEL");
            value  = @"\1\s[100]\0\b[2]\s[0]\_q" + value + @"\e";
            return(value);
        }
示例#2
0
        public static string MenuItem(string text, params string[] args)
        {
            string r = @"\![*]\__q[";
            int    i = 0;

            foreach (string arg in args)
            {
                if (i > 0)
                {
                    r += ",";
                }
                r += AYATemplate.EscapeText(arg);
                i++;
            }
            r += "]" + AYATemplate.MakeJustText(text, MENU_TEXT_WIDTH) + @"\__q";
            return(r);
        }
示例#3
0
        public string OnRSSComplete()
        {
            string value;

            value = @"■" + this.sReference(0) + @"\n\n[half]\_n";
            for (int i = 2; i < this.referenceCount(); i++)
            {
                if (i >= 22)
                {
                    value += @"and more...\n";
                    break;
                }
                string[] _r    = this.reference(i).Split('\u0001');
                string   title = _r.Length > 0 ? _r[0] : "";
                string   url   = _r.Length > 1 ? _r[1] : "";
                string   date  = _r.Length > 2 ? _r[2] : "";
                if (Regex.IsMatch(title, @"(^AD:)|(^PR:)|(\[ *PR *\])"))
                {
                    continue;
                }
                string content = title;
                if (date.CompareTo("") != 0)
                {
                    string[] _datea = date.Split(',');
                    string   month  = _datea.Length > 1 ? _datea[1] : "";
                    string   day    = _datea.Length > 2 ? _datea[2] : "";
                    content = "[" + month + "/" + day + "]" + title;
                }
                value += @"\_a[" + url + @"]"
                         + SHIORI3FW.EscapeAllTags(AYATemplate.MakeJustText(content, 46))
                         + @"\_a\n";
            }
            value += @"\_n\n\n[half]";
            value += AYATemplate.MenuItem("open browser", this.reference(1)) + @"\n";
            value += AYATemplate.MenuItem("cancel", "Menu_CANCEL");
            value  = @"\![set,choicetimeout,-1]\![set,balloontimeout,-1]\1\s[100]\0\b[2]\s[0]\_q" + value + @"\e";
            return(value);
        }