private void PreviousButton_Click(object sender, RoutedEventArgs e)
 {
     if (Gif1.Source == new Uri("Resources/gif_neurons.mp4", UriKind.Relative))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Hidden;
         Gif1.Source = new Uri("Resources/gif_brain_reward_pathways.mp4", UriKind.Relative);
         Gif1.Play();
         videoLabel.Content = "Reward Pathways";
         dopamineText.Text  = "In a healthy person, the brain's reward system reinforces healthy behaviors, such as eating. The reward system ensures that you eat, because it knows that after eating, you will feel good.";
     }
     else if (Gif1.Source == new Uri("Resources/gif_dopamine_receptors.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_neurons.mp4", UriKind.Relative);
         Gif1.Play();
         videoLabel.Content = "Neurotransmitters";
         dopamineText.Text  = "A brain consists of billions of neurons, which communicate via neurotransmitters. After stimulation, an electrical impulse, called an action potential, is generated and travels down the axon to the nerve terminal.";
     }
     else if (Gif1.Source == new Uri("Resources/gif_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_dopamine_receptors.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoLabel.Content = "Dopamine Receptors";
         dopamineText.Text  = "The action impulse triggers the release of neurotransmitters in the synaptic clift, a space between neurons. The neurotransmitters then bind to receptors of a neighboring neuron, generating a signal in it, thereby transmitting the information to that neuron.";
     }
     else if (Gif1.Source == new Uri("Resources/gif_drug_stimulation.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoLabel.Content = "Dopamine Transporters";
         dopamineText.Text  = "After the dopamine binds to the receptors, pleasurable feelings or rewarding effects are produced. A special protein, called a dopamine transporter, then removes the dopamine from the synaptic clift and transports them back to the transmitting neuron.";
     }
     else if (Gif1.Source == new Uri("Resources/gif_blocked_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_drug_stimulation.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoLabel.Content = "Action Potential";
         dopamineText.Text  = "The major reward pathways involve transmission of dopamine from the ventral tegmental area (VTA) of the midbrain to the limbic system in the frontal cortex. Some drugs, such as alcohol, heroine, and nicotine, indirectly excite dopamine-producing neurons in the VTA so that more action potentials are generated.";
     }
     else if (Gif1.Source == new Uri("Resources/gif_continuous_dopamine_stimulation.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_blocked_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoLabel.Content = "Drug Binding";
         dopamineText.Text  = "Drugs, such as meth, bind to the dopamine transporter and block the reuptake of dopamine. In addition, they can enter the neruron into the dopamine-containing vesticles, where they trigger dopamine release, even in the absence of action potentials.";
     }
     else if (Gif1.Source == new Uri("Resources/gif_tolerance.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_continuous_dopamine_stimulation.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoLabel.Content = "Overstimulation";
         dopamineText.Text  = "Different drugs act in different ways, but the common outcome is that dopamine builds up in the synapse to a much greater amount than normal. This results in overstimulation in receiving neurons and is responsible for prolonged and intense euphoria experienced by drug users. ";
     }
     else if (Gif1.Source == new Uri("Resources/gif_increased_tolerance.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri("Resources/gif_tolerance.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoLabel.Content = "Tolerance";
         dopamineText.Text  = "Drugs will desensitize the reward system. The system is no longer responsive to everyday stimuli. The only thing that is rewarding is the drug.";
     }
 }
 //This method takes the user to the next gif when the 'Next' button is clicked.
 //The description text, label, and combo box list item for that gif are loaded
 //as well.
 private void NextButton_Click(object sender, RoutedEventArgs e)
 {
     if (Gif1.Source == new Uri(@".\Resources\gif_brain_reward_pathways.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_neurons.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 1;
         videoLabel.Content      = "2/9 Neurotransmitters";
         dopamineText.Text       = "A brain consists of billions of neurons, which communicate via neurotransmitters. After stimulation, an electrical impulse, called an action potential, is generated and travels down the axon to the nerve terminal.";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_neurons.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_dopamine_receptors.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 2;
         videoLabel.Content      = "3/9 Dopamine Receptors";
         dopamineText.Text       = "The action impulse triggers the release of neurotransmitters in the synaptic clift, a space between neurons. The neurotransmitters then bind to receptors of a neighboring neuron, generating a signal in it, thereby sending the information to that neuron.";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_dopamine_receptors.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 3;
         videoLabel.Content      = "4/9 Dopamine Transporters";
         dopamineText.Text       = "After the dopamine binds to the receptors, pleasurable feelings or rewarding effects are produced. A special protein, called a dopamine transporter, then removes the dopamine from the synaptic cleft and transports them back to the sending neuron.";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_drug_stimulation.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 4;
         videoLabel.Content      = "5/9 Action Potential";
         dopamineText.Text       = "The major reward pathways involve transmission of dopamine from the ventral tegmental area (VTA) of the midbrain to the limbic system in the frontal cortex. Some substances, such as alcohol, heroin, and nicotine, indirectly excite dopamine-producing neurons in the VTA so that more action potentials are generated.";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_drug_stimulation.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_blocked_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 5;
         videoLabel.Content      = "6/9 Substance Binding";
         dopamineText.Text       = "Substances, such as meth, bind to the dopamine transporter and block the reuptake of dopamine. In addition, they can enter the neruron into the dopamine-containing vesticles, where they trigger dopamine release, even in the absence of action potentials.";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_blocked_dopamine_transporters.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_continuous_dopamine_stimulation.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 6;
         videoLabel.Content      = "7/9 Overstimulation";
         dopamineText.Text       = "Different substances act in different ways, but the common outcome is that dopamine builds up in the synapse to a much greater amount than normal. This results in overstimulation in receiving neurons and is responsible for prolonged and intense euphoria experienced by substance users. ";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_continuous_dopamine_stimulation.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Visible;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_tolerance.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 7;
         videoLabel.Content      = "8/9 Tolerance";
         dopamineText.Text       = "Substances will desensitize the reward system. The system is no longer responsive to everyday stimuli. The only thing that is rewarding is the substances.";
     }
     else if (Gif1.Source == new Uri(@".\Resources\gif_tolerance.mp4", UriKind.RelativeOrAbsolute))
     {
         Gif1.Stop();
         nextButton.Visibility     = Visibility.Hidden;
         previousButton.Visibility = Visibility.Visible;
         Gif1.Source = new Uri(@".\Resources\gif_increased_tolerance.mp4", UriKind.RelativeOrAbsolute);
         Gif1.Play();
         videoList.SelectedIndex = 8;
         videoLabel.Content      = "9/9 Increased Tolerance";
         dopamineText.Text       = "Eventually, even the substance loses its ability to reward and higher doses are required to achieve the rewarding effect. This may lead to drug overdose.";
     }
 }