public OpponentAdvertDetailsPage(OpponentAdvertMenuViewModel model)
        {
            InitializeComponent();
            NavigationPage nav = App.Current.MainPage as NavigationPage;

            nav.BarBackgroundColor = Color.White;

            mainModel             = model;
            lblDate.Text          = model.AdvertDate;
            lblTime.Text          = model.MinMaxTimeStr;
            lblTeamName.Text      = model.Advert.Team.Name;
            lblUserName.Text      = model.OwnerName;
            lblVisitProfile.Text  = model.OwnerName + " kullanıcısının profilini gör";
            lblMessageToUser.Text = model.OwnerName + " kullanıcısına mesaj at";

            imgProfilePicture.Source = model.Advert.RandomLine5;
            if (model.Advert.District1 == "Tüm İlçeler")
            {
                lblCityAndTown.Text = "Tüm İlçeler";
            }
            else
            {
                lblCityAndTown.Text = model.Advert.District1 + "," + model.Advert.District2 + "," + model.Advert.District3;
            }
            if (model.Advert.RandomLine6 != null)
            {
                lblAdvertInfo.Text = model.Advert.RandomLine6;
            }
            else
            {
                lblAdvertInfo.Text = " -İlan bilgisi paylaşılmamış- ";
            }
            FillList();
        }
示例#2
0
 private async void LstOpponentAdverts_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (lstOpponentAdverts.SelectedItem != null)
     {
         OpponentAdvertMenuViewModel model = new OpponentAdvertMenuViewModel();
         model = lstOpponentAdverts.SelectedItem as OpponentAdvertMenuViewModel;
         await Navigation.PushAsync(new OpponentAdvertDetailsPage(model));
     }
 }
示例#3
0
        private async void FrameReqTapped_Tapped(object sender, EventArgs e)
        {
            Frame frm = (Frame)sender;
            MixedRequestsViewModel model = frm.BindingContext as MixedRequestsViewModel;

            if (model.Type == "Oyuncu İlanı")
            {
                string option;
                if (model.AdvertRequestPlayer.isApprovedSituation != "Denied")
                {
                    option = await DisplayActionSheet("Seçenekler", "Vazgeç", "Tamam", new string[] { "İlanı gör", "İsteği sil" });
                }
                else
                {
                    option = await DisplayActionSheet("Seçenekler", "Vazgeç", "Tamam", new string[] { "İlanı gör" });
                }
                if (option == "İlanı gör")
                {
                    await Navigation.PushAsync(new PlayerAdvertDetailsPage(model.PlayerAdvert));
                }
                else if (option == "İsteği sil")
                {
                    await Navigation.PushAsync(new DeleteAdvertRequestPage("Oyuncu İlanı", model.AdvertRequestPlayer, null));
                }
            }
            else
            {
                string option;
                if (model.AdvertRequestOpponent.isApprovedSituation != "Denied")
                {
                    option = await DisplayActionSheet("Seçenekler", "Vazgeç", "Tamam", new string[] { "İlanı gör", "İsteği sil" });
                }
                else
                {
                    option = await DisplayActionSheet("Seçenekler", "Vazgeç", "Tamam", new string[] { "İlanı gör" });
                }

                if (option == "İlanı gör")
                {
                    OpponentAdvertMenuViewModel _model = new OpponentAdvertMenuViewModel()
                    {
                        Advert = model.OpponentAdvert
                    };
                    await Navigation.PushAsync(new OpponentAdvertDetailsPage(_model));
                }

                else
                {
                    await Navigation.PushAsync(new DeleteAdvertRequestPage("Rakip İlanı", null, model.AdvertRequestOpponent));
                }
            }
        }
示例#4
0
 private async void TapSeeAdvert_Tapped(object sender, EventArgs e)
 {
     if (messagesPageViewModel.PlayerAdvert != null && messagesPageViewModel.OpponentAdvert == null)
     {
         if (messagesPageViewModel.PlayerAdvert.UserId == currentUser.Id)
         {
             messagesPageViewModel.PlayerAdvert.User = currentUser;
             await Navigation.PushAsync(new PlayerAdvertDetailsPage(messagesPageViewModel.PlayerAdvert));
         }
         else
         {
             messagesPageViewModel.PlayerAdvert.User = messagesPageViewModel.OtherUser;
             await Navigation.PushAsync(new PlayerAdvertDetailsPage(messagesPageViewModel.PlayerAdvert));
         }
     }
     else if (messagesPageViewModel.PlayerAdvert == null && messagesPageViewModel.OpponentAdvert != null)
     {
         OpponentAdvertMenuViewModel vm = new OpponentAdvertMenuViewModel()
         {
             Advert = messagesPageViewModel.OpponentAdvert
         };
         await Navigation.PushAsync(new OpponentAdvertDetailsPage(vm));
     }
 }