public META3D(METAboltInstance instance, ObjectsListItem obtectitem) { InitializeComponent(); SetExceptionReporter(); Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException; Disposed += new EventHandler(META3D_Disposed); this.RootPrimLocalID = obtectitem.Prim.LocalID; selitem = obtectitem.Prim; string msg1 = "Drag (left mouse down) to rotate object\n" + "ALT+Drag to Zoom\n" + "Ctrl+Drag to Pan\n" + "Wheel in/out to Zoom in/out\n\n" + "Click camera then object for snapshot"; toolTip = new Popup(customToolTip = new CustomToolTip(instance, msg1)); toolTip.AutoClose = false; toolTip.FocusOnOpen = false; toolTip.ShowingAnimation = toolTip.HidingAnimation = PopupAnimations.Blend; UseMultiSampling = false; this.instance = instance; client = this.instance.Client; //netcom = this.instance.Netcom; isobject = true; this.objectitem = obtectitem; TexturePointers[0] = 0; renderer = new MeshmerizerR(); textRendering = new TextRendering(instance); client.Objects.TerseObjectUpdate += new EventHandler<TerseObjectUpdateEventArgs>(Objects_TerseObjectUpdate); client.Objects.ObjectUpdate += new EventHandler<PrimEventArgs>(Objects_ObjectUpdate); client.Objects.ObjectDataBlockUpdate += new EventHandler<ObjectDataBlockUpdateEventArgs>(Objects_ObjectDataBlockUpdate); client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(SIM_OnSimChanged); client.Self.TeleportProgress += new EventHandler<TeleportEventArgs>(Self_TeleportProgress); }
void META3D_Disposed(object sender, EventArgs e) { try { if (glControl != null) { glControl.Dispose(); glControl = null; } if (textRendering != null) { textRendering = null; } } catch (Exception ex) { //string exp = ex.Message; reporter.Show(ex); } }