Revision 2c27cdd0 trunk/Pithos.Client.WPF/Shell/MessageView.xaml.cs

b/trunk/Pithos.Client.WPF/Shell/MessageView.xaml.cs
16 16
using System.Windows.Media.Imaging;
17 17
using System.Windows.Shapes;
18 18
using Caliburn.Micro;
19
using Pithos.Client.WPF.Shell;
19 20

  
20 21
namespace Pithos.Client.WPF
21 22
{
......
53 54
        /// </summary>
54 55
        private void OnCopy(object sender, ExecutedRoutedEventArgs e)
55 56
        {
56
            StringBuilder clipText = new StringBuilder()
57
            var text = GetLogText();
58
            Clipboard.SetText(text);
59
        }
60

  
61
        private string GetLogText()
62
        {
63
            StringBuilder logText = new StringBuilder()
57 64
                .Append('-', 30)
58
                .AppendLine("\r\nProduct Map")
65
                .AppendLine("\r\nPithos")
59 66
                .Append('-', 30)
60 67
                .AppendLine()
61 68
                .AppendLine();
62 69
            foreach (var message in UserMessages)
63 70
            {
64
                clipText
71
                logText
65 72
                    .Append('-', 20)
66 73
                    .AppendFormat("\r\n[{0,5}]\t{1}", message.Severity, message.Message)
67 74
                    .AppendLine()
......
69 76
                    .AppendLine();
70 77
            }
71 78

  
72
            Clipboard.SetText(clipText.ToString());
79
            var text = logText.ToString();
80
            return text;
73 81
        }
74 82

  
75 83
        private void OnClose(object sender, ExecutedRoutedEventArgs e)
......
87 95

  
88 96
        private void OnSend(object sender, RoutedEventArgs e)
89 97
        {
90
            SmtpClient client=new SmtpClient();
98
            var manager=IoC.Get<IWindowManager>();
99
            var logText = GetLogText();
100
            var feedBack = IoC.Get<FeedbackViewModel>();
101
            feedBack.AppendData(logText);
102
            manager.ShowWindow(feedBack);
103
            this.Close();
91 104
        }
92 105
    }
93 106

  

Also available in: Unified diff