Esempio n. 1
0
 /// <summary>Обновить карту</summary>
 private void updateMap()
 {
     if (MapInfo.IsSelected)
     {
         mapLabel.Text = MapInfo.Description;
         mapLabel.SetControlsStyle(ControlsStyle.LabelNormal);
         registerBtn.Enabled = true;
         positionBtn.Enabled = true;
     }
 }
Esempio n. 2
0
        /// <summary></summary>
        private void hideTextBox()
        {
            if (registerTextBox != null)
            {
                registerLabel.Show();

                if (string.IsNullOrEmpty(registerTextBox.Text))
                {
                    clearRegister();
                }
                else
                {
                    int registerValue;

                    try
                    {
                        registerValue = int.Parse(registerTextBox.Text);
                    }
                    catch (FormatException)
                    {
                        registerTextBox.Text = string.Empty;
                        registerValue        = 0;
                    }

                    if (registerValue >= MapInfo.Range.X && registerValue <= MapInfo.Range.Y)
                    {
                        registerLabel.Text = registerTextBox.Text;
                        registerLabel.SetControlsStyle(ControlsStyle.LabelNormal);
                    }
                    else
                    {
                        ShowMessage(string.Format("Допустимый диапазон значений:\r\n{0}-{1}",
                                                  MapInfo.Range.X,
                                                  MapInfo.Range.Y));
                    }
                }

                MainProcess.RemoveControl((Control)registerTextBox.GetControl());
                registerTextBox = null;
            }
        }
Esempio n. 3
0
 /// <summary>Очистить позицию</summary>
 private void clearPosition()
 {
     positionLabel.Text = NOT_CHOOSEN;
     positionLabel.SetControlsStyle(ControlsStyle.LabelH2Red);
 }