Exemplo n.º 1
0
        private void btnExportHTMLTable_Click(object sender, EventArgs e)
        {
            DialogResult expand = MessageBox.Show(
                "The export will only show what is visible in the grid. Do you wish to expand all groups to receive all the content?",
                "Expand Groups",
                MessageBoxButtons.YesNo);

            if (expand == DialogResult.Yes)
            {
                gridView1.ExpandAllGroups();
            }

            using (SaveFileDialog dlg = new SaveFileDialog())
            {
                dlg.Filter           = "HTML (*.html)|*.html";
                dlg.CheckFileExists  = false;
                dlg.InitialDirectory = CodeIssueOptions.GetLayoutPath();

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        File.WriteAllText(dlg.FileName, new HTMLTableBuilder(gridView1).BuildHTMLTable("#E3EEFB"));
                    }
                    catch (Exception err)
                    {
                        Debug.Assert(false, "Export Failed");
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     try
     {
         File.Delete(CodeIssueOptions.GetLayoutPath() + Path.DirectorySeparatorChar + cmbLayouts.SelectedItem.ToString());
         this.Close();
     }
     catch (Exception err)
     {
         MessageBox.Show("Failed to Remove Layout", "Removing Layout Failed");
         this.Close();
     }
 }
Exemplo n.º 3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtName.Text.Length > 0)
         {
             view.SaveLayoutToXml(CodeIssueOptions.GetLayoutPath() + Path.DirectorySeparatorChar + txtName.Text + ".xml");
             saveName = txtName.Text + ".xml";
             this.Close();
         }
         else
         {
             MessageBox.Show("You must enter a layout name.", "Enter Layout Name");
         }
     }
     catch (Exception err)
     {
         MessageBox.Show("Failed to Save", "Saving Failed Possibly Access Privileges");
     }
 }