示例#1
0
        private void handleSalut(string input)
        {
            if (string.IsNullOrEmpty(input))
            {
                lblInfo.Content = "Nu ati introdus numic! Va rog sa introduceti numele:";
                return;
            }
            Cuvant cuv = new Cuvant(txtDate.Text);

            lblResults.Content = cuv.generateHello();
        }
示例#2
0
        private void handlePalindrom(string input)
        {
            //citirea datelor
            //validare
            if (string.IsNullOrEmpty(input))
            {
                lblInfo.Content = "nu ati introdus numic! Va rog sa introduceti un cuvant";
                return;
            }

            //calcul
            Cuvant cuv = new Cuvant(txtDate.Text);
            bool   isP = cuv.IsPalindrom();

            //afisare
            if (isP)
            {
                lblResults.Content = "Este palindrom";
            }
            else
            {
                lblResults.Content = "Nu este palindrom";
            }
        }