Forum - syntax highlighting for C# and C++ is falling back to C | Page 2

Discussion in 'Website/Forum/Wiki Feedback' started by Vasilich, June 14, 2014.

  1. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,389
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    pure c doesn't have classes, hence the highlighting of "class" doesn't wotk for c, but should work for c++ and c#


     
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,614
    Likes Received:
    2,649
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,599 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    IMHO C++ and C more redable then C# higlight :)
     
  4. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,389
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    because in C# there is no highlighting for strings :(
     
    • Agree Agree x 1
  5. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,614
    Likes Received:
    2,649
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,599 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    @high
    It does not help?
    https://xenforo.com/community/threads/geshi-syntax-highlighter.21903/#post-276543
    Change in editor_dialog_code template:
    from:
    Code (Text):
    1. <option value="code=C++">C++</option>
    2. <option value="code=C#">C#</option>
    to
    Code (Text):
    1. <option value="code=cpp">C++</option>
    2. <option value="code=csharp">C#</option>
    ? :whistle::coffee:

    I think they can be added. We should see the code as it is highlighted in the C and do here as well.
    https://github.com/GeSHi/geshi-1.1/tree/master/geshi/languages/csharp
     
    Last edited by a moderator: December 11, 2015
    • Agree Agree x 1
  6. high
    • Team MediaPortal
    • IT-Admin

    high Administrator

    Joined:
    August 31, 2004
    Messages:
    4,738
    Likes Received:
    3,110
    Gender:
    Male
    Occupation:
    Sysadmin
    Location:
    Isselburg/NRW
    Ratings:
    +4,822 / 6
    Home Country:
    Germany Germany
    Show System Specs
    never use this nor have a deeper idea about hose languages so...you need to decide what to use ;)
    it's added to 'noto white bg' for testing
     
    • Thank You! Thank You! x 1
  7. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,389
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Code (C#):
    1. using System;
    2. using System.IO;
    3. // comment
    4. /* more
    5.   multiline
    6.   comment */
    7. #pragma warning disable 414, 3021
    8. public class Program
    9. {
    10.   /// <summary>The entry point to the program.</summary>
    11.   public static int Main(string[] args)
    12.   {
    13.   Console.WriteLine("Hello, World!");
    14.   string s = @"This
    15. ""string""
    16. spans
    17. multiple
    18. lines!";
    19.   dynamic x = new ExpandoObject();
    20.   x.MyProperty = 2; X = 0b01010001 + 44L;
    21.   return 0xFF;
    22.   }
    23. }
    24. async Task<int> AccessTheWebAsync()
    25. {
    26.   string urlContents = await getStringTask;
    27.   return urlContents.Length;
    28. }
    29. internal static void ExceptionFilters()
    30. {
    31.   try
    32.   {
    33.   throw new Exception();
    34.   }
    35.   catch (Exception e) when (e.Message == "My error") { }
    36. }
    Code (C++):
    1. #include <iostream>
    2. #define IABS(x) ((x) < 0 ? -(x) : (x))
    3. int main(int argc, char *argv[]) {
    4.   /* An annoying "Hello World" example */
    5.   for (auto i = 0; i < 0xFFFF; i++)
    6.   cout << "Hello, World!" << endl;
    7.   char c = '\n';
    8.   unordered_map <string, vector<string> > m;
    9.   m["key"] = "\\\\"; // this is an error
    10.   return -2e3 + 12l;
    11. }
    fine, works
     
    Last edited: December 11, 2015
    • Agree Agree x 1
  8. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,614
    Likes Received:
    2,649
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,599 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    It is necessary to alter the string coloring for C#.

    I can not download this plugin to look like there and what works. If someone will give him, I look, at the same time highlighting washes correct.
     
    Last edited by a moderator: December 11, 2015
  9. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,389
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    upload_2015-12-11_11-8-48.png
    so better for C#?
     
    • Agree Agree x 1
  10. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,389
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    @high can you set those strings to other themes also?
    and please replace geshi/csharp.php with attached one :)
     

    Attached Files:

    • csharp.zip
      File size:
      3.4 KB
      Uploaded:
      December 11, 2015
      Views:
      80
  11. high
    • Team MediaPortal
    • IT-Admin

    high Administrator

    Joined:
    August 31, 2004
    Messages:
    4,738
    Likes Received:
    3,110
    Gender:
    Male
    Occupation:
    Sysadmin
    Location:
    Isselburg/NRW
    Ratings:
    +4,822 / 6
    Home Country:
    Germany Germany
    Show System Specs
    this one will be MP-default style this evening anyway ;)
    file is replaced for testing
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!