public ChatSystemMainWindow(ContactManager contactManager, WindowMessageNotificator windowMessageNotificator, SenderService senderService) { _contactManager = contactManager; _windowMessageNotificator = windowMessageNotificator; _senderService = senderService; InitializeComponent(); _InitializeObjects(); }
static void Main() { var contactManager = new ContactManager(); var senderService = new SenderService(); var windowsNotificator = new WindowMessageNotificator(contactManager); var messageListener = new MessageListener(windowsNotificator); var listenerThread = new Thread(messageListener.Start) {IsBackground = true}; listenerThread.Start(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ChatSystemMainWindow(contactManager, windowsNotificator, senderService)); }
public ChatWindow(Contact contact, SenderService senderService) { InitializeComponent(); _contact = contact; _senderService = senderService; }
public ChatWindow GetChatWindow(Contact contact, SenderService senderService) { return new ChatWindow(contact, senderService); }