Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Guild logo in C# ASP.NET

Joined
Jul 31, 2012
Messages
490
Reaction score
92
Hi, a lot of people are now programming their website in ASP NET.

So I have overwritten the function from the programmer = Master = to that language.

The feature will display you on the guild logo pages.

I apologize for my English.

PHP:
    public string GuildLogo(string hex, int xy)
    {
        string[] color = new string[255];
        color['0'] = "";
        color['1'] = "#000000";
        color['2'] = "#8c8a8d";
        color['3'] = "#ffffff";
        color['4'] = "#fe0000";
        color['5'] = "#ff8a00";
        color['6'] = "#ffff00";
        color['7'] = "#8cff01";
        color['8'] = "#00ff00";
        color['9'] = "#01ff8d";
        color['A'] = "#00ffff";
        color['B'] = "#008aff";
        color['C'] = "#0000fe";
        color['D'] = "#8c00ff";
        color['E'] = "#ff00fe";
        color['F'] = "#ff008c";

        int i = 0;
        int k = 0;

        string table = $"<table style='width: {8 * xy}px; height:{8 * xy}px' border=1 cellpadding=0 cellspacing=0><tr>";

        while (i < 64)
        {
            char place = hex[i];

            i++;
            k++;

            string add = color[place];

            table += $"<td class='guildlogo' style='background-color: {add}' width='{xy}' height='{xy}'></td>";

            if (k == 8)
            {
                table += "</tr>";
                if (k != 64)
                {
                    table += "<tr>";
                }
                k = 0;
            }
        }

        table += "</table>";
        return table;
    }

Calling a function is easy

PHP:
string gLogo = GuildLogo("*the variable for the G_Mark column in your database.", "logo dimensions");

The feature is tested for the VS 2017.

* Do not convert from binary data to hexadecimal data!
 
Last edited:
Joined
Aug 6, 2005
Messages
550
Reaction score
296
To be honest, this looks very inefficient in different aspects, just to name a few:
1. The approach itself to show it as a table in html - why no image, e.g svg with css or even a simple 8x8 bitmap? Can be scaled up if needed.
2. Your code creates a lot of strings. StringBuilder is more efficient here.
 
Joined
Jul 31, 2012
Messages
490
Reaction score
92
To be honest, this looks very inefficient in different aspects, just to name a few:
1. The approach itself to show it as a table in html - why no image, e.g svg with css or even a simple 8x8 bitmap? Can be scaled up if needed.
2. Your code creates a lot of strings. StringBuilder is more efficient here.

Hi, it's just a code override.

This code is easy to edit, just basic knowledge of c # and HTML.

string[] can be changed to switch or List
The table is not needed at all, other elements can be used.
The whole code can also be simplified and accelerated.

Enlarge image after mouseover or click is simple and can be created in JS, CSS, C # ...

It's just a basic option.



Hi, I am Korean. Can I ask you to do it only once?

What to do?
 
Back
Top