public InventoryImageConsole(SecondLife instance, SLNetCom netcoms, InventoryItem item, ImageCache imageCache) { InitializeComponent(); //SecondLife secondlife, SLNetCom netcoms, netcom = netcoms; client = instance; this.item = item; this.imagecache = imageCache; if (imageCache.ContainsImage(item.AssetUUID)) SetFinalImage(this.imagecache.GetImage(item.AssetUUID)); else { this.Disposed += new EventHandler(InventoryImageConsole_Disposed); client.Assets.OnImageReceived += new AssetManager.ImageReceivedCallback(Assets_OnImageReceived); client.Assets.RequestImage(item.AssetUUID, ImageType.Normal, 125000.0f, 0); } }
public Form1() { InitializeComponent(); //Initialize SL communication library objects client = new SecondLife(); client.Settings.ALWAYS_REQUEST_OBJECTS = true; client.Settings.ALWAYS_DECODE_OBJECTS = true; client.Settings.OBJECT_TRACKING = true; client.Settings.ENABLE_SIMSTATS = true; client.Settings.FETCH_MISSING_INVENTORY = true; client.Settings.MULTIPLE_SIMS = true; client.Settings.SEND_AGENT_THROTTLE = true; client.Settings.SEND_AGENT_UPDATES = true; netcom = new SLNetCom(client); imageCache = new ImageCache(); netcom.NetcomSync = this; AddNetcomEvents();//Needed for SLNetCom }
public InventoryImageConsole(SecondLife instance, SLNetCom netcoms, InventoryItem item, ImageCache imageCache) { InitializeComponent(); //SecondLife secondlife, SLNetCom netcoms, netcom = netcoms; client = instance; this.item = item; this.imagecache = imageCache; if (imageCache.ContainsImage(item.AssetUUID)) { SetFinalImage(this.imagecache.GetImage(item.AssetUUID)); } else { this.Disposed += new EventHandler(InventoryImageConsole_Disposed); client.Assets.OnImageReceived += new AssetManager.ImageReceivedCallback(Assets_OnImageReceived); client.Assets.RequestImage(item.AssetUUID, ImageType.Normal, 125000.0f, 0); } }
public ImageDownloader(SecondLife instance, SLNetCom netcoms, InventoryItem item, ImageCache imageCache, string savepath) { InitializeComponent(); //SecondLife secondlife, SLNetCom netcoms, netcom = netcoms; client = instance; this.item = item; this.imagecache = imageCache; this.FilePath = savepath; if (imageCache.ContainsImage(item.AssetUUID)) SetFinalImage(this.imagecache.GetImage(item.AssetUUID)); else { this.Disposed += new EventHandler(InventoryImageConsole_Disposed); client.Assets.OnImageReceived += new AssetManager.ImageReceivedCallback(Assets_OnImageReceived); SetStatusBoxText("Requesting: " + item.Name); client.Assets.RequestImage(item.AssetUUID, ImageType.Normal, 125000.0f, 0); this.Decoded = false; // Wait for the event to trigger queryEvent.WaitOne(8000, false); } }
public ImageViewerForm(InventoryItem item, SecondLife secondlife, SLNetCom netcoms, ImageList imageIconList, ImageCache imageCache) { InitializeComponent(); this.netcom = netcoms; this.client = secondlife; this.item = item; this.imagecache = imageCache; //Let's display the associated icon with the AssetType switch (item.AssetType) { case AssetType.Texture: case AssetType.TextureTGA: case AssetType.ImageJPEG: case AssetType.ImageTGA: this.Icon = Utils.MIUtils.MakeIcon(imageIconList.Images["snapshot.ico"], 16, true); break; default: this.Icon = Utils.MIUtils.MakeIcon(imageIconList.Images["texture.ico"], 16, true); break; } }
public ImageDownloader(SecondLife instance, SLNetCom netcoms, InventoryItem item, ImageCache imageCache, string savepath) { InitializeComponent(); //SecondLife secondlife, SLNetCom netcoms, netcom = netcoms; client = instance; this.item = item; this.imagecache = imageCache; this.FilePath = savepath; if (imageCache.ContainsImage(item.AssetUUID)) { SetFinalImage(this.imagecache.GetImage(item.AssetUUID)); } else { this.Disposed += new EventHandler(InventoryImageConsole_Disposed); client.Assets.OnImageReceived += new AssetManager.ImageReceivedCallback(Assets_OnImageReceived); SetStatusBoxText("Requesting: " + item.Name); client.Assets.RequestImage(item.AssetUUID, ImageType.Normal, 125000.0f, 0); this.Decoded = false; // Wait for the event to trigger queryEvent.WaitOne(8000, false); } }