diff -r 000000000000 -r 249d70e7b32d client/src/Iri.Modernisation.Controls/ViewModel/HeaderControl/HeaderControlVM.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderControl/HeaderControlVM.cs Wed Nov 18 15:30:31 2009 +0100 @@ -0,0 +1,56 @@ +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 Iri.Modernisation.BaseMVVM.ViewModel; +using Iri.Modernisation.BaseMVVM.Commands; +namespace Iri.Modernisation.Controls.ViewModel +{ + public class HeaderControlVM : BaseMVVM.ViewModel.ViewModel + { + private String _connectedName = String.Empty; + public String ConnectedName + { + get + { + if (_connectedName != String.Empty) + { + return _connectedName; + } + else + { + return "Non Connecté"; + } + } + set + { + _connectedName = value; + OnPropertyChanged("ConnectedName"); + } + } + public HeaderControlVM() + { + InitializeCommands(); + } + public HeaderControlVM(String name) + { + _connectedName = name; + InitializeCommands(); + } + private void InitializeCommands() + { + Commands.HeaderControl.ButtonClick.Executed += new EventHandler(ButtonClick_Executed); + } + + void ButtonClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) + { + MessageBox.Show(e.Parameter.ToString()); + } + } +}