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 void Show(WindowMessageNotificator windowMessageNotificator) { windowMessageNotificator.AddWindowToDictionary(this); Show(); }
public MessageListener(WindowMessageNotificator windowMessageNotificator) { _windowMessageNotificator = windowMessageNotificator; }