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"); } } } }
internal static void SetupSettingsLists() { fileInclusions = CodeIssueOptions.GetInclusions(); fileContentInclusions = CodeIssueOptions.GetContentInclusions(); fileExclusions = CodeIssueOptions.GetExclusions(); fileContentExclusions = CodeIssueOptions.GetContentExclusions(); }
// 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"); }
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(); } }
public RemoveLayout() { InitializeComponent(); CodeIssueOptions.UpdateLayoutsList(cmbLayouts, false); try { cmbLayouts.SelectedIndex = 0; } catch { Debug.Assert(false, "No Layouts"); } }
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"); } }
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; } }