Ejemplo n.º 1
0
        private String GetContactName(NTContact contact)
        {
            //prepare contact name and username from NTContact
            String name = "";
            String nick = "";

            if (contact != null)
            {
                name = contact.FullName().Trim().Length > 64 ? contact.FullName().Trim().Substring(0, 64) : contact.FullName().Trim();
                nick = new JabberUser(contact.NTJabberID).Nick;
            }
            return(name + " (" + nick + ")");
        }
Ejemplo n.º 2
0
        private String GetContactName(NTContact contact)
        {
            //prepare contact name and username from NTContact
            String name = "";
            String nick = "";
            if (contact != null)
            {

                name = contact.FullName().Trim().Length > 64 ? contact.FullName().Trim().Substring(0, 64) : contact.FullName().Trim();
                nick = new JabberUser(contact.NTJabberID).Nick;
            }
            return name + " (" + nick + ")";
        }
Ejemplo n.º 3
0
        private String GetContactName(NTContact contact)
        {
            //prepare contact name and username from NTContact
            String Name     = "";
            String Username = "";

            if (contact != null)
            {
                Name     = contact.FullName().Trim().Length > 64 ? contact.FullName().Trim().Substring(0, 64) : contact.FullName().Trim();
                Username = contact.NTJabberID.Trim().Length != 0 ? " (" + (contact.NTJabberID.Trim().Length > 64 ? contact.NTJabberID.Trim().Substring(0, 64) : contact.NTJabberID.Trim()) + ")" : "";
            }
            return(Name + Username);
        }
Ejemplo n.º 4
0
        public Phone2PhoneWindow(NTContact selectedContact, NTContact meContact)
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Phone2PhoneWindow));

            InitializeComponent();
            LocalizeComponent();
            BrandComponent();
            mySelectedNTContact = selectedContact;
            myMeNTContact = meContact;

            this.ClientSize = this.Size;
            this.MaximizeBox = false;
            this.MaximumSize = this.Size;


           lblPhoneFromName.Text = mySelectedNTContact.FullName() + "'s Phone Number";
            selectedContactComboBox.Items.Clear();
            selectedContactComboBox.Items.Clear();
            meContactComboBox.Items.Clear();
#region process mySelectedNTContact
            if (mySelectedNTContact.NTHomeTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.selectedContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = Properties.Localization.txtCFormTitlePhoneHome;
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = mySelectedNTContact.NTHomeTelephoneNumber; 
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.selectedContactComboBox.SelectedItem = this.tmplRadComboBoxItem;
            }
            if (mySelectedNTContact.NTMobileTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.selectedContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = Properties.Localization.txtCFormTitlePhoneMobile;
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = mySelectedNTContact.NTMobileTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.selectedContactComboBox.SelectedItem = this.tmplRadComboBoxItem;
            };
            if (mySelectedNTContact.NTBusinessTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.selectedContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = Properties.Localization.txtCFormTitlePhoneBusiness;
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = mySelectedNTContact.NTBusinessTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.selectedContactComboBox.SelectedItem = this.tmplRadComboBoxItem;
            };
            if (selectedContactComboBox.Items.Count > 0) selectedContactComboBox.SelectedIndex = 0;
#endregion

            #region process myMeNTContact
            if (myMeNTContact.NTHomeTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.meContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = Properties.Localization.txtCFormTitlePhoneHome;
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = myMeNTContact.NTHomeTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.meContactComboBox.SelectedItem = this.tmplRadComboBoxItem;
            }
            if (myMeNTContact.NTMobileTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.meContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = Properties.Localization.txtCFormTitlePhoneMobile;
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = myMeNTContact.NTMobileTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.meContactComboBox.SelectedItem = this.tmplRadComboBoxItem;
            };
            if (myMeNTContact.NTBusinessTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.meContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = Properties.Localization.txtCFormTitlePhoneBusiness;
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = myMeNTContact.NTBusinessTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.meContactComboBox.SelectedItem = this.tmplRadComboBoxItem;
            };
            if (meContactComboBox.Items.Count > 0) meContactComboBox.SelectedIndex = 0;
            #endregion

        }
