aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Keyboard/KeysLineDefinition.cs
blob: 4b5a32b2a52fb3b18f351a8a210dc1387d04593d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Tango.Touch.Keyboard
{
    public class KeysLineDefinition
    {
        public List<KeyDefinition> KeyDefinitions { get; set; }

        public List<SpecialKeyDefinition> SpecialLeftKeyDefinitions { get; set; }

        public List<SpecialKeyDefinition> SpecialRightKeyDefinitions { get; set; }

        public KeysLineDefinition()
        {
            KeyDefinitions = new List<KeyDefinition>();
            SpecialLeftKeyDefinitions = new List<SpecialKeyDefinition>();
            SpecialRightKeyDefinitions = new List<SpecialKeyDefinition>();
        }
    }
}
n class="c1">/// <seealso cref="ExtendedObject" /> public abstract class AppButton : ExtendedObject { /// <summary> /// Occurs when the button has been pressed. /// </summary> public event Action Pressed; private String _text; /// <summary> /// Gets or sets the text. /// </summary> public String Text { get { return _text; } set { _text = value; RaisePropertyChangedAuto(); } } private bool _isEnabled; /// <summary> /// Gets or sets a value indicating whether this instance is enabled. /// </summary> public bool IsEnabled { get { return _isEnabled; } set { _isEnabled = value; RaisePropertyChangedAuto(); } } private RelayCommand _command; /// <summary> /// Gets or sets the command. /// </summary> public RelayCommand Command { get { return _command; } set { _command = value; RaisePropertyChangedAuto(); } } /// <summary> /// Initializes a new instance of the <see cref="AppButton"/> class. /// </summary> public AppButton() { } /// <summary> /// Initializes a new instance of the <see cref="AppButton"/> class. /// </summary> /// <param name="text">The text.</param> /// <param name="isEnabled">if set to <c>true</c> [is enabled].</param> /// <param name="onExecute">The on execute.</param> /// <param name="canExecute">The can execute.</param> public AppButton(String text, bool isEnabled) : this() { Text = text; IsEnabled = isEnabled; Command = new RelayCommand(() => { Pressed?.Invoke(); }); } /// <summary> /// Initializes a new instance of the <see cref="AppButton"/> class. /// </summary> /// <param name="text">The text.</param> /// <param name="command">The command.</param> public AppButton(String text, RelayCommand command) : this(text, true) { Command = command; } /// <summary> /// Invalidates the button state. /// </summary> public void RaiseCanExecute() { Command.RaiseCanExecuteChanged(); } /// <summary> /// Pops this instance. /// </summary> public void Pop() { TangoIOC.Default.GetInstance<INotificationProvider>().PopAppButton(this); } /// <summary> /// Pushes this instance. /// </summary> public void Push() { TangoIOC.Default.GetInstance<INotificationProvider>().PushAppButton(this); } } }