private void InitializeProject() { uxMap.Projection = DotSpatial.Projections.KnownCoordinateSystems.Projected.World.WebMercator; Project = new TamsProject(uxMap); tabControlControls.TabPages.Clear(); if (Program.cmdArgs.Length > 0) { string file = Program.cmdArgs[0]; if (!Project.open(file)) { MessageBox.Show("Could not open " + file); } } while (!Project.isOpen) { FormStartup getProject = new FormStartup(Project); getProject.ShowDialog(); } Visible = true; ToolStripMenuItem[] lcs = { importRoadsToolStripMenuItem, generalToolStripMenuItem, potholesToolStripMenuItem, analysisToolStripMenuItem, customToolStripMenuItem, roadToolStripMenuItem, roadTypeToolStripMenuItem, roadCategoryToolStripMenuItem, governingDistressToolStripMenuItem, rSLToolStripMenuItem }; ToolStripMenuItem[] lcsn = { favoriteSignsToolStripMenuItem, signAlertsToolStripMenuItem, signInventoryToolStripMenuItem, supportAlertsToolStripMenuItem, supportInventoryToolStripMenuItem, signToolStripMenuItem }; ToolStripMenuItem[] lcso = { otherToolStripMenuItem, sidewalkDistressToolStripMenuItem, severeRoadDistressToolStripMenuItem, aDARampsToolStripMenuItem, drainageToolStripMenuItem, accidentsToolStripMenuItem, allOthersToolStripMenuItem, roadsWithSidewalksToolStripMenuItem }; ModuleRoads road = new ModuleRoads(Project, new TabPage("Roads"), lcs); ModuleSigns sign = new ModuleSigns(Project, new TabPage("Signs"), lcsn); GenericModule other = new GenericModule(Project, new TabPage("Other"), lcso); Project.addModule(road, "Roads", tabControlControls); Project.addModule(sign, "Signs", tabControlControls); Project.addModule(other, "Other", tabControlControls); Project.selectModule("Roads"); toolStripStatusLabel1.Text = Project.projectFilePath; toolStripStatusLabel2.Visible = false; toolStripProgressBar1.Visible = false; CurrentMode = uxMap.FunctionMode; maxWidth = (int)uxMap.ViewExtents.Width + 10; }
private static IEnumerable <string> LoadPaoFileIntoRepositoryRaw(XilinxRepository repository, string filepath, string libraryName) { List <PaoFileModuleElement> fileElements = LoadInPaoFile(filepath); HashSet <string> librariesToExpand = new HashSet <string>(); ILibrary libraryLoading = repository.GetLibraryAutoCreate(libraryName); // Expand File Elements while (fileElements.Count != 0) { PaoFileModuleElement element = fileElements[0]; fileElements.RemoveAt(0); // Handles libraries outside of current pao library // When creating a library, the library needs to be manually loaded also, add it to the manual load collection // This check here ensures the library is only ever loaded once if (!repository.LibraryExists(element.Library) && string.Compare(libraryName, element.Library) != 0) { librariesToExpand.Add(element.Library); } ILibrary library = repository.GetLibraryAutoCreate(element.Library); if (element.LibraryAllReference) { // Collect Expected Libraries to Expand libraryLoading.AddReference(repository.GetLibraryAutoCreate(element.Library)); if (repository.VerboseOutput) { Console.WriteLine("Library '{0}' referenced into library '{1}'", element.Library, libraryLoading.Name); } } else { IModule module = new GenericModule(library, element.ModuleType, element.Module); module.Execution = element.ExecutionType; library.AddModule(module); // Check non-specific references if (library != libraryLoading) { libraryLoading.AddReference(library); if (repository.VerboseOutput) { Console.WriteLine("Library '{0}' referenced into library '{1}'", library.Name, libraryLoading.Name); } } if (repository.VerboseOutput) { Console.WriteLine("Module loaded into library '{0}', with module name '{1}'", library.Name, module.RelativeLocation); } } } return(librariesToExpand); }
private void InitializeProject() { uxMap.Projection = DotSpatial.Projections.KnownCoordinateSystems.Projected.World.WebMercator; Project = new TamsProject(uxMap); tabControlControls.TabPages.Clear(); if (Program.cmdArgs.Length > 0) { string file = Program.cmdArgs[0]; if (!Project.open(file)) { MessageBox.Show("Could not open " + file); } } while (!Project.isOpen) { FormStartup getProject = new FormStartup(Project); string logMessage = ""; logMessage += "GetEntryAssembly().Location Startup: " + System.Reflection.Assembly.GetEntryAssembly().Location + "\n"; logMessage += "GetExecutingAssembly().CodeBase: " + System.Reflection.Assembly.GetExecutingAssembly().CodeBase + "\n"; logMessage += "Environment.CurrentDirectory " + Environment.CurrentDirectory + "\n"; Classes.Log.Add(logMessage, "dev"); try { getProject.openProjectFile(System.Reflection.Assembly.GetEntryAssembly().Location); } catch { getProject.ShowDialog(); } } Visible = true; ToolStripMenuItem[] lcs = { importRoadsToolStripMenuItem, generalToolStripMenuItem, potholesToolStripMenuItem, analysisToolStripMenuItem, roadToolStripMenuItem, surfaceTypeToolStripMenuItem, functionalClassificationToolStripMenuItem, governingDistressesToolStripMenuItem, rSLDistributionToolStripMenuItem }; ToolStripMenuItem[] lcsn = { favoriteSignsToolStripMenuItem, signInventoryToolStripMenuItem, signRecommendationsToolStripMenuItem, supportInventoryToolStripMenuItem, supportRecommendationsToolStripMenuItem, signToolStripMenuItem }; ToolStripMenuItem[] lcso = { otherToolStripMenuItem, sidewalkDistressToolStripMenuItem, severeRoadDistressToolStripMenuItem, aDARampsToolStripMenuItem, drainageToolStripMenuItem, accidentsToolStripMenuItem, allOthersToolStripMenuItem, roadsWithSidewalksToolStripMenuItem }; road = new ModuleRoads(Project, new TabPage("Roads"), lcs); sign = new ModuleSigns(Project, new TabPage("Signs"), lcsn); other = new GenericModule(Project, new TabPage("Other"), lcso); Project.addModule(road, "Roads", tabControlControls); Project.addModule(sign, "Signs", tabControlControls); Project.addModule(other, "Other", tabControlControls); Project.selectModule("Roads"); toolStripStatusLabel1.Text = Project.projectFilePath; toolStripStatusLabel2.Visible = false; toolStripProgressBar1.Visible = false; CurrentMode = uxMap.FunctionMode; maxWidth = (int)uxMap.ViewExtents.Width + 10; }
private static IEnumerable<string> LoadPaoFileIntoRepositoryRaw(XilinxRepository repository, string filepath, string libraryName) { List<PaoFileModuleElement> fileElements = LoadInPaoFile(filepath); HashSet<string> librariesToExpand = new HashSet<string>(); ILibrary libraryLoading = repository.GetLibraryAutoCreate(libraryName); // Expand File Elements while (fileElements.Count != 0) { PaoFileModuleElement element = fileElements[0]; fileElements.RemoveAt(0); // Handles libraries outside of current pao library // When creating a library, the library needs to be manually loaded also, add it to the manual load collection // This check here ensures the library is only ever loaded once if (!repository.LibraryExists(element.Library) && string.Compare(libraryName, element.Library) != 0) { librariesToExpand.Add(element.Library); } ILibrary library = repository.GetLibraryAutoCreate(element.Library); if (element.LibraryAllReference) { // Collect Expected Libraries to Expand libraryLoading.AddReference(repository.GetLibraryAutoCreate(element.Library)); if (repository.VerboseOutput) { Console.WriteLine("Library '{0}' referenced into library '{1}'", element.Library, libraryLoading.Name); } } else { IModule module = new GenericModule(library, element.ModuleType, element.Module); module.Execution = element.ExecutionType; library.AddModule(module); // Check non-specific references if (library != libraryLoading) { libraryLoading.AddReference(library); if (repository.VerboseOutput) { Console.WriteLine("Library '{0}' referenced into library '{1}'", library.Name, libraryLoading.Name); } } if (repository.VerboseOutput) { Console.WriteLine("Module loaded into library '{0}', with module name '{1}'", library.Name, module.RelativeLocation); } } } return librariesToExpand; }
public OtherReports(TamsProject theProject, GenericModule other = null) { Project = theProject; moduleOther = other; }