|
[ Login / Register ]
|
|
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Sda.Silverlight.Content.Management;
using System.Text;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Sda.Wcf.Extensions;
using Sda.Core.Exceptions;
namespace Sda.ADEMS.View.Shell
{
public class MyException : IExceptionHost
{
internal string GetFormattedMessage(Exception exception)
{
var stringBuilder = new StringBuilder();
foreach (var item in GetExceptions(exception))
{
stringBuilder.AppendLine(item.Message);
}
return stringBuilder.ToString();
}
public void ShowException(Exception exception)
{
//throw new NotImplementedException();
//ContentManager.Current.Alert("ADEMS", exception.Message, DialogType.Error);
ContentManager.Current.Alert("ADEMS", GetFormattedMessage(exception), DialogType.Error);
}
public void ShowExceptions(List
elton cezar on 2/6/2012
#include
Bartłomiej Kruczyk on 8/16/2011
Updated on 8/16/2011
This class writes the FormatElements corresponding to a parsed scope to a list.
Vlad Horbovanu on 11/1/2010
We'll add a AddCodeWord() method to CodeLine to handle
the appending of text to that line and decide whether we're
dealing with a keyword or not.
We'll try to reuse existing CodeWords if possible, in order to keep the resulting TextBlocks number low. AddCodeWord also updates a Text property that we can use to decide if two lines are equal.
Vlad Horbovanu on
Updated on 10/12/2010
We'll use two entity classes for storing the lines and words of code: CodeWord and CodeLine.
Add CodeText and CodeLines properties to the ViewModel.
The CodeText property will be bound to the Text property of the overlapping TextBox. Any change to its value will cause the CodeLines collection to be updated, resulting in turn in the update of the underlying TextBlocks
Vlad Horbovanu on
Updated on 10/12/2010
UpdateCodeWords method that updates the CodeLines when the CodeText property changes. It basically determines the lines that changed and rebuilds the corresponding CodeLines.
Of course, this can be replaced with a real parsing module.
Vlad Horbovanu on
Updated on 10/12/2010
In order to display the colors depending on the CodeWordType, we need to add a converter.
Vlad Horbovanu on
Updated on 10/12/2010
Normally, the TextBox updates the backing property on FocusLost. We need to update it on every change:
Vlad Horbovanu on
Updated on 10/12/2010
We'll use two entity classes for storing the lines and words of code: CodeWord and CodeLine.
Vlad Horbovanu on
Updated on 10/12/2010
Add the basic INotifyPropertyChanged implementation to the ViewModel
Vlad Horbovanu on
Updated on 10/12/2010
|
Login using an account you already use.
What is CodeReturn?
Upload your code here and embed it wherever you want! Edit it here or directly in your page! Coming soon: Post replies to other people's code!
Latest code snippet
|
|
SUBSCRIBE TO OUR NEWSLETTER
Get news on the latest releases, beta programs, discounts and more.
|
SUPPORT
We are currently implementing a ticketing system and a support forum. Meanwhile,
for bug reports and feature requests, please
send us an email.
|
INFO
© Codexcite S.A. de C.V. - All Rights Reserved.
Calle Acacias #211, Colonia Valle Alto, Monterrey, Nuevo Léon, CP 64989, México
|