MoreOption CreateMoreOption() { var moreOption = new MoreOption(_page); moreOption.Clicked += OnMoreOptionItemClicked; _page.Children.Add(moreOption); moreOption.Show(); return(moreOption); }
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); }
MoreOption CreateMoreOption() { var moreOption = new MoreOption(_page); _page.Children.Add(moreOption); moreOption.Show(); moreOption.Clicked += OnMoreOptionItemClicked; moreOption.Closed += SendMoreOptionClosed; moreOption.Opened += SendMoreOptionOpened; return(moreOption); }
/// <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(); }; }
public View CreateMessageList() { Adapter = new MessageListAdaptor() { Data = MessageDummy.Create(100) }; //Adapter.FlickAnimationSpeed = 0.7f; //Adapter.FlickDistanceMultiplierRange = new Vector2(0.2f, 1.3f); //Adapter.FlickThreshold = 0.1f; popupAnimation = new Animation(100); Layer root = NUIApplication.GetDefaultWindow().GetDefaultLayer(); contentBlurView = new GaussianBlurView(40, 3.0f, PixelFormat.RGBA8888, 1.0f, 1.0f, false) { Size = new Size(360, 360), }; message = new MessageList(Adapter) { Size = new Size(360, 360), PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.Center, }; contentBlurView.Add(message); MenuListAdapter menuListAdapter = new MenuListAdapter() { Data = new List <object> { new MenuData() { Title = "Write", ResourceUrl = "send_message.png" }, new MenuData() { Title = "Delete", ResourceUrl = "delete.png" }, new MenuData() { Title = "Settings", ResourceUrl = "settings.png" } } }; menuPopup = new MenuList(menuListAdapter) { Size = new Size(360, 360), }; menuPopup.Hide(); menuPopup.TouchEvent += (object source, View.TouchEventArgs args) => { if (args.Touch.GetState(0) == PointStateType.Finished) { HidePopup(); } return(true); }; //contentBlurView.Add(menuPopup); optionButton = new MoreOption() { PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight, PivotPoint = Tizen.NUI.PivotPoint.CenterRight, }; optionButton.TouchEvent += (object sender, View.TouchEventArgs args) => { MoreOption target = args.Touch.GetHitView(0) as MoreOption; if (target) { if (args.Touch.GetState(0) == PointStateType.Down && args.Touch.GetLocalPosition(0).X > 50) { optionButton.ShowTouchEffect(); } else if (args.Touch.GetState(0) == PointStateType.Finished) { if (optionButton.IsPressed && args.Touch.GetLocalPosition(0).X > 50) { ShowPopup(); } optionButton.HideTouchEffect(); } else if (args.Touch.GetState(0) == PointStateType.Interrupted) { optionButton.HideTouchEffect(); } } return(true); }; contentBlurView.Add(optionButton); return(contentBlurView); }
public void ClickMenuOptionUnderMore(MoreOption option) { string pageSource = UIUtil.DefaultProvider.GetPageSource(); string js = string.Empty; switch (option) { case MoreOption.Profile: Regex regex = new Regex(@"LoadProfile\('[^)]+',\d+,'[^)]+'\);", RegexOptions.IgnoreCase); MatchCollection matchCollection = regex.Matches(pageSource); UIUtil.DefaultProvider.ExecuteJavaScript(matchCollection[0].Value); break; case MoreOption.AddThisAttendeeToGroup: regex = new Regex(@"LoadGrouping\('[^)]+',\d+,\d+\)"); matchCollection = regex.Matches(pageSource); UIUtil.DefaultProvider.ExecuteJavaScript(matchCollection[0].Value); break; case MoreOption.DeleteThisAttendee: UIUtil.DefaultProvider.ExecuteJavaScript("DeleteRegistrant()"); break; case MoreOption.CreateNewGroupByAddingANewAttendee: UIUtil.DefaultProvider.ExecuteJavaScript("AddNewAttendee('AddNewAttendee');"); break; case MoreOption.PrintThisPage: UIUtil.DefaultProvider.ExecuteJavaScript("printTable('attendeeData','')"); break; case MoreOption.Transfer: regex = new Regex(@"TransferRegistration\('\d+','[^)]+'\);"); matchCollection = regex.Matches(pageSource); UIUtil.DefaultProvider.ExecuteJavaScript(matchCollection[0].Value); break; default: break; } }
public void VerifyMenuOptionPresent(MoreOption option, bool present) { // Click 'More' UIUtil.DefaultProvider.WaitForDisplayAndClick(@"More>>", LocateBy.LinkText); Utilities.Utility.ThreadSleep(2); VerifyTool.VerifyValue( present, UIUtil.DefaultProvider.IsElementPresent(StringEnum.GetStringValue(option), LocateBy.LinkText), "More option '" + StringEnum.GetStringValue(option) + "' is present: {0}"); }
public void ShowMoreOptionMenu() { MoreOption.Show(); }