Пример #1
0
        public MainPage()
        {
            bool Option;

            try
            {
                GoPGP pgp = new GoPGP();
                Option = pgp.ValidationKey();
            }
            catch
            {
                Option = false;
            }

            masterPage = new MasterPage();
            Master     = masterPage;
            Detail     = Option ? new NavigationPage(new HelloPage(false)) : new NavigationPage(new StartPage());

            masterPage.ListView.ItemSelected += OnItemSelected;

            if (Device.RuntimePlatform == Device.UWP)
            {
                MasterBehavior = MasterBehavior.Popover;
            }
        }
Пример #2
0
        async void SetKeys(object sender, EventArgs e)
        {
            GoPGP PGP = new GoPGP(EntryEmail.Text, EntryPass.Text, PublicTextEditor.Text, PrivateTextEditor.Text);

            if (PGP.ValidationKey())
            {
                await Navigation.PushAsync(new HelloPage(true));
            }
            else
            {
                await DisplayAlert("Уведомление", "Ошибка ключей!", "ОK");
            }
        }