private void AddForm_Click(object sender, EventArgs e)
 {
     using (CustomFormEditor form = new CustomFormEditor())
     {
         form.panelIndex = PanelBox.SelectedIndex;
         form.ShowDialog();
         if (form.DialogResult == DialogResult.Yes)
         {
             fillFormList();
             string temp = "insert into AdminLog(empID, message) values(" + ((Launcher)MdiParent).currentID + ", \"" + ((Launcher)MdiParent).currentUser + " ";
             temp += "added a new form";
             temp += ".\")";
             database.Query(temp);
         }
     }
 }
 private void EditFormButton_Click(object sender, EventArgs e)
 {
     if (FormBox.SelectedItems.Count > 0)
     {
         using (CustomFormEditor form = new CustomFormEditor())
         {
             form.loadedPdf = Path.GetFileName(((FormItem)FormBox.SelectedItem).path);
             form.panelIndex = Convert.ToInt32(((FormItem)FormBox.SelectedItem).panel);
             form.preload = form.hideLoad = true;
             form.ShowDialog();
             if (form.DialogResult == DialogResult.Yes)
             {
                 fillFormList();
             }
         }
     }
 }