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; }
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); }
public override void AttachView(object view, object context) { base.AttachView(view, context); _view = view as IConversationView; }
public ConversationWindowViewModel(IConversationView model) { CurrentView = model; }
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(); }