Esempio n. 1
0
 public void AddEntry(String uriString)
 {
     lock (this.entries)
     {
         if (!this.entries.ContainsKey(uriString))
         {
             IMActivityIndicator entry = new IMActivityIndicator(uriString);
             entry.RemoteStateChangedEvent += this.entry_RemoteStateChangedEvent;
             entry.SendMessageEvent += this.entry_SendMessageEvent;
             this.entries.Add(uriString, entry);
         }
     }
 }
Esempio n. 2
0
 public void AddEntry(String uriString)
 {
     lock (this.entries)
     {
         if (!this.entries.ContainsKey(uriString))
         {
             IMActivityIndicator entry = new IMActivityIndicator(uriString);
             entry.RemoteStateChangedEvent += this.entry_RemoteStateChangedEvent;
             entry.SendMessageEvent        += this.entry_SendMessageEvent;
             this.entries.Add(uriString, entry);
         }
     }
 }
Esempio n. 3
0
        public SessionWindow(String remotePartyUri)
            : base()
        {
            InitializeComponent();

            this.remotePartyUri = remotePartyUri;
            this.Title = String.Empty;
            this.buttonCallOrAnswer.Tag = Strings.Text_Call;

            this.fileTransferSessions = new List<MyMsrpSession>();
            this.imActivityIndicator = new IMActivityIndicator(this.remotePartyUri);

            this.videoDisplayLocal = new VideoDisplay();
            this.videoDisplayLocal.VerticalAlignment = VerticalAlignment.Stretch;
            this.videoDisplayLocal.HorizontalAlignment = HorizontalAlignment.Stretch;
            this.videoDisplayScrenCastLocal = new VideoDisplay();
            this.videoDisplayScrenCastLocal.VerticalAlignment = this.videoDisplayLocal.VerticalAlignment;
            this.videoDisplayScrenCastLocal.HorizontalAlignment = this.videoDisplayLocal.HorizontalAlignment;
            this.videoDisplayRemote = new VideoDisplay();
            this.videoDisplayRemote.ToolTip = this.borderVideoDispalyRemote.ToolTip;

            this.borderVideoDispalyRemote.Child = this.videoDisplayRemote;
            this.borderVideoDispalyLocal.Child = this.videoDisplayLocal;
            this.borderVideoDispalyScrenCastLocal.Child = this.videoDisplayScrenCastLocal;

            this.labelInfo.Content = String.Empty;
            this.timerCall = new Timer(1000);
            this.timerCall.AutoReset = true;
            this.timerCall.Elapsed += this.timerCall_Elapsed;

            // Services
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;

            // Messaging
            this.historyDataSource = new MyObservableCollection<HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource = this.historyDataSource;

            // Register events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;
            this.imActivityIndicator.RemoteStateChangedEvent += this.imActivityIndicator_RemoteStateChangedEvent;
            this.imActivityIndicator.SendMessageEvent += this.imActivityIndicator_SendMessageEvent;

            this.volume = this.configurationService.Get(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.AUDIO_VOLUME, Configuration.DEFAULT_GENERAL_AUDIO_VOLUME);
            this.sliderVolume.Value = (double)this.volume;

            lock (SessionWindow.windows)
            {
                SessionWindow.windows.Add(this);
            }
        }
Esempio n. 4
0
        public MessagingWindow(String remotePartyUri)
        {
            InitializeComponent();

            this.remotePartyUri = remotePartyUri;
            this.Title = String.Empty;
            this.messagingType = MediaType.None;
            this.fileTransferSessions = new List<MyMsrpSession>();
            this.imActivityIndicator = new IMActivityIndicator(this.remotePartyUri);

            // Services
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;

            // Messaging
            this.historyDataSource = new MyObservableCollection<HistoryEvent>();
            this.historyCtrl.ItemTemplateSelector = new DataTemplateSelectorMessaging();
            this.historyCtrl.ItemsSource = this.historyDataSource;

            // Participants
            this.participants = new MyObservableCollection<Participant>();
            this.participants.Add(new Participant(this.remotePartyUri));
            this.listBoxParticipants.ItemsSource = this.participants;
            this.participantsView = CollectionViewSource.GetDefaultView(this.listBoxParticipants.ItemsSource);

            // Events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;
            this.imActivityIndicator.RemoteStateChangedEvent += this.imActivityIndicator_RemoteStateChangedEvent;
            this.imActivityIndicator.SendMessageEvent += this.imActivityIndicator_SendMessageEvent;

            lock (MessagingWindow.windows)
            {
                MessagingWindow.windows.Add(this);
            }
        }