Modifying GUI of mission planner

Hello guys
I have installed the source file for the mission planner.
which cs file I need to modify so I can modify the GUI of mission planner.
and what is the way to open this cs file so I can see the design using winform cause I couldn’t view any cs file from this source code.
I am new to this stuff , I would appreciate a simple clarification.
I have visual studio 2022 installed as well.
thank you and looking for your guidance.

Most of the GUI is contained in these files.

Not every .cs file has a design view associated with it, but all of these should. You can switch between the code and the designer by right clicking and selecting “View Code/Designer”, or by hitting F7 for code and Shift-F7 for designer.

Also be sure you follow all the steps on this page if you haven’t already: Building Mission Planner with Visual Studio — Dev documentation (ardupilot.org)

Thanks a lot Robert, yes I found it and it worked to add some buttons.
may I have extra help here, where do I find the C# code for other flight modes, for example, stabilize mode or any other functions ( kill motors for example ) if I wanna add a button to it, in the flightdata.cs code I didn’t find it.
appreciate your help and thanks again.

Hello Asser, this is just a screenshot of the right side of mission planner

1 Like

One good way to find functions is to find an existing button that does something similar to what you want, and go to the designer view and double-click it, which will jump it’s click handler implementation.

Do you know how to create .msi or .exe of mission planner
after done some changes

when you built the project in visual studio, you can find the .exe file in the mission planner repository in /bin/debug/ or /bin/release depend which way you have build your project

@robertlong13
Is there anyway that I can modify the map in mission planner where I can add a search tool to find location faster, for example look at the following picture

thank you

Yes, there is an existing function for exactly what you want in FlightPlanner.cs, that you could pretty easily modify to do this. Right click > Map Tool > Zoom To.

You can see the exact area of the code from a PR I opened ages ago to fix that feature: MapTool: use OpenStreetMap to zoom to locations by robertlong13 · Pull Request #3024 · ArduPilot/MissionPlanner · GitHub

1 Like

I found the code thank u, the thing is I want this functionality in the main screen i.e flightData.cs and not in the planner i.e. flight planner

can u give me a small guidance how to integrate this code with the map of flightData, sorry if it appears dumb question, I never programmed with c# before

Hi…
How to change the waypoint quad icon in the data page?
mp_tlog_playback