public void CloseDocument()
 {
     foreach (ITabDocument document in bottomTabControl.Documents)
     {
         CloseTabDocument(document);
     }
     BackendForm.close();
 }
        public bool CanCloseDocument()
        {
            foreach (ITabDocument document in bottomTabControl.Documents)
            {
                if (document is IWorkbenchDocument)
                {
                    if (!(document as IWorkbenchDocument).CanCloseDocument())
                    {
                        return(false);
                    }
                }
            }

            if (!BackendForm.can_close())
            {
                return(false);
            }

            return(true);
        }