示例#1
0
 public void ReplacePopup(string popupType, PopupMenuItem menu)
 {
     foreach (PopupMenuItem p in listPopups)
     {
         if (p.PopupType == popupType)
         {
             listPopups.Remove(p);
             break;
         }
     }
     listPopups.Add(menu);
 }
示例#2
0
        private void UpdateCurrentPopupMenus()
        {
            try
            {
                string[] popups = textPopups.Text.Trim().Split(new String[] { Environment.NewLine }, StringSplitOptions.None);

                if (currentPopup == "NickList")
                    nickListPopup = popups;
                if (currentPopup == "Console")
                    consolePopup = popups;
                if (currentPopup == "Channel")
                    channelPopup = popups;
                if (currentPopup == "Query")
                    queryPopup = popups;

                PopupMenuItem p = new PopupMenuItem();
                p.PopupType = currentPopup;
                p.Menu = popups;
                popupList.ReplacePopup(p.PopupType, p);

                FormMain.Instance.IceChatPopupMenus = popupList;

                currentPopupMenu.Checked = false;
            }
            catch (Exception ex)
            {
                FormMain.Instance.WindowMessage(FormMain.Instance.InputPanel.CurrentConnection, "Console", "UpdatePopupMenus Error:" + ex.Message + ":" + ex.Source, 4, true);
            }
        }
示例#3
0
 public void AddPopup(PopupMenuItem menu)
 {
     listPopups.Add(menu);
 }
示例#4
0
 private PopupMenuItem newPopupMenu(string type, string[] menu)
 {
     PopupMenuItem p = new PopupMenuItem();
     p.PopupType = type;
     p.Menu = menu;
     return p;
 }