- Project
- Installation
- How it Works
- Review Code/Documentation
This project was to complete the following features:
-
Bonus Feature: This project allows multiple images from multiple searches to be shown inside a single document
-
Create a solution that accepts user input and generates a power point slide (or other document which accepts images/text)
-
Have a Title area
-
Have a Text area
-
Have a image suggestion area that utilizes words in the title, and bold words in the text area to bring suggested images in, with ability to select multiple images to include in the document
- Built on .NET framework 4.7
- Uses gemboxsoftware link contains instructions to download into visual studio using (https://www.gemboxsoftware.com/document/examples/c-sharp-vb-net-word-pdf-library/801) for creating and manipulating .docx documents. You can also download through nuget package manager in visual studio make sure to install GemBox.Document
- Uses HtmlAgilityPack to obtain src to images instructions to download https://www.nuget.org/packages/HtmlAgilityPack/ or use Nuget package manager in visual studio to download
- Download through git or download zip file and unpack onto laptop
- Open project file (\WindowsFormsApp2\WindowsFormsApp2.csproj) from visual studio
- Start the software.
- Popup Opens as seen here, In order for the bold to work it must map to a word in the content textbox. To get multiple words bolded seperate then by "," in the content bold textbox. Then after clicking search you will see the text changed to bold. Click the reset to change the content.
- Insert content into Title, Content, and Content Bold textboxes then click search.
- Change images by clicking "Next Image" and "Previous Image".
- Add that image to the document by clicking on "Add to Document" then after choosing which images to show click "Create Document".
- Find the document named powerpoint.pptx inside \WindowsFormsApp2\bin\Debug
Form1.cs - WindowsForm which contains all functions to work app
popupwindowdoc.cs - WindowsForm which contains popup to show when creating document or adding images to documentS
private void Search_Button_Click(object sender, EventArgs e)
- desc: Function to search google images based on title and content bold words and display the first image.
- parameters: sender, event
- returns: list urls which contains images found from search
private void AddtoDocument_Button_Click(object sender, EventArgs e)
- desc: Works the "Add to Document" button by adding the current image from the url list to a new list named urls_save.
- parameters: sender, event
- returns: list urls_save which contains images going to be added to document.
private void NextImage_Button_Click(object sender, EventArgs e)
- desc: Works the "Next Image" button by changing the image shown to the next index.
- parameters: sender, event
- returns: new image displayed.
private void PreviousImage_Button_Click(object sender, EventArgs e)
- desc: Works the "Previous Image" button by changing the image shown to the previous index.
- parameters: sender, event
- returns: new image displayed.
private void CreateDocument_Button_Click(object sender, EventArgs e)
- desc: Works the "Create Document" button by saving the images along with content into a docx file.
- parameters: sender, event
- returns: docx file saved.