Record last mouse click for use in a statment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beep
    New Member
    • Mar 2014
    • 1

    Record last mouse click for use in a statment

    I am trying to find out how to record last mouse event so that i can use it in a statement for example.
    Code:
    private void blueballoon_click(object sender, MouseButtonEventArgs e)
            {
                if (last_click == "green" "brown" "red")
                {
                    PopBalloonCount--;
                }
                else
                {
                    PopBalloonCount++;
                }
                score.Content = "Your Score" + " " + Convert.ToString(PopBalloonCount);
            }   
    
            private void greenballoon_click(object sender, MouseButtonEventArgs e)
            {
                if (last_click == "blue") 
                 { 
                     PopBalloonCount++;
                 }
                else 
                 { 
                     PopBalloonCount--;
                 }
                score.Content = "Your Score" + " " + Convert.ToString(PopBalloonCount);
            }
    Is there a simple way of doing this and if so how?
Working...