Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Short, Simple and Utterly Pointless

Short, Simple and Utterly Pointless

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpruby
6 Posts 5 Posters 15 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rob Grainger
    wrote on last edited by
    #1

    Discovered this gem in our code base (C#, but I guess that won't make much difference)...

    if (transparent)
        pdfDoc.HtmlOptions.HideBackground = true;
    pdfDoc.HtmlOptions.HideBackground = true;
    

    :wtf: Rob

    CPalliniC N M 3 Replies Last reply
    0
    • R Rob Grainger

      Discovered this gem in our code base (C#, but I guess that won't make much difference)...

      if (transparent)
          pdfDoc.HtmlOptions.HideBackground = true;
      pdfDoc.HtmlOptions.HideBackground = true;
      

      :wtf: Rob

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Well, if opaque then it's true, on the other hand, if transparent then it's so true. :-D

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • R Rob Grainger

        Discovered this gem in our code base (C#, but I guess that won't make much difference)...

        if (transparent)
            pdfDoc.HtmlOptions.HideBackground = true;
        pdfDoc.HtmlOptions.HideBackground = true;
        

        :wtf: Rob

        N Offline
        N Offline
        Nagy Vilmos
        wrote on last edited by
        #3

        I remember having to do something like that; repainting a dynamic form I think. It was easier to do the repaint twice based on a simple condition then to code a nasty, recursive, snaking, 683 if level method. But I put a comment in to explain why.


        Panic, Chaos, Destruction. My work here is done.

        R 1 Reply Last reply
        0
        • N Nagy Vilmos

          I remember having to do something like that; repainting a dynamic form I think. It was easier to do the repaint twice based on a simple condition then to code a nasty, recursive, snaking, 683 if level method. But I put a comment in to explain why.


          Panic, Chaos, Destruction. My work here is done.

          R Offline
          R Offline
          Rob Grainger
          wrote on last edited by
          #4

          No, nothing like that. Fortunately, we have a great Refactoring policy here that allowed me to simply fix the code. All is working fine, so I guess it was... well actually I've no idea. ;)

          1 Reply Last reply
          0
          • R Rob Grainger

            Discovered this gem in our code base (C#, but I guess that won't make much difference)...

            if (transparent)
                pdfDoc.HtmlOptions.HideBackground = true;
            pdfDoc.HtmlOptions.HideBackground = true;
            

            :wtf: Rob

            M Offline
            M Offline
            MarkB777
            wrote on last edited by
            #5

            re-wording a famous Shakespare quote: To hide, or not to hide... :D

            Mark Brock Click here to view my blog

            N 1 Reply Last reply
            0
            • M MarkB777

              re-wording a famous Shakespare quote: To hide, or not to hide... :D

              Mark Brock Click here to view my blog

              N Offline
              N Offline
              Nelek
              wrote on last edited by
              #6

              :laugh: :laugh: :laugh:

              Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups