Example #1
0
        private async void DeliveryDemandMatchPanel_Paint(object sender, PaintEventArgs e)
        {
            var donor = await client.GetUserInfo(matchedDeliveryDemand.PickupUsername);

            var ngo = await client.GetNgoInfo(matchedDeliveryDemand.DestinationUsername);

            donorLocation = donor.Location;
            ngoLocation   = ngo.Location;

            var etaMinutes = Math.Ceiling(ETA / 60);
            var etaString  = etaMinutes.ToString();

            DeliveryDemandMatchPanel_CampaignNameLabel.Text = matchedDeliveryDemand.CampaignName;
            DeliveryDemandMatchPanel_ETAValue.Text          = etaString + " minutes";
            DeliveryDemandMatchPanel_InstructionsValue.Text = matchedDeliveryDemand.OtherInfo;
        }
Example #2
0
        private async void InfoPanel_Username_Click(object sender, EventArgs e)
        {
            var username = InfoPanel_Username.Text.ToString();
            var userInfo = await client.GetUserInfo(username);

            UserInfoPanel_Username.Text    = userInfo.Username;
            UserInfoPanel_FirstName.Text   = userInfo.FirstName;
            UserInfoPanel_LastName.Text    = userInfo.LastName;
            UserInfoPanel_PhoneNumber.Text = userInfo.PhoneNumber;
            UserInfoPanel_Email.Text       = userInfo.Email;
            Navigate(UserInfoPanel);
        }