In the latest BETA release of LogViewPlus (v2.3.8) we have introduced the following two new interfaces:
/// <summary>
/// Used to implement a custom configuration which can be used to create or
/// edit complex configuration strings. Note that custom configuration may
/// be in the form of a dialog.
///
/// Implementing custom configuration will prevent direct editing of the
/// filter or parser arguments.
/// </summary>
public interface ICustomConfiguration
{
/// <summary>
/// Used to provide a custom configuration option when configuring a
/// ILogParser or ILogFilter.
/// </summary>
/// <param name="parentWindow">The current parent window. This will
/// be of type IWin32Window and can be used to show a dialog.</param>
/// <param name="configuration">The string used to represent the target
/// configuration. Null when a new configuration is requested. We
/// recommend a base64 string for advanced configuration.</param>
/// <returns>The configuration string that should be passed to our
/// ILogParser or ILogFilter.</returns>
string Configure(object parentWindow, string configuration);
}
/// <summary>
/// Implement on custom parsers or filters if you need custom configuration.
///
/// Note that custom code can also implement ICustomConfiguration directly so this
/// interface is not strictly necessary. The advantage of using
/// IHasCustomConfiguration is that it helps separate configuration code from
/// the filter or parser implementation.
/// </summary>
public interface IHasCustomConfiguration
{
/// <summary>
/// Returns a custom configuration implementation. This may be a dialog.
/// </summary>
ICustomConfiguration GetConfigurationManager();
}
After implementing these interfaces on your ILogFilter or ILogParser, you should see a new 'Configure' command appear next to the arguments in the respective configuration screen.
I have also updated the customization sample code to include examples of ICustomConfiguration in a filter and parser. Please see:
http://www.logviewplus.com/dist/LogViewPlus_Samples.zip
https://www.logviewplus.com/docs/running_the_samples.html
Hopefully, these new interfaces will meet your needs. Online documentation is still pending, but please do let me know if you have any further questions or issues.
Thanks,
Toby