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

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,390
    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. class foreach (var blah in trallalla)
    - this is for CODE=C# (selectable from dropdown). Wrong!
    Code (C#):
    1. class foreach (var blah in trallalla)
    - this is for CODE=csharp (written manually). Correct.
    Code ( (Unknown Language)):
    1. class foreach (var blah in trallalla)
    - this is for CODE=cs (written manually). Wrong.
    Code (C):
    1. class foreach (var blah in trallalla)
    - this is for CODE=C++ (selectable from dropdown). Well, also wrong (not c++, just pure C).
    Code ( (Unknown Language)):
    1. class foreach (var blah in trallalla)
    - this is for CODE=Cplusplus (written manually). Well, also wrong.



    see the difference?
     
    Last edited: October 16, 2014
    • Thank You! Thank You! x 2
    • Agree Agree x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. high
    • Team MediaPortal
    • IT-Admin

    high Administrator

    Joined:
    August 31, 2004
    Messages:
    4,742
    Likes Received:
    3,114
    Gender:
    Male
    Occupation:
    Sysadmin
    Location:
    Isselburg/NRW
    Ratings:
    +4,828 / 6
    Home Country:
    Germany Germany
    Show System Specs
    thx, reported the issue, looks like theres a problem with special characters like + or # in block
     
    • Thank You! Thank You! x 2
  4. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,390
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
  5. high
    • Team MediaPortal
    • IT-Admin

    high Administrator

    Joined:
    August 31, 2004
    Messages:
    4,742
    Likes Received:
    3,114
    Gender:
    Male
    Occupation:
    Sysadmin
    Location:
    Isselburg/NRW
    Ratings:
    +4,828 / 6
    Home Country:
    Germany Germany
    Show System Specs
    nope, sorry. No feedback from author since months to any issue related to this plugin.
     
  6. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,706
    Likes Received:
    2,693
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,658 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    I try:
    Code (C):
    1. class foreach (var blah in trallalla)
    Code (C):
    1. class foreach (var blah in trallalla)
     
  7. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,390
    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. public class foreach (var blah in trallalla)
    works if you write "csharp" manually

    Code (C):
    1. class foreach (var blah in trallalla)
    Code (C++):
    1. class foreach (var blah in trallalla)
    Code ( (Unknown Language)):
    1. class foreach (var blah in trallalla)
    Code ( (Unknown Language)):
    1. class foreach (var blah in trallalla)
    c++ - when writing "cpp" manually
     
    Last edited: December 10, 2015
    • Informative Informative x 1
  8. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,706
    Likes Received:
    2,693
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,658 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Works from Menu
    Code (C):
    1.     public enum MvView
    2.     {
    3.       None = 1,
    4.       Artist = 2,
    5.       Album = 3,
    6.       Video = 4,
    7.       AllAlbums = 5,
    8.       AllVideos = 6,
    9.       VideosOnAlbum = 7,
    10.       Genres = 8,
    11.       ArtistViaGenre = 9,
    12.       ArtistTracks = 10,
    13.       SearchedArtists = 11,
    14.       DvdView = 12
    15.     }
    and works by hand:
    Code (C):
    1. public enum MvSort
    2. {
    3. Ascending,
    4. Desending
    5. }
    EDIT: Or is it the highlighting for the C?
     
    Last edited: December 10, 2015
  9. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,390
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,172 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    as you see - it falls back to C
     
  10. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,706
    Likes Received:
    2,693
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,658 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    I'm not good at the difference, for the highlighting C, C++, C# :):whistle::coffee:
     
  11. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,706
    Likes Received:
    2,693
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,658 / 30
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Test for diferences:
    Code (C#):
    1.     /// <summary>
    2.     /// Catch GUI to full screen toggle, set property #mvCentral.isPlaying to enable pop-up
    3.     /// </summary>
    4.     void GUIGraphicsContext_OnVideoWindowChanged()
    5.     {
    6.       // make sure we are playing some video and the video source is us
    7.       if (GUIGraphicsContext.IsPlayingVideo && (GUIPropertyManager.GetProperty("#mvCentral.isPlaying") == "true"))
    8.       {
    9.         if (GUIWindowManager.IsSwitchingToNewWindow)
    10.         {
    11.           if (GUIGraphicsContext.IsFullScreenVideo)
    12.           {
    13.             if (GUIPropertyManager.GetProperty("#mvCentral.Play.Started") == "false")
    14.             {
    15.               clearPropertyTimer.Enabled = true;
    16.               logger.Debug("Set #mvCentral.Play.Started = true");
    17.               GUIPropertyManager.SetProperty("#mvCentral.Play.Started", "true");
    18.             }
    19.           }
    20.         }
    21.       }
    22.     }
    Code (C++):
    1.     /// <summary>
    2.     /// Catch GUI to full screen toggle, set property #mvCentral.isPlaying to enable pop-up
    3.     /// </summary>
    4.     void GUIGraphicsContext_OnVideoWindowChanged()
    5.     {
    6.       // make sure we are playing some video and the video source is us
    7.       if (GUIGraphicsContext.IsPlayingVideo && (GUIPropertyManager.GetProperty("#mvCentral.isPlaying") == "true"))
    8.       {
    9.         if (GUIWindowManager.IsSwitchingToNewWindow)
    10.         {
    11.           if (GUIGraphicsContext.IsFullScreenVideo)
    12.           {
    13.             if (GUIPropertyManager.GetProperty("#mvCentral.Play.Started") == "false")
    14.             {
    15.               clearPropertyTimer.Enabled = true;
    16.               logger.Debug("Set #mvCentral.Play.Started = true");
    17.               GUIPropertyManager.SetProperty("#mvCentral.Play.Started", "true");
    18.             }
    19.           }
    20.         }
    21.       }
    22.     }
    Code (C):
    1.     /// <summary>
    2.     /// Catch GUI to full screen toggle, set property #mvCentral.isPlaying to enable pop-up
    3.     /// </summary>
    4.     void GUIGraphicsContext_OnVideoWindowChanged()
    5.     {
    6.       // make sure we are playing some video and the video source is us
    7.       if (GUIGraphicsContext.IsPlayingVideo && (GUIPropertyManager.GetProperty("#mvCentral.isPlaying") == "true"))
    8.       {
    9.         if (GUIWindowManager.IsSwitchingToNewWindow)
    10.         {
    11.           if (GUIGraphicsContext.IsFullScreenVideo)
    12.           {
    13.             if (GUIPropertyManager.GetProperty("#mvCentral.Play.Started") == "false")
    14.             {
    15.               clearPropertyTimer.Enabled = true;
    16.               logger.Debug("Set #mvCentral.Play.Started = true");
    17.               GUIPropertyManager.SetProperty("#mvCentral.Play.Started", "true");
    18.             }
    19.           }
    20.         }
    21.       }
    22.     }
     
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!