public void Deactivate() { Window.Instance.KeyEvent -= OnWindowsKeyEvent; if (listItemArray != null) { for (int i = 0; i < COUNT; ++i) { if (listItemArray[i] != null) { rootView.Remove(listItemArray[i]); listItemArray[i].Dispose(); listItemArray[i] = null; } } listItemArray = null; } if (button != null) { rootView.Remove(button); button.Dispose(); button = null; } if (rootView != null) { root.Remove(rootView); rootView.Dispose(); rootView = null; } root.Dispose(); }
public void Deactivate() { Window window = Window.Instance; if (searchBar != null) { searchBar.SearchButtonClickEvent -= OnSearchButtonClickEvent; searchBar.CancelButtonClickEvent -= OnCancelButtonClickEvent; rootView.Remove(searchBar); searchBar.Dispose(); searchBar = null; } if (button != null) { rootView.Remove(button); button.Dispose(); button = null; } if (rootView != null) { rootView.Dispose(); rootView = null; } }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Tab"; tab = new Tizen.NUI.CommonUI.Tab("Tab"); tab.IsNatureTextWidth = false; tab.Size2D = new Size2D(1080, 108); tab.Position2D = new Position2D(0, 300); tab.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f); root.Add(tab); for (int i = 0; i < 3; i++) { Tizen.NUI.CommonUI.Tab.TabItemData item = new Tizen.NUI.CommonUI.Tab.TabItemData(); item.Text = "Tab " + i; if (i == 1) { item.Text = "Long long Tab " + i; } tab.AddItem(item); } for (int i = 0; i < num; i++) { button[i] = new Tizen.NUI.CommonUI.Button("ServiceButton"); button[i].Size2D = new Size2D(240, 80); button[i].Position2D = new Position2D(280 + i * 260, 700); button[i].Text = mode[i]; button[i].ClickEvent += ButtonClickEvent; root.Add(button[i]); } }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Button"; BasicButtonNormal = new Tizen.NUI.CommonUI.Button("BasicButton"); BasicButtonNormal.Size2D = new Size2D(300, 80); BasicButtonNormal.Position2D = new Position2D(156, 50); BasicButtonNormal.Text = "BasicButton"; root.Add(BasicButtonNormal); BasicButtonDisabled = new Tizen.NUI.CommonUI.Button("BasicButton"); BasicButtonDisabled.Size2D = new Size2D(300, 80); BasicButtonDisabled.Position2D = new Position2D(624, 50); BasicButtonDisabled.Text = "BasicButton"; BasicButtonDisabled.IsEnabled = false; root.Add(BasicButtonDisabled); ServiceButtonNormal = new Tizen.NUI.CommonUI.Button("ServiceButton"); ServiceButtonNormal.Size2D = new Size2D(300, 80); ServiceButtonNormal.Position2D = new Position2D(156, 200); ServiceButtonNormal.Text = "ServiceButton"; root.Add(ServiceButtonNormal); ServiceButtonDisabled = new Tizen.NUI.CommonUI.Button("ServiceButton"); ServiceButtonDisabled.Size2D = new Size2D(300, 80); ServiceButtonDisabled.Position2D = new Position2D(624, 200); ServiceButtonDisabled.Text = "ServiceButton"; ServiceButtonDisabled.IsEnabled = false; root.Add(ServiceButtonDisabled); ToggleButtonNormal = new Tizen.NUI.CommonUI.Button("ToggleButton"); ToggleButtonNormal.Size2D = new Size2D(300, 80); ToggleButtonNormal.Position2D = new Position2D(156, 350); ToggleButtonNormal.Text = "ToggleButton"; root.Add(ToggleButtonNormal); ToggleButtonDisabled = new Tizen.NUI.CommonUI.Button("ToggleButton"); ToggleButtonDisabled.Size2D = new Size2D(300, 80); ToggleButtonDisabled.Position2D = new Position2D(624, 350); ToggleButtonDisabled.Text = "ToggleButton"; root.Add(ToggleButtonDisabled); OvalButtonNormal = new Tizen.NUI.CommonUI.Button("OvalButton"); OvalButtonNormal.Size2D = new Size2D(100, 100); OvalButtonNormal.Position2D = new Position2D(156, 500); root.Add(OvalButtonNormal); OvalButtonDisabled = new Tizen.NUI.CommonUI.Button("OvalButton"); OvalButtonDisabled.Size2D = new Size2D(100, 100); OvalButtonDisabled.Position2D = new Position2D(624, 500); OvalButtonDisabled.IsEnabled = false; root.Add(OvalButtonDisabled); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; CreateRootView(); CreateSearchBar(); button = new Tizen.NUI.CommonUI.Button(); button.PointSize = 14; button.Size2D = new Size2D(300, 80); button.BackgroundColor = Color.Green; button.Position2D = new Position2D(40, 400); button.Text = "LTR/RTL"; button.ClickEvent += OnLayoutChanged; rootView.Add(button); Window.Instance.KeyEvent += OnWindowsKeyEvent; }
public void Deactivate() { Window window = Window.Instance; window.KeyEvent -= OnWindowsKeyEvent; for (int i = 0; i < COUNT; ++i) { if (inputFieldArr[i] != null) { if (i % 2 == 0) { inputFieldArr[i].CancelButtonClickEvent -= OnCancelBtnClickEvent; } else { inputFieldArr[i].DeleteButtonClickEvent -= OnDeleteBtnClickEvent; inputFieldArr[i].AddButtonClickEvent -= OnAddBtnClickEvent; } inputFieldArr[i].KeyEvent -= OnKeyEvent; rootView.Remove(inputFieldArr[i]); inputFieldArr[i].Dispose(); inputFieldArr[i] = null; } } inputFieldArr = null; if (guideText != null) { rootView.Remove(guideText); guideText.Dispose(); guideText = null; } if (button != null) { rootView.Remove(button); button.Dispose(); button = null; } if (rootView != null) { rootView.TouchEvent -= OnRootViewTouchEvent; rootView.Dispose(); rootView = null; } }
private void ButtonClickEvent(object sender, Tizen.NUI.CommonUI.Button.ClickEventArgs e) { Tizen.NUI.CommonUI.Button btn = sender as Tizen.NUI.CommonUI.Button; if (button[0] == btn) { CreateBaseTimePicker(); } else if (button[1] == btn) { CreateAMPMTimePicker(); } else if (button[2] == btn) { CreateRepeatTimePicker(); } }
private void ButtonClickEvent(object sender, Tizen.NUI.CommonUI.Button.ClickEventArgs e) { Tizen.NUI.CommonUI.Button btn = sender as Tizen.NUI.CommonUI.Button; if (button[0] == btn) { CreatePopupWithoutTitle(); } else if (button[1] == btn) { CreatePopupWithoutTitleAndButton(); } else if (button[2] == btn) { CreateBasePopup(); } }
private void ButtonClickEvent(object sender, Tizen.NUI.CommonUI.Button.ClickEventArgs e) { Tizen.NUI.CommonUI.Button btn = sender as Tizen.NUI.CommonUI.Button; if (button[0] == btn) { tab.IsNatureTextWidth = false; } else if (button[1] == btn) { tab.IsNatureTextWidth = true; } //tab.DeleteItem(0); //Tab.TabItemData item = new Tab.TabItemData(); //item.Text = "insert Tab "; //tab.InsertItem(item, 1); }
public void Activate() { Window.Instance.BackgroundColor = Color.White; posY = 100; inputFieldArr = new Tizen.FH.NUI.Controls.InputField[COUNT]; CreateRootView(); CreateFamily(); CreateGuideText(); button = new Tizen.NUI.CommonUI.Button(); button.PointSize = 14; button.Size2D = new Size2D(300, 80); button.BackgroundColor = Color.Green; button.Position2D = new Position2D(200, 0); button.Text = "LTR/RTL"; button.ClickEvent += OnLayoutChanged; rootView.Add(button); Window.Instance.KeyEvent += OnWindowsKeyEvent; }
public void Activate() { Window.Instance.BackgroundColor = Color.White; root = new SampleLayout(); root.HeaderText = "Time Picker"; CreateBaseTimePicker(); for (int i = 0; i < num; i++) { button[i] = new Tizen.NUI.CommonUI.Button("ServiceButton"); button[i].Size2D = new Size2D(240, 80); button[i].Position2D = new Position2D(160 + i * 260, 1350); button[i].Text = mode[i]; button[i].PointSize = 11; button[i].ClickEvent += ButtonClickEvent; root.Add(button[i]); } }
public void Activate() { Window.Instance.BackgroundColor = Color.White; Window window = Window.Instance; root = new SampleLayout(); root.HeaderText = "Progress"; button1 = new Tizen.NUI.CommonUI.Button("BasicButton"); button1.BackgroundColor = Color.Green; button1.Position2D = new Position2D(300, 200); button1.Size2D = new Size2D(80, 80); button1.Text = "+"; root.Add(button1); button1.Focusable = true; button1.ClickEvent += bar1Add; button2 = new Tizen.NUI.CommonUI.Button("BasicButton"); button2.BackgroundColor = Color.Green; button2.Position2D = new Position2D(700, 200); button2.Size2D = new Size2D(80, 80); button2.Text = "-"; root.Add(button2); button2.Focusable = true; button2.ClickEvent += bar1Minus; progressBar1 = new Tizen.NUI.CommonUI.Progress("Progressbar"); progressBar1.Position2D = new Position2D(300, 100); progressBar1.Size2D = new Size2D(500, 4); progressBar1.MaxValue = 100; progressBar1.MinValue = 0; progressBar1.CurrentValue = 45; root.Add(progressBar1); window.Add(root); FocusManager.Instance.SetCurrentFocusView(button1); }
public SampleLayout(bool isThemeButtonVisiable = true) { Size2D = new Size2D(Window.Instance.Size.Width, Window.Instance.Size.Height); //Window.Instance.Add(this); LayoutHeader = new Tizen.FH.NUI.Controls.Header("DefaultHeader"); LayoutHeader.PositionY = 0; LayoutContent = new View { Size2D = new Size2D(Window.Instance.Size.Width, Window.Instance.Size.Height - 128), Position2D = new Position2D(0, 128), }; Content = new View { Size2D = new Size2D(Window.Instance.Size.Width, Window.Instance.Size.Height - 128 - 150), Position2D = new Position2D(0, 150), }; LayoutContent.Add(Content); if (isThemeButtonVisiable) { ButtonAttributes buttonAttributes = new ButtonAttributes { IsSelectable = true, BackgroundImageAttributes = new ImageAttributes { ResourceURL = new StringSelector { All = CommonResource.GetResourcePath() + "3. Button/rectangle_point_btn_normal.png" }, Border = new RectangleSelector { All = new Rectangle(5, 5, 5, 5) } }, ShadowImageAttributes = new ImageAttributes { ResourceURL = new StringSelector { All = CommonResource.GetResourcePath() + "3. Button/rectangle_btn_shadow.png" }, Border = new RectangleSelector { All = new Rectangle(5, 5, 5, 5) } }, OverlayImageAttributes = new ImageAttributes { ResourceURL = new StringSelector { Pressed = CommonResource.GetResourcePath() + "3. Button/rectangle_btn_press_overlay.png", Other = "" }, Border = new RectangleSelector { All = new Rectangle(5, 5, 5, 5) }, }, TextAttributes = new TextAttributes { PointSize = new FloatSelector { All = 30 }, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, WidthResizePolicy = ResizePolicyType.FillToParent, HeightResizePolicy = ResizePolicyType.FillToParent, TextColor = new ColorSelector { All = new Color(0, 0, 0, 1), }, } }; UtilityButton = new Tizen.NUI.CommonUI.Button(buttonAttributes); UtilityButton.Size2D = new Size2D(200, 80); UtilityButton.Position2D = new Position2D(56, 32); UtilityButton.Text = "Utility"; UtilityButton.ClickEvent += UtilityButton_ClickEvent; LayoutContent.Add(UtilityButton); buttonAttributes.BackgroundImageAttributes.ResourceURL.All = CommonResource.GetResourcePath() + "3. Button/[Button] App Primary Color/rectangle_point_btn_normal_ec7510.png"; FoodButton = new Tizen.NUI.CommonUI.Button(buttonAttributes); FoodButton.Size2D = new Size2D(200, 80); FoodButton.Position2D = new Position2D(312, 32); FoodButton.Text = "Food"; FoodButton.ClickEvent += FoodButton_ClickEvent; LayoutContent.Add(FoodButton); buttonAttributes.BackgroundImageAttributes.ResourceURL.All = CommonResource.GetResourcePath() + "3. Button/[Button] App Primary Color/rectangle_point_btn_normal_24c447.png"; FamilyButton = new Tizen.NUI.CommonUI.Button(buttonAttributes); FamilyButton.Size2D = new Size2D(200, 80); FamilyButton.Position2D = new Position2D(578, 32); FamilyButton.Text = "Family"; FamilyButton.ClickEvent += FamilyButton_ClickEvent; LayoutContent.Add(FamilyButton); buttonAttributes.BackgroundImageAttributes.ResourceURL.All = CommonResource.GetResourcePath() + "3. Button/[Button] App Primary Color/rectangle_point_btn_normal_9762d9.png"; KitchenButton = new Tizen.NUI.CommonUI.Button(buttonAttributes); KitchenButton.Size2D = new Size2D(200, 80); KitchenButton.Position2D = new Position2D(834, 32); KitchenButton.Text = "Kitchen"; KitchenButton.ClickEvent += KitchenButton_ClickEvent; LayoutContent.Add(KitchenButton); } this.isThemeButtonVisible = isThemeButtonVisiable; Window.Instance.Add(LayoutHeader); Window.Instance.Add(LayoutContent); //SampleMain.SampleNaviFrame.NaviFrameItemPush(LayoutHeader, LayoutContent); //this.ResourceUrl = CommonResource.GetResourcePath() + "0. BG/background_default_overlay.png"; }
private void ButtonClickEvent(object sender, Tizen.NUI.CommonUI.Button.ClickEventArgs e) { Tizen.NUI.CommonUI.Button btn = sender as Tizen.NUI.CommonUI.Button; }
public void Activate() { Window.Instance.BackgroundColor = Color.White; CreateRootView(); itemPosX = 100; itemPosY = -80; itemPosYOffset = 20; listItemArray = new Tizen.FH.NUI.Controls.ListItem[COUNT]; index = 0; CreateListItem(index, "DefaultListItem", 90, 0, "default"); index++; CreateListItem(index, "MultiSubTextListItem", 150, 1, "sub text 1line"); index++; CreateListItem(index, "MultiSubTextListItem", 220, 2, "sub text 2line"); listItemArray[index].StateDividerEnabled = false; index++; // checkBox + text CreateListItem(index, "ItemAlignListItem", 90, 0, "item align"); listItemArray[index].LeftItemRootViewSize = new Size2D(48, 48); listItemArray[index].ItemAlignType = Tizen.FH.NUI.Controls.ListItem.ItemAlignTypes.CheckIcon; listItemArray[index].RightItemRootViewSize = new Size2D(200, 90); listItemArray[index].RightText = "Sub text"; index++; // icon CreateListItem(index, "ItemAlignListItem", 90, 0, "item align, icon"); listItemArray[index].LeftItemRootViewSize = new Size2D(48, 48); listItemArray[index].ItemAlignType = Tizen.FH.NUI.Controls.ListItem.ItemAlignTypes.Icon; listItemArray[index].LeftIconURL = CommonResource.GetResourcePath() + "0. Softkey/softkey_ic_home.png"; index++; CreateListItem(index, "EffectListItem", 90, 0, "effect"); index++; //itemPosX = 100 + 800 + 100; //itemPosY = 50; CreateListItem(index, "NextDepthListItem", 90, 0, "next depth"); index++; CreateListItem(index, "GroupIndexListItem", 90, 0, "group index, default"); listItemArray[index].GroupIndexType = Tizen.FH.NUI.Controls.ListItem.GroupIndexTypes.None; index++; CreateListItem(index, "GroupIndexListItem", 90, 0, "group index, next button"); listItemArray[index].GroupIndexType = Tizen.FH.NUI.Controls.ListItem.GroupIndexTypes.Next; listItemArray[index].RightItemRootViewSize = new Size2D(48, 48); index++; CreateListItem(index, "GroupIndexListItem", 90, 0, "group index, switch"); listItemArray[index].GroupIndexType = Tizen.FH.NUI.Controls.ListItem.GroupIndexTypes.Switch; listItemArray[index].RightItemRootViewSize = new Size2D(72, 48); index++; CreateListItem(index, "GroupIndexListItem", 90, 0, "group index, drop down"); listItemArray[index].GroupIndexType = Tizen.FH.NUI.Controls.ListItem.GroupIndexTypes.DropDown; listItemArray[index].RightItemRootViewSize = new Size2D(48, 48); button = new Tizen.NUI.CommonUI.Button(); button.PointSize = 14; button.Size2D = new Size2D(300, 80); button.BackgroundColor = Color.Green; button.Position2D = new Position2D(itemPosX + 10, itemPosY); button.Text = "LTR/RTL"; button.ClickEvent += OnLayoutChanged; rootView.Add(button); Window.Instance.KeyEvent += OnWindowsKeyEvent; }
void CreateBoardAndButtons() { board = new TextLabel(); board.Size2D = new Size2D(1000, 100); board.Position2D = new Position2D(80, 600); board.PointSize = 30; board.HorizontalAlignment = HorizontalAlignment.Center; board.VerticalAlignment = VerticalAlignment.Center; board.BackgroundColor = Color.Magenta; board.Text = "log pad"; root.Add(board); board.Focusable = true; board.FocusGained += Board_FocusGained; board.FocusLost += Board_FocusLost; board1 = new TextLabel(); board1.Size2D = new Size2D(300, 70); board1.Position2D = new Position2D(50, 100); board1.PointSize = 20; board1.HorizontalAlignment = HorizontalAlignment.Center; board1.VerticalAlignment = VerticalAlignment.Center; board1.BackgroundColor = Color.Magenta; board1.Text = "style construction"; root.Add(board1); board1.Focusable = true; board1.FocusGained += Board_FocusGained; board1.FocusLost += Board_FocusLost; board2 = new TextLabel(); board2.Size2D = new Size2D(300, 70); board2.Position2D = new Position2D(400, 100); board2.PointSize = 20; board2.HorizontalAlignment = HorizontalAlignment.Center; board2.VerticalAlignment = VerticalAlignment.Center; board2.BackgroundColor = Color.Magenta; board2.Text = "Attribute construction"; root.Add(board2); board2.Focusable = true; board2.FocusGained += Board_FocusGained; board2.FocusLost += Board_FocusLost; button1 = new Tizen.NUI.CommonUI.Button(); button1.PointSize = 14; button1.BackgroundColor = Color.Green; button1.Position2D = new Position2D(80, 500); button1.Size2D = new Size2D(100, 80); button1.Text = "FPS++"; root.Add(button1); button1.Focusable = true; button1.ClickEvent += loading1FPSAdd; button2 = new Tizen.NUI.CommonUI.Button(); button2.PointSize = 14; button2.BackgroundColor = Color.Green; button2.Position2D = new Position2D(200, 500); button2.Size2D = new Size2D(100, 80); button2.Text = "FPS--"; root.Add(button2); button2.Focusable = true; button2.ClickEvent += loading1FPSMinus; }
private void CreateBoardAndButtons() { board1 = new TextLabel(); board1.Size2D = new Size2D(200, 70); board1.Position2D = new Position2D(100, 0); board1.PointSize = 14; board1.HorizontalAlignment = HorizontalAlignment.Center; board1.VerticalAlignment = VerticalAlignment.Center; board1.BackgroundColor = Color.Magenta; board1.Text = "Honrizal"; root.Add(board1); board1.Focusable = true; board2 = new TextLabel(); board2.Size2D = new Size2D(200, 70); board2.Position2D = new Position2D(450, 0); board2.PointSize = 30; board2.HorizontalAlignment = HorizontalAlignment.Center; board2.VerticalAlignment = VerticalAlignment.Center; board2.BackgroundColor = Color.Magenta; board2.Text = "vertical"; root.Add(board2); board2.Focusable = true; button1 = new Tizen.NUI.CommonUI.Button(); button1.PointSize = 14; button1.BackgroundColor = Color.Green; button1.Position2D = new Position2D(100, 500); button1.Size2D = new Size2D(80, 80); button1.Text = "+"; root.Add(button1); button1.Focusable = true; button1.ClickEvent += Scroll1Add; button2 = new Tizen.NUI.CommonUI.Button(); button2.PointSize = 14; button2.BackgroundColor = Color.Green; button2.Position2D = new Position2D(200, 500); button2.Size2D = new Size2D(80, 80); button2.Text = "-"; root.Add(button2); button2.Focusable = true; button2.ClickEvent += Scroll1Minus; button3 = new Tizen.NUI.CommonUI.Button(); button3.PointSize = 14; button3.BackgroundColor = Color.Green; button3.Position2D = new Position2D(450, 500); button3.Size2D = new Size2D(80, 80); button3.Text = "+"; root.Add(button3); button3.Focusable = true; button3.ClickEvent += Scroll2Add; button4 = new Tizen.NUI.CommonUI.Button(); button4.PointSize = 14; button4.BackgroundColor = Color.Green; button4.Position2D = new Position2D(550, 500); button4.Size2D = new Size2D(80, 80); button4.Text = "-"; root.Add(button4); button4.Focusable = true; button4.ClickEvent += Scroll2Minus; }