Inheritance: NotificationForm
Example #1
0
        public static void ShowCreatureList(List <TibiaObject> c, string title, string command, bool conditionalAttributes = false)
        {
            if (c == null)
            {
                return;
            }
            string[] split        = command.Split(Constants.CommandSymbol);
            string   parameter    = split[1].Trim().ToLower();
            int      page         = 0;
            int      displayType  = 0;
            bool     desc         = false;
            string   sortedHeader = null;

            if (split.Length > 2 && int.TryParse(split[2], out page))
            {
            }
            if (split.Length > 3 && int.TryParse(split[3], out displayType))
            {
            }
            if (split.Length > 4)
            {
                desc = split[4] == "1";
            }
            if (split.Length > 5)
            {
                sortedHeader = split[5];
            }
            CreatureList f = new CreatureList(page, displayType == 1 ? DisplayType.Images : DisplayType.Details, sortedHeader, desc);

            f.addConditionalAttributes = conditionalAttributes;
            f.objects = c;
            f.title   = title;

            ShowNotification(f, command);
        }
Example #2
0
        public static void ShowCreatureList(List<TibiaObject> c, string title, string command, bool conditionalAttributes = false)
        {
            if (c == null) return;
            string[] split = command.Split(Constants.CommandSymbol);
            string parameter = split[1].Trim().ToLower();
            int page = 0;
            int displayType = 0;
            bool desc = false;
            string sortedHeader = null;

            if (split.Length > 2 && int.TryParse(split[2], out page)) { }
            if (split.Length > 3 && int.TryParse(split[3], out displayType)) { }
            if (split.Length > 4) { desc = split[4] == "1"; }
            if (split.Length > 5) { sortedHeader = split[5]; }
            CreatureList f = new CreatureList(page, displayType == 1 ? DisplayType.Images : DisplayType.Details, sortedHeader, desc);
            f.addConditionalAttributes = conditionalAttributes;
            f.objects = c;
            f.title = title;

            ShowNotification(f, command);
        }