Beispiel #1
0
 void BtnJavaClick()
 {
     try
     {
         JAVAdb db = new JAVAdb();
         db.CreateDatabase();
         int dbCount = db.selectTablePerson().Count;
         int i       = 0;
         foreach (Contact c in db.selectTablePerson())
         {
             SmsManager.Default.SendTextMessage(c.Number, null, txtmsg.Text, null, null);
         }
     }
     catch (Exception ex)
     {
         Android.Util.Log.Info(ex.GetType().ToString(), ex.Message);
     }
 }
Beispiel #2
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     // Set our view from the "main" layout resource
     SetContentView(Resource.Layout.Main);
     java.CreateDatabase();
     os.CreateDatabase();
     erp.CreateDatabase();
     compiler.CreateDatabase();
     num.CreateDatabase();
     se.CreateDatabase();
     btnJAVA = FindViewById <Button>(Resource.Id.btnJAVA);
     try
     {
         btnJAVA.Text = "JAVA (" + java.selectTablePerson().Count + ")";
     }
     catch (NullReferenceException)
     {
         btnJAVA.Text = "JAVA (0)";
     }
     btnOS = FindViewById <Button>(Resource.Id.btnOS);
     try
     {
         btnOS.Text = "OS (" + os.selectTablePerson().Count + ")";
     }
     catch (NullReferenceException)
     {
         btnOS.Text = "OS (0)";
     }
     btnERP = FindViewById <Button>(Resource.Id.btnERP);
     try
     {
         btnERP.Text = "ERP (" + erp.selectTablePerson().Count + ")";
     }
     catch (NullReferenceException)
     {
         btnERP.Text = "ERP (0)";
     }
     btnComp = FindViewById <Button>(Resource.Id.btnComp);
     try
     {
         btnComp.Text = "Compiler (" + compiler.selectTablePerson().Count + ")";
     }
     catch (NullReferenceException)
     {
         btnComp.Text = "Compiler (0)";
     }
     btnNum = FindViewById <Button>(Resource.Id.btnNum);
     try
     {
         btnNum.Text = "Numerical (" + num.selectTable().Count + ")";
     }
     catch (NullReferenceException)
     {
         btnNum.Text = "Numerical (0)";
     }
     btnSE = FindViewById <Button>(Resource.Id.btnSE);
     try
     {
         btnSE.Text = "SE (" + se.selectTablePerson().Count + ")";
     }
     catch (NullReferenceException)
     {
         btnSE.Text = "SE (0)";
     }
     txtmsg              = FindViewById <EditText>(Resource.Id.messageBox);
     count               = FindViewById <TextView>(Resource.Id.wordCount);
     status              = FindViewById <TextView>(Resource.Id.txtStatus);
     btnSE.Click        += BtnSE_Click;
     btnNum.Click       += BtnNum_Click;
     btnComp.Click      += BtnComp_Click;
     btnERP.Click       += BtnERP_Click;
     btnOS.Click        += BtnOS_Click;
     btnJAVA.Click      += BtnJAVA_Click;
     txtmsg.TextChanged += Txtmsg_TextChanged;
 }