Example #1
0
        public ScreenContacts()
            : base()
        {
            InitializeComponent();

            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;

            // important to do it here before setting ItemsSource
            this.contactService.onContactEvent += this.contactService_onContactEvent;
            this.sipService.onSubscriptionEvent += this.sipService_onSubscriptionEvent;

            this.UpdateSource();
        }
        public ScreenAuthentication()
        {
            InitializeComponent();

            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;

            this.textBoxDisplayName.Text = this.configurationService.Get(Configuration.ConfFolder.IDENTITY, Configuration.ConfEntry.DISPLAY_NAME, Configuration.DEFAULT_DISPLAY_NAME);
            this.textBoxPublicIdentity.Text = this.configurationService.Get(Configuration.ConfFolder.IDENTITY, Configuration.ConfEntry.IMPU, Configuration.DEFAULT_IMPU);
            this.textBoxPrivateIdentity.Text = this.configurationService.Get(Configuration.ConfFolder.IDENTITY, Configuration.ConfEntry.IMPI, Configuration.DEFAULT_IMPI);
            this.passwordBox.Password = this.configurationService.Get(Configuration.ConfFolder.IDENTITY, Configuration.ConfEntry.PASSWORD, String.Empty);
            this.textBoxRealm.Text = this.configurationService.Get(Configuration.ConfFolder.NETWORK, Configuration.ConfEntry.REALM, Configuration.DEFAULT_REALM);
            this.checkBoxEarlyIMS.IsChecked = this.configurationService.Get(Configuration.ConfFolder.NETWORK, Configuration.ConfEntry.EARLY_IMS, Configuration.DEFAULT_EARLY_IMS);

            this.configurationService.onConfigurationEvent += this.configurationService_onConfigurationEvent;
            this.sipService.onRegistrationEvent += this.sipService_onRegistrationEvent;
        }
