public static bool EditStrings(IList <string> strings)
        {
            if (strings == null)
            {
                throw new ArgumentNullException("strings");
            }

            var window = new MemoWindow();

            window.tb.Text = string.Join(Environment.NewLine, strings);
            if (window.ShowDialog() == true)
            {
                strings.Clear();
                foreach (var line in window.tb.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.None))
                {
                    strings.Add(line);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
 void miAddLines_Click(object sender, RoutedEventArgs e)
 {
     MemoWindow.EditStrings(this.strings);
 }