示例#1
0
        /// <summary>
        ///     Call the Close void of all filtered forms except the parameterizied form
        /// </summary>
        /// <typeparam name="TU">Filter forms by specificied type</typeparam>
        /// <returns>a boolean of any form is proccessed on this void</returns>
        public bool CloseForms <TU>(object exceptForm) where TU : T, new()
        {
            var findedForms = InstanceForms.Where(r => r.IsDisposed == false && r.MainForm.GetType() == typeof(TU) && !r.MainForm.Equals(exceptForm)).ToList();

            if (!findedForms.Any())
            {
                return(false);
            }
            findedForms.ForEach(r =>
            {
                ((TU)r.MainForm).Close();
                ((TU)r.MainForm).Dispose();
            });
            return(true);
        }
示例#2
0
 /// <summary>
 ///     Get all minimized forms by called Resize event and windowstate is maximized
 /// </summary>
 /// <typeparam name="TU">Filter forms by specificied type</typeparam>
 /// <returns>List of FireForm</returns>
 public List <FireForm <T> > GetMaximizedForms <TU>()
 {
     return(InstanceForms
            .Where(r => r.IsDisposed == false && r.MainForm.GetType() == typeof(TU) && r.IsMaximized)
            .Select(r => r).ToList());
 }
示例#3
0
 /// <summary>
 ///     Will return a list of initialized and not disposed forms at the manager type of TU
 /// </summary>
 /// <typeparam name="TU">Filter forms by specificied type</typeparam>
 /// <returns>List of FireForm</returns>
 public List <FireForm <T> > GetForms <TU>()
 {
     return(InstanceForms.Where(r => r.IsDisposed == false && r.MainForm.GetType().IsEquivalentTo(typeof(TU))).ToList());
 }