Example #3
0
        public MainWindow()
        {
            InitializeComponent();

            // Initialize Screen Service
            this.screenService = Win32ServiceManager.SharedManager.Win32ScreenService;
            this.screenService.SetTabControl(this.tabControl);
            this.screenService.SetProgressLabel(this.labelProgressInfo);

            // Initialize SIP Service
            this.sipService = Win32ServiceManager.SharedManager.SipService;
            this.sipService.onStackEvent += this.sipService_onStackEvent;
            this.sipService.onRegistrationEvent += this.sipService_onRegistrationEvent;
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;
            this.sipService.onMessagingEvent += this.sipService_onMessagingEvent;
            this.sipService.onSubscriptionEvent += this.sipService_onSubscriptionEvent;
            this.sipService.onHyperAvailabilityTimedout += this.sipService_onHyperAvailabilityTimedout;

            // Initialize other Services
            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.contactService = Win32ServiceManager.SharedManager.ContactService;
            this.soundService = Win32ServiceManager.SharedManager.SoundService;
            this.historyService = Win32ServiceManager.SharedManager.HistoryService;
            this.stateMonitorService = Win32ServiceManager.SharedManager.StateMonitorService;
            this.xcapService = Win32ServiceManager.SharedManager.XcapService;
            this.configurationService.onConfigurationEvent += this.configurationService_onConfigurationEvent;
            this.xcapService.onXcapEvent += this.xcapService_onXcapEvent;
            this.stateMonitorService.onStateChangedEvent += this.stateMonitorService_onStateChangedEvent;

            // Hook Closeable items
            this.AddHandler(CloseableTabItem.CloseTabEvent, new RoutedEventHandler(this.CloseTab));

            this.registrations = new MyObservableCollection<RegistrationInfo>();
            this.watchers = new MyObservableCollection<WatcherInfo>();

            // Show Authentication Screen
            //this.screenService.Show(ScreenType.Contacts);
            this.screenService.Show(ScreenType.Authentication);
        }
 public Login()
 {
     InitializeComponent();
     this.sipService = Win32ServiceManager.SharedManager.SipService;
     this.sipService.onRegistrationEvent += sipService_onRegistrationEvent;
 }
        public ScreenOptions()
        {
            InitializeComponent();

            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.xcapService          = Win32ServiceManager.SharedManager.XcapService;
            this.sipService           = Win32ServiceManager.SharedManager.SipService;

            this.xcapService.onXcapEvent += this.xcapService_onXcapEvent;

            //
            //  Contacts
            //
            this.radioButtonContactsRemote.Checked   += (sender, e) => this.groupBoxXCAP.IsEnabled = true;
            this.radioButtonContactsRemote.Unchecked += (sender, e) => this.groupBoxXCAP.IsEnabled = false;

            //
            //  Messaging
            //
            this.radioButtonMessagingSMSBinary.Checked   += (sender, e) => this.textBoxMessagingPSI.IsEnabled = true;
            this.radioButtonMessagingSMSBinary.Unchecked += (sender, e) => this.textBoxMessagingPSI.IsEnabled = false;


            //
            //  Presence
            //
            this.checkBoxPresenceSubscribe.Checked += (sender, e) =>
            {
                this.checkBoxPresenceRLS.IsEnabled = true;
            };
            this.checkBoxPresenceSubscribe.Unchecked += (sender, e) =>
            {
                this.checkBoxPresenceRLS.IsEnabled = false;
            };

            this.checkBoxPresencePublish.Checked += (sender, e) =>
            {
                this.textBoxPresenceFreeText.IsEnabled         = true;
                this.textBoxPresenceHomePage.IsEnabled         = true;
                this.textBoxHyperAvailabilityTimeout.IsEnabled = true;
                this.borderAvatar.IsEnabled = true;
            };
            this.checkBoxPresencePublish.Unchecked += (sender, e) =>
            {
                this.textBoxPresenceFreeText.IsEnabled         = false;
                this.textBoxPresenceHomePage.IsEnabled         = false;
                this.textBoxHyperAvailabilityTimeout.IsEnabled = false;
                this.borderAvatar.IsEnabled = false;
            };

            this.textBoxPresenceFreeText.TextChanged += (sender, e) => this.presenceChanged = true;
            this.textBoxPresenceHomePage.TextChanged += (sender, e) => this.presenceChanged = true;

            //
            //  NATT
            //
            this.checkBoxIceEnabled.Checked += (sender, e) =>
            {
                this.checkBoxStunForICE.IsEnabled = true;
                this.checkBoxTurnForICE.IsEnabled = true;
            };
            this.checkBoxIceEnabled.Unchecked += (sender, e) =>
            {
                this.checkBoxStunForICE.IsEnabled = false;
                this.checkBoxTurnForICE.IsEnabled = false;
            };
            this.radioButtonStunUseThis.Checked += (sender, e) =>
            {
                this.textBoxStunServerAddress.IsEnabled = true;
                this.textBoxStunPort.IsEnabled          = true;
            };
            this.radioButtonStunUseThis.Unchecked += (sender, e) =>
            {
                this.textBoxStunServerAddress.IsEnabled = false;
                this.textBoxStunPort.IsEnabled          = false;
            };


            //
            //  Security
            //
            this.checkBoxIPSecSecAgreeEnabled.Unchecked += (sender, e) =>
            {
                this.comboBoxIPSecAlgorithm.IsEnabled  = false;
                this.comboBoxIPSecEAlgorithm.IsEnabled = false;
                this.comboBoxIPSecMode.IsEnabled       = false;
                this.comboBoxIPSecProtocol.IsEnabled   = false;
            };
            this.checkBoxIPSecSecAgreeEnabled.Checked += (sender, e) =>
            {
                this.comboBoxIPSecAlgorithm.IsEnabled  = true;
                this.comboBoxIPSecEAlgorithm.IsEnabled = true;
                this.comboBoxIPSecMode.IsEnabled       = true;
                this.comboBoxIPSecProtocol.IsEnabled   = true;
            };

            //
            //  QoS
            //
            this.checkBoxSessionTimersEnable.Checked += (sender, e) =>
            {
                this.comboBoxSessionTimerRefreser.IsEnabled = true;
                this.textBoxSessionTimersTimeout.IsEnabled  = true;
            };
            this.checkBoxSessionTimersEnable.Unchecked += (sender, e) =>
            {
                this.comboBoxSessionTimerRefreser.IsEnabled = false;
                this.textBoxSessionTimersTimeout.IsEnabled  = false;
            };

            this.InitializeGeneral();
            this.Initializeidentity();
            this.InitializeCodecs();
            this.InitializeQoS();
            this.InitializeSecurity();

            this.LoadConfiguration();
        }
Example #6
0
        public bool Start()
        {
            this.configurationService = this.manager.ConfigurationService;
            this.sipService = this.manager.SipService;
            this.contactService = this.manager.ContactService;

            #if !ASYNCHRONOUSLY
            this.synchronizer = new System.Threading.Semaphore(0, 1);
            #endif

            return true;
        }
Example #7
0
        public bool Start()
        {
            this.screenService = this.manager.ScreenService;
#if !WINRT
            this.xcapService = this.manager.XcapService;
            this.sipService = this.manager.SipService;
#endif
            this.configurationService = this.manager.ConfigurationService;
            this.stateMonitorService = this.manager.StateMonitorService;
#if !WINRT
            this.sipService.onRegistrationEvent += this.sipService_onRegistrationEvent;
#endif

            return true;
        }
Example #8
0
        public MessagingWindow(String remotePartyUri)
        {
            InitializeComponent();

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

            // 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;

            // Events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;

            lock (MessagingWindow.windows)
            {
                MessagingWindow.windows.Add(this);
            }
        }
Example #9
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);
            }
        }
Example #10
0
        public SessionWindow(String remotePartyUri)
            : base()
        {
            InitializeComponent();

            this.remotePartyUri = remotePartyUri;
            this.Title = String.Empty;
            this.buttonCallOrAnswer.Tag = "Call";

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

            this.videoDisplayLocal = new VideoDisplay();
            this.videoDisplayLocal.Visibility = Visibility.Hidden;
            this.videoDisplayRemote = new VideoDisplay();
            this.videoDisplayRemote.Visibility = Visibility.Hidden;
            this.videoDisplayRemote.ToolTip = this.borderVideoDispalyRemote.ToolTip;

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

            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 to SIP events
            this.sipService.onInviteEvent += this.sipService_onInviteEvent;

            lock (SessionWindow.windows)
            {
                SessionWindow.windows.Add(this);
            }
        }
