AEMManager.AemInstanceTypeUtil.GetLabel C# (CSharp) Method

GetLabel() public static method

public static GetLabel ( AemInstanceType pAemInstanceType ) : string
pAemInstanceType AemInstanceType
return string
        public static string GetLabel(AemInstanceType pAemInstanceType)
        {
            if (pAemInstanceType == AemInstanceType.AEM54) {
            return "AEM 5.4 and below";
              }
              else if (pAemInstanceType == AemInstanceType.AEM55) {
            return "AEM 5.5, AEM 6 and higher";
              }
              // fallback
              return pAemInstanceType.ToString();
        }

Usage Example

Example #1
0
        private void InitializeNotifyIcon()
        {
            if (mNotifyIcon == null)
            {
                mNotifyIcon = new NotifyIcon();

                mNotifyIcon.DoubleClick += new EventHandler(mNotifyIcon_DoubleClick);
            }

            ContextMenu contextMenu = new ContextMenu();

            MenuItem nameMenuItem = new MenuItem(this.Name + " (" + AemInstanceTypeUtil.GetLabel(this.AemInstanceType) + ")");

            nameMenuItem.Enabled = false;
            contextMenu.MenuItems.Add(nameMenuItem);

            contextMenu.MenuItems.Add(new MenuItem("-"));
            AemActions.AddControlMenuItems(contextMenu.MenuItems, this);

            contextMenu.MenuItems.Add(new MenuItem("-"));
            AemActions.AddLogMenuItems(contextMenu.MenuItems, this);

            contextMenu.MenuItems.Add(new MenuItem("-"));
            AemActions.AddOpenMenuItems(contextMenu.MenuItems, this, true);

            contextMenu.MenuItems.Add(new MenuItem("-"));
            contextMenu.MenuItems.Add(new MenuItem("Properties", propertiesMenuItem_Click));

            this.NotifyIcon.ContextMenu = contextMenu;

            mNotifyIcon.Text    = this.Name;
            mNotifyIcon.Visible = this.ShowInTaskbar;

            string trayIcon = "trayicon_disabled";

            mNotifyIcon.Icon = IconCache.GetIcon(this.IconSet, this.CustomIconPath, trayIcon);
        }
All Usage Examples Of AEMManager.AemInstanceTypeUtil::GetLabel
AemInstanceTypeUtil