Ejemplo n.º 1
0
        public ListViewSortMenu(ToolStripMenuItem tsmiContainer, ListView lvTarget,
                                SortCommandHandler h)
        {
            if (tsmiContainer == null)
            {
                throw new ArgumentNullException("tsmiContainer");
            }
            if (lvTarget == null)
            {
                throw new ArgumentNullException("lvTarget");
            }
            if (h == null)
            {
                throw new ArgumentNullException("h");
            }

            m_tsmiMenu = tsmiContainer;
            m_lv       = lvTarget;
            m_h        = h;

            m_tsmiInitDummy = new ToolStripMenuItem(KPRes.NoSort);
            m_tsmiMenu.DropDownItems.Add(m_tsmiInitDummy);

            m_tsmiMenu.DropDownOpening += this.UpdateMenu;
        }
Ejemplo n.º 2
0
        public void Release()
        {
            if (m_tsmiMenu != null)
            {
                DeleteMenuItems();
                m_tsmiMenu.DropDownOpening -= this.UpdateMenu;

                m_tsmiMenu = null;
                m_lv       = null;
                m_h        = null;
            }
        }
Ejemplo n.º 3
0
		public void Release()
		{
			if(m_tsmiMenu != null)
			{
				DeleteMenuItems();
				m_tsmiMenu.DropDownOpening -= this.UpdateMenu;

				m_tsmiMenu = null;
				m_lv = null;
				m_h = null;
			}
		}
Ejemplo n.º 4
0
        public ListViewSortMenu(ToolStripMenuItem tsmiContainer, ListView lvTarget,
            SortCommandHandler h)
        {
            if(tsmiContainer == null) throw new ArgumentNullException("tsmiContainer");
            if(lvTarget == null) throw new ArgumentNullException("lvTarget");
            if(h == null) throw new ArgumentNullException("h");

            m_tsmiMenu = tsmiContainer;
            m_lv = lvTarget;
            m_h = h;

            m_tsmiInitDummy = new ToolStripMenuItem(KPRes.NoSort);
            m_tsmiMenu.DropDownItems.Add(m_tsmiInitDummy);

            m_tsmiMenu.DropDownOpening += this.UpdateMenu;
        }