Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            //Services starten
            ThreadPool.QueueUserWorkItem(o => StartService(new Intent(this, typeof(OnOffService))));
            ThreadPool.QueueUserWorkItem(o => StartService(new Intent(this, typeof(ManagementServiceLocal))));

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            mBtnSignUp = FindViewById<Button>(Resource.Id.btnSignUp);
            mBtnSignIn = FindViewById<Button>(Resource.Id.btnSignIn);
            mBtnMap = FindViewById<Button>(Resource.Id.btnMap);
            //progressBar = FindViewById<ProgressBar>(Resource.Id.progressBar1);
            connectivityPointer = FindViewById<ImageView>(Resource.Id.ivConnection);
            //ConnectivityPointer belegen
            setConnectivityStatus(OnOffService.Online);

            mBtnSignUp.Click += (object sender, EventArgs args) =>
                {
                    //Pull up SignUp-dialog
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    Dialog_SignUp signUpDialog = new Dialog_SignUp();
                    signUpDialog.Show(transaction, "dialog fragment");

                    signUpDialog.onSignUpComplete += SignUpDialog_onSignUpComplete;
                };
            mBtnSignIn.Click += (object sender, EventArgs args) =>
            {
                //Pull up SignIn-dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                Dialog_SignIn signInDialog = new Dialog_SignIn();
                signInDialog.Show(transaction, "dialog fragment");

                signInDialog.onSignInComplete += SignInDialog_onSignInComplete;
            };
            mBtnMap.Click += (object sender, EventArgs args) =>
            {
                var intent = new Intent(this, typeof(MapActivity));
                StartActivity(intent);
            };
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            //Services starten
            ThreadPool.QueueUserWorkItem(o => StartService(new Intent(this, typeof(OnOffService))));
            ThreadPool.QueueUserWorkItem(o => StartService(new Intent(this, typeof(ManagementServiceLocal))));

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            mBtnSignUp = FindViewById <Button>(Resource.Id.btnSignUp);
            mBtnSignIn = FindViewById <Button>(Resource.Id.btnSignIn);
            mBtnMap    = FindViewById <Button>(Resource.Id.btnMap);
            //progressBar = FindViewById<ProgressBar>(Resource.Id.progressBar1);
            connectivityPointer = FindViewById <ImageView>(Resource.Id.ivConnection);
            //ConnectivityPointer belegen
            setConnectivityStatus(OnOffService.Online);

            mBtnSignUp.Click += (object sender, EventArgs args) =>
            {
                //Pull up SignUp-dialog
                FragmentTransaction transaction  = FragmentManager.BeginTransaction();
                Dialog_SignUp       signUpDialog = new Dialog_SignUp();
                signUpDialog.Show(transaction, "dialog fragment");

                signUpDialog.onSignUpComplete += SignUpDialog_onSignUpComplete;
            };
            mBtnSignIn.Click += (object sender, EventArgs args) =>
            {
                //Pull up SignIn-dialog
                FragmentTransaction transaction  = FragmentManager.BeginTransaction();
                Dialog_SignIn       signInDialog = new Dialog_SignIn();
                signInDialog.Show(transaction, "dialog fragment");

                signInDialog.onSignInComplete += SignInDialog_onSignInComplete;
            };
            mBtnMap.Click += (object sender, EventArgs args) =>
            {
                var intent = new Intent(this, typeof(MapActivity));
                StartActivity(intent);
            };
        }