Forum syntax highlighting for C# and C++ is falling back to C (1 Viewer)

Vasilich

Portal Pro
August 30, 2009
3,394
1,170
Germany, Mayence
Home Country
Russian Federation Russian Federation
Code:
class foreach (var blah in trallalla)
- this is for CODE=C# (selectable from dropdown). Wrong!
C#:
class foreach (var blah in trallalla)
- this is for CODE=csharp (written manually). Correct.
Code:
class foreach (var blah in trallalla)
- this is for CODE=cs (written manually). Wrong.
Code:
class foreach (var blah in trallalla)
- this is for CODE=C++ (selectable from dropdown). Well, also wrong (not c++, just pure C).
Code:
class foreach (var blah in trallalla)
- this is for CODE=Cplusplus (written manually). Well, also wrong.

see the difference?
 
Last edited:

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,369
    Kyiv
    Home Country
    Ukraine Ukraine
    I try:
    Code:
    class foreach (var blah in trallalla)
    Code:
    class foreach (var blah in trallalla)
     

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    C#:
    public class foreach (var blah in trallalla)
    works if you write "csharp" manually

    Code:
    class foreach (var blah in trallalla)
    C++:
    class foreach (var blah in trallalla)
    Code:
    class foreach (var blah in trallalla)
    Code:
    class foreach (var blah in trallalla)
    c++ - when writing "cpp" manually
     
    Last edited:

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,369
    Kyiv
    Home Country
    Ukraine Ukraine
    works if you write "csharp" manually
    Works from Menu
    Code:
        public enum MvView
        {
          None = 1,
          Artist = 2,
          Album = 3,
          Video = 4,
          AllAlbums = 5,
          AllVideos = 6,
          VideosOnAlbum = 7,
          Genres = 8,
          ArtistViaGenre = 9,
          ArtistTracks = 10,
          SearchedArtists = 11,
          DvdView = 12
        }
    and works by hand:
    Code:
    public enum MvSort
    {
    Ascending,
    Desending
    }
    EDIT: Or is it the highlighting for the C?
     
    Last edited:

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,369
    Kyiv
    Home Country
    Ukraine Ukraine
    Test for diferences:
    C#:
        /// <summary>
        /// Catch GUI to full screen toggle, set property #mvCentral.isPlaying to enable pop-up
        /// </summary>
        void GUIGraphicsContext_OnVideoWindowChanged()
        {
          // make sure we are playing some video and the video source is us
          if (GUIGraphicsContext.IsPlayingVideo && (GUIPropertyManager.GetProperty("#mvCentral.isPlaying") == "true"))
          {
            if (GUIWindowManager.IsSwitchingToNewWindow)
            {
              if (GUIGraphicsContext.IsFullScreenVideo)
              {
                if (GUIPropertyManager.GetProperty("#mvCentral.Play.Started") == "false")
                {
                  clearPropertyTimer.Enabled = true;
                  logger.Debug("Set #mvCentral.Play.Started = true");
                  GUIPropertyManager.SetProperty("#mvCentral.Play.Started", "true");
                }
              }
            }
          }
        }
    C++:
        /// <summary>
        /// Catch GUI to full screen toggle, set property #mvCentral.isPlaying to enable pop-up
        /// </summary>
        void GUIGraphicsContext_OnVideoWindowChanged()
        {
          // make sure we are playing some video and the video source is us
          if (GUIGraphicsContext.IsPlayingVideo && (GUIPropertyManager.GetProperty("#mvCentral.isPlaying") == "true"))
          {
            if (GUIWindowManager.IsSwitchingToNewWindow)
            {
              if (GUIGraphicsContext.IsFullScreenVideo)
              {
                if (GUIPropertyManager.GetProperty("#mvCentral.Play.Started") == "false")
                {
                  clearPropertyTimer.Enabled = true;
                  logger.Debug("Set #mvCentral.Play.Started = true");
                  GUIPropertyManager.SetProperty("#mvCentral.Play.Started", "true");
                }
              }
            }
          }
        }
    Code:
        /// <summary>
        /// Catch GUI to full screen toggle, set property #mvCentral.isPlaying to enable pop-up
        /// </summary>
        void GUIGraphicsContext_OnVideoWindowChanged()
        {
          // make sure we are playing some video and the video source is us
          if (GUIGraphicsContext.IsPlayingVideo && (GUIPropertyManager.GetProperty("#mvCentral.isPlaying") == "true"))
          {
            if (GUIWindowManager.IsSwitchingToNewWindow)
            {
              if (GUIGraphicsContext.IsFullScreenVideo)
              {
                if (GUIPropertyManager.GetProperty("#mvCentral.Play.Started") == "false")
                {
                  clearPropertyTimer.Enabled = true;
                  logger.Debug("Set #mvCentral.Play.Started = true");
                  GUIPropertyManager.SetProperty("#mvCentral.Play.Started", "true");
                }
              }
            }
          }
        }
     

    Users who are viewing this thread

    Top Bottom