示例#1
0
        private void checkShow_KeyPress(object sender, KeyPressEventArgs e)
        {
            KeysConverter kc = new KeysConverter();

            try {
                arbitraryStringName.Append(e.KeyChar);
            }
            catch (Exception ex) {
                //fail VERY silently. Mwa Ha Ha.
            }
            if (arbitraryStringName.ToString().EndsWith("X"))             //Clear string if (upper case) 'X' is pressed.
            {
                arbitraryStringName.Clear();
            }
            if (arbitraryStringName.ToString() == "open" || arbitraryStringName.ToString() == "There is no cow level")
            {
                FormEcwDiagAdv FormECWA = new FormEcwDiagAdv();
                FormECWA.ShowDialog();
            }
        }
示例#2
0
		private void checkShow_KeyPress(object sender,KeyPressEventArgs e) {
			KeysConverter kc=new KeysConverter();
			try {
				arbitraryStringName.Append(e.KeyChar);
			}
			catch(Exception ex) {
				//fail VERY silently. Mwa Ha Ha.
			}
			if(arbitraryStringName.ToString().EndsWith("X")) {//Clear string if (upper case) 'X' is pressed.
				arbitraryStringName.Clear();
			}
			if(arbitraryStringName.ToString()=="open" || arbitraryStringName.ToString()=="There is no cow level") {
				FormEcwDiagAdv FormECWA=new FormEcwDiagAdv();
				FormECWA.ShowDialog();
			}

		}