Ejemplo n.º 1
0
        MoreOption CreateMoreOption()
        {
            var moreOption = new MoreOption(_page);

            moreOption.Clicked += OnMoreOptionItemClicked;
            _page.Children.Add(moreOption);
            moreOption.Show();
            return(moreOption);
        }
Ejemplo n.º 2
0
        public override void Run(Window window)
        {
            Conformant conf = new Conformant(window);

            conf.Show();

            MoreOption option = new MoreOption(window)
            {
                AlignmentX = -1,
                AlignmentY = -1,
                WeightX    = 1,
                WeightY    = 1,
                Direction  = MoreOptionDirection.Right
            };

            option.Show();
            //option.Move(window.ScreenSize.Width/2, window.ScreenSize.Height/2);
            conf.SetContent(option);

            option.Items.Add(new ColorMoreOptionItem(window, "icon_aquamarine_260_me", Color.FromHex("#800000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_auamarine_260_me", Color.FromHex("#800012")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_azure_215_me", Color.FromHex("#800034")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_beige_330_me", Color.FromHex("#800056")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_blue_45_me", Color.FromHex("#800067")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_brown_90_me", Color.FromHex("#800087")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_cyan_230_me", Color.FromHex("#800023")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_firebrick_95_me", Color.FromHex("#804300")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_gold_75_me", Color.FromHex("#854000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_green_60_me", Color.FromHex("#800340")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_honeydew_285_me", Color.FromHex("#823000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_ivory_315_me", Color.FromHex("#806700")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_khaki_360_me", Color.FromHex("#80ab00")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_lime_300_me", Color.FromHex("#800c30")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_maroon_120_me", Color.FromHex("#8fd000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_me", Color.FromHex("#800000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_orchid_160_me", Color.FromHex("#8d3000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_pink_145_me", Color.FromHex("#8002d0")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_purple_200_me", Color.FromHex("#8ff000")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_red_30_me", Color.FromHex("#800fa0")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_snow_75_me", Color.FromHex("#80f200")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_snow_80_me", Color.FromHex("#80d200")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_teal_245_me", Color.FromHex("#80f300")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_violet_180_me", Color.FromHex("#80fb00")));
            option.Items.Add(new ColorMoreOptionItem(window, "icon_yellow_345_me", Color.FromHex("#800b30")));

            option.Opened   += (s, e) => Log.Debug(TestName, "Opened!");
            option.Closed   += (s, e) => Log.Debug(TestName, "Closed!");
            option.Selected += (s, e) => Log.Debug(TestName, "Selected! : " + e?.Item?.MainText);
            option.Clicked  += (s, e) => Log.Debug(TestName, "Clicked! : " + e?.Item?.MainText);

            option.Opened += (s, e) => option.BackgroundColor = Color.Aqua;
            option.Closed += (s, e) => option.BackgroundColor = Color.Black;

            option.Selected += (s, e) => option.BackgroundColor = (e?.Item as ColorMoreOptionItem).Color;
            option.Clicked  += (s, e) => option.BackgroundColor = Deep((e?.Item as ColorMoreOptionItem).Color);
        }
Ejemplo n.º 3
0
        MoreOption CreateMoreOption()
        {
            var moreOption = new MoreOption(_page);

            _page.Children.Add(moreOption);
            moreOption.Show();
            moreOption.Clicked += OnMoreOptionItemClicked;
            moreOption.Closed  += SendMoreOptionClosed;
            moreOption.Opened  += SendMoreOptionOpened;
            return(moreOption);
        }
Ejemplo n.º 4
0
        public void HidePopup()
        {
            popupAnimation.Stop();
            popupAnimation.Clear();

            optionButton.Show();
            contentBlurView.Deactivate();

            popupAnimation.Duration = 200;

            AlphaFunction timeCurve = new AlphaFunction(new Vector2(0.45f, 0.03f), new Vector2(0.41f, 1.0f));

            popupAnimation.AnimateTo(message, "scale", new Vector3(1.0f, 1.0f, 1.0f), 0, 200, timeCurve);
            popupAnimation.Play();

            menuPopup.Unparent();
            menuPopup.Hide();
        }
        /// <summary>
        /// Create a MapView object.
        /// </summary>
        public void CreateMap()
        {
            // Create the MapView
            var layout = new Layout(navi);

            s_mapview = new MapView(layout, s_maps);
            // Move the MapView
            s_mapview.Move(0, 0);
            // Resize the MapView
            s_mapview.Resize(360, 360);
            // Show the MapView
            s_mapview.Show();
            // Set the latitude and longitude for the center position of the MapView
            //s_mapview.Center = new Geocoordinates(SEOUL_LAT, SEOUL_LON);
            s_mapview.Center = new Geocoordinates(DEFAULT_LAT, DEFAULT_LON);
            // Set the zoom level
            s_mapview.ZoomLevel = 9;
            // Add the handler for the longpress event on MapView
            s_mapview.LongPressed += MapViewLongPressed;

            // Create the MoreOption
            var viewOption = new MoreOption(window)
            {
                AlignmentX = -1,
                AlignmentY = -1,
                WeightX    = 1,
                WeightY    = 1,
                Direction  = MoreOptionDirection.Right
            };

            // Move the viewOption
            viewOption.Move(180, 180);
            // Show the viewOption
            viewOption.Show();
            viewOption.Clicked += ViewOptionSelected;

            // Create and add items of the MoreOption
            viewOption.Items.Add(new MoreOptionItem()
            {
                MainText = "Map"
            });
            viewOption.Items.Add(new MoreOptionItem()
            {
                MainText = "POI"
            });
            viewOption.Items.Add(new MoreOptionItem()
            {
                MainText = "Route"
            });

            RotaryEventManager.Rotated += (e) =>
            {
                if (viewOption.IsOpened == false)
                {
                    if (e.IsClockwise)
                    {
                        s_mapview.ZoomLevel += 1;
                    }
                    else
                    {
                        s_mapview.ZoomLevel -= 1;
                    }
                }
            };

            var mapPage = navi.Push(layout, null, "empty");

            navi.Popped += (s, e) => { viewOption.Unrealize(); };
        }
Ejemplo n.º 6
0
 public void ShowMoreOptionMenu()
 {
     MoreOption.Show();
 }