Beispiel #1
0
        /*bool isNetworkConnected { get {
                ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
                NetworkInfo ni = cm.getActiveNetworkInfo();
                if (ni == null) {
                    // There are no active networks.
                    return false;
                } else
                    return true;
            }
        }*/
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView (Resource.Layout.Main);

            string pwd = "y_98diH[am";
            session = new TamLogin()
            {
                username = "******",
                password = pwd,
                school = "kho",
                _class = "32"
            };
            //session = new TamLogin ();
            _HandleTimeTable ();
        }
Beispiel #2
0
        /*bool isNetworkConnected { get {
                ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
                NetworkInfo ni = cm.getActiveNetworkInfo();
                if (ni == null) {
                    // There are no active networks.
                    return false;
                } else
                    return true;
            }
        }*/
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.Login);
            return;
            web_view = FindViewById<WebView> (Resource.Id.webView1);
            web_view.Settings.JavaScriptEnabled = true;
            web_view.SetWebViewClient (new CustomWebViewClient());

            progB = FindViewById<ProgressBar> (Resource.Id.progressBar1);
            currentWeek = TAM_API.Util.GetCurrentWeekNumber ();
            textBox = FindViewById<TextView> (Resource.Id.textView1);

            Button btn_next = FindViewById<Button> (Resource.Id.button_next);
            Button btn_prev = FindViewById<Button> (Resource.Id.button_prev);
            btn_prev.Click += delegate(object sender, EventArgs e) {
                currentWeek--;
                LoadCache();
                LoadPage ();
            };
            btn_next.Click += delegate(object sender, EventArgs e) {
                currentWeek++;
                LoadCache();
                LoadPage ();
            };

            string pwd = "y_98diH[am";
            session = new TamLogin()
            {
                username = "******",
                password = pwd,
                school = "kho",
                _class = "32"
            };
            LoadCache ();
            Login ();
        }