I think that I figured it out. Well, it *seems* to be working, although I'm not sure if I could/should have done it a better way.
Here's what I have now:
In "MainWindow.xaml.cs":
Code:
namespace programX
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
protected internal void doSomething()
{
triggerDerivedClass tCodes = new triggerDerivedClass();
if (tCodes.triggerCodeFound(this, "Hello World"))
return;
Console.WriteLine("Didn't find it");
}
public void sayHello(string message)
{
StringBuilder msg = new StringBuilder();
msg.Append("Hello ");
msg.Append(message);
// *should* write "Hello Silly Person!"
Console.WriteLine(msg.ToString());
}
}
}
In "TriggerCodes.cs":
Code:
namespace programX
{
public abstract class triggerBaseClass
{
public abstract bool triggerCodeFound(MainWindow sender, String theData);
}
public class triggerDerivedClass : triggerBaseClass
{
public override bool triggerCodeFound(MainWindow sender, String theData)
{
if ((theData.IndexOf("World") > (-1)))
{
sender.sayHello("Silly Person!");
return (true);
}
return (false);
}
}
}