Esempio n. 1
0
        public UserControlCollection this[Control cont, ToolStripDropDownItem menuitem, ToolStripDropDownItem dropitem ]
        {
            get
            {
                if (this.Count == 0)
                    return null;
                else
                {
                    UserControlCollection uscont = new UserControlCollection();
                    for (int i = 0; i < Controlok.Count; i++)
                    {
                        Control control = (Control)Controlok[i];
                        if (control.Name == cont.Name && (menuitem == null 
                            || menuitem==(ToolStripDropDownItem)AktivMenuItemek[i])
                            && (dropitem==null || dropitem==(ToolStripDropDownItem)AktivDropItemek[i]))
                            uscont.Add(this[i]);
                    }
                    if (uscont.Count == 0)
                        return null;
                    else
                        return uscont;
                }
            }

        }
Esempio n. 2
0
        /// <summary>
        /// Azon UserControlInfo-k keresese, melyeknek az AktivMenuItem-e azonos a keresettel
        /// </summary>
        /// <param name="menuitemname">
        /// a keresett menuitem
        /// </param>
        /// <returns>
        /// UserControlInfo gyujtemeny (lehet, hogy 0 hosszu)
        /// </returns>
        public UserControlCollection this[string menuitemname]
        {
            get
            {
                UserControlCollection ar = new UserControlCollection();
                ar.Csakbase = true;
                for (int i = 0; i < this.Count; i++)
                {
                    ToolStripMenuItem menuitem = (ToolStripMenuItem)AktivMenuItemek[i];

                    if (menuitem!=null && menuitem.Name  == menuitemname)
                        ar.Add(this[i]);
                }
                ar.Csakbase = false;
                return ar;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Adott UserControl informaciojanak keresese
 /// </summary>
 /// <param name="cont">
 /// az adott UserControl
 /// </param>
 /// <returns>
 /// keresett UserControlInfo vagy null
 /// </returns>
 public UserControlCollection this[Control cont]
 {
     get
     {
         if (this.Count == 0)
             return null;
         else
         {
             UserControlCollection uscont = new UserControlCollection();
             for (int i = 0; i < Controlok.Count; i++)
             {
                 Control control = (Control)Controlok[i];
                 if (control.Name == cont.Name)
                     uscont.Add(this[i]);
             }
             if (uscont.Count == 0)
                 return null;
             else
                 return uscont;
         }
     }
 }