/// <summary> /// This method runs once in the Module life. /// right before the module is unloaded. /// It usually happens when the application is closing. /// </summary> public void Disintegrate() { // Unregister XYZOjectDataSourceFactory PetrelSystem.RemoveDataSourceFactory(OceanCoursePlugin._15_UITrees.XYZOjectDataSourceFactory.Instance); CoreSystem.Services.RemoveService(typeof(OceanCoursePlugin._15_UITrees.XYZObject), typeof(Slb.Ocean.Petrel.UI.INameInfoFactory)); CoreSystem.Services.RemoveService(typeof(OceanCoursePlugin._15_UITrees.XYZObject), typeof(Slb.Ocean.Petrel.UI.IImageInfoFactory)); // TODO: Add UITreesModule.Disintegrate implementation }
/// <summary> /// This method runs once in the Module life. /// In this method, you can do registrations of the not UI related components. /// (eg: datasource, plugin) /// </summary> public void Integrate() { // Register OceanCoursePlugin._15_UITrees.XYZOjectDataSourceFactory PetrelSystem.AddDataSourceFactory(OceanCoursePlugin._15_UITrees.XYZOjectDataSourceFactory.Instance); // Register TreeItem CoreSystem.Services.AddService(typeof(OceanCoursePlugin._15_UITrees.XYZObject), typeof(Slb.Ocean.Petrel.UI.INameInfoFactory), OceanCoursePlugin._15_UITrees.XYZObjectFactory.Instance); CoreSystem.Services.AddService(typeof(OceanCoursePlugin._15_UITrees.XYZObject), typeof(Slb.Ocean.Petrel.UI.IImageInfoFactory), OceanCoursePlugin._15_UITrees.XYZObjectFactory.Instance); PetrelSystem.CommandManager.CreateCommand(OceanCoursePlugin._15_UITrees.XYZObjectCommandHandler.ID, new OceanCoursePlugin._15_UITrees.XYZObjectCommandHandler()); // TODO: Add UITreesModule.Integrate implementation }
public void convertToSeismic(string fileName) { // Check if parent collection contains any 2D data SeismicCollection coll = (SeismicCollection)FTReciever.parent; while (coll.MemberType == typeof(SeismicLine2DCollection)) { MessageBox.Show("The Seismic Collection you selected was of SeismicLine2DCollection"); List <SeismicCollection> cols = Discuss.getAllSeismicCollections(); List <string> names = new List <string>(); foreach (SeismicCollection col in cols) { names.Add(col.Name); } objSelect selector = new objSelect("Select a Seismic collection to add the cube to", names); if (selector.ShowDialog() == DialogResult.Cancel) { return; } coll = cols[objSelect.SelectedIndex]; } // Get Service ISegyFormat segyFormat = CoreSystem.GetService <ISegyFormat>(); // Find property version IPropertyVersionService pvService = PetrelSystem.PropertyVersionService; ITemplate seisTemplate = PetrelUnitSystem.TemplateGroupSeismicColor.SeismicDefault; PropertyVersion pv = pvService.FindOrCreate(PetrelSystem.GetGlobalPropertyVersionContainer(), seisTemplate); SeismicCube cube = SeismicCube.NullObject; // Lock the parent using (ITransaction txn = DataManager.NewTransaction()) { try { txn.Lock(coll); cube = segyFormat.ImportSeismic3D(fileName, (SeismicCollection)FTReciever.parent, "", Domain.ELEVATION_DEPTH, pv); } catch (InvalidOperationException e) { MessageBox.Show(e.Message); } finally { txn.Commit(); } } }
private static void ImportFromFieldPRO1_ToolClick(object sender, EventArgs args) { var w = new FieldPROConnectorDialog(); PetrelSystem.ShowModeless(w); }
private static void ChangeDatabaseConnection1_ToolClick(object sender, EventArgs args) { var w = new DBConfigurationDialogUI(); PetrelSystem.ShowModeless(w); }
/// <summary> /// This method runs once in the Module life; when it loaded into the petrel. /// This method called first. /// </summary> public void Initialize() { // Register OceanTestingZone.AmpAverageTest PetrelSystem.AddDataSourceFactory(new OceanTestingZone.AmpAverageTest.ArgumentPackageDataSourceFactory()); // TODO: Add Module.Initialize implementation }