To answer my own question:
- Code: Select all
Public Class SystemSettingPlugin
Inherits System.MarshalByRefObject
Implements JiwaApplication.IJiwaSystemSettingPlugin
'.
'. bits left out that don't matter.
'.
Public Sub ButtonClicked(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal SystemSetting As JiwaApplication.SystemSettings.Setting) Implements JiwaApplication.IJiwaSystemSettingPlugin.ButtonClicked
' If Debugger.IsAttached Then Debugger.Break()
If SystemSetting.IDKey = "Invoice Email Report Filename" Then
Dim newFileDialog As OpenFileDialog = New OpenFileDialog() With {
.FileName = SystemSetting.Contents,
.CheckFileExists = True,
.DefaultExt = "RPT",
.Filter = "Crystal Reports (*.RPT)|*.RPT|All Files (*.*)|*,*",
.Multiselect = False,
.RestoreDirectory = True,
.SupportMultiDottedExtensions = True,
.DereferenceLinks = True
}
If newFileDialog.ShowDialog() = DialogResult.OK Then
SystemSetting.Contents = newFileDialog.FileName
End If
End If
End Sub
End Class
There's probably fancier stuff that could be done, but this has worked for me.