예제 #1
0
        public ConversationWindow(IConversationView model)
        {
            InitializeComponent();
            DataContext = new ConversationWindowViewModel(model);

            this.FixBackground();
        }
 public override void AttachView(object view, object context)
 {
     base.AttachView(view, context);
     _view = (IConversationView)view;
 }
예제 #3
0
 public void InitialiseConversation(string userName,IConversationView conversationView)
 {
     if (conversationControllers.ContainsKey(userName))
     {
         conversationControllers[userName].ShowView();
         return;
     }
     ConversationController newConversationController = new ConversationController();
     newConversationController.ReceiverName = userName;
     newConversationController.CurrentClientName = this.currentUserName;
     newConversationController.LocalPort = this.localPort;
     newConversationController.InitialiseController();
     newConversationController.SendServerMessageEvent += new SendServerMessageEventHandler(newConversationController_SendServerMessageEvent);
     newConversationController.DisposeConversationControllerEvent += new DisposeConversationController(newConversationController_DisposeConversationControllerEvent);
     newConversationController.InitialiseView(conversationView);
     this.conversationControllers.Add(userName, newConversationController);
 }
예제 #4
0
 public override void AttachView(object view, object context)
 {
     base.AttachView(view, context);
     _view = view as IConversationView;
 }
예제 #5
0
 public ConversationWindowViewModel(IConversationView model)
 {
     CurrentView = model;
 }
예제 #6
0
 public void InitialiseView(IConversationView view)
 {
     this.conversationView = view;
     view.Initialise(this.receiverName);
     view.CurrentUserName = currentClientName;
     conversationView.CloseEvent += new CloseEventDelegate(conversationView_CloseEvent);
     conversationView.SendMessageEvent += new SendMessageDelegate(conversationView_SendMessageEvent);
     conversationView.ShowView();
 }