private void Calculator_TextInput(object sender, TextCompositionEventArgs e) { for (var i = 0; i < e.Text.Length; ++i) { cc.KeyPress(e.Text[i]); } }