public void UnityLayerListener(object sender, UnityLayer unityLayer) { if (UnityLayerHanlder != null) { UnityLayerHanlder(this, unityLayer); } }
public void UnityLayerListener(object sender, UnityLayer unityLayer) { _u3dLayer = unityLayer; treeView.ItemsSource = unityLayer.UnityLayerModel.childs; if (Model3dLoaded != null) { Model3dLoaded(this, unityLayer); } }
private void Preview3DLayerBtn_Click(object sender, RoutedEventArgs e) { Proj3DViewDefWindow proj3DViewDefWnd = new Proj3DViewDefWindow(_prjDef, Layer3DNameTB.Text); proj3DViewDefWnd.Model3dLoaded += (send, args) => { _u3dLayer = args; }; proj3DViewDefWnd.Owner = this.Owner; proj3DViewDefWnd.WindowStartupLocation = WindowStartupLocation.CenterOwner; proj3DViewDefWnd.Show(); }
public DomainDefWindow(ProjectDefinition prjDef, Project prj, List <EMapLayers> eMapLayersList, UnityLayer unityLayer) { InitializeComponent(); _prjDef = prjDef; _prj = prj; _eMapLayersList = eMapLayersList; DomainListLB.ItemsSource = prj.domains; _unityLayer = unityLayer; Loaded += DomainDefWindow_Loaded; }
bool StartConfig() { bool?success; // Preparation Step 1 - Config path to iS3 and data directory // ConfPathWindow mainWnd = new ConfPathWindow(); mainWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; success = mainWnd.ShowDialog(); if (success == null || success.Value == false) { return(false); } iS3Path = mainWnd.ExePath; dataPath = mainWnd.DataPath; // Preparation Step 2 - Config projects // string projListFile = dataPath + "\\ProjectList.xml"; ProjectList projList = ConfigCore.LoadProjectList(projListFile); ProjectsWindow projsWnd = new ProjectsWindow(projList); projsWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; success = projsWnd.ShowDialog(); if (success == null || success.Value == false) { return(false); } projID = projsWnd.ProjID; projLocX = projsWnd.ProjLocX; projLocY = projsWnd.ProjLocY; // Step 1 - Config project general definition // ProjectDefinition projDef = ConfigCore.LoadProjectDefinition(dataPath, projID); if (projDef == null) { projDef = ConfigCore.CreateProjectDefinition(dataPath, projID); } ProjGnrDefWindow projGnrDefWnd = new ProjGnrDefWindow(projDef); projGnrDefWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; success = projGnrDefWnd.ShowDialog(); if (success == null || success.Value == false) { return(false); } // Step 2 - Config engineering maps definition of the project // ProjEMapDefWindow projEMapsDefWnd = new ProjEMapDefWindow(projDef); projEMapsDefWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; success = projEMapsDefWnd.ShowDialog(); if (success == null || success.Value == false) { return(false); } //Step 3.3 -Config 3d map // Proj3DDefWindow proj3DDefWindow = new Proj3DDefWindow(projDef); success = proj3DDefWindow.ShowDialog(); if (success == null || success.Value == false) { return(false); } // Config 3D map // Note: Because there is nothing to configure for 3D, add "preview 3D model" in DomainDefWindow // //Proj3DViewDefWindow proj3DViewDefWnd = new Proj3DViewDefWindow(dataPath, projID); //proj3DViewDefWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; //success = proj3DViewDefWnd.ShowDialog(); //if (success == null || success.Value == false) //{ // return false; //} // Step 3 - Config domains of the project // List <EMapLayers> eMapLayersList = projEMapsDefWnd.EMapLayersList; UnityLayer unitylayer = proj3DDefWindow.unityLayer; Project prj = ConfigCore.LoadProject(dataPath, projID); DomainDefWindow domainDefWnd = new DomainDefWindow(projDef, prj, eMapLayersList, unitylayer); domainDefWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; success = domainDefWnd.ShowDialog(); if (success == null || success.Value == false) { return(false); } // Step 4 - Config project tree // ProjTreeDefWindow prjTreeDefWnd = new ProjTreeDefWindow(prj); prjTreeDefWnd.WindowStartupLocation = WindowStartupLocation.CenterScreen; success = prjTreeDefWnd.ShowDialog(); if (success == null || success.Value == false) { return(false); } // Write ProjectList.xml // ConfigCore.WriteProjectList(projListFile, projsWnd.ProjectList); // Write <projectID>.xml // ConfigCore.WriteProject(dataPath, projID, projDef, prj); // Write <projectID>.py // ConfigCore.WriteViewsDef(iS3Path, projID, projDef); string format = "Congratulations!\r\n" + "The following files has been generated successfully.\r\n" + " {0}\\ProjectList.xml\r\n" + " {1}\\{2}.xml\r\n" + " {3}\\IS3Py\\{4}.py\r\n" + "The {5} project is ready to use in iS3."; string str = string.Format(format, dataPath, dataPath, projID, iS3Path, projID, projID); MessageBox.Show(str, "Success", MessageBoxButton.OK); return(true); }
public Select3DEMapLayersWindow(UnityLayer unitylayer) { InitializeComponent(); _unityLayer = unitylayer; Loaded += SelectEMapLayersWindow_Loaded; }
int GetLayer(UnityLayer varUnityLayer) { return((int)varUnityLayer); }
public void UnityLayerListener(object sender, UnityLayer unityLayer) { this.unityLayer = unityLayer; treeView.ItemsSource = unityLayer.UnityLayerModel.childs; }
public void SetLayers(UnityLayer origin, UnityLayer target) { originLayer = origin; targetLayer = target; }