Link to another project in the same assembly, different namespaces

I have two projects: a menu and a module, and they are both in the same foobar namespace.

I am currently linking to a module project from the menu project to open certain controls in the tab control in my menu. However, I need to launch a new control from one of my controls, which is located in the module project.

When I try to reference a menu project, it does not appear in my intellisense when I try to reference it when using. Am I doing something wrong logically here?

Here is an example of what it is:

Project menu

Public Void LaunchWPFControl(string pHeader,string pPath)
{
     //Code goes here to launch a WPF control in the browser
}

Project module

//What I would love to do but doesn't work
Using Menu;
...
...
...
private void dgModule_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
     Menu.LaunchWPFControl("Accounts","AccountsControl");
}
+3
3

, , , , . Project Project Module, Project Module Project Menu.

Project Module - Menu, . , .

, Project Module:

private void dgModule_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
    OnMyEvent();
}

private void OnMyEvent()
{
    EventHandler localEvent = MyEvent;
    if(localEvent != null)
    {
        localEvent(this, EventArgs.Empty);
    } 
} 

"" :

...
...
...
moduleClass.MyEvent += SomeHandler;
...
...
...
private void SomeHandler(Object sender, EventArgs e)
{
    Menu.LaunchWPFControl("Accounts","AccountsControl");
}    

(. ), Menu - ( , , - ), .

, .

+4

foobar,

using foobar;

using Menu.

- " " - . Visual Studio . , . .

, , , :

namespace MyProject
{
    ...
}

, , , , , , .

, using; . . using : " , using, ."

:

Menu.LaunchWPFControl("Accounts","AccountsControl");

, Menu , , . ?

, . , , , .

0

, Project Project Project Module. , Project Module Project Menu, ?

, . , Visual Studio .

, , . .

0

Source: https://habr.com/ru/post/1750002/


All Articles