public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
dic.Add(1, "E");
dic.Add(2, "G");
dic.Add(3, "$");
dic.Add(4, "/");
dic.Add(5, "!");
dic.Add(6, "P");
dic.Add(7, "*");
dic.Add(8, "@");
dic.Add(9, "Q");
dic.Add(0, "U");
}
public static Dictionary<int, string> dic = new Dictionary<int, string>();
private void txt_TextChanged(object sender, TextChangedEventArgs e)
{
txtval.Text = "";
char[] str = txt.Text.ToArray();
foreach (char items in str)
{
var cx = (from t in dic where t.Key == Convert.ToInt32(items.ToString()) select t);
foreach (var item in cx)
{
txtval.Text += item.Value;
}
}
}
}