コード例 #1
0
        private void Chng(object sender, EventArgs e)
        {
            if (IsEnc.IsToggled)
            {
                XenoCode a = new XenoCode();

                string[] words = Textlb.Text.Split(new char[] { ' ' });
                string   h     = words[1];
                for (int o = 3; o < h.Length; o = o + 4)
                {
                    h = h.Insert(o, " ");
                }
                string bufs = words[0] + " " + h;
                /////////////////////////
                string bufAdr = SupportClass.NumberCorrect(Adresslb.Text);
                try
                {
                    Textlb.Text = a.decryption(bufs + " &", PNumber, bufAdr);
                }
                catch
                {
                    IsEnc.IsToggled = false;
                }
            }
            else
            {
                Textlb.Text = textSms;
            }
        }
コード例 #2
0
 private async void ToMenu(object sender, EventArgs e)
 {
     if (PNumber.Text.Length > 0)
     {
         if (SupportClass.NumberCorrect(PNumber.Text).Length == 11)
         {
             await Navigation.PushAsync(new NewMenuPage(SupportClass.NumberCorrect(PNumber.Text)));
         }
         else
         {
             DisplayAlert("Ошибка", "Не корректный номер телефона", "ОK");
         }
     }
 }
コード例 #3
0
        private void SendClik(object sender, EventArgs e)
        {
            if (checkNullString())
            {
                try
                {
                    string bufNumber = SupportClass.NumberCorrect(AdressEmail.Text);
                    if (IsEnc.IsToggled)
                    {
                        string bufs = "";

                        XenoCode a = new XenoCode();

                        bufs = a.RSA_encryption(BodyEmail.Text, PNumber, bufNumber);

                        ////////////////////////////////////////
                        string[] words  = bufs.Split(new char[] { ' ' });
                        string   header = words[0] + " ";
                        bufs = bufs.Replace(words[0], " ");
                        bufs = bufs.Replace(" ", "");
                        bufs = header + bufs;
                        DependencyService.Get <Interface>().Send(bufNumber, bufs);
                    }
                    else
                    {
                        DependencyService.Get <Interface>().Send(bufNumber, BodyEmail.Text);
                    }

                    BodyEmail.Text = AdressEmail.Text = "";
                }
                catch
                {
                    DisplayAlert("Ошибка", "Не отправлено!", "ОK");
                }
            }
        }
コード例 #4
0
 private async void SmsGet(object sender, EventArgs e)
 {
     await Navigation.PushAsync(new ListSmsContacsOrNumbers(SupportClass.NumberCorrect(PNumber.Text)));
 }
コード例 #5
0
 private async void SmsSend(object sender, EventArgs e)
 {
     await Navigation.PushAsync(new SendSms(SupportClass.NumberCorrect(PNumber.Text)));
 }