Esempio n. 1
0
        public string OnMinuteChange()
        {
            string   value = "";
            DateTime now   = DateTime.Now;

            if (now.Hour % 2 == 0)
            {
                switch (now.Minute)
                {
                case 0:
                    this.s.AiTalkCount = 0;
                    value = @"\1\s[100]\0\s[0]" + now.Hour + @"時だ。\_w[500]巡回にいってくるね。\_w[500]\s[999]\_w[500]\1\s[105]いってらっしゃい。\e";
                    break;

                case 3:
                    string headlinename = "偽SiReFaSo";
                    if (this.s.installedheadlinelist.Contains(headlinename))
                    {
                        value = @"\1\s[100]\0\s[0]更新状況だよ。\_w[500]\![execute,headline," + headlinename + @"]\e";
                    }
                    else
                    {
                        value = @"\1\s[100]\0\s[0]%username、\_w[500]\s[5]ボクのフィードを購読してみない?\n\n[half]\_w[500]\_q"
                                + AYATemplate.MenuItem("購読する", "InstallRSS", "http://nikolat.starfree.jp/sirefaso/rss2.xml") + @"\n"
                                + AYATemplate.MenuItem("遠慮しとく", "Menu_CANCEL") + @"\e";
                    }
                    break;

                default:
                    break;
                }
            }
            return(value);
        }
Esempio n. 2
0
        public string OnInstallRefuse()
        {
            string sakuraname = this.reference(0);
            string value      = "Refused. " + SHIORI3FW.EscapeAllTags(sakuraname) + "'s archive.";

            if (!this.s.ghostexlist.Contains(sakuraname))               // 同時起動していない時
            {
                value += @"\n\n";
                value += AYATemplate.MenuItem("change", "GOYAUTIL_InstallChange", sakuraname, "ghost") + @"\n";
                value += AYATemplate.MenuItem("call", "GOYAUTIL_InstallCall", sakuraname) + @"\n";
                value += AYATemplate.MenuItem("hold", "Menu_CANCEL");
            }
            value = @"\1\s[100]\0\s[0]\_q" + value + @"\e";
            return(value);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        public string OnBIFFComplete()
        {
            string value = "";

            if (this.referenceInt(0) == 0)
            {
                value = "Not new.";
            }
            else if (this.referenceInt(0) > 0)
            {
                value  = this.sReference(0) + @" mail come to your mailbox.\n\n[half]";
                value += AYATemplate.MenuItem("open mailer", "OpenMailer") + @"\n";
                value += AYATemplate.MenuItem("calcel", "Menu_CANCEL");
            }
            value = @"\1\s[100]\0\s[0]\_q" + value + @"\e";
            return(value);
        }
Esempio n. 5
0
        public string OnInstallComplete()
        {
            string value = "「" + this.sReference(1)
                           + "」/「" + this.sReference(0) + "」installed.";
            string id = Regex.Split(this.reference(0), " with")[0];

            if (Regex.IsMatch(id, "ghost|shell|balloon"))
            {
                value += @"\n\n";
                value += AYATemplate.MenuItem("change", "GOYAUTIL_InstallChange", "lastinstalled", id) + @"\n";
                if (id.CompareTo("ghost") == 0)
                {
                    value += AYATemplate.MenuItem("call", "GOYAUTIL_InstallCall", "lastinstalled") + @"\n";
                }
                value += AYATemplate.MenuItem("hold", "Menu_CANCEL");
            }
            value = @"\1\s[100]\0\s[0]\_q" + value + @"\e";
            return(value);
        }
Esempio n. 6
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);
        }