public void AddError(string message, Exception ex)
 {
     var stackTrace = new StackTrace();
     var item = new OutputWindowMessage
     {
         Title = "Internal Error",
         Icon = Utilities.LoadBitmap("..\\..\\Resources\\error.png"),
         Description = string.Format("Internal error\r\n {0} \r\n in {1}", ex.Message, stackTrace.GetFrame(2))
     };
     _messages.Add(item);
 }
Beispiel #2
0
        public void SaveAs()
        {
            var filename = GetFilename();
            if (!string.IsNullOrEmpty(filename))
            {
                Filename = filename;
                var flag = IsFileLocked(new System.IO.FileInfo(Filename));
                if (!flag)
                {
                    File.WriteAllText(Filename, Text);
                    OnPropertyChanged("Title");

                    var msg = new OutputWindowMessage
                    {
                        Title = "File Saved",
                        Description = Filename,
                        Icon = null
                    };

                    Messenger.Default.Send<IMessage>(msg);
                }
            }
        }