Exemplo n.º 1
0
        public Keyboard(JKeyboard jk, string staticId)
        {
            _id       = jk.Id;
            _name     = jk.Name;
            _comPort  = jk.ComPort;
            _staticId = staticId;

            foreach (JKey jKey in jk.KeyList)
            {
                Key k = new Key(jKey);
                _keyList.Add(k);
            }
        }
Exemplo n.º 2
0
        public JKeyboard SaveKeyboard(string version)
        {
            JKeyboard jk = new JKeyboard();

            jk.Version = version;
            jk.Id      = _id;
            jk.Name    = _name;
            jk.ComPort = _comPort;

            foreach (Key key in _keyList)
            {
                jk.KeyList.Add(key.SaveKey());
            }

            return(jk);
        }