public void Add_Selected_Card(PageCard card)
 {
     SelectedCard               = card;
     btn_Edit_Card.Enabled      = true;
     btn_Duplicate_Card.Enabled = true;
     btn_Delete_Card.Enabled    = true;
     Card_Count();
 }
 private void btn_Delete_Card_Click(object sender, EventArgs e)
 {
     //prompt before deleting
     if (flp_Page_Cards.Controls.Contains(SelectedCard))
     {
         PageCard scard = flp_Page_Cards.Controls[flp_Page_Cards.Controls.GetChildIndex(SelectedCard)] as PageCard;
         _baseform.file.Pages.Remove(scard.PageData);
         scard.Dispose();
         Reset_Numbers();
     }
 }
 public void Remove_Selected_Card(PageCard card)
 {
     if (SelectedCard == card)
     {
         SelectedCard               = null;
         btn_Edit_Card.Enabled      = false;
         btn_Duplicate_Card.Enabled = false;
         btn_Delete_Card.Enabled    = false;
         Card_Count();
         _baseform.data_changed();
     }
 }
        public void New_Card(Page page)
        {
            int      index = Find_Number();
            PageCard card  = new PageCard(index + 1, this);

            if (page == null)
            {
                page = new Page(index + 1);
                _baseform.file.Pages.Insert(index, page);
            }
            card.Contents = this;
            card.Set_Page_Num(index + 1);
            card.PageData = page;
            card.Set_Summary(page.Description);
            card.WasClicked += UsersGrid_WasClicked;
            flp_Page_Cards.Controls.Add(card);
            flp_Page_Cards.Controls.SetChildIndex(card, index);
            Reset_Numbers();
        }