Ejemplo n.º 5
0
        public Phone2PhoneWindow(NTContact selectedContact)
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Phone2PhoneWindow));

            InitializeComponent();

            this.ClientSize  = this.Size;
            this.MaximizeBox = false;
            this.MaximumSize = this.Size;


            myNTContact = selectedContact;

            label3.Text = myNTContact.FullName() + "'s Phone Number";
            radComboBox1.Items.Clear();
            if (myNTContact.NTHomeTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.radComboBox1.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = "Home";
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = myNTContact.NTHomeTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.radComboBox1.SelectedItem                   = this.tmplRadComboBoxItem;
            }
            if (myNTContact.NTMobileTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.radComboBox1.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = "Mobile";
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = myNTContact.NTMobileTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.radComboBox1.SelectedItem                   = this.tmplRadComboBoxItem;
            }
            ;
            if (myNTContact.NTBusinessTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.radComboBox1.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = "Work";
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = myNTContact.NTBusinessTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.radComboBox1.SelectedItem                   = this.tmplRadComboBoxItem;
            }
            ;
        }
Ejemplo n.º 6
0
        public Phone2PhoneWindow(NTContact selectedContact, NTContact meContact)
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Phone2PhoneWindow));

            InitializeComponent();
            LocalizeComponent();
            BrandComponent();
            mySelectedNTContact = selectedContact;
            myMeNTContact       = meContact;

            this.ClientSize  = this.Size;
            this.MaximizeBox = false;
            this.MaximumSize = this.Size;


            lblPhoneFromName.Text = mySelectedNTContact.FullName() + "'s Phone Number";
            selectedContactComboBox.Items.Clear();
            selectedContactComboBox.Items.Clear();
            meContactComboBox.Items.Clear();
            #region process mySelectedNTContact
            if (mySelectedNTContact.NTHomeTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.selectedContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = Properties.Localization.txtCFormTitlePhoneHome;
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = mySelectedNTContact.NTHomeTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.selectedContactComboBox.SelectedItem        = this.tmplRadComboBoxItem;
            }
            if (mySelectedNTContact.NTMobileTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.selectedContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = Properties.Localization.txtCFormTitlePhoneMobile;
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = mySelectedNTContact.NTMobileTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.selectedContactComboBox.SelectedItem        = this.tmplRadComboBoxItem;
            }
            ;
            if (mySelectedNTContact.NTBusinessTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.selectedContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = Properties.Localization.txtCFormTitlePhoneBusiness;
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = mySelectedNTContact.NTBusinessTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.selectedContactComboBox.SelectedItem        = this.tmplRadComboBoxItem;
            }
            ;
            if (selectedContactComboBox.Items.Count > 0)
            {
                selectedContactComboBox.SelectedIndex = 0;
            }
            #endregion

            #region process myMeNTContact
            if (myMeNTContact.NTHomeTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.meContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = Properties.Localization.txtCFormTitlePhoneHome;
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = myMeNTContact.NTHomeTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.meContactComboBox.SelectedItem              = this.tmplRadComboBoxItem;
            }
            if (myMeNTContact.NTMobileTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.meContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = Properties.Localization.txtCFormTitlePhoneMobile;
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = myMeNTContact.NTMobileTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.meContactComboBox.SelectedItem              = this.tmplRadComboBoxItem;
            }
            ;
            if (myMeNTContact.NTBusinessTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.meContactComboBox.Items.AddRange(new Telerik.WinControls.RadItem[] {
                    this.tmplRadComboBoxItem
                });

                //
                // tmplRadComboBoxItem
                //
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus                = true;
                this.tmplRadComboBoxItem.DescriptionText         = Properties.Localization.txtCFormTitlePhoneBusiness;
                this.tmplRadComboBoxItem.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image                   = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text                    = myMeNTContact.NTBusinessTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText             = null;
                this.tmplRadComboBoxItem.DisplayStyle            = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation       = TextImageRelation.ImageBeforeText;
                this.meContactComboBox.SelectedItem              = this.tmplRadComboBoxItem;
            }
            ;
            if (meContactComboBox.Items.Count > 0)
            {
                meContactComboBox.SelectedIndex = 0;
            }
            #endregion
        }
