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));
        }
 public WindowMessageNotificator(ContactManager contactManager)
 {
     _windows = new Dictionary<string, ChatWindow>();
     _contactManager = contactManager;
 }
Example #4
0
 public AddContactWindow(ContactManager contactManager)
 {
     InitializeComponent();
     _contactManager = contactManager;
 }
Example #5
0
 public AddContactWindow GetNewContactWindow(ContactManager contactManager)
 {
     return new AddContactWindow(contactManager);
 }