Ejemplo n.º 1
0
        /// <summary>
        /// Close form by specified form.
        /// </summary>
        /// <param name="form">Specified form instance.</param>
        /// <param name="dispose">Dispose form on close?</param>
        public void CloseForm(IUIForm form, bool dispose = false)
        {
            if (form == null)
            {
                return;
            }

            if (dispose)
            {
                var info = GetFormInfo(form);
                if (layerForms.ContainsKey(info.Layer))
                {
                    layerForms[info.Layer].Remove(form);
                }
            }
            form.Close(dispose);
        }