void editMatrix(int index)
 {
     if (ReportControlsState.appManager.Map.GetPointLayers().Count() > 0)
     {
         var fmTable = new Forms.MatrixSelectionForm(CorrelationMatrixList[index]);
         fmTable.isUpdate = true;
         fmTable.DeleteIndex = index;
         fmTable.FormClosed += fmMatrix_FormClosed;
         fmTable.ShowDialog();
     }
     else
     {
         MessageBox.Show("Please add feature or point layer.");
     }
 }
 private void btnAddMatrix_Click(object sender, EventArgs e)
 {
     var fm = new Forms.MatrixSelectionForm();
     fm.FormClosed += fmMatrix_FormClosed;
     fm.ShowDialog();
 }
        void editTablelink_Click(object sender, EventArgs e)
        {
            var link = sender as LinkLabel;
            var index = Convert.ToInt32(link.Name);

            if (ReportControlsState.appManager.Map.GetPointLayers().Count() > 0)
            {
                var fmTable = new Forms.MatrixSelectionForm(CorrelationMatrixList[index]);
                fmTable.isUpdate = true;
                fmTable.DeleteIndex = index;
                fmTable.FormClosed += fmMatrix_FormClosed;
                fmTable.ShowDialog();
            }
            else
            {
                MessageBox.Show("Please add feature or point layer.");
            }
        }