Exemplo n.º 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);
 }
Exemplo n.º 2
0
        private void UpdateCurrentPopupMenus()
        {
            try
            {
                string[] popups = ReplaceCharsXml(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
                {
                    PopupType = currentPopup,
                    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", "\x000304UpdatePopupMenus Error:" + ex.Message + ":" + ex.Source, "", true);
            }
        }
Exemplo n.º 3
0
 public void ReplacePopup(string popupType, PopupMenuItem menu)
 {
     foreach (PopupMenuItem p in listPopups)
     {
         if (p.PopupType == popupType)
         {
             listPopups.Remove(p);
             break;
         }
     }
     listPopups.Add(menu);
 }
Exemplo n.º 4
0
 public void AddPopup(PopupMenuItem menu)
 {
     listPopups.Add(menu);
 }
Exemplo n.º 5
0
 public void AddPopup(PopupMenuItem menu)
 {
     listPopups.Add(menu);
 }
Exemplo n.º 6
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);
            }
        }
Exemplo n.º 7
0
 private PopupMenuItem newPopupMenu(string type, string[] menu)
 {
     PopupMenuItem p = new PopupMenuItem();
     p.PopupType = type;
     p.Menu = menu;
     return p;
 }