Example #11
0
        public ScreenOptions()
        {
            InitializeComponent();

            this.configurationService = Win32ServiceManager.SharedManager.ConfigurationService;
            this.xcapService = Win32ServiceManager.SharedManager.XcapService;
            this.sipService = Win32ServiceManager.SharedManager.SipService;

            this.xcapService.onXcapEvent += this.xcapService_onXcapEvent;

            //
            //  Contacts
            //
            this.radioButtonContactsRemote.Checked += (sender, e) => this.groupBoxXCAP.IsEnabled = true;
            this.radioButtonContactsRemote.Unchecked += (sender, e) => this.groupBoxXCAP.IsEnabled = false;

            //
            //  Messaging
            //
            this.radioButtonMessagingSMSBinary.Checked += (sender, e) => this.textBoxMessagingPSI.IsEnabled = true;
            this.radioButtonMessagingSMSBinary.Unchecked += (sender, e) => this.textBoxMessagingPSI.IsEnabled = false;

            //
            //  Presence
            //
            this.checkBoxPresenceSubscribe.Checked += (sender, e) =>
                {
                    this.checkBoxPresenceRLS.IsEnabled = true;
                };
            this.checkBoxPresenceSubscribe.Unchecked += (sender, e) =>
            {
                this.checkBoxPresenceRLS.IsEnabled = false;
            };

            this.checkBoxPresencePublish.Checked += (sender, e) =>
            {
                this.textBoxPresenceFreeText.IsEnabled = true;
                this.textBoxPresenceHomePage.IsEnabled = true;
                this.textBoxHyperAvailabilityTimeout.IsEnabled = true;
                this.borderAvatar.IsEnabled = true;
            };
            this.checkBoxPresencePublish.Unchecked += (sender, e) =>
            {
                this.textBoxPresenceFreeText.IsEnabled = false;
                this.textBoxPresenceHomePage.IsEnabled = false;
                this.textBoxHyperAvailabilityTimeout.IsEnabled = false;
                this.borderAvatar.IsEnabled = false;
            };

            this.textBoxPresenceFreeText.TextChanged += (sender, e) => this.presenceChanged = true;
            this.textBoxPresenceHomePage.TextChanged += (sender, e) => this.presenceChanged = true;

            //
            //  NATT
            //
            this.checkBoxIceEnabled.Checked += (sender, e) =>
            {
                this.checkBoxStunForICE.IsEnabled = true;
                this.checkBoxTurnForICE.IsEnabled = true;
            };
            this.checkBoxIceEnabled.Unchecked += (sender, e) =>
            {
                this.checkBoxStunForICE.IsEnabled = false;
                this.checkBoxTurnForICE.IsEnabled = false;
            };
            this.radioButtonStunUseThis.Checked += (sender, e) =>
            {
                this.textBoxStunServerAddress.IsEnabled = true;
                this.textBoxStunPort.IsEnabled = true;
            };
            this.radioButtonStunUseThis.Unchecked += (sender, e) =>
            {
                this.textBoxStunServerAddress.IsEnabled = false;
                this.textBoxStunPort.IsEnabled = false;
            };

            //
            //  Security
            //
            this.checkBoxIPSecSecAgreeEnabled.Unchecked += (sender, e) =>
            {
                this.comboBoxIPSecAlgorithm.IsEnabled = false;
                this.comboBoxIPSecEAlgorithm.IsEnabled = false;
                this.comboBoxIPSecMode.IsEnabled = false;
                this.comboBoxIPSecProtocol.IsEnabled = false;
            };
            this.checkBoxIPSecSecAgreeEnabled.Checked += (sender, e) =>
            {
                this.comboBoxIPSecAlgorithm.IsEnabled = true;
                this.comboBoxIPSecEAlgorithm.IsEnabled = true;
                this.comboBoxIPSecMode.IsEnabled = true;
                this.comboBoxIPSecProtocol.IsEnabled = true;
            };

            //
            //  QoS
            //
            this.checkBoxSessionTimersEnable.Checked += (sender, e) =>
            {
                this.comboBoxSessionTimerRefreser.IsEnabled = true;
                this.textBoxSessionTimersTimeout.IsEnabled = true;
            };
            this.checkBoxSessionTimersEnable.Unchecked += (sender, e) =>
            {
                this.comboBoxSessionTimerRefreser.IsEnabled = false;
                this.textBoxSessionTimersTimeout.IsEnabled = false;
            };

            this.InitializeGeneral();
            this.Initializeidentity();
            this.InitializeCodecs();
            this.InitializeQoS();
            this.InitializeSecurity();

            this.LoadConfiguration();
        }
Example #12
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;

            // QoS
            this.labelQuality.Content   = String.Empty;
            this.timerQuality           = new Timer(3000);
            this.timerQuality.AutoReset = true;
            this.timerQuality.Elapsed  += this.timerQuality_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);
            }
        }