Mercurial > silverbladetech
diff Messaging/Server/UI/MainWindowViewModel.cs @ 28:4c0dea4760c5
RabbitMq working
author | adminsh@apollo |
---|---|
date | Wed, 21 Mar 2012 20:29:04 +0000 |
parents | 96fdf58e05b4 |
children | 9919ee227c93 |
line wrap: on
line diff
--- a/Messaging/Server/UI/MainWindowViewModel.cs Wed Mar 21 19:00:59 2012 +0000 +++ b/Messaging/Server/UI/MainWindowViewModel.cs Wed Mar 21 20:29:04 2012 +0000 @@ -1,12 +1,9 @@ -using System; -using System.Windows.Input; +using System.Windows.Input; using Common; using Common.Logger; -using Common.Messages; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using System.Windows; -using GalaSoft.MvvmLight.Messaging; using Server.EndPoints; using Server.Interfaces; using Server.Listeners; @@ -48,12 +45,13 @@ public MainWindowViewModel() { InitSocketEndPoint(Settings.SocketsPortNumber); - InitRabbitEndPoint(Settings.RabbitPortNumber); + InitRabbitEndPoint(Settings.RabbitPortNumber, Settings.QueueName); InitRabbitProtoEndPoint(Settings.RabbitProtoPortNumber); CloseCommand = new RelayCommand(CloseCommandExecute); + } - } + #endregion private void InitSocketEndPoint(int port) { @@ -65,9 +63,9 @@ }; } - private void InitRabbitEndPoint(int port) + private void InitRabbitEndPoint(int port, string queueName) { - IListener listener = new RabbitQueueListener(port); + IListener listener = new RabbitQueueListener(port, queueName); RabbitEndPoint = new RabbitEndPoint(listener) { DisplayText = "RabbitMQ", @@ -89,7 +87,5 @@ Log.Write("Closing command executed"); Application.Current.Shutdown(); } - - #endregion } }