Exemple #1
0
 private void GenerateSigningInDisplayPage(CommunityTab.CommunityPageBuilder builder)
 {
     builder.BeginNewSection(false);
     builder.AddImage(InfoGlyph).Padding = new BoxEdges(0, 1, 4, 1);
     builder.PushBold();
     builder.AddText("Signing-in...");
     builder.PopBold();
     builder.EndCurrentSection();
 }
Exemple #2
0
 private void GenerateErrorDisplayPage(CommunityTab.CommunityPageBuilder builder)
 {
     builder.BeginNewSection(false);
     builder.AddImage(ErrorGlyph).Padding = new BoxEdges(0, 1, 4, 1);
     builder.PushBold();
     builder.AddText("Error...");
     builder.PopBold();
     builder.EndCurrentSection();
     builder.AddSectionBreak();
     builder.BeginNewSection(20);
     builder.AddTextSpan("Unable to access the Windows Messenger service and display contacts in the '" + this._buddyGroup + "' contact group. To use the contact list feature you must have Windows Messenger version 4.5 or greater on your computer.");
     builder.EndCurrentSection();
     builder.AddSectionBreak();
     builder.BeginNewSection(20);
     builder.AddHyperLink("Click here", "Messenger").ToolTip = "http://messenger.msn.com";
     builder.AddTextSpan(" to download and install the latest version of Windows Messenger. Once you have installed it, click the 'Refresh' button above.");
     builder.EndCurrentSection();
 }
Exemple #3
0
 private void GenerateSignInDisplayPage(CommunityTab.CommunityPageBuilder builder)
 {
     builder.BeginNewSection(false);
     builder.AddImage(InfoGlyph).Padding = new BoxEdges(0, 1, 4, 1);
     builder.PushBold();
     builder.AddText("Please sign-in...");
     builder.PopBold();
     builder.EndCurrentSection();
     builder.AddSectionBreak();
     builder.BeginNewSection(20);
     builder.AddTextSpan("You can use the contact list feature to interact with your contacts in the '" + this._buddyGroup + "' group by signing into Windows Messenger service.");
     builder.EndCurrentSection();
     builder.AddSectionBreak();
     builder.BeginNewSection(20);
     builder.AddHyperLink("Sign-in", "SignIn").ToolTip = "Click here to sign-in now";
     builder.EndCurrentSection();
 }
Exemple #4
0
        private void GenerateContactsDisplayPage(CommunityTab.CommunityPageBuilder builder)
        {
            Interop.IMessengerGroup group = null;
            int num = 0;
            if (this._messenger != null)
            {
                Interop.IMessengerGroups myGroups = (Interop.IMessengerGroups) this._messenger.GetMyGroups();
                int count = myGroups.GetCount();
                for (int i = 0; i < count; i++)
                {
                    Interop.IMessengerGroup group2 = (Interop.IMessengerGroup) myGroups.Item(i);
                    string name = group2.GetName();
                    if ((name != null) && name.Equals(this._buddyGroup))
                    {
                        group = group2;
                    }
                }
                if (group == null)
                {
                    group = (Interop.IMessengerGroup) this._messenger.CreateGroup(this._buddyGroup, this._messenger.GetMyServiceId());
                }
            }
            if (group != null)
            {
                Interop.IMessengerContacts contacts = (Interop.IMessengerContacts) group.GetContacts();
                if (contacts != null)
                {
                    num = contacts.GetCount();
                    for (int j = 0; j < num; j++)
                    {
                        string str2;
                        Interop.IMessengerContact contact = (Interop.IMessengerContact) contacts.Item(j);
                        if (contact.GetBlocked())
                        {
                            goto Label_0165;
                        }
                        Image glyph = null;
                        int status = contact.GetStatus();
                        if (status <= 10)
                        {
                            switch (status)
                            {
                                case 1:
                                    goto Label_0121;

                                case 2:
                                    glyph = BuddyGlyph;
                                    goto Label_0128;

                                case 10:
                                    goto Label_0118;
                            }
                            goto Label_0121;
                        }
                        if ((status != 0x12) && (status != 0x22))
                        {
                            goto Label_0121;
                        }
                        glyph = AwayBuddyGlyph;
                        goto Label_0128;
                    Label_0118:
                        glyph = BusyBuddyGlyph;
                        goto Label_0128;
                    Label_0121:
                        glyph = OfflineBuddyGlyph;
                    Label_0128:
                        str2 = contact.GetSigninName();
                        string serviceId = contact.GetServiceId();
                        string friendlyName = contact.GetFriendlyName();
                        builder.AddHyperLinkWithGlyph(friendlyName, new string[] { str2, serviceId }, str2, glyph);
                    Label_0165:;
                    }
                }
            }
            if (num == 0)
            {
                builder.BeginNewSection(false);
                builder.AddImage(InfoGlyph).Padding = new BoxEdges(0, 1, 4, 1);
                builder.PushBold();
                builder.AddText("No contacts found...");
                builder.PopBold();
                builder.EndCurrentSection();
                builder.AddSectionBreak();
                builder.BeginNewSection(20);
                builder.AddTextSpan("There are currently no contacts present in your '" + this._buddyGroup + "' group in Windows Messenger to display here.");
                builder.EndCurrentSection();
            }
            else
            {
                builder.AddSectionBreak();
                builder.AddSectionBreak();
                builder.AddHorizontalLine();
                builder.BeginNewSection(false);
                builder.AddImage(InfoGlyph).Padding = new BoxEdges(0, 1, 4, 1);
                builder.PushBold();
                builder.AddText("Organizing your contacts...");
                builder.PopBold();
                builder.EndCurrentSection();
            }
            builder.AddSectionBreak();
            builder.BeginNewSection(20);
            builder.AddTextSpan("You can use Windows Messenger to organize your contact list, so that you have other contacts appear in this group.");
            builder.EndCurrentSection();
        }