public ScreenContactEdit(Contact contact, Group group) : base() { InitializeComponent(); if ((this.contact = contact) != null) { this.textBoxSipUri.Text = this.contact.UriString ?? this.contact.UriString; this.textBoxDisplayName.Text = this.contact.DisplayName ?? this.contact.DisplayName; this.textBoxSipUri.IsEnabled = false; this.editMode = true; this.labelTitle.Content = "Edit Contact"; } else { String realm = Win32ServiceManager.SharedManager.ConfigurationService.Get(Configuration.ConfFolder.NETWORK, Configuration.ConfEntry.REALM, Configuration.DEFAULT_REALM); this.contact = new Contact(); if (group != null) { this.contact.GroupName = group.Name; } this.textBoxSipUri.Text = this.contact.UriString = String.Format("sip:johndoe@{0}", realm.Replace("sip:", String.Empty)); this.textBoxDisplayName.Text = this.contact.DisplayName = "John Doe"; this.textBoxSipUri.IsEnabled = true; this.editMode = false; this.labelTitle.Content = "Add Contact"; } this.contactService = Win32ServiceManager.SharedManager.ContactService; this.screenService = Win32ServiceManager.SharedManager.Win32ScreenService; }
public MainWindow() { InitializeComponent(); aTimer.Interval = 10000; aTimer.Elapsed += aTimer_Elapsed; aTimer.Start(); //Initialize Screen Service this.screenService = Win32ServiceManager.SharedManager.Win32ScreenService; this.screenService.SetTabControl(this.Tab1); //this.screenService.SetProgressLabel(this.labelProgressInfo); Common.MainW = this; // 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>(); this.screenService.Show(ScreenType.Authentication); this.Uname.Text = Common.displayName; this.Ye.Text = Common.Uye.ToString("0.00"); }
public ScreenGroupEdit(Group group) { InitializeComponent(); if ((this.group = group) != null) { this.textBoxDisplayName.Text = this.group.DisplayName ?? this.group.DisplayName; this.labelTitle.Content = "Edit Group"; this.editMode = true; } else { this.labelTitle.Content = "Add Group"; this.editMode = false; } this.editMode = (group != null); this.contactService = Win32ServiceManager.SharedManager.ContactService; this.screenService = Win32ServiceManager.SharedManager.Win32ScreenService; }
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 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 ScreenContactEdit(Contact contact, Group group) : base() { InitializeComponent(); if ((this.contact = contact) != null) { this.textBoxSipUri.Text = this.contact.UriString ?? this.contact.UriString; this.textBoxDisplayName.Text = this.contact.DisplayName ?? this.contact.DisplayName; this.textBoxSipUri.IsEnabled = false; this.editMode = true; this.labelTitle.Content = Strings.Text_EditContact; } else { String realm = Win32ServiceManager.SharedManager.ConfigurationService.Get(Configuration.ConfFolder.NETWORK, Configuration.ConfEntry.REALM, Configuration.DEFAULT_NETWORK_REALM); this.contact = new Contact(); if (group != null) { this.contact.GroupName = group.Name; } this.textBoxSipUri.Text = this.contact.UriString = String.Format("sip:johndoe@{0}", realm.Replace("sip:", String.Empty)); this.textBoxDisplayName.Text = this.contact.DisplayName = "John Doe"; this.textBoxSipUri.IsEnabled = true; this.editMode = false; this.labelTitle.Content = Strings.Text_AddContact; } this.contactService = Win32ServiceManager.SharedManager.ContactService; this.historyService = Win32ServiceManager.SharedManager.HistoryService; this.screenService = Win32ServiceManager.SharedManager.Win32ScreenService; }