当前位置: 首页>>代码示例>>C#>>正文


C# com.getDisplayName方法代码示例

本文整理汇总了C#中com.getDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C# com.getDisplayName方法的具体用法?C# com.getDisplayName怎么用?C# com.getDisplayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com的用法示例。


在下文中一共展示了com.getDisplayName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: onPropertyChange

        /**
         * ContactListener Override: Tutorial Handler - Availability.
         * <br /><br />
         * Maps an availability property ENUM code to a text string, and writes that string to
         * the console. If it's <em>not</em> an availability change, ignore it.
         * <br /><br />
         * The implementation here follows the C++ pattern - a switch statement with cases for each
         * defined code. For Java 5.0, the Enum class' <code>toString</code> method eliminates the
         * need for the entire switch statement. For example, you could code the printf as:
         * <pre>
         *     MySession.myConsole.printf("%s: Availability of %s is now %s%n",
         *                       mySession.myTutorialTag,
         *                       affectedContact.getDisplayName(),
         *                       availability.toString());
         * </pre>
         * Implementing this functionality as a switch statement, however,
         * enables you to perform additional processing for specific cases.
         *
         * @param affectedContact
         * 	The affected Contact.
         * @param prop
         * 	The Contact property that triggered this event.
         * @param value
         * 	Ignored.
         *
         * @since 1.0
         *
         * @see com.skype.api.ContactListener#onPropertyChange(com.skype.api.Contact, com.skype.api.Contact.Property, int, String)
         */
        public void onPropertyChange(com.skype.api.Contact affectedContact, com.skype.api.Contact.Property prop, int value, String svalue)
        {
            if (prop == Contact.Property.P_AVAILABILITY)
            {
                String statusAsText;
                Contact.Availability availability = affectedContact.getAvailability();

                if (availability == Contact.Availability.UNKNOWN)
                    statusAsText = "UNKNOWN";
                else if (availability == Contact.Availability.PENDINGAUTH)
                    statusAsText = "PENDINGAUTH";
                else if (availability == Contact.Availability.BLOCKED)
                    statusAsText = "BLOCKED";
                else if (availability == Contact.Availability.BLOCKED_SKYPEOUT)
                    statusAsText = "BLOCKED_SKYPEOUT";
                else if (availability == Contact.Availability.SKYPEOUT)
                    statusAsText = "SKYPEOUT";
                else if (availability == Contact.Availability.OFFLINE)
                    statusAsText = "OFFLINE";
                else if (availability == Contact.Availability.OFFLINE_BUT_VM_ABLE)
                    statusAsText = "OFFLINE_BUT_VM_ABLE";
                else if (availability == Contact.Availability.OFFLINE_BUT_CF_ABLE)
                    statusAsText = "OFFLINE_BUT_CF_ABLE";
                else if (availability == Contact.Availability.ONLINE)
                    statusAsText = "ONLINE";
                else if (availability == Contact.Availability.AWAY)
                    statusAsText = "AWAY";
                else if (availability == Contact.Availability.NOT_AVAILABLE)
                    statusAsText = "NOT_AVAILABLE";
                else if (availability == Contact.Availability.DO_NOT_DISTURB)
                    statusAsText = "DO_NOT_DISTURB";
                else if (availability == Contact.Availability.SKYPE_ME)
                    statusAsText = "SKYPE_ME";
                else if (availability == Contact.Availability.INVISIBLE)
                    statusAsText = "INVISIBLE";
                else if (availability == Contact.Availability.CONNECTING)
                    statusAsText = "CONNECTING";
                else if (availability == Contact.Availability.ONLINE_FROM_MOBILE)
                    statusAsText = "ONLINE_FROM_MOBILE";
                else if (availability == Contact.Availability.AWAY_FROM_MOBILE)
                    statusAsText = "AWAY_FROM_MOBILE";
                else if (availability == Contact.Availability.NOT_AVAILABLE_FROM_MOBILE)
                    statusAsText = "NOT_AVAILABLE_FROM_MOBILE";
                else if (availability == Contact.Availability.DO_NOT_DISTURB_FROM_MOBILE)
                    statusAsText = "DO_NOT_DISTURB_FROM_MOBILE";
                else if (availability == Contact.Availability.SKYPE_ME_FROM_MOBILE)
                    statusAsText = "SKYPE_ME_FROM_MOBILE";
                else
                    statusAsText = "UNKNOWN";

                MySession.myConsole.printf("%s: Availability of %s is now %s (%s)%n",
                        mySession.myTutorialTag,
                        affectedContact.getDisplayName(), statusAsText,
                        availability);
            }
        }
开发者ID:ravurivasu,项目名称:Skype-Examples,代码行数:85,代码来源:Listeners.cs

示例2: processFolder

        private static void processFolder(com.pff.PSTFolder folder)
        {
            depth++;

            if (depth > 0)
            {
                Console.Out.WriteLine(folder.getDisplayName());
            }

            if (folder.hasSubfolders())
            {
                java.util.Vector folders = folder.getSubFolders();
                foreach (com.pff.PSTFolder childFolder in folders) {
                    processFolder(childFolder);
                }
            }

            if (folder.getContentCount() > 0)
            {
                com.pff.PSTMessage email = (com.pff.PSTMessage)folder.getNextChild();
                depth++;
                while (email != null)
                {
                    email = (com.pff.PSTMessage) folder.getNextChild();
                    scanEmail(email);

                }
                depth--;
            }

            depth--;
        }
开发者ID:mtotheikle,项目名称:EWU-OIT-SSN-Scanner,代码行数:32,代码来源:Program.cs


注:本文中的com.getDisplayName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。