예제 #1
0
        /* protected override void OnCreate(Bundle savedInstanceState)
         * {
         *   base.OnCreate(savedInstanceState);
         *
         *   SetContentView(Resource.Layout.layout1);
         *   SysLogVIewer = FindViewById<TextView>(Resource.Id.SysLog);
         *   //TesteWIndow = FindViewById<EditText>(Resource.Id.editText1);
         *   NewButton = FindViewById<Button>(Resource.Id.TesteButton);
         *
         *   NewButton.Click += NewButton_Click;
         *   //TesteWIndow.Text = "Teste Botão1";
         * }
         */
        private void NewButton_Click(object sender, EventArgs e)
        {
            SysLogVIewer.Text = "Teste base de dados.";
            OnibusClass obj = new OnibusClass();

            if (ConectionTest())
            {
                SysLogVIewer.Text = obj.UpdateOnibus("111", "aaa-3333", 111, 123, 444).ToString();
            }
        }
예제 #2
0
        void UpdateOnStatusChange()
        {
            string      cRet = "";
            double      PosiX, PosiY;
            OnibusClass ObjOnibus = new OnibusClass();

            PosiX = GetPosX();
            PosiY = GetPosY();
            cRet  = ObjOnibus.UpdateOnibus(ListParam[0], ListParam[1], PosiX, PosiY);
            if (cRet != "")
            {
                Console.WriteLine(cRet);
            }
            //Console.WriteLine("Executou StatusChabge ----------------------------------");
        }
예제 #3
0
        void UpdatePositionFunc()
        {
            string cRet = "";

            string Hora = DateTime.Now.Hour.ToString();

            while (_ContinueTread)
            {
                if (_currentLocation != null)
                {
                    cRet = ObjOnibus.UpdateOnibus(ListParam[0], ListParam[1], GetPosX(), GetPosY());

                    Thread.Sleep(10000);// espera 10 segundos para executar de novo
                    if (cRet != "")
                    {
                        Console.WriteLine(cRet);
                    }
                    //Console.WriteLine("Executou ----------------------------------");
                }
            }
        }