private void InputBox_TextChanged(object sender, EventArgs e) { if (InputBox.Text.StartsWith("π") == false)//Clear the box if the message does not start with π { InputBox.Text = ""; } if ((InputBox.Text.StartsWith("π") == true) && (InputBox.Text.EndsWith("}") == true))// only process if the message starts with π and ends with } { string Message = InputBox.Text; InputBox.Text = "";// Clear the box when done. if (Message.StartsWith("πImageBox_Coordinates{") == true) ///Coordinates { Message = Message.Substring(22); Message = Message.TrimEnd('}'); string[] MessageSplit = Message.Split(new char[] { ',' }); for (int i = 0; i < MessageSplit.Count(); i++) { buttcorrs[i] = Convert.ToInt16(MessageSplit[i]); ////////////////////// }
TolgaCiftci wrote:InputBox.Text.StartsWith("π") == false
TryParse
NumberStyles
IFormatProvider
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)