private void WindowKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { switch (e.Key.KeyPressedName) { case "Left": HorizontalOperation(false); break; case "Right": HorizontalOperation(true); break; case "Up": FocusSectionUp(); break; case "Down": FocusSectionDown(); break; } } }
/// <summary> /// Called when the chosen key event is received. /// Response to the pressing the left and right arrow is defined here: /// switching the selected pagination's indicator. /// Also used to exit the application. /// </summary> /// <param name="sender"> Event sender </param> /// <param name="e"> Event argument </param> private void WindowKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "BackSpace") { Exit(); } else if (e.Key.KeyPressedName == "Left") { if (PaginationExample.SelectedIndex > 0) { MainVisualView.Position2D = MainVisualView.Position2D + WindowShift; PaginationExample.SelectedIndex = PaginationExample.SelectedIndex - 1; } } else if (e.Key.KeyPressedName == "Right") { if (PaginationExample.SelectedIndex < PaginationExample.IndicatorCount - 1) { MainVisualView.Position2D = MainVisualView.Position2D - WindowShift; PaginationExample.SelectedIndex = PaginationExample.SelectedIndex + 1; } } } }
public void OnWindowKeyEvent(object sender, Window.KeyEventArgs e) { Tizen.Log.Fatal("NUI", "e.Key.KeyPressedName=" + e.Key.KeyPressedName); if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Up") { } else if (e.Key.KeyPressedName == "Down") { } else if (e.Key.KeyPressedName == "Return") { for (int i = 0; i < 20; i++) { gridVertical[i].UpdateMe(); } for (int i = 0; i < 11; i++) { gridHorizontal[i].UpdateMe(); } } else if (e.Key.KeyPressedName == "XF86Exit" || e.Key.KeyPressedName == "XF86Back") { Exit(); } } }
private void Window_KeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Left") { if (circular.SelectedIndex > 0) { circular.SelectedIndex = circular.SelectedIndex - 1; } if (homeCircular.SelectedIndex > 0) { homeCircular.SelectedIndex = homeCircular.SelectedIndex - 1; } /*for(int i = 0; i < 7; i++) * { * Position pos = homeCircular.GetIndicatorPosition(i); * Tizen.Log.Error("NUI", "home circular index : "+i+", pos x :"+pos.X+", y :"+pos.Y+"\n"); * }*/ } else if (e.Key.KeyPressedName == "Right") { if (circular.SelectedIndex < circular.IndicatorCount - 1) { circular.SelectedIndex = circular.SelectedIndex + 1; } if (homeCircular.SelectedIndex < homeCircular.IndicatorCount - 1) { homeCircular.SelectedIndex = homeCircular.SelectedIndex + 1; } } } }
private void Window_KeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Left") { if (pagination[0].SelectedIndex > 0) { pagination[0].SelectedIndex = pagination[0].SelectedIndex - 1; } if (pagination[1].SelectedIndex > 0) { pagination[1].SelectedIndex = pagination[1].SelectedIndex - 1; } } else if (e.Key.KeyPressedName == "Right") { if (pagination[0].SelectedIndex < pagination[0].IndicatorCount - 1) { pagination[0].SelectedIndex = pagination[0].SelectedIndex + 1; } if (pagination[1].SelectedIndex < pagination[1].IndicatorCount - 1) { pagination[1].SelectedIndex = pagination[1].SelectedIndex + 1; } } } }
private void Instance_Key(object sender, Window.KeyEventArgs e) { View currentFocusView = FocusManager.Instance.GetCurrentFocusView(); Tizen.Log.Fatal("NUI", "Window_KeyEvent" + e.Key.State.ToString() + ", Pressed-" + e.Key.KeyPressedName); //Tizen.Log.Fatal("NUI", " CurrentFocusView : " + currentFocusView.HasBody() + currentFocusView?.Name); }
public void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "1") { ChangeScrollableBaseSizeBigger(); } else if (e.Key.KeyPressedName == "2") { ChangeScrollableBaseSizeSmaller(); } else if (e.Key.KeyPressedName == "3") { RemoveAllChildrenDisposeFalse(); } else if (e.Key.KeyPressedName == "4") { RemoveAllChildrenDisposeTrue(); } else if (e.Key.KeyPressedName == "5") { AddChildrenInScrollableBase(); } } }
private void Instance_KeyEvent(object sender, Window.KeyEventArgs args) { if (args.Key.State == Key.StateType.Up) { Log.Info("WebView", $"window key is {args.Key.KeyPressedName}."); } }
public void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { log.Fatal(tag, $"key down! key={e.Key.KeyPressedName}"); switch (e.Key.KeyPressedName) { case "XF86Back": case "Escape": //Exit(); break; case KEY_NUM_1: log.Fatal(tag, $"pressed Key Num 1!"); break; case KEY_NUM_2: mainWin.Maximize(true); break; case KEY_NUM_3: if (mainWin.IsMaximized()) { mainWin.Maximize(false); } break; default: log.Fatal(tag, $"no test!"); break; } } }
public void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { Exit(); } }
private void Instance_Key(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "BackSpace" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { ExitSample(); } }
public void OnKeyEvent(object sender, Window.KeyEventArgs e) { Tizen.Log.Debug("rkdehdrud", $"key name is {e.Key.KeyPressedName}"); if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { Exit(); } }
public void OnKeyEvent(object sender, Window.KeyEventArgs e) { //log.Debug(tag, $"OnKeyEvent() {e.Key.KeyPressedName}, page.slider.CurrentValue={page.slider.CurrentValue}"); if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { Exit(); } }
private void OnScene1KeyEvent(object sender, Window.KeyEventArgs e) { Logger.Debug(""); if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { Exit(); } }
/// <summary> /// The method called when key pressed down /// </summary> /// <param name="sender">Key instance</param> /// <param name="e">Key's args</param> private void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "BackSpace")) { // Terminate application. Exit(); } }
public void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { uiCreator.HideObjects(); //Window.Instance.SetIconified(true); Exit(); } }
/// <summary> /// This Application will be exited when back key entered. /// </summary> /// <param name="sender">Window.Instance</param> /// <param name="e">event</param> private void OnKey(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "XF86Back") { this.Exit(); } } }
///// <summary> ///// Create text propertyMap used to set Button.Label ///// </summary> ///// <param name="text">text</param> ///// <returns>The created propertyMap</returns> //private PropertyMap CreateText(string text) //{ // PropertyMap textVisual = new PropertyMap(); // // Visual's type is textVisual; // textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); // // Set textVisual's text. // textVisual.Add(TextVisualProperty.Text, new PropertyValue(text)); // // Text color is black. // textVisual.Add(TextVisualProperty.TextColor, new PropertyValue(Color.Black)); // // The text size is 7. // //textVisual.Add(TextVisualProperty.PointSize, new PropertyValue(7)); // textVisual.Add(TextVisualProperty.PointSize, new PropertyValue(DeviceCheck.PointSize7)); // // Texts place at the center of horizontal direction. // textVisual.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER")); // // Texts place at the center of vertical direction. // textVisual.Add(TextVisualProperty.VerticalAlignment, new PropertyValue("CENTER")); // textVisual.Add(TextVisualProperty.FontFamily, new PropertyValue("Samsung One 400")); // return textVisual; //} /// <summary> /// This Application will be exited when back key entered. /// </summary> /// <param name="source">Window.Instance</param> /// <param name="e">event</param> private void AppBack(object source, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "XF86Back") { this.Exit(); } } }
private void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "BackSpace") { // Do Something later } } }
/// <summary> /// Called when the chosen key event is received. /// Use to exit the application /// </summary> /// <param name="sender"> Event sender </param> /// <param name="e"> Event argument </param> private void WindowKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "BackSpace") { Exit(); } } }
private void Win_KeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { tlog.Fatal(tag, $"key pressed name={e.Key.KeyPressedName}"); if (e.Key.KeyPressedName == "XF86Back") { Deactivate(); } } }
private void AppBack(object source, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "XF86Back") { Tizen.Log.Fatal("NUI.ChannelList", "XF86Back"); this.Exit(); } } }
/// <summary> /// This Application will be exited when back key entered. /// </summary> /// <param name="source">Window.Instance</param> /// <param name="e">event</param> private void AppBack(object source, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "XF86Back") { //When receive back key, exit the app. this.Exit(); } } }
private void WindowKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Up") { tlog.Debug(tag, $"======================"); var ret = checkTest() ? "PASS" : "FAIL"; tlog.Debug(tag, $"test result={ret}"); } } }
private void OnWindowsKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Left") { } else if (e.Key.KeyPressedName == "Right") { } } }
public void OnWindowKeyEvent(object sender, Window.KeyEventArgs e) { Tizen.Log.Fatal("NUI", "e.Key.KeyPressedName=" + e.Key.KeyPressedName); if (e.Key.State == Key.StateType.Down) { keySubclassTest.Text = $"DeviceSubClass={e.Key.DeviceSubClass}, DeviceClass={e.Key.DeviceClass}, DeviceName={e.Key.DeviceName}, KeyCode={e.Key.KeyCode}"; switch (e.Key.KeyPressedName) { case "Up": { if (_animation) { _animation.Finished += AnimationFinished; cnt++; Tizen.Log.Fatal("NUI", "AnimationFinished added!"); } Tizen.Log.Fatal("NUI", $"LineWrapMode 1st={ myTextLabel?.LineWrapMode} 2nd={ myTextLabel2?.LineWrapMode}"); } break; case "Down": { if (_animation) { _animation.Finished -= AnimationFinished; cnt--; Tizen.Log.Fatal("NUI", "AnimationFinished removed!"); } Window.Instance.SetClass($"Window.SetClass() Test #{win_test++}", ""); Tizen.Log.Fatal("NUI", $"Check with enlightenment_info -topwins ! Window.SetClass() Test #{win_test}"); } break; case "Return": { _animation.Play(); Tizen.Log.Fatal("NUI", "_animation play here!"); } break; case "Escape": case "Back": { Exit(); } break; } } }
private void OnKeyEvent(object sender, Window.KeyEventArgs eventArgs) { if (eventArgs.Key.State == Key.StateType.Down) { switch (eventArgs.Key.KeyPressedName) { case "Back": case "XF86Back": //for emulator Exit(); break; } } }
private void OnWindowsKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down) { if (e.Key.KeyPressedName == "Right") { listItemArray[5].StateSelectedEnabled = !listItemArray[5].StateSelectedEnabled; } else if (e.Key.KeyPressedName == "Left") { listItemArray[5].StateEnabled = !listItemArray[5].StateEnabled; } } }
void OnKeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape")) { if (Stack.Stack.Count > 1) { Stack.Pop(); } else { Exit(); } } }
private void DefaultWindow_KeyEvent(object sender, Window.KeyEventArgs e) { if (e.Key.State == Key.StateType.Up && (e.Key.KeyPressedName == "XF86Back")) { if (rotarySelector.GetCurrentMode() == RotarySelector.Mode.EditMode) { rotarySelector.SetNormalMode(); } else { Exit(); } } }