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 errors) { throw new NotImplementedException(); } private ObservableCollection GetExceptions(Exception exception) { var result = new ObservableCollection(); if (exception != null) { if (exception is IncomingMessageException) { IncomingMessageException error = (IncomingMessageException)exception; if (error.Exceptions.Count > 0) { for (int i = 0; i < error.Exceptions.Count; i++) { result.Add(error.Exceptions[i]); } } } else { var error = new ParamsException(exception.Message, null); error.Name = exception.GetType().FullName; result.Add(error); } } return result; } } }
elton cezar on 2/6/2012
#include using namespace std; int main() { int a,b; char c; int tab[10]; for (int i=0; i<10; i++) { tab[i]=0; } while((cin>>c>>a>>b)!=NULL) { switch (c) { case 'z': tab[a]=b; break; case '+': cout<
Bartłomiej Kruczyk on 8/16/2011 Updated on 8/16/2011
Description goes here...
center quote on 3/7/2011
Description goes here...
Stefan Cullmann on 1/8/2011
Description goes here...
a_belykh on 12/9/2010
This class writes the FormatElements corresponding to a parsed scope to a list.
Vlad Horbovanu on 11/1/2010
Test
Eduardo Ramos on 10/18/2010 Updated on 10/18/2010
una prueba
Heriberto . on 10/13/2010
Victor Grigoriu on 10/13/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
just testing
Vlad Horbovanu on Updated on 11/10/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
CodeLine implementation
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
just some demo code
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.

If you have logged in previously, click the same button you did last time.

If you don't have an account with any of these services, just pick Google. They'll help you set up an account.

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
blog comments powered by Disqus
SUBSCRIBE TO OUR NEWSLETTER
GO
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