Reputation: 1
This look like silly and similar to previous questions but it's not.
Project details: I am using Dockpanel Suite
MDIParent - Form1 testapp
MDIChild - Form2 child window
ToolWindow - Form3 toolwindow / logs
I want to access ToolWindow
(logs window) procedures and variables from form2 (child window):
public partial class Form2 : DockContent, IForm2
{
public Form2()
{
InitializeComponent();
}
private string m_fileName = "This is Private";
public string _FileName()
{
return this.m_fileName;
}
}
interface IForm2
{
string _FileName();
}
and I am calling procedures of Form2
from ToolWindow
using this code:
if (DockPanel.FindForm().ActiveMdiChild != null)
{
IForm2 childForm = (IForm2)DockPanel.FindForm().ActiveMdiChild;
MessageBox.Show(childForm._FileName() );
}
Now I want to do the same in reverse: I want to access data and procedures of ToolWindow
(logs) from child window.
Found this link Dockpanel Suite and passing data across multiple forms but not working for me. My scenario is a different one.
Upvotes: 0
Views: 191