public string OnAnchorSelect() { string value = ""; String id = this.reference(0); if (Regex.IsMatch(id, "^https?://")) { value = @"\C\![open,browser," + AYATemplate.EscapeText(id) + @"]\e"; } else { OnAnchorSelect oo = new OnAnchorSelect(this.s, this.header); Type t = oo.GetType(); MethodInfo mi = t.GetMethod(this.reference(0)); try { object o = mi.Invoke(oo, null); value = (string)o; } catch (NullReferenceException) { } } return(value); }
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); }
public string OnDive() { string url = "http://www.google.com/images?q=" + Uri.EscapeUriString(this.reference(0)); return(@"\1\s[100]\0\s[7]とうっ!!\![open,browser," + AYATemplate.EscapeText(url) + "]"); }