Cascade.Controls.addKey C# (CSharp) Метод

addKey() приватный Метод

private addKey ( Keys k ) : void
k Keys
Результат void
        private void addKey(Keys k)
        {
            Keys[] temp = new Keys[keyArray.Length + 1];

            //copy over old array to temp
            for (int i = 0; i < keyArray.Length; i += 1)
            {
                temp[i] = keyArray[i];
            }

            temp[keyArray.Length] = k;
            keyArray = temp;
            
            keyString = new String[keyArray.Length];

            //use new keyArray to replace the string array
            for (int i = 0; i < keyArray.Length; i += 1)
                keyString[i] = keyArray[i].ToString();

            //replace state arrays
            stateArray = new int[keyArray.Length];
            stateArray2 = new int[keyArray.Length];
            stateArray3 = new int[keyArray.Length];
            stateArray4 = new int[keyArray.Length];
            stateArray5 = new int[keyArray.Length];

            //reset stateArrays
            for (int i = 0; i < keyArray.Length; i += 1)
            {
                stateArray[i] = 0;
                stateArray2[i] = 0;
                stateArray3[i] = 0;
                stateArray4[i] = 0;
                stateArray4[i] = 0;
            }


        }