/// <summary> /// Default constructor /// </summary> public GridClient() { // Initialise SmartThreadPool when using mono if (Type.GetType("Mono.Runtime") != null) { WorkPool.Init(true); } // These are order-dependant Network = new NetworkManager(this); Settings = new Settings(this); Parcels = new ParcelManager(this); Self = new AgentManager(this); Avatars = new AvatarManager(this); Estate = new EstateTools(this); Friends = new FriendsManager(this); Grid = new GridManager(this); Objects = new ObjectManager(this); Groups = new GroupManager(this); Assets = new AssetManager(this); Appearance = new AppearanceManager(this); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); Stats = new OpenMetaverse.Stats.UtilizationStatistics(); }
/// <summary> /// Default constructor /// </summary> public GridClient() { // These are order-dependant Network = new NetworkManager(this); Settings = new Settings(this); Parcels = new ParcelManager(this); Self = new AgentManager(this); Avatars = new AvatarManager(this); Friends = new FriendsManager(this); Grid = new GridManager(this); Objects = new ObjectManager(this); Groups = new GroupManager(this); Assets = new AssetManager(this); Appearance = new AppearanceManager(this, Assets); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); //if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore = new Inventory(Inventory); //if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore = new Inventory(Inventory); //Inventory.OnSkeletonsReceived += // delegate(InventoryManager manager) // { // if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton); // if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton); // }; }
// UI thread private void EventInf(DirectoryManager.EventInfo matchedEvent) { textBox7.Text = matchedEvent.Creator.ToString(); textBox2.Text = matchedEvent.Name.ToString(); textBox3.Text = DirectoryManager.EventCategories.All.ToString(); // matchedEvent.Category.ToString(); if (matchedEvent.Duration > 59) { uint dur = matchedEvent.Duration/60; textBox5.Text = dur.ToString() + " hours"; } else { textBox5.Text = matchedEvent.Duration.ToString() + " minutes"; } textBox6.Text = matchedEvent.Date.ToString(); // Get region handle //ulong regionhand =Helpers.UIntsToLong((uint)(matchedEvent.GlobalPos.X - (matchedEvent.GlobalPos.X % 256)), (uint)(matchedEvent.GlobalPos.Y - (matchedEvent.GlobalPos.Y % 256))); // Convert Global pos to local float locX = (float)matchedEvent.GlobalPos.X; ; float locY = (float)matchedEvent.GlobalPos.Y; float locX1; float locY1; Helpers.GlobalPosToRegionHandle(locX, locY, out locX1, out locY1); fX = locX1; fY = locY1; fZ = (float)matchedEvent.GlobalPos.Z; textBox8.Text = matchedEvent.SimName.ToString() + "/" + fX.ToString() + "/" + fY.ToString() + "/" + fZ.ToString(); if (matchedEvent.Cover == 0) { textBox9.Text = "none"; } else { textBox9.Text = "L$ " + matchedEvent.Cover.ToString(); } textBox1.Text = matchedEvent.Desc.ToString(); }
/// <summary> /// Default constructor /// </summary> public GridClient() { // These are order-dependant Network = new NetworkManager(this); Settings = new Settings(this); Parcels = new ParcelManager(this); Self = new AgentManager(this); Avatars = new AvatarManager(this); Estate = new EstateTools(this); Friends = new FriendsManager(this); Grid = new GridManager(this); Objects = new ObjectManager(this); Groups = new GroupManager(this); Assets = new AssetManager(this); Appearance = new AppearanceManager(this); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); Stats = new OpenMetaverse.Stats.UtilizationStatistics(); }
/// <summary> /// Create or update profile Classified /// </summary> /// <param name="classifiedID">UUID of the classified to update, or random UUID to create a new classified</param> /// <param name="category">Defines what catagory the classified is in</param> /// <param name="snapshotID">UUID of the image displayed with the classified</param> /// <param name="price">Price that the classified will cost to place for a week</param> /// <param name="name">Name of the classified</param> /// <param name="desc">Long description of the classified</param> /// <param name="autoRenew">if true, auto renew classified after expiration</param> public void UpdateClassifiedInfo(UUID classifiedID, DirectoryManager.ClassifiedCategories category, UUID snapshotID, int price, string name, string desc, bool autoRenew) { UpdateClassifiedInfo(classifiedID, category, snapshotID, price, Client.Self.GlobalPosition, name, desc, autoRenew); }
/// <summary> /// Create or update profile Classified /// </summary> /// <param name="classifiedID">UUID of the classified to update, or random UUID to create a new classified</param> /// <param name="category">Defines what catagory the classified is in</param> /// <param name="snapshotID">UUID of the image displayed with the classified</param> /// <param name="price">Price that the classified will cost to place for a week</param> /// <param name="position">Global position of the classified landmark</param> /// <param name="name">Name of the classified</param> /// <param name="desc">Long description of the classified</param> /// <param name="autoRenew">if true, auto renew classified after expiration</param> public void UpdateClassifiedInfo(UUID classifiedID, DirectoryManager.ClassifiedCategories category, UUID snapshotID, int price, Vector3d position, string name, string desc, bool autoRenew) { ClassifiedInfoUpdatePacket classified = new ClassifiedInfoUpdatePacket(); classified.AgentData.AgentID = Client.Self.AgentID; classified.AgentData.SessionID = Client.Self.SessionID; classified.Data.ClassifiedID = classifiedID; classified.Data.Category = (uint)category; classified.Data.ParcelID = UUID.Zero; // TODO: verify/fix ^ classified.Data.ParentEstate = 0; // TODO: verify/fix ^ classified.Data.SnapshotID = snapshotID; classified.Data.PosGlobal = position; classified.Data.ClassifiedFlags = autoRenew ? (byte)32 : (byte)0; // TODO: verify/fix ^ classified.Data.PriceForListing = price; classified.Data.Name = Utils.StringToBytes(name); classified.Data.Desc = Utils.StringToBytes(desc); Client.Network.SendPacket(classified); }
/// <summary>Construct a new instance of the EventInfoReplyEventArgs class</summary> /// <param name="matchedEvent">A single EventInfo object containing the details of an event</param> public EventInfoReplyEventArgs(DirectoryManager.EventInfo matchedEvent) { this.m_MatchedEvent = matchedEvent; }
// UI thread public void DisplayPlace(DirectoryManager.PlacesSearchData place) { if (place.Name == null) return; string sForSale = ""; if (place.Price > 0) { sForSale = "For Sale for L$" + place.Price.ToString(); } txtName.Text = place.Name; txtDescription.Text = place.Desc; txtInformation.Text = "Traffic: " + place.Dwell + " Area: " + place.ActualArea.ToString() + " sq. m. " + sForSale; // Can't figure out how this is done so I am commenting // this feature out. If you know how it's done // go ahead and implement it //string LandFlag = ""; //if ((place.Flags & Parcel.ParcelFlags.MaturePublish) == Parcel.ParcelFlags.MaturePublish) //{ // byte sflag = place.Flags; // LandFlag = " (Mature)"; //} //txtLocation.Text += LandFlag; // Convert Global pos to local float locX = (float)place.GlobalX; ; float locY = (float)place.GlobalY; float locX1; float locY1; Helpers.GlobalPosToRegionHandle(locX, locY, out locX1, out locY1); fX = locX1; fY = locY1; fZ = (float)place.GlobalZ; sSIM = place.SimName; txtLocation.Text = place.SimName.ToString() + " " + fX.ToString() + ", " + fY.ToString() + ", " + fZ.ToString(); }
/// <summary> /// Default constructor /// </summary> public GridClient() { // These are order-dependant Log = new LoggerInstance(); Network = new NetworkManager(Log); Terrain = new TerrainManager(Log, Network); Parcels = new ParcelManager(Log, Network, Terrain); Self = new AgentManager(Log, Network, Grid); Avatars = new AvatarManager(Log, Network); Friends = new FriendsManager(Log, Network, Inventory, Self, Avatars); Grid = new GridManager(Log, Network); Objects = new ObjectManager(Log, Network, Self); Groups = new GroupManager(Log, Network, Self); Assets = new AssetManager(Log, Network); Estate = new EstateTools(Log, Network, Assets); Appearance = new AppearanceManager(Log, Network, Inventory, Assets, Objects, Self); Inventory = new InventoryManager(Log, Network, Self, Assets); Directory = new DirectoryManager(Log, Network); Sound = new SoundManager(Log, Network, Self); Throttle = new AgentThrottle(Network); Settings = new Settings(this); //if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore = new Inventory(Inventory); //if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore = new Inventory(Inventory); //Inventory.OnSkeletonsReceived += // delegate(InventoryManager manager) // { // if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton); // if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton); // }; Network.RegisterLoginResponseCallback( delegate(bool loginSuccess, bool redirect, string message, string reason, LoginResponseData replyData) { if (loginSuccess) Log.BotName = replyData.FirstName + " " + replyData.LastName; }); }
/// <summary> /// Default constructor /// </summary> public GridClient() { #if USE_SMART_THREAD_POOL ThreadPool = new SmartThreadPool(-1, 25); #endif // These are order-dependant #if USE_SMART_THREAD_POOL Network = new NetworkManager(this, ThreadPool); #else Network = new NetworkManager(this); #endif Settings = new Settings(this); #if USE_SMART_THREAD_POOL Parcels = new ParcelManager(this, ThreadPool); #else Parcels = new ParcelManager(this); #endif Self = new AgentManager(this); Avatars = new AvatarManager(this); Friends = new FriendsManager(this); Grid = new GridManager(this); Objects = new ObjectManager(this); Groups = new GroupManager(this); #if USE_SMART_THREAD_POOL Assets = new AssetManager(this, ThreadPool); #else Assets = new AssetManager(this); #endif Appearance = new AppearanceManager(this, Assets); Inventory = new InventoryManager(this); Directory = new DirectoryManager(this); Terrain = new TerrainManager(this); Sound = new SoundManager(this); Throttle = new AgentThrottle(this); //if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore = new Inventory(Inventory); //if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore = new Inventory(Inventory); //Inventory.OnSkeletonsReceived += // delegate(InventoryManager manager) // { // if (Settings.ENABLE_INVENTORY_STORE) // InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton); // if (Settings.ENABLE_LIBRARY_STORE) // LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton); // }; }