I am trying to get information from an external class back to a textbox in the main form. However, monodevelop won't let me change the automatic form creation code so a textbox can be public and easily accessible. When I debug, any changes I make are overwritten.
So, I attempted to pass the text box by reference parameter to a subclass then change the value there. Didn't work.
Finally, I tried to use a listener to trigger a function in the form to change the value, still no luck. Reference: Stack Overflow Page
All routes lead to an infinite loop or failure because of the way I have this structured. Can someone please suggest a solution, and explain why the heck this keeps becoming an infinite loop? Thank you
public class MainClass
{
//Get Information to here
//textbox
public static void Main()
{
ParentClass Parent = new ParentClass ();
}
public void print1 (string Test)
{
Console.WriteLine(Test);
}
}
public class ParentClass : MainClass
{
public ParentClass()
{
ChildClass child = new ChildClass ();
}
public void print2(string Test)
{
base.print1 (Test);
}
}
public class ChildClass : ParentClass
{
public ChildClass()
{
// Some code
}
public void print3(string Test)
{
base.print2(Test);
}
class Socket : ChildClass
{
//Asynchronous Socket
public Socket()
{
//Start Listening
}
//Listener running, target function:
void ListenerTargetFunction()
{
base.print3 ("Test");
}
}
}