{"id":27633764,"url":"https://github.com/djaus2/meadow.projectlab.extension2","last_synced_at":"2025-04-23T18:19:30.841Z","repository":{"id":207506784,"uuid":"719416774","full_name":"djaus2/Meadow.ProjectLab.Extension2","owner":"djaus2","description":"Based upon the Meadow.Foundation project sample, MicroLayoutMenu. This implments a Multi-level Menu System with menu Up/Down as well as [Select] (choose item and move to next menu level) and [Back] (go back one menu level).","archived":false,"fork":false,"pushed_at":"2024-01-25T12:07:35.000Z","size":5032,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T18:19:26.472Z","etag":null,"topics":["csharp","meadow","projectlab"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djaus2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-16T05:45:45.000Z","updated_at":"2024-03-31T10:18:59.000Z","dependencies_parsed_at":"2024-01-25T13:29:05.208Z","dependency_job_id":"6a24c918-4b0e-4ef6-90ca-9d3d981636cd","html_url":"https://github.com/djaus2/Meadow.ProjectLab.Extension2","commit_stats":null,"previous_names":["djaus2/meadow.projectlab.extensoions2","djaus2/meadow.projectlab.extension2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMeadow.ProjectLab.Extension2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMeadow.ProjectLab.Extension2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMeadow.ProjectLab.Extension2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FMeadow.ProjectLab.Extension2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djaus2","download_url":"https://codeload.github.com/djaus2/Meadow.ProjectLab.Extension2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487536,"owners_count":21438612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","meadow","projectlab"],"created_at":"2025-04-23T18:19:30.220Z","updated_at":"2025-04-23T18:19:30.835Z","avatar_url":"https://github.com/djaus2.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meadow.ProjectLab.Extensions2\n\nBased upon the Meadow.Foundation project sample, **MicroLayoutMenu**.  \nThis implments a Multi-level Menu System with menu Up/Down as well as [Select] _(choose item and move to next menu level)_ and [Back] _(go back one menu level)_.\n\n\u003chr/\u003e\n\n\u003e **Latest:** Added a new project **Hierarchical** that has hierarchical menu navigation.  \nSelection determines the next menu level options.  \n**MultiMenu** just has cascading menus. The same at each level regardless.  \n\n\u003e Update 2: [Bug fix] Remove 2nd instantiation of menus that causes menu handlers to be called twice.  \n\n\u003e Update 1: [Bug Fix] App had been renamed so path to image needed change.  \n\n\u003e Update 1.1: Also Long Click (1.5s) on left resets menu to top level with no previous selections.\n\n\u003chr/\u003e\n\n![The board](https://github.com/djaus2/Meadow.ProjectLab.Extensions/blob/master/theboard.png)  \n**_The WILDERNESS LABS Project Lab V3 board_**\n\n## Links\n\n- Previous repository: [Meadow.ProjectLab.Extensions](https://github.com/djaus2/Meadow.ProjectLab.Extensions)\n- Original Meadow.ProjectLab [MicroLayoutMenu Project](https://github.com/WildernessLabs/Meadow.ProjectLab.Samples/tree/main/Source/MicroLayoutMenu)\n- As previous:\n  - [Blog about Meadow Project Lab](https://davidjones.sportronics.com.au/med/WildernessLabs_Project_Lab-About_Project_Lab_V3-med.html)\n  - The target board:  [The Wilderness Labs project V3](https://store.wildernesslabs.co/collections/frontpage/products/project-lab-board)\n  - [Meadow ProjectLab_Demo](https://github.com/WildernessLabs/Meadow.ProjectLab/tree/main/Source/)\n  - [WildernessLabs/Meadow.ProjectLab](https://github.com/WildernessLabs/Meadow.ProjectLab)\n  - [Meadow ProjectLab Samples](https://github.com/WildernessLabs/Meadow.ProjectLab.Samples)\n  - [Meadow.Core.Samples](https://github.com/WildernessLabs/Meadow.Core.Samples)\n  - [Meadow.Foundation.Grove](https://github.com/WildernessLabs/Meadow.Foundation.Grove)\n  - [WildernessLabs](https://github.com/Wildernesslabs)\n  - [WildernessLabs fork of MQTTnet](https://github.com/WildernessLabs/MQTTnet)\n\n---\n\n## Nb: Suggested update for MicroLayoutMenu\n\nThe original MicroLayoutMenu project has a bug that, if ShowMenuScreen is uncommented, the textual scxreen fails to be drawn.\n\n- In ```MeadowApp.cs``` change:\n```cs \n        public override Task Run()\n        {\n            ShowDemoScreen();\n\n            //ShowMenuScreen();\n\n            return base.Run();\n        }\n```\n- To:  \n```cs\n        public override Task Run()\n        {\n            ShowDemoScreen();\n\n            // Move to Menu after 5sec\n            Thread.Sleep(5000);\n\n           _screen.Controls.Clear(); // \u003c-This IS needed!\n           ShowMenuScreen();\n\n            return base.Run();\n        }\n```\n\nThis implements the clearing of the Demo screen controls before the textual menu is drawn.\n\n---\n\n## About _(this)_ MultiMenu project\n\nWhen it runs, the demo screen shows.\n\n\n![The demo screen](./MultiMenu/menu0.jpg)\n\n\nAfter a period the first level of the menu shows.\n\n![The menu screen](./MultiMenu/Menu1.jpg)\n\nThe blue buttons are, bottom right, used to navigate the menu.\nThe top and bottom buttons are used to move up and down the menu. The right button is used to select an item and move to the next level. \nThe left button is used to go back to the previous menu level. \nThe Demo screen suggests this navigation scenario but the drawn buttons there aren't actionable.\n\n\nWhen a menu item is selected, it is pushed onto the Stack with other data for that menu level. The menu is then cleared and the next level is drawn.\nWhen [Back] is selected and the previous menu level is redrawn, the previous menu menu data is recovered from the Stack and the item previously selected there is reselected.\n\n\n## Extensible Menu System\n\nThe menu data is held in a ```List\u003cMenuItem\u003e``` and is defined in ```MenuItem.cs```. The MenuData class defines the data for each menu level:\n\n```cs\n    public class MenuData\n    {\n        public string Title { get; set; }\n        public string Items { get; set; }\n    }\n```\n\nThat is, there is a Title for each level as well as a CSV list of items for that level. \n\nTo add or remove menu levels, simply add instantiated MenuData items in the ```List\u003cMenuData\u003e``` in ```MenuData.cs```, or remove them.\nEach menu level requires a corresponding method in  ```MultiMenu.cs``` to handle the menu level of the form:\n\n```cs\n       private void Action3(object sender, EventArgs e)\n        {\n            int actionNo = 3;\n            int index = _menu.SelectedRow;\n            //Do Whatever for previous menu\n\n            MenuData md = AppSettings.MenuDataList[actionNo];\n            ShowMenuScreen(md.Title, md.Items, Action4);\n        }\n```\n\nFor each additional level, replace the 3 in the method code with the order for the level in the list, that is numbered from zero.\nAny additional menu method need to be linked in the previous method via the last arguement in ```ShowMenuScreen()```. In the case above, the next level is ```Action4```.\nAny functionality based upon a menu selection at a level would be inserted below ```//Do Whatever for previous menu``` in the next level method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjaus2%2Fmeadow.projectlab.extension2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjaus2%2Fmeadow.projectlab.extension2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjaus2%2Fmeadow.projectlab.extension2/lists"}