コード例 #1
0
        public ChatSystemMainWindow(ContactManager contactManager, WindowMessageNotificator windowMessageNotificator, SenderService senderService)
        {
            _contactManager = contactManager;
            _windowMessageNotificator = windowMessageNotificator;
            _senderService = senderService;

            InitializeComponent();
            _InitializeObjects();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: oxscar93/Projects-C-
        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));
        }
コード例 #3
0
ファイル: ChatWindow.cs プロジェクト: oxscar93/Projects-C-
 public ChatWindow(Contact contact, SenderService senderService)
 {
     InitializeComponent();
     _contact = contact;
     _senderService = senderService;
 }
コード例 #4
0
 public ChatWindow GetChatWindow(Contact contact, SenderService senderService)
 {
     return new ChatWindow(contact, senderService);
 }