public ChatSystemMainWindow(ContactManager contactManager, WindowMessageNotificator windowMessageNotificator, SenderService senderService)
        {
            _contactManager = contactManager;
            _windowMessageNotificator = windowMessageNotificator;
            _senderService = senderService;

            InitializeComponent();
            _InitializeObjects();
        }
Example #2
0
        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));
        }
Example #3
0
 public void Show(WindowMessageNotificator windowMessageNotificator)
 {
     windowMessageNotificator.AddWindowToDictionary(this);
     Show();
 }
Example #4
0
 public MessageListener(WindowMessageNotificator windowMessageNotificator)
 {
     _windowMessageNotificator = windowMessageNotificator;
 }