protected virtual void Initialize() { MenuType = MenuType.NavMenu; MenuItemList.Add(new MenuItem("Dashboard", "fa-tachometer", "Home/Dashboard")); MenuItemList.Add(new MenuItem("My Queue", "fa-user", "Home/MyQueue")); MenuItemList.Add(new MenuItem("My Time", "fa-calendar-o", "Home/MyTime")); MenuItem New = new MenuItem("New", "fa-plus-square", "", true); MenuItem NewRequest = new MenuItem("Request", "fa-plus-square", "", true); MenuItem NewCustomer = new MenuItem("Customers", "fa-plus-square", "", true); NewRequest.ChildMenu.Add(new MenuItem("Support Request", "", "SupportRequest/Create", false)); NewRequest.ChildMenu.Add(new MenuItem("Service Request", "", "ServiceRequest/Create", false)); NewCustomer.ChildMenu.Add(new MenuItem("Customer", "", "Customer/Create", false)); NewCustomer.ChildMenu.Add(new MenuItem("Site", "", "Site/Create", false)); NewCustomer.ChildMenu.Add(new MenuItem("Contact", "", "Contact/Create", false)); New.ChildMenu.Add(NewRequest); New.ChildMenu.Add(NewCustomer); MenuItemList.Add(New); MenuItem Requests = new MenuItem("Requests", "fa-truck", "", true); Requests.ChildMenu.Add(new MenuItem("Support Request", "", "SupportRequest", false)); Requests.ChildMenu.Add(new MenuItem("Service Request", "", "ServiceRequest", false)); MenuItem Customers = new MenuItem("Customers", "fa-group", "", true); Customers.ChildMenu.Add(new MenuItem("Customer", "", "Customer", false)); Customers.ChildMenu.Add(new MenuItem("Site", "", "Site", false)); Customers.ChildMenu.Add(new MenuItem("Contact", "", "Contact", false)); MenuItem Company = new MenuItem("Company", "fa-folder", "", true); Company.ChildMenu.Add(new MenuItem("Resources", "", "Resource", false)); Company.ChildMenu.Add(new MenuItem("Groups", "", "Group", false)); Company.ChildMenu.Add(new MenuItem("Activities", "", "Activity", false)); Company.ChildMenu.Add(new MenuItem("Expenses", "", "Expense", false)); Company.ChildMenu.Add(new MenuItem("Products", "", "Product", false)); Company.ChildMenu.Add(new MenuItem("Items", "", "Contact", false)); MenuItemList.Add(Requests); MenuItemList.Add(Customers); MenuItemList.Add(Company); List<string> test = new List<string>(); test.Add("1"); test.Add("2"); test.Add("3"); test.Add("4"); for (int i = 0; i < test.Count; i++) { if (test[i] == "3") { test.RemoveAt(i); break; } } }
protected virtual void Initialize() { MenuType = MenuType.ActionMenu; MenuItemList.Add(new MenuItem("Save", "fa-check", "Save")); MenuItemList.Add(new MenuItem("Save As", "fa-check", "SaveAs")); MenuItem More = new MenuItem("More", "", "", true); More.ChildMenu.Add(new MenuItem("Action Log", "", "ActionLog", false)); More.ChildMenu.Add(new MenuItem("Comments", "", "Comments", false)); MenuItemList.Add(More); MenuItemList.Add(new MenuItem("Delete", "fa-minus-square", "Delete")); MenuItemList.Add(new MenuItem("Refresh", "fa-refresh", "Refresh")); MenuItemList.Add(new MenuItem("Exit", "fa-times", "Exit")); }