Exemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Main);
            buttonLoginLogout = (Button)FindViewById(Resource.Id.buttonLoginLogout);
            getMeButton = FindViewById<Button>(Resource.Id.getmeButton);
            textInstructionsOrLink = (TextView)FindViewById(Resource.Id.instructionsOrLink);

            buttonLoginLogout.SetOnClickListener(this);
            getMeButton.SetOnClickListener(this);

            Settings.AddLoggingBehavior(LoggingBehavior.IncludeAccessTokens);

            Session session = Session.ActiveSession;
            if (session == null)
            {
                if (savedInstanceState != null)
                {
                    session = Session.RestoreSession(this, null, statusCallback, savedInstanceState);
                }
                if (session == null)
                {
                    session = new Session(this);
                }
                Session.ActiveSession = session;
                if (session.State.Equals(SessionState.CreatedTokenLoaded))
                {
                    session.OpenForRead(new Session.OpenRequest(this).SetCallback(statusCallback));
                }
            }
            statusCallback = new SessionStatusCallback(this);
            updateView();
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.Act2);

            buttonBack = FindViewById<Button> (Resource.Id.buttonBack);
            buttonBack.Click += HandleButtonBackClick;

            tv001 = FindViewById<TextView> (Resource.Id.tv001);
            tv002 = FindViewById<TextView> (Resource.Id.tv002);
            tv003 = FindViewById<TextView> (Resource.Id.tv003);
            tv004 = FindViewById<TextView> (Resource.Id.tv004);
            tv005 = FindViewById<TextView> (Resource.Id.tv005);
            tv006 = FindViewById<TextView> (Resource.Id.tv006);
            tv007 = FindViewById<TextView> (Resource.Id.tv007);
            tv008 = FindViewById<TextView> (Resource.Id.tv008);
            tv009 = FindViewById<TextView> (Resource.Id.tv009);

            tv010 = FindViewById<TextView> (Resource.Id.tv010);
            tv011 = FindViewById<TextView> (Resource.Id.tv011);
            tv012 = FindViewById<TextView> (Resource.Id.tv012);
            tv013 = FindViewById<TextView> (Resource.Id.tv013);
            tv014 = FindViewById<TextView> (Resource.Id.tv014);
            tv015 = FindViewById<TextView> (Resource.Id.tv015);
            tv016 = FindViewById<TextView> (Resource.Id.tv016);
            tv017 = FindViewById<TextView> (Resource.Id.tv017);
            tv018 = FindViewById<TextView> (Resource.Id.tv018);
            tv019 = FindViewById<TextView> (Resource.Id.tv019);

            tv020 = FindViewById<TextView> (Resource.Id.tv020);
            tv021 = FindViewById<TextView> (Resource.Id.tv021);
            tv022 = FindViewById<TextView> (Resource.Id.tv022);
            tv023 = FindViewById<TextView> (Resource.Id.tv023);
            tv024 = FindViewById<TextView> (Resource.Id.tv024);
            tv025 = FindViewById<TextView> (Resource.Id.tv025);
            tv026 = FindViewById<TextView> (Resource.Id.tv026);
            tv027 = FindViewById<TextView> (Resource.Id.tv027);
            tv028 = FindViewById<TextView> (Resource.Id.tv028);
            tv029 = FindViewById<TextView> (Resource.Id.tv029);

            tv001.Text = "Data001";
            tv002.Text = "Data002";
            tv003.Text = "Data003";
            tv004.Text = "Data004";
            tv005.Text = "Data005";
            tv006.Text = "Data006";
            tv007.Text = "Data007";
            tv008.Text = "Data008";
            tv009.Text = "Data009";
            tv010.Text = "Data010";
        }
Exemplo n.º 3
0
        private void IntitializeControls()
        {
            buttonConnect = FindViewById<Button>(Resource.Id.buttonConnect);
            buttonPauseResume = FindViewById<Button>(Resource.Id.buttonPauseResume);
            buttonResumeRealFlow = FindViewById<Button>(Resource.Id.buttonResumeRealFlow);
            textViewStatus = FindViewById<TextView>(Resource.Id.textViewStatus);
            textViewNumber = FindViewById<TextView>(Resource.Id.textViewNumber);
            textViewServerTime = FindViewById<TextView>(Resource.Id.textViewServerTime);
            textViewBufferSize = FindViewById<TextView>(Resource.Id.textViewBufferSize);
            linearLayoutChart = FindViewById<LinearLayout>(Resource.Id.linearLayoutChart);

            buttonConnect.Click += ButtonConnectOnClick;
            buttonPauseResume.Click += ButtonPauseResumeOnClick;
            buttonResumeRealFlow.Click += ButtonResumeRealFlowOnClick;
        }
Exemplo n.º 4
0
        protected override void OnSettingUp()
        {
            base.OnSettingUp();

            Color yellow = Color.DARK_AMBER;
            Color blue = Color.BLUE;

            CheckBox cb1 = new CheckBox(new CheckBoxTemplate()
            {
                UpperLeftPos = new Point(1,1),
                Label = yellow.DoForegroundCode() + " A check" + blue.DoBackgroundCode() + "box",
                MinimumWidth = 13,
                HasFrameBorder = false,
                //LabelAlignment = HorizontalAlignment.Center,
                Tooltip = "Testing" + blue.DoBackgroundCode() + " Tootlip"
            });

            Button b1 = new Button(new ButtonTemplate()
            {
                UpperLeftPos = new Point(1,2),
                Label = yellow.DoForegroundCode() + "A " + blue.DoBackgroundCode()+ "button",
                MinimumWidth = 11,
                LabelAlignment = HorizontalAlignment.Center
            });

            CheckBox cb3 = new CheckBox(new CheckBoxTemplate()
            {
                UpperLeftPos = new Point(1, 5),
                Label = yellow.DoForegroundCode() + "che" +
                    Color.StopColorCode + "cbox 3",
                AutoSizeOverride = new Size(5,3),
                HasFrameBorder = false,
                LabelAlignment = HorizontalAlignment.Center,
                CheckOnLeft = false,
            });

            CheckBox cb4 = new CheckBox(new CheckBoxTemplate()
            {
                UpperLeftPos = new Point(1, 7),
                Label = "check4",
                HasFrameBorder = false,
                AutoSizeOverride = new Size(11, 1),
                LabelAlignment = HorizontalAlignment.Center,
                CheckOnLeft = false,
            });

            ValueBar vb = new ValueBar(new ValueBarTemplate()
            {
                UpperLeftPos = new Point(1,12),
                MaximumValue = 100,
                StartingValue = 50,
                MinimumBGIntensity = .3f,
                MinimumFGIntensity = .5f,
                Width = 15,
                Tooltip = "Testing Tooltip"
            });

            Pigment p = new Pigment(0xffffff, 0x334455);

            AddControls(cb3);

            AddSchedule(new Schedule(Callback, 2));
        }