Ejemplo 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");
                    }
                }
            }
        }
Ejemplo n.º 2
0
 internal static void SetupSettingsLists()
 {
     fileInclusions        = CodeIssueOptions.GetInclusions();
     fileContentInclusions = CodeIssueOptions.GetContentInclusions();
     fileExclusions        = CodeIssueOptions.GetExclusions();
     fileContentExclusions = CodeIssueOptions.GetContentExclusions();
 }
Ejemplo n.º 3
0
 // DXCore-generated code...
 #region InitializePlugIn
 public override void InitializePlugIn()
 {
     base.InitializePlugIn();
     gridView1.BestFitMaxRowCount = 50;
     CodeIssueOptions.SetupSettingsLists();
     CodeIssueOptions.UpdateLayoutsList(cmbLayouts, true);
     helper = new RefreshHelper(gridView1, "Hash");
 }
Ejemplo n.º 4
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();
     }
 }
Ejemplo n.º 5
0
 public RemoveLayout()
 {
     InitializeComponent();
     CodeIssueOptions.UpdateLayoutsList(cmbLayouts, false);
     try
     {
         cmbLayouts.SelectedIndex = 0;
     }
     catch
     {
         Debug.Assert(false, "No Layouts");
     }
 }
Ejemplo n.º 6
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");
     }
 }
Ejemplo n.º 7
0
        private void cmbLayouts_SelectedValueChanged(object sender, EventArgs e)
        {
            switch (cmbLayouts.SelectedItem.ToString())
            {
            case CodeIssueOptions.AllString:
                gridView1.RestoreLayoutFromStream(GetEmbeddedFile("All.xml"));
                break;

            case CodeIssueOptions.SaveString:
                using (SaveLayout saveLayout = new SaveLayout(gridView1))
                {
                    saveLayout.ShowDialog();

                    if (saveLayout.DialogResult == DialogResult.OK)
                    {
                        CodeIssueOptions.UpdateLayoutsList(cmbLayouts, true, saveLayout.saveName);
                    }
                }
                break;

            case CodeIssueOptions.RemoveString:
                using (RemoveLayout removeLayout = new RemoveLayout())
                {
                    removeLayout.ShowDialog();

                    if (removeLayout.DialogResult == DialogResult.OK)
                    {
                        CodeIssueOptions.UpdateLayoutsList(cmbLayouts, true);
                    }
                }
                break;

            case CodeIssueOptions.Separator:
                break;

            default:
                CodeIssueOptions.LoadLayout(gridView1, cmbLayouts.SelectedItem.ToString());
                break;
            }
        }