It seems like more and more I am seeing people wanting to implement GUIs into their tools, my hope is that this example can be used as a model for a way to properly create a WinForm GUI for your shiny new utility that you just got done creating.
In this multi-part series I will be going through from start to finish a replacement tool for Windows Event Viewer. Here is the agenda:
- Part 1 – Planning/Overview
- Part 2 – Designing your GUI
- Part 3 – Integrating your code
We will begin by creating a plan for execution of creating this new utility, this sets us up for success. Traditionally this would start with a requirements gathering from your requestor. Next we will design our actual form and plan out events to use to trigger our code behind the scenes. Finally, at the end we will leverage runspaces to bring it all together. If anyone has any feedback or success from this please feel free to reach out, as I am always happy to hear positive impact made within the community. Let’s jump right in:
To start, we need to ask ourselves what we are trying to achieve. In this case my primary goal is to pull event log information on a remote machine faster than the built in Windows Event Viewer and present the information in a way that is versatile depending on what the results may be. My plan is to create filter options that can be set prior (for performance) to querying any information from a remote machine as well as create a number of layout options for viewing results.
My core functionality will be made up as follows:
- Get application/security/system logs (default to last 3 days)
- Save results to local location in viewable format
- Find/search
- Create a runspace to execute code separate from GUI
As far as layout options here are my initial view options:
- Traditional (Default)
- Side by side
That’s about it for part 1, now that we have a plan we can move forward and create an actual design for our new utility.