Exemplo n.º 1
0
        public bool IsInputValid()
        {
            if (!String.IsNullOrEmpty(txtKey.Text))
            {
                var lines = txtKey.Text.Split('\r', '\n');

                foreach (var item in lines)
                {
                    if (item.Length != 0)
                    {
                        if (!Polibian.IsStringValid(item))
                        {
                            MessageBox.Show("Допустимы буквы русского алфавита и символы .,!?;\"-'");
                            return(false);
                        }
                    }
                }
                return(true);
            }
            else
            {
                MessageBox.Show("Введите ключ");
                return(false);
            }
        }
Exemplo n.º 2
0
        private void LoadLink_Click(object sender, RoutedEventArgs e)
        {
            string key = GetFileText();

            if (Polibian.IsStringValid(key))
            {
                txtKey.Text = key;
            }
            else
            {
                MessageBox.Show("Ключ поврежден");
            }
        }