0

I want to create a new c# project (with windows form), and i would like to use the avionic instruments that are used in another project. How can i implement those tools inside mine? I tried but i can't figure out what i have to do.

The link for the avionic instruments is this one: https://www.codeproject.com/Articles/27411/C-Avionic-Instrument-Controls

Can you help me? Thank you in advance.

Okenite
  • 189
  • 1
  • 10
  • 1
    Your question is very broad, what specific part are you stuck with? – TidyDev Oct 14 '17 at 15:04
  • from the beginning. I've just created a new project that is empty. I have to manually add each tool (instrument) from the other project. But unfortunately it doesn't work. – Okenite Oct 14 '17 at 15:46

2 Answers2

0

You should download the project that you want to reference and build it in release mode.

That should generate the DLLs containing that project (they should be in the bin/Release folder inside the project directory).

Then, you can follow this instructions to reference those DLLs from inside your project.

After doing that, you should be able to use that project functionality inside your own project.

Tao Gómez Gil
  • 2,228
  • 20
  • 36
  • I've just tried to do what you told me. Unfortunately building the project in release mode has generated only 4 files: 1 .exe, 1 vshost.exe, 1 pdb and 1 manifest. So I'm unable to add dll files – Okenite Oct 14 '17 at 14:55
  • Therefore, I'm afraid you can't do what you want. The reason is that the avionics project does not have a public API exposing its functionality, so you can't use it from the outside. You have one option left (although it is more difficult): find and copy the code from the functionality you want directly into your project. – Tao Gómez Gil Oct 14 '17 at 15:14
  • i solved the problem doing exactly what you told me. I added the missing code from the other project and i added the resources. Thank you very much. – Okenite Oct 14 '17 at 22:29
  • If that's the case, I invite you to mark my answer as accepted. – Tao Gómez Gil Oct 15 '17 at 07:46
0

Right click your solution (in the solution explorer) and click add -> existing project. Select the project on your disk and you should be able to import and reference it's namespaces. This is nicer than importing the DLL as it's rebuilt every time the referenced project changes.

Mies van der Lippe
  • 492
  • 1
  • 3
  • 13