Exemple #1
0
        private void InitNetworkCommManager()
        {
            //processors related to cloud service
            dropboxGeneralNoteDownloader            = new NoteUpdater();
            anotoNotesDownloader                    = new AnotoNoteUpdater();
            noteUpdateScheduler                     = new NoteUpdateScheduler();
            noteUpdateScheduler.updateEventHandler += new NoteUpdateScheduler.UpdateIntervalTickedEvent(noteUpdateScheduler_updateEventHandler);
            cloudDataEventProcessor                 = new CloudDataEventProcessor();
            dropboxGeneralNoteDownloader.noteStreamsDownloadedHandler += new NewNoteStreamsDownloaded(cloudDataEventProcessor.handleDownloadedStreamsFromCloud);
            anotoNotesDownloader.noteStreamsDownloadedHandler         += new NewNoteStreamsDownloaded(cloudDataEventProcessor.handleDownloadedStreamsFromCloud);
            cloudDataEventProcessor.newNoteExtractedEventHandler      += new CloudDataEventProcessor.NewNoteExtractedFromStreamEvent(brainstormManager.HandleComingIdea);

            p2pClient            = new AsyncTCPClient();
            remotePointerManager = new RemotePointerManager();
            p2pClient.setP2PDataListener(remotePointerManager);
            remotePointerManager.setPointerEventListener(this);
            p2pClient.StartClient();
        }
        private void InitNetworkCommManager()
        {
            //processors related to cloud service
            dropboxGeneralNoteDownloader = new NoteUpdater();
            anotoNotesDownloader = new AnotoNoteUpdater();
            noteUpdateScheduler = new NoteUpdateScheduler();
            noteUpdateScheduler.updateEventHandler += new NoteUpdateScheduler.UpdateIntervalTickedEvent(noteUpdateScheduler_updateEventHandler);
            cloudDataEventProcessor = new CloudDataEventProcessor();
            dropboxGeneralNoteDownloader.noteStreamsDownloadedHandler += new NewNoteStreamsDownloaded(cloudDataEventProcessor.handleDownloadedStreamsFromCloud);
            anotoNotesDownloader.noteStreamsDownloadedHandler += new NewNoteStreamsDownloaded(cloudDataEventProcessor.handleDownloadedStreamsFromCloud);
            cloudDataEventProcessor.newNoteExtractedEventHandler += new CloudDataEventProcessor.NewNoteExtractedFromStreamEvent(brainstormManager.HandleComingIdea);

            p2pClient = new AsyncTCPClient();
            remotePointerManager = new RemotePointerManager();
            p2pClient.setP2PDataListener(remotePointerManager);
            remotePointerManager.setPointerEventListener(this);
            p2pClient.StartClient();
        }