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

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine
    and please replace geshi/csharp.php with attached one
    Outstripped :)

    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");
                }
              }
            }
          }
        }

    Comments are merged with the rest of the text. It is necessary to change the color of the main text.
     
    Last edited by a moderator:

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    @high can you try to change the color in line 199 from
    5 => 'color: #000000;'
    to
    5 => 'color: #020202;'
    as it seems that some colors will be replaced when used in code blocks? particularly black 000000 will be changed to gray 808080 as i see....
     

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    line 199 is changed
    thank you. Though it doesn't work, as the main problem is that there are not matched words that get grayed out (e.g. word "Main" below):
    upload_2015-12-11_12-14-19.png


    Do you have any idea how to change default text color in code section? some geshi settings in CSS?
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine
    Do you have any idea how to change default text color in code section? some geshi settings in CSS?
    @high Change plz in geshi.php line 454 from:
    Code:
        var $code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"';
    to
    Code:
        var $code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top; color: #000000;"';
    :D
    I feel that it is necessary to learn php and C# :) and then I look and do not understand anything :) :coffee:
     
    Last edited:

    Users who are viewing this thread

    Top Bottom