Exemplo n.º 1
0
 private void BtnPopOk_Click(object sender, EventArgs e)
 {
     if (txtCampaignName.Text.Length == 0)
     {
         View view = (View)sender;
         Snackbar.Make(view, "Must Enter a name", Snackbar.LengthLong)
         .SetAction("Action", (Android.Views.View.IOnClickListener)null).Show();
     }
     else
     {
         View view = (View)sender;
         if (cc.AddCampaign(txtCampaignName.Text))
         {
             adapter.Add(txtCampaignName.Text.ToString());
             adapter.NotifyDataSetChanged();
             popupDialog.Dismiss();
             popupDialog.Hide();
         }
         else
         {
             Snackbar.Make(view, "Campaign Already Exists", Snackbar.LengthShort)
             .SetAction("Action", (Android.Views.View.IOnClickListener)null).Show();
         }
     }
 }