protected override void OnCreate(Bundle savedInstanceState)
        {
            RequestWindowFeature(WindowFeatures.NoTitle);
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            buttonSelectColor        = (ButtonFloatSmall)FindViewById(Resource.Id.buttonColorSelector);
            buttonSelectColor.Click += (sender, e) =>
            {
                ColorSelector colorSelector = new ColorSelector(this, backgroundColor, this);
                colorSelector.Show();
            };

            LayoutRipple layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemButtons);


            OriginRiple = layoutRipple;

            layoutRipple.Click += (sender, e) =>
            {
                Intent intent = new Intent(this, typeof(ButtonsActivity));
                intent.PutExtra("BACKGROUND", backgroundColor);
                StartActivity(intent);
            };
            layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemSwitches);


            OriginRiple = layoutRipple;

            layoutRipple.Click += (sender, e) =>
            {
                Intent intent = new Intent(this, typeof(SwitchActivity));
                intent.PutExtra("BACKGROUND", backgroundColor);
                StartActivity(intent);
            };
            layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemProgress);


            OriginRiple = layoutRipple;

            layoutRipple.Click += (sender, e) =>
            {
                Intent intent = new Intent(this, typeof(ProgressActivity));
                intent.PutExtra("BACKGROUND", backgroundColor);
                StartActivity(intent);
            };
            layoutRipple = (LayoutRipple)FindViewById(Resource.Id.itemWidgets);


            OriginRiple = layoutRipple;

            layoutRipple.Click += (sender, e) =>
            {
                Intent intent = new Intent(this, typeof(WidgetActivity));
                intent.PutExtra("BACKGROUND", backgroundColor);
                StartActivity(intent);
            };
        }
Example #2
0
        private void AddBookmark(string text, TextRenderData first, TextRenderData last)
        {
            ColorSelector.Show();

            ClearTextSelection();
            ManipulationService.SetManipulationListener(PageCanvas, _dummyManipulationListenner);

            _bookmarkText             = text;
            _bookmarkFirstTextContext = first;
            _bookmarkLastTextContext  = last;
        }
Example #3
0
        public override void Run(Window window)
        {
            Background bg = new Background(window);

            bg.Color = Color.White;
            bg.Move(0, 0);
            bg.Resize(window.ScreenSize.Width, window.ScreenSize.Height);
            bg.Show();

            ColorSelector cs = new ColorSelector(window);

            Label label1 = new Label(window)
            {
                Text = string.Format("Selected Color={0}", cs.SelectedColor),
            };

            Label label2 = new Label(window);

            Label label3 = new Label(window);

            cs.ColorChanged += (object sender, ColorChangedEventArgs e) =>
            {
                label1.Text = string.Format("Selected Color={0}", cs.SelectedColor);
                label2.Text = string.Format("Old Color={0}", e.OldColor);
                label3.Text = string.Format("New Color={0}", e.NewColor);
            };

            cs.Resize(600, 600);
            cs.Move(0, 300);
            cs.Show();

            label1.Resize(600, 100);
            label1.Move(0, 0);
            label1.Show();

            label2.Resize(600, 100);
            label2.Move(0, 100);
            label2.Show();

            label3.Resize(600, 100);
            label3.Move(0, 200);
            label3.Show();
        }
Example #4
0
 void color_onClicked(object sender, InputEngine.MouseArgs e)
 {
     colsel = ColorSelector.Show(position + color.Position + new Vector2(color.Size.X, 0));
     colsel.onColorSelected += new ColorSelector.ColorSelectedEventHandler(colsel_onColorSelected);
 }