[Release] Guild logo in C# ASP.NET

Results 1 to 5 of 5
  1. #1
    if(!caffeine) continue; leorond is offline
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    479Posts

    idea [Release] Guild logo in C# ASP.NET

    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 Code:
        public string GuildLogo(string hexint 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 (
    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 (
    == 8)
                {
                    
    table += "</tr>";
                    if (
    != 64)
                    {
                        
    table += "<tr>";
                    }
                    
    0;
                }
            }

            
    table += "</table>";
            return 
    table;
        } 
    Calling a function is easy

    PHP Code:
    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 by leorond; 01-11-18 at 06:21 PM.


  2. #2
    RZ's most loyal knight Dios is offline
    ModeratorRank
    Apr 2005 Join Date
    ArgentinaLocation
    5,238Posts

    re: [Release] Guild logo in C# ASP.NET

    Approved.

  3. #3
    Developer nevS is offline
    MemberRank
    Aug 2005 Join Date
    GermanyLocation
    531Posts

    re: [Release] Guild logo in C# ASP.NET

    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.

  4. #4
    Novice zhsks1321 is offline
    MemberRank
    Oct 2018 Join Date
    2Posts

    re: [Release] Guild logo in C# ASP.NET

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

  5. #5
    if(!caffeine) continue; leorond is offline
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    479Posts

    re: [Release] Guild logo in C# ASP.NET

    Quote Originally Posted by nevS View Post
    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.

    - - - Updated - - -

    Quote Originally Posted by zhsks1321 View Post
    Hi, I am Korean. Can I ask you to do it only once?
    What to do?



Advertisement