Ejemplo n.º 7
0
        private Telerik.WinControls.UI.RadListBoxItem BuildContactItem(NTContact contact)
        {
           
                    this.tmplContactListItem = new Telerik.WinControls.UI.RadListBoxItem();

                    JabberUser jabberUser = new JabberUser(contact.NTJabberID);

                    // 
                    // tmplContactListItem
                    // 
                    this.tmplContactListItem.AccessibleDescription = contact.FullName().Length > 64 ? contact.FullName().Trim().Substring(0, 64) : contact.FullName().Trim();
                    this.tmplContactListItem.CanFocus = true;
                    this.tmplContactListItem.DescriptionText = "» " + (contact.PrimaryPhoneNumbers().Length > 64 ? contact.PrimaryPhoneNumbers().Trim().Substring(0, 64) : contact.PrimaryPhoneNumbers().Trim());
                    this.tmplContactListItem.ForeColor = System.Drawing.Color.Black;
                    this.tmplContactListItem.ImageAlignment = ContentAlignment.MiddleCenter;
                    try
                    {
                        if(contact.NTPicture!=null & contact.NTPicture.Length>0) this.tmplContactListItem.Image = ImageProcessing.FixedSize(ImageProcessing.FromString(contact.NTPicture), 60, 60);
                    }
                    catch (Exception)
                    {
                      
                    }

                    if (this.tmplContactListItem.Image == null) this.tmplContactListItem.Image = ((System.Drawing.Image)(Properties.Resources.ContactBlank)); 

                    this.tmplContactListItem.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                    this.tmplContactListItem.Text = "» " + (contact.FullName().Length > 64 ? contact.FullName().Trim().Substring(0, 64) : contact.FullName().Trim());
                    this.tmplContactListItem.Text += jabberUser.Nick.Trim() != "" ? " (" + (jabberUser.Nick.Trim().Length > 64 ? jabberUser.Nick.Trim().Substring(0, 64) : jabberUser.Nick.Trim()) + ")" : "";
                    this.tmplContactListItem.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
                    this.tmplContactListItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                    this.tmplContactListItem.ToolTipText = null;
                    this.tmplContactListItem.Font = new System.Drawing.Font("Trebuchet MS", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                    this.tmplContactListItem.ForeColor = System.Drawing.Color.Black;
                    this.tmplContactListItem.DescriptionFont = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                    this.tmplContactListItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                    this.tmplContactListItem.DoubleClick += new EventHandler(tmplContactListItem_DoubleClick);
                    this.tmplContactListItem.Tag = contact;
                
                return tmplContactListItem;
        }
Ejemplo n.º 8
0
        public Phone2PhoneWindow(NTContact selectedContact)
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Phone2PhoneWindow));

            InitializeComponent();

            this.ClientSize = this.Size;
            this.MaximizeBox = false;
            this.MaximumSize = this.Size;


            myNTContact  = selectedContact;

            label3.Text = myNTContact.FullName() + "'s Phone Number";
            radComboBox1.Items.Clear();
            if (myNTContact.NTHomeTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.radComboBox1.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = "Home";
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = myNTContact.NTHomeTelephoneNumber; 
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.radComboBox1.SelectedItem = this.tmplRadComboBoxItem;
            }
            if (myNTContact.NTMobileTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.radComboBox1.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = "Mobile";
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = myNTContact.NTMobileTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.radComboBox1.SelectedItem = this.tmplRadComboBoxItem;
            };
            if (myNTContact.NTBusinessTelephoneNumber != "")
            {
                this.tmplRadComboBoxItem = new Telerik.WinControls.UI.RadComboBoxItem();

                this.radComboBox1.Items.AddRange(new Telerik.WinControls.RadItem[] {
            this.tmplRadComboBoxItem});

                // 
                // tmplRadComboBoxItem
                // 
                this.tmplRadComboBoxItem.AccessibleDescription = "";
                this.tmplRadComboBoxItem.CanFocus = true;
                this.tmplRadComboBoxItem.DescriptionText = "Work";
                this.tmplRadComboBoxItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tmplRadComboBoxItem.Image = ((System.Drawing.Image)(resources.GetObject("tmpRadComboBoxItem.Image")));
                this.tmplRadComboBoxItem.Text = myNTContact.NTBusinessTelephoneNumber;
                this.tmplRadComboBoxItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible;
                this.tmplRadComboBoxItem.ToolTipText = null;
                this.tmplRadComboBoxItem.DisplayStyle = DisplayStyle.ImageAndText;
                this.tmplRadComboBoxItem.TextImageRelation = TextImageRelation.ImageBeforeText;
                this.radComboBox1.SelectedItem = this.tmplRadComboBoxItem;
            };
        }