Esempio n. 1
0
 private void ChangeColourButton_Click(object sender, EventArgs e)
 {
     ColourDialog.Color = ColourPanel.BackColor;
     if (ColourDialog.ShowDialog() == DialogResult.OK)
     {
         ColourPanel.BackColor = ColourDialog.Color;
     }
 }
Esempio n. 2
0
 private void TrailColourButton_Click(object sender, EventArgs e)
 {
     // Opens the Windows Colour Dialog form, and gets the user to select a colour.
     // If "DialogResult.OK" is returned, then a colour was selected, and the TrailColour is therefore updated with the new value.
     if (ColourDialog.ShowDialog() == DialogResult.OK)
     {
         TrailColour.BackColor = ColourDialog.Color;
         testButton.Select();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// This sets the form up for drawing borders
 /// </summary>
 private void BorderDrawingBtn_CheckedChanged(object sender, EventArgs e)
 {
     _clickAndDrag.IsEditing = BorderDrawingBtn.Checked;
     if (BorderDrawingBtn.Checked)
     {
         InterestingInfoBtn.Checked = false;
         CreateFormInstance(false);
         var result = ColourDialog.ShowDialog();
         if (result == DialogResult.OK)
         {
             PolygonCreator.Drawing                    = true;
             LocalBorderStorageClass.Colour            = ColourDialog.Color;
             LocalBorderStorageClass.AllPointsofBorder = new List <Point>();
             IndexList.Visible                = true;
             DeleteIndexBtn.Visible           = true;
             viewForm.LocalDrawClass.MoveForm = false;
             ViewCompleteBtn.Visible          = true;
         }
         else
         {
             BorderDrawingBtn.Checked = false;
         }
     }
     else if (!InterestingInfoBtn.Checked)
     {
         DeleteIndexBtn.Visible   = false;
         CompleteBtn.Visible      = false;
         ViewCompleteBtn.Visible  = false;
         IndexList.Visible        = false;
         BorderDrawingBtn.Checked = false;
         CreateFormInstance(true);
         PolygonCreator.Drawing           = false;
         viewForm.WorldMap.Click         -= BorderDrawingClickDelegate;
         viewForm.LocalDrawClass.MoveForm = false;
     }
     viewForm.LocalDrawClass.RenderMap();
 }