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. Not a horror, but still ugly

Not a horror, but still ugly

Scheduled Pinned Locked Moved The Weird and The Wonderful
questionhelp
4 Posts 4 Posters 0 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.
  • C Offline
    C Offline
    codemunkeh
    wrote on last edited by
    #1

    Just wrote this 5 minutes ago... Got a panel that displays a bunch of thumbnails of images. You can highlight these by mousing over them. In the MouseMove event for the panel, I had this... queueHighlight determinines which slide is currently highlighted. queueOffset determines the start position of what is visible. slideHovered is calculated from MouseEventArgs.X based on the thumbnail width.

    if ((slideHovered + queueOffset) != queueHighlight)
    {
    if (queueHighlight != (slideHovered + queueOffset))
    {
    queueHighlight = (ushort)(slideHovered + queueOffset);
    forceRender(HymnMgrTarget.QueueList); // Redraw the panel
    }
    else
    {
    queueHighlight = (ushort)(slideHovered + queueOffset);
    }
    }

    I added the outer block when I first wrote the method. When tweaking it just then, I managed to add the inner if block, and only when I ran it and noticed that nothing had changed, did I realise my error. this.Edit(reason:="oops");


    Ninja (the Nerd)
    Confused? You will be...

    D M 2 Replies Last reply
    0
    • C codemunkeh

      Just wrote this 5 minutes ago... Got a panel that displays a bunch of thumbnails of images. You can highlight these by mousing over them. In the MouseMove event for the panel, I had this... queueHighlight determinines which slide is currently highlighted. queueOffset determines the start position of what is visible. slideHovered is calculated from MouseEventArgs.X based on the thumbnail width.

      if ((slideHovered + queueOffset) != queueHighlight)
      {
      if (queueHighlight != (slideHovered + queueOffset))
      {
      queueHighlight = (ushort)(slideHovered + queueOffset);
      forceRender(HymnMgrTarget.QueueList); // Redraw the panel
      }
      else
      {
      queueHighlight = (ushort)(slideHovered + queueOffset);
      }
      }

      I added the outer block when I first wrote the method. When tweaking it just then, I managed to add the inner if block, and only when I ran it and noticed that nothing had changed, did I realise my error. this.Edit(reason:="oops");


      Ninja (the Nerd)
      Confused? You will be...

      D Offline
      D Offline
      dasli
      wrote on last edited by
      #2

      wow... Its scared...

      1 Reply Last reply
      0
      • C codemunkeh

        Just wrote this 5 minutes ago... Got a panel that displays a bunch of thumbnails of images. You can highlight these by mousing over them. In the MouseMove event for the panel, I had this... queueHighlight determinines which slide is currently highlighted. queueOffset determines the start position of what is visible. slideHovered is calculated from MouseEventArgs.X based on the thumbnail width.

        if ((slideHovered + queueOffset) != queueHighlight)
        {
        if (queueHighlight != (slideHovered + queueOffset))
        {
        queueHighlight = (ushort)(slideHovered + queueOffset);
        forceRender(HymnMgrTarget.QueueList); // Redraw the panel
        }
        else
        {
        queueHighlight = (ushort)(slideHovered + queueOffset);
        }
        }

        I added the outer block when I first wrote the method. When tweaking it just then, I managed to add the inner if block, and only when I ran it and noticed that nothing had changed, did I realise my error. this.Edit(reason:="oops");


        Ninja (the Nerd)
        Confused? You will be...

        M Offline
        M Offline
        Michael Bookatz
        wrote on last edited by
        #3

        At least you spotted and admitted it!

        Weight loss Target Weight at start [1/Feb/2009] 127kg Weight now [31/Jul/2009] 107.7kg Target weight : 80kg Only 28 TO go hope to be there by March Wish me luck!

        S 1 Reply Last reply
        0
        • M Michael Bookatz

          At least you spotted and admitted it!

          Weight loss Target Weight at start [1/Feb/2009] 127kg Weight now [31/Jul/2009] 107.7kg Target weight : 80kg Only 28 TO go hope to be there by March Wish me luck!

          S Offline
          S Offline
          Stryder_1
          wrote on last edited by
          #4

          My thoughts exactly. If there were more developers with your kind of humility it would make the rest of our jobs much easier. Thanks

          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