private void OpenYamlForGen_FileOk(object sender, System.ComponentModel.CancelEventArgs e) { string yamlPath = OpenYamlForGen.FileName; A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); presentation.GenerateFromYaml(yamlPath); }
private void btnPublish_Click(object sender, EventArgs e) { A3Environment.StartUp(); A3Log log = new A3Log(A3Log.Operations.Publish); A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); A3Outline outline = presentation.GenerateOutline(log); if (chkPNG.Checked) { presentation.PublishPNGs(); } if (chkMarkdown.Checked) { presentation.PublishMarkdown(); } if (chkPDF.Checked) { presentation.PublishPDF(); } if (chkYAML.Checked) { presentation.PublishYaml(); } Dispose(); }
private void BtnPublish_Click(object sender, RibbonControlEventArgs e) { A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); presentation.FixMetadata(false, false); PublishOptions publish = new PublishOptions(); publish.ShowDialog(); }
public void GenerateFromYaml(string yamlPath) { // Set global variables after starting with a clean slate A3Environment.Clean(); A3Environment.ALLOW_INFER_FROM_SLIDE = true; A3Environment.ALLOW_DEFAULT_INFER_FROM_SLIDE = true; // Setup logging A3Log log = new A3Log(A3Log.Operations.GenerateFromYaml); // Ingest the yaml file A3Yaml yaml = new A3Yaml(yamlPath); // Lint the YAML file before attempting to deserialize the outline and exit early if the user cancels the operation yaml.Lint(log); if (A3Environment.QUIT_FROM_CURRENT_LOOP) { A3Environment.Clean(); return; } // Create the outline from the YAML file and exit early if the user cancels the operation A3Outline outline = yaml.Deserialize(log); if (A3Environment.QUIT_FROM_CURRENT_LOOP) { A3Environment.Clean(); return; } // Open a copy of the model PowerPoint in the current PowerPoint context A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.Presentations.Open(A3Environment.MODEL_POWERPOINT, 0, 0, Microsoft.Office.Core.MsoTriState.msoTrue)); // Save the presentation to a unqiue location presentation.SavePresentationAs(outline.Course); // Generate the Presentation presentation.WriteFromOutline(outline); // Cleanup the initial slides for (int i = 0; i < 6; i++) { presentation.Presentation.Slides[1].Delete(); } // Save the generated presentation and handoff control back to the user presentation.Presentation.Save(); MessageBox.Show(A3Yaml.AlertMessages[A3Yaml.Alerts.YamlGenSuccess].Replace("{}", Path), "POWERPOINT GENERATION COMPLETE!", MessageBoxButtons.OK); A3Environment.Clean(); }
private void BtnFillSubChaps_Click(object sender, RibbonControlEventArgs e) { A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); presentation.FillSubChapters(); }
private void BtnNewBaseline_Click(object sender, RibbonControlEventArgs e) { A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); presentation.NewBaseLine(); }
private void BtnFixAllMetadata_Click(object sender, RibbonControlEventArgs e) { A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); presentation.FixMetadata(true, true); }
private void BtnShowGuids_Click(object sender, EventArgs e) { A3Presentation presentation = new A3Presentation(Globals.ThisAddIn.Application.ActivePresentation); presentation.ShowGuids(); }