private void Work1_Click(object sender, EventArgs e) { WorkRTB.Clear(); string[] arr = MainRTB.Text.Split('\n'); List <string> list = new List <string>(); int len = 0; foreach (string str in arr) { if (str.Length > len) { len = str.Length; } } foreach (string str in arr) { if (str.Length == len) { list.Add(str); } } foreach (string str in list) { str.Trim(); List <string> l = new List <string>(str.Split(' ')); l.Sort(); foreach (string word in l) { WorkRTB.AppendText(word + " "); } WorkRTB.Text.TrimEnd(); WorkRTB.AppendText("\n"); } }
private void create_Click(object sender, EventArgs e) { curFileName = null; MainRTB.Clear(); WorkRTB.Clear(); this.Text = "Textor"; }