diff -r 4d9ebc6fbbe8 -r 43bb1b8ed555 client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs --- a/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Tue Jan 19 09:49:56 2010 +0100 +++ b/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Mon Jan 25 09:30:22 2010 +0100 @@ -16,6 +16,7 @@ using System.Linq; using Iri.Modernisation.Controls.View; using Iri.Modernisation.Data.LDTClass; + namespace Iri.Modernisation.Controls.ViewModel { @@ -270,6 +271,16 @@ Commands.ContextualBinderLayer.ActiveBind.Executed += new EventHandler(ActiveBind_Executed); Commands.ContextualBinderLayer.DesactiveBind.Executed += new EventHandler(DesactiveBind_Executed); Commands.AnnotationMaker.OkClick.Executed += new EventHandler(OkClickAnnotationMaker_Executed); + Commands.EscapeKeyPressed.Executed += new EventHandler(EscapeKeyPressed_Executed); + } + + void EscapeKeyPressed_Executed(object sender, ExecutedEventArgs e) + { + + PolemicRelation = new PolemicLink(); + PolemicRelation.FromElement = _newAnnotation; + + } private void DesactiveBind_Executed(object sender, ExecutedEventArgs e) @@ -366,9 +377,26 @@ }; newfile.Relations.Add(polemicRelation); } - MessageBox.Show(newfile.ToString()); + //MessageBox.Show(newfile.ToString()); + + + Application app = Application.Current as Application; + HttpSender helper = new HttpSender(new Uri("http://mtotet.free.fr/TestHttpSender/index.php"), "POST", + new KeyValuePair("authKey", "123456" ), + new KeyValuePair("newAnnotation", newfile.ToString()), + new KeyValuePair("msg", "303")); + helper.ResponseComplete += new HttpResponseCompleteEventHandler(helper_ResponseComplete); + helper.Execute(); _refElement = null; OnPropertyChanged("IsControlEnable"); + + } + + void helper_ResponseComplete(HttpResponseCompleteEventArgs e) + { + String resp = e.Response; + MessageBox.Show(resp); + } ///