private void compliancePerformanceControl_Deleted(object sender, EventArgs e)
        {
            DetailCompliancePerformanceControl control = (DetailCompliancePerformanceControl)sender;
            DetailDirective directive = control.DetailDirective;

            existPrformances.Remove(control);
            flowLayoutPanelPerformances.Controls.Remove(control);
            try
            {
                currentDetail.RemoveDetailDirective(directive);
            }
            catch (Exception ex)
            {
                Program.Provider.Logger.Log("Error while removing data", ex);
            }
        }
        /// <summary>
        /// Обновляет данные
        /// </summary>
        public void UpdateInformation()
        {
            flowLayoutPanelPerformances.Controls.Clear();
            existPrformances.Clear();
            addedPerformances.Clear();
            List <DetailDirective> detailDirectives = new List <DetailDirective>(currentDetail.GetDetailDirectives());

            for (int i = 0; i < detailDirectives.Count; i++)
            {
                DetailCompliancePerformanceControl compliancePerformanceControl = new DetailCompliancePerformanceControl(detailDirectives[i]);
                compliancePerformanceControl.Deleted += compliancePerformanceControl_Deleted;
                existPrformances.Add(compliancePerformanceControl);
                flowLayoutPanelPerformances.Controls.Add(compliancePerformanceControl);
            }
            if (currentDetail != null && currentDetail.InUse)
            {
                flowLayoutPanelPerformances.Controls.Add(linkLabelAddNew);
            }
        }