private void button4_Click(object sender, EventArgs e) { try { var cs = Convert.ToDouble(CSTB.Text); var ch = Convert.ToDouble(CHTB.Text); var ah = Convert.ToDouble(AHTB.Text); var ar = Convert.ToDouble(ARTB.Text); var mc = Convert.ToDouble(MCTB.Text); var ms = Convert.ToDouble(MSTB.Text); var ts = Convert.ToDouble(TSTB.Text); var rs = Convert.ToDouble(RMinS.Text); var rms = Convert.ToDouble(RMS.Text); var eml = Convert.ToDouble(EMaxL.Text); var em = Convert.ToDouble(EmE.Text); var vpp = Convert.ToDouble(vPP.Text); var dsd = Convert.ToDouble(DSD.Text); var dsm = Convert.ToDouble(DsM.Text); NavBuilder.ChangeNavMeshSettings(cs, ch, ah, ar, mc, ms, ts, rs, rms, eml, em, vpp, dsd, dsm); Logger.AddDebugText(rtbDebug, "NavMesh Settings changed."); } catch (Exception es) { Logger.AddDebugText(rtbDebug, es.ToString()); } }
public void ShouldBuildMenu() { const string menuConfig = @"[ { ""text"": ""Help"", ""submenus"": [ { ""url"": ""/documentation/GeneralHelp.pdf"", ""text"": ""General Help"", ""target"": ""new"" }, { ""url"": ""/documentation/DeployHelp.pdf"", ""text"": ""Deploy Help"", ""target"": ""new"" } ] } ]" ; const string expected = @"<ul class=""nav navbar-nav""><li class=""dropdown""><a href=""#"" class=""dropdown-toggle"" data-toggle=""dropdown""><span>Help</span> <b class=""caret""></b></a><ul class=""dropdown-menu""><li class=""""><a href=""~/documentation/GeneralHelp.pdf"" target=""new"">General Help</a></li><li class=""""><a href=""~/documentation/DeployHelp.pdf"" target=""new"">Deploy Help</a></li></ul></li></ul>"; var menuItems = Menu.LoadFromJson(menuConfig).ToArray(); var menu = NavBuilder.Nav(menuItems); Assert.AreEqual(expected, menu); }
private void button5_Click(object sender, EventArgs e) { if (button5.Text == @"Start dumping all zone.obj file navmeshes") { button5.Text = @"Stop dumping all zone.obj file navmeshes"; Thread.Sleep(100); if (DumpMeshes.IsBusy) { DumpMeshes.CancelAsync(); } else { DumpMeshes.RunWorkerAsync(); } Logger.AddDebugText(rtbDebug, @"Dumping all zone.obj file navmeshes = True"); } else if (button5.Text == @"Stop dumping all zone.obj file navmeshes") { Logger.AddDebugText(rtbDebug, @"Dumping all zone.obj file navmeshes = false, Finishing off Current build."); DumpMeshes.CancelAsync(); NavBuilder.DumpingMesh = false; NavBuilder.UnloadMeshBuilder(); Thread.Sleep(200); button5.Text = @"Start dumping all zone.obj file navmeshes"; Thread.Sleep(200); } }
/// <summary> /// <para> /// Sets the <see cref="PropertyAccessMode" /> to use for this property. /// </para> /// <para> /// By default, the backing field, if one is found by convention or has been specified, is used when /// new objects are constructed, typically when entities are queried from the database. /// Properties are used for all other accesses. Calling this method will change that behavior /// for this property as described in the <see cref="PropertyAccessMode" /> enum. /// </para> /// <para> /// Calling this method overrides for this property any access mode that was set on the /// entity type or model. /// </para> /// </summary> /// <param name="propertyAccessMode"> The <see cref="PropertyAccessMode" /> to use for this property. </param> /// <returns> The same builder instance so that multiple configuration calls can be chained. </returns> public virtual NavigationBuilder UsePropertyAccessMode(PropertyAccessMode propertyAccessMode) { if (NavBuilder != null) { NavBuilder.UsePropertyAccessMode(propertyAccessMode, ConfigurationSource.Explicit); } else { SkipNavBuilder.UsePropertyAccessMode(propertyAccessMode, ConfigurationSource.Explicit); } return(this); }
/// <summary> /// Adds or updates an annotation on the navigation property. If an annotation /// with the key specified in <paramref name="annotation" /> already exists /// its value will be updated. /// </summary> /// <param name="annotation"> The key of the annotation to be added or updated. </param> /// <param name="value"> The value to be stored in the annotation. </param> /// <returns> The same builder instance so that multiple configuration calls can be chained. </returns> public virtual NavigationBuilder HasAnnotation([NotNull] string annotation, [NotNull] object value) { Check.NotEmpty(annotation, nameof(annotation)); Check.NotNull(value, nameof(value)); if (NavBuilder != null) { NavBuilder.HasAnnotation(annotation, value, ConfigurationSource.Explicit); } else { SkipNavBuilder.HasAnnotation(annotation, value, ConfigurationSource.Explicit); } return(this); }
public ActionResult Models() { ViewBag.Title = "Models"; int[] navList = { 0, 1, 2, 3, 5, 7, 9, 10 }; NavBuilder nb = new NavBuilder(); List <NavMenuModel> iMenuItems = new List <NavMenuModel>(); iMenuItems = nb.generateItems(navList, 3); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); return(View()); }
public ActionResult Projects() { ViewBag.Title = "Projects"; int[] navList = { 0, 1 }; NavBuilder nb = new NavBuilder(); List <NavMenuModel> iMenuItems = new List <NavMenuModel>(); iMenuItems = nb.generateItems(navList, 1); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); return(View()); }
public ActionResult Dashboard() { ViewBag.Title = "Dashboard"; int[] navList = { 0, 1 }; NavBuilder nb = new NavBuilder(); List<NavMenuModel> iMenuItems = new List<NavMenuModel>(); iMenuItems = nb.generateItems(navList, 0); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); return View(); }
public ActionResult Schedule() { ViewBag.Title = "Schedule"; int[] navList = { 0, 1, 2, 3, 4, 5, 6, 10, 11 }; NavBuilder nb = new NavBuilder(); List <NavMenuModel> iMenuItems = new List <NavMenuModel>(); iMenuItems = nb.generateItems(navList, 11); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); return(View()); }
private void button3_Click(object sender, EventArgs e) { var openDialog = new OpenFileDialog(); var path = string.Format(Application.StartupPath + "\\Map Collision obj files\\"); openDialog.InitialDirectory = path; openDialog.FilterIndex = 0; if (openDialog.ShowDialog() != DialogResult.OK) { return; } var zoneFilename = openDialog.FileName; Logger.AddDebugText(rtbDebug, $@"Obj File Selected = {zoneFilename}"); try { var stopWatch = new Stopwatch(); var result = Path.GetFileName(zoneFilename); var result2 = result.Substring(0, result.LastIndexOf(".", StringComparison.Ordinal) + 1); if (File.Exists($@"{Application.StartupPath}\\Dumped NavMeshes\\{result2}nav")) { var box = MessageBox.Show($@"Are you sure you want to overwrite {result2}.nav", @"Question", MessageBoxButtons.YesNoCancel); if (box == DialogResult.Yes) { Logger.AddDebugText(rtbDebug, $@"Dumping NavMesh for {result}"); Thread.Sleep(100); if (!NavBuilder.DumpingMesh) { stopWatch.Start(); NavBuilder.Dump_NavMesh(zoneFilename); stopWatch.Stop(); var ts2 = stopWatch.Elapsed; // Format and display the TimeSpan value. var elapsedTime2 = $"{ts2.Hours:00}:{ts2.Minutes:00}:{ts2.Seconds:00}.{ts2.Milliseconds / 10:00}"; Logger.AddDebugText(rtbDebug, string.Format(@"Time Taken to dump mesh = " + elapsedTime2)); } } else if (box == DialogResult.Cancel) { DumpMeshes.CancelAsync(); return; } else if (box == DialogResult.No) { return; } } if (File.Exists($@"{Application.StartupPath}\\Dumped NavMeshes\\{result2}nav")) { return; } stopWatch.Start(); Logger.AddDebugText(rtbDebug, $@"Dumping NavMesh for {zoneFilename}"); NavBuilder.Dump_NavMesh(zoneFilename); stopWatch.Stop(); var ts = stopWatch.Elapsed; // Format and display the TimeSpan value. var elapsedTime = $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds / 10:00}"; Logger.AddDebugText(rtbDebug, $@"Finished dumping NavMesh for {zoneFilename}"); Logger.AddDebugText(rtbDebug, string.Format(@"Time Taken to dump NavMesh = " + elapsedTime)); } catch (Exception ex) { Logger.AddDebugText(rtbDebug, string.Format(ex.ToString())); } }
private void DumpMeshes_DoWork(object sender, DoWorkEventArgs e) { try { var stopWatch1 = new Stopwatch(); stopWatch1.Start(); while (!DumpMeshes.CancellationPending) { if (DumpMeshes.CancellationPending) { e.Cancel = true; break; } var path = $"{Application.StartupPath}\\Map Collision obj files\\"; var fileCount = Directory.GetFiles(path, "*.obj", SearchOption.AllDirectories).Length; Logger.AddDebugText(rtbDebug, $@"{fileCount.ToString()}.obj files fould in Map Collision obj folder"); foreach (var file in Directory.EnumerateFiles(string.Format(path, "*.obj"))) { if (DumpMeshes.CancellationPending) { button5.BeginInvoke(new MethodInvoker(() => { button5.Text = @"Start dumping all zone.obj file navmeshes"; })); e.Cancel = true; break; } var result = Path.GetFileName(file); var result2 = result.Substring(0, result.LastIndexOf(".", StringComparison.Ordinal) + 1); if (File.Exists($@"{Application.StartupPath}\\Dumped NavMeshes\\{result2}nav")) { var box = MessageBox.Show($@"Are you sure you want to overwrite {result2}.nav", @"Question", MessageBoxButtons.YesNoCancel); if (box == DialogResult.Yes) { if (!NavBuilder.DumpingMesh && !DumpMeshes.CancellationPending) { var stopWatch = new Stopwatch(); stopWatch.Start(); Logger.AddDebugText(rtbDebug, $@"Dumping NavMesh for {result2}"); if (NavBuilder.Dump_NavMesh(file) && !DumpMeshes.CancellationPending) { stopWatch.Stop(); NavBuilder.UnloadMeshBuilder(); var ts = stopWatch.Elapsed; // Format and display the TimeSpan value. var elapsedTime = $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds / 10:00}"; Logger.AddDebugText(rtbDebug, $@"Time Taken to dump mesh {result2} = {elapsedTime} "); } } } else if (box == DialogResult.Cancel) { button5.BeginInvoke(new MethodInvoker(() => { button5.Text = @"Start dumping all zone.obj file navmeshes"; })); DumpMeshes.CancelAsync(); break; } else if (box == DialogResult.No) { continue; } } if (!File.Exists($@"{Application.StartupPath}\\Dumped NavMeshes\\{result2}nav")) { if (!NavBuilder.DumpingMesh && !DumpMeshes.CancellationPending) { var stopWatch = new Stopwatch(); stopWatch.Start(); Logger.AddDebugText(rtbDebug, $@"Dumping NavMesh for {result2}"); if (NavBuilder.Dump_NavMesh(file) && !DumpMeshes.CancellationPending) { stopWatch.Stop(); NavBuilder.UnloadMeshBuilder(); var ts = stopWatch.Elapsed; // Format and display the TimeSpan value. var elapsedTime = $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds / 10:00}"; Logger.AddDebugText(rtbDebug, $@"Time Taken to dump mesh {result2} = {elapsedTime} "); } } } if (DumpMeshes.CancellationPending) { button5.BeginInvoke(new MethodInvoker(() => { button5.Text = @"Start dumping all zone.obj file navmeshes"; })); e.Cancel = true; break; } } stopWatch1.Stop(); var ts1 = stopWatch1.Elapsed; var elapsedTime1 = $"{ts1.Hours:00}:{ts1.Minutes:00}:{ts1.Seconds:00}.{ts1.Milliseconds / 10:00}"; Logger.AddDebugText(rtbDebug, @"Finished dumping NavMesh data"); Logger.AddDebugText(rtbDebug, string.Format(@"Time Taken to dump all zones NavMeshes = " + elapsedTime1)); var dInfo = new DirectoryInfo($@"{Application.StartupPath}\Dumped NavMeshes\"); var sizeOfDir = DirectorySize(dInfo, true); Logger.AddDebugText(rtbDebug, $@"NavMeshes data disk space used = {(double)sizeOfDir / (1024 * 1024):N2} MB"); button5.BeginInvoke(new MethodInvoker(() => { button5.Text = @"Start dumping all zone.obj file navmeshes"; })); progressBar1.Enabled = false; progressBar1.Visible = false; DumpMeshes.CancelAsync(); return; } } catch (Exception es) { Logger.AddDebugText(rtbDebug, es.ToString()); } }
private void CreateFolders() { if (!Directory.Exists($@"{Application.StartupPath}\\Map Collision obj files")) { Directory.CreateDirectory($@"{Application.StartupPath}\\Map Collision obj files"); } if (!Directory.Exists($@"{Application.StartupPath}\\Dumped NavMeshes")) { Directory.CreateDirectory($@"{Application.StartupPath}\\Dumped NavMeshes"); } if (!Directory.Exists($"{Application.StartupPath}\\Log Configs")) { Directory.CreateDirectory($"{Application.StartupPath}\\Log Configs"); } if (!Directory.Exists($"{Application.StartupPath}\\Logs")) { Directory.CreateDirectory($"{Application.StartupPath}\\Logs"); } var netVersion = Environment.Version.ToString(); Logger.AddDebugText(rtbDebug, $@".NetFramework v = ({netVersion})"); if (!netVersion.Contains("4.")) { Logger.AddDebugText(rtbDebug, "Please Update your .Net framework, https://www.microsoft.com/en-us/download/details.aspx?id=53344"); } if (File.Exists($"{Application.StartupPath}\\FFXINAV.dll")) { var ffxinaVversion = FileVersionInfo.GetVersionInfo("FFXINAV.dll"); Logger.AddDebugText(rtbDebug, $@"FFXINAV.dll Found: Version: ({ffxinaVversion.FileVersion})"); NavBuilder = new Ffxinav(); } if (!File.Exists($"{Application.StartupPath}\\FFXINAV.dll")) { Logger.AddDebugText(rtbDebug, @"FFXINAV.dll Missing, Please download the latest version from my GitHub,https://github.com/xenonsmurf/FFXI-NavMesh-builder"); } var configPath = $"{Application.StartupPath}\\Log Configs\\Default_Config.conf"; if (!Directory.Exists(configPath)) { using (var sw = File.CreateText(configPath)) { sw.WriteLine("* GLOBAL:"); sw.WriteLine(" FORMAT = \"%datetime | %level | %logger | %msg\""); sw.WriteLine(" FILENAME = \"Logs\\FFXINAV-Info.log\""); sw.WriteLine(" ENABLED = true"); sw.WriteLine(" TO_FILE = true"); sw.WriteLine(" TO_STANDARD_OUTPUT = true"); sw.WriteLine(" SUBSECOND_PRECISION = 3"); sw.WriteLine(" PERFORMANCE_TRACKING = false"); sw.WriteLine(" MAX_LOG_FILE_SIZE = 2097152 ## Throw log files away after 2MB"); sw.Dispose(); } } try { if (NavBuilder.Initialize(configPath)) { Logger.AddDebugText(rtbDebug, "FFXINAV: Initialized"); } if (!NavBuilder.Initialize(configPath)) { Logger.AddDebugText(rtbDebug, "FFXINAV: Unable to Initialize"); } } catch (Exception ex) { Logger.AddDebugText(rtbDebug, ex.ToString()); } }
public ActionResult Index() { string autoDesk_creds = getAutoDeskAuthoToken.getAuthoToken(); autoDesk_creds = autoDesk_creds.Replace("\r\n", ""); ViewBag.autoDesk = "var auth_script='" + autoDesk_creds + "';"; ViewBag.Title = "Model"; int[] navList = { 0, 1, 2, 3, 4, 5, 7, 9, 10 }; NavBuilder nb = new NavBuilder(); List <NavMenuModel> iMenuItems = new List <NavMenuModel>(); iMenuItems = nb.generateItems(navList, 4); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); StringBuilder objProp = new StringBuilder(); objProp.Append("<li class='mega-dropdown' >"); objProp.Append("<a href='#' class='mega-dropdown-toggle'><i class='fa fa-2x info fa-th-large'></i></a>"); objProp.Append("<div class='dropdown-menu mega-dropdown-menu'>"); objProp.Append("<div class='clearfix'>"); objProp.Append(" <div class='col-sm-12 col-md-3'>"); objProp.Append(" <!--Mega menu widget-->"); objProp.Append(" <div class='text-center bg-purple pad-all'>"); objProp.Append(" <h3 class='text-thin mar-no'>Product Selector</h3>"); objProp.Append(" <div class='pad-ver box-inline'> <span class='icon-wrap icon-wrap-lg icon-circle bg-trans-light'> <i class='fa fa-cubes fa-4x'></i> </span> </div>"); objProp.Append(" <p class='pad-btm'> Select Objects in the Model </p>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" <div class='col-sm-4 col-md-3'>"); objProp.Append(" <div class='panel'>"); objProp.Append(" <!--Panel heading-->"); objProp.Append(" <div class='panel-heading'>"); objProp.Append(" <h3 class='panel-title'>Selected Object Properties</h3>"); objProp.Append(" </div>"); objProp.Append(" <!--Default panel contents-->"); objProp.Append(" <div class='panel-body'>"); objProp.Append(" <table class='table table-striped table-bordered'>"); objProp.Append(" <thead>"); objProp.Append(" <tr>"); objProp.Append(" <th>Name</th>"); objProp.Append(" <th>Value</th>"); objProp.Append(" </tr>"); objProp.Append(" </thead>"); objProp.Append(" <tbody>"); objProp.Append(" <tr>"); objProp.Append(" <td>Selected Id</td>"); objProp.Append(" <td id='model-selected-id'></td>"); objProp.Append(" </tr>"); objProp.Append(" <tr>"); objProp.Append(" <td>Name</td>"); objProp.Append(" <td id='model-selected-name'></td>"); objProp.Append(" </tr>"); objProp.Append(" <tr>"); objProp.Append(" <td>ifcObjectType</td>"); objProp.Append(" <td id='model-selected-ifcObjectType'></td>"); objProp.Append(" </tr>"); objProp.Append(" </tbody>"); objProp.Append(" </table>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" <div class='col-sm-8 col-md-6'>"); objProp.Append(" <div class='panel'>"); objProp.Append(" <!--Panel heading-->"); objProp.Append(" <div class='panel-heading'>"); objProp.Append(" <h3 class='panel-title'>Product Library</h3>"); objProp.Append(" </div>"); objProp.Append(" <!--Default panel contents-->"); objProp.Append(" <div class='panel-body' id='supplierProductsTablePanel'>"); /* * objProp.Append(" <table class='table table-striped table-bordered'"); * objProp.Append(" data-search='true'"); * objProp.Append(" data-show-refresh='true'"); * objProp.Append(" data-show-toggle='true'"); * objProp.Append(" data-show-columns='true'"); * objProp.Append(" data-sort-name='id'"); * objProp.Append(" data-page-list='[15, 20, 50]'"); * objProp.Append(" data-page-size='15'"); * objProp.Append(" data-pagination='true' data-show-pagination-switch='true'"); * objProp.Append(" id='supplierProductTable'>"); * objProp.Append(" <thead>"); * objProp.Append(" <tr>"); * objProp.Append(" <th data-field='SupplierName' data-sortable='true'>Manufacturer</th>"); * objProp.Append(" <th data-field='NoOfProducts' data-sortable='true'>Products</th>"); * objProp.Append(" <th data-hide='all' data-field='actionButtons' data-sortable='false'>Actions</th>"); * objProp.Append(" </tr>"); * objProp.Append(" </thead>"); * objProp.Append(" <tbody id='tableResults'></tbody>"); * objProp.Append(" </table>"); */ objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append("</div></li>"); ViewBag.MegaMenu = objProp.ToString(); return(View()); }
public ActionResult Index() { string autoDesk_creds = getAutoDeskAuthoToken.getAuthoToken(); autoDesk_creds = autoDesk_creds.Replace("\r\n", ""); ViewBag.autoDesk = "var auth_script='" + autoDesk_creds + "';"; ViewBag.Title = "Model"; int[] navList = { 0, 1, 2, 3, 4,5,7,9,10 }; NavBuilder nb = new NavBuilder(); List<NavMenuModel> iMenuItems = new List<NavMenuModel>(); iMenuItems = nb.generateItems(navList, 4); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); StringBuilder objProp = new StringBuilder(); objProp.Append("<li class='mega-dropdown' >"); objProp.Append("<a href='#' class='mega-dropdown-toggle'><i class='fa fa-2x info fa-th-large'></i></a>"); objProp.Append("<div class='dropdown-menu mega-dropdown-menu'>"); objProp.Append("<div class='clearfix'>"); objProp.Append(" <div class='col-sm-12 col-md-3'>"); objProp.Append(" <!--Mega menu widget-->"); objProp.Append(" <div class='text-center bg-purple pad-all'>"); objProp.Append(" <h3 class='text-thin mar-no'>Product Selector</h3>"); objProp.Append(" <div class='pad-ver box-inline'> <span class='icon-wrap icon-wrap-lg icon-circle bg-trans-light'> <i class='fa fa-cubes fa-4x'></i> </span> </div>"); objProp.Append(" <p class='pad-btm'> Select Objects in the Model </p>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" <div class='col-sm-4 col-md-3'>"); objProp.Append(" <div class='panel'>"); objProp.Append(" <!--Panel heading-->"); objProp.Append(" <div class='panel-heading'>"); objProp.Append(" <h3 class='panel-title'>Selected Object Properties</h3>"); objProp.Append(" </div>"); objProp.Append(" <!--Default panel contents-->"); objProp.Append(" <div class='panel-body'>"); objProp.Append(" <table class='table table-striped table-bordered'>"); objProp.Append(" <thead>"); objProp.Append(" <tr>"); objProp.Append(" <th>Name</th>"); objProp.Append(" <th>Value</th>"); objProp.Append(" </tr>"); objProp.Append(" </thead>"); objProp.Append(" <tbody>"); objProp.Append(" <tr>"); objProp.Append(" <td>Selected Id</td>"); objProp.Append(" <td id='model-selected-id'></td>"); objProp.Append(" </tr>"); objProp.Append(" <tr>"); objProp.Append(" <td>Name</td>"); objProp.Append(" <td id='model-selected-name'></td>"); objProp.Append(" </tr>"); objProp.Append(" <tr>"); objProp.Append(" <td>ifcObjectType</td>"); objProp.Append(" <td id='model-selected-ifcObjectType'></td>"); objProp.Append(" </tr>"); objProp.Append(" </tbody>"); objProp.Append(" </table>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" <div class='col-sm-8 col-md-6'>"); objProp.Append(" <div class='panel'>"); objProp.Append(" <!--Panel heading-->"); objProp.Append(" <div class='panel-heading'>"); objProp.Append(" <h3 class='panel-title'>Product Library</h3>"); objProp.Append(" </div>"); objProp.Append(" <!--Default panel contents-->"); objProp.Append(" <div class='panel-body' id='supplierProductsTablePanel'>"); /* objProp.Append(" <table class='table table-striped table-bordered'"); objProp.Append(" data-search='true'"); objProp.Append(" data-show-refresh='true'"); objProp.Append(" data-show-toggle='true'"); objProp.Append(" data-show-columns='true'"); objProp.Append(" data-sort-name='id'"); objProp.Append(" data-page-list='[15, 20, 50]'"); objProp.Append(" data-page-size='15'"); objProp.Append(" data-pagination='true' data-show-pagination-switch='true'"); objProp.Append(" id='supplierProductTable'>"); objProp.Append(" <thead>"); objProp.Append(" <tr>"); objProp.Append(" <th data-field='SupplierName' data-sortable='true'>Manufacturer</th>"); objProp.Append(" <th data-field='NoOfProducts' data-sortable='true'>Products</th>"); objProp.Append(" <th data-hide='all' data-field='actionButtons' data-sortable='false'>Actions</th>"); objProp.Append(" </tr>"); objProp.Append(" </thead>"); objProp.Append(" <tbody id='tableResults'></tbody>"); objProp.Append(" </table>"); */ objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append(" </div>"); objProp.Append("</div></li>"); ViewBag.MegaMenu = objProp.ToString(); return View(); }
public ActionResult Systems() { ViewBag.Title = "Systems"; int[] navList = { 0, 1, 2, 3, 4, 5,10 }; NavBuilder nb = new NavBuilder(); List<NavMenuModel> iMenuItems = new List<NavMenuModel>(); iMenuItems = nb.generateItems(navList, 5); NavBuilder navMenu = new NavBuilder(); ViewBag.NavMenu = navMenu.generateMenu(iMenuItems); return View(); }