Ejemplo n.º 1
0
        public void FrequencyBoxUpdate(ref Int64 Storage, TextBox Box)
        {
            String Result = Utility.RemoveSeparator(Box.Text);

            Result = Result.Replace(",", ".");

            if (Result.Length > 0)
            {
                Storage = Convert.ToInt64(Result, new CultureInfo("en-US"));

                if (Storage > DeviceInterface.MaxFrequency || Storage < DeviceInterface.MinFrequency || nFrequencyDetectionEnd <= nFrequencyDetectionStart)
                {
                    Box.ForeColor = Color.Red;
                }
                else
                {
                    Box.ForeColor = Color.Black;

                    if (nFrequencyDetectionEnd > nFrequencyDetectionStart)
                    {
                        SpectrumPictureBox.GraphicUpdateScaleRefresh(nFrequencyDetectionStart, nFrequencyDetectionEnd);
                    }
                }
            }
        }