private HomeViewModel GetPropertySummary(HomeViewModel homeViewModel, int PropID, string PropName) { //Sends to summary of the property homeViewModel.viewName = "PropertySummary"; // Models.GlobalVariables.SelectedProperty = StaticVariables.PropList[0].Address1; Session["SelectedPropertyID"] = PropID; Session["SelectedProperty"] = PropName; // Session["IsDirector"] = EstateDirectors.EstateDirectorMethods.IsCustomerDirector(GlobalVariables.CS, StaticVariables.PropList[0].ID).ToString(); Models.MyAccountViewModel vm = GetViewModel(); Estates es = new Estates(); try { es = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); } catch { } Session["EstateName"] = es.EstateName; //Gets outstanding repairs vm.RepairVM = new RepairsMaintenanceViewModel(); vm.RepairVM.Repair = RepairMethods.GetOutstandingRepairs(es.EstatedID); // try // { vm = GetAccountDetails(vm, (int)Session["SelectedPropertyID"]); // } catch { } vm.PageTitle = "Property Level Contact Preferences"; homeViewModel.anonObj = vm; return(homeViewModel); }
public override Estates Update(GameTime gameTime) { if (menubuttons.Update()) { targetState = Estates.Gameplay; } return(targetState); }
private void DisposeState(State state) { if (targetState != currentState) { state.Dispose(); previousState = currentState; currentState = targetState; } }
private void InitializeState(State state) { if (previousState != currentState) { state.Initialize(); previousState = currentState; currentState = targetState; } }
public async Task LoadAsync() { var lookup = await estateLookupService.GetEstateLookupAsync(); Estates.Clear(); foreach (var item in lookup) { Estates.Add(new NavigationItemViewModel(item.Id, item.DisplayMember)); } }
private void SetEstateName() { if (Session["EstateName"] == null) { Estates es = new Estates(); try { es = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); } catch { } Session["EstateName"] = es.EstateName; } }
private void SettingsHandler(string regionName, RegionSettings settings) { if (m_regionInfo != null) { m_regionInfo.MaxAgents = (uint)settings.AgentLimit; m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.AllowDamage, settings.AllowDamage); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.AllowParcelChanges, settings.AllowLandJoinDivide); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.BlockLandResell, !settings.AllowLandResell); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.BlockParcelSearch, settings.BlockLandShowInSearch); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.BlockTerraform, settings.BlockTerraform); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.SkipCollisions, settings.DisableCollisions); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.SkipPhysics, settings.DisablePhysics); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.SkipScripts, settings.DisableScripts); m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.SunFixed, settings.FixedSun); //settings.MaturityRating //settings.ObjectBonus m_regionInfo.RegionFlags = ToggleRegionFlag(m_regionInfo.RegionFlags, RegionFlags.RestrictPushObject, settings.RestrictPushing); m_regionInfo.TerrainDetail0 = settings.TerrainDetail0; m_regionInfo.TerrainDetail1 = settings.TerrainDetail1; m_regionInfo.TerrainDetail2 = settings.TerrainDetail2; m_regionInfo.TerrainDetail3 = settings.TerrainDetail3; m_regionInfo.TerrainHeightRange00 = settings.TerrainHeightRange00; m_regionInfo.TerrainHeightRange01 = settings.TerrainHeightRange01; m_regionInfo.TerrainHeightRange10 = settings.TerrainHeightRange10; m_regionInfo.TerrainHeightRange11 = settings.TerrainHeightRange11; m_regionInfo.TerrainStartHeight00 = settings.TerrainStartHeight00; m_regionInfo.TerrainStartHeight01 = settings.TerrainStartHeight01; m_regionInfo.TerrainStartHeight10 = settings.TerrainStartHeight10; m_regionInfo.TerrainStartHeight11 = settings.TerrainStartHeight11; //settings.TerrainLowerLimit //settings.TerrainRaiseLimit m_regionInfo.UseEstateSun = settings.UseEstateSun; m_regionInfo.WaterHeight = settings.WaterHeight; if (m_udp != null) { m_scene.ForEachPresence( delegate(IScenePresence presence) { if (presence is LLAgent) { Estates.SendRegionHandshake((LLAgent)presence, m_udp, m_scene, m_regionInfo, m_permissions); } } ); } } }
private Estates GetEstate() { Estates es = new Estates(); try { es = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); } catch { } Session["EstateName"] = es.EstateName; return(es); }
public ActionResult OutstandingRepairs(int PropID = 0) { if (Session["CustomerID"] != null && (int)Session["CustomerID"] != 0) { RepairsMaintenanceViewModel vm = new RepairsMaintenanceViewModel(); if (Session["SelectedPropertyID"] != null) { if (PropID != 0 && Session["SelectedPropertyID"] != null) { Session["SelectedPropertyID"] = PropID; Session["SelectedProperty"] = Models.PropertyMethods.PropertyAddress(PropID); Session["IsDirector"] = EstateDirectors.EstateDirectorMethods.IsCustomerDirector(GlobalVariables.GetConnection(), PropID).ToString(); //Models.GlobalVariables.SelectedProperty = Models.PropertyMethods.PropertyAddress(PropID); Estates e = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); Session["EstateName"] = e.EstateName; e = null; } if ((int)Session["SelectedPropertyID"] == 0) { vm.PropListViewModel = new ServiceChargeBudgetViewModel(); vm.PropListViewModel.PropertyList = Models.PropertyMethods.GetAllOwnedProperties((int)Session["CustomerID"]); vm.PropListViewModel.ControllerName = "RepairsMaintenance"; vm.PropListViewModel.ViewName = "OutstandingRepairs"; } else { Estates Estate = new Estates(); Estate = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); vm.Repair = RepairMethods.GetOutstandingRepairs(Estate.EstatedID); Session["EstateName"] = Estate.EstateName; } } else { Estates Estate = new Estates(); Estate = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); vm.Repair = RepairMethods.GetOutstandingRepairs(Estate.EstatedID); Session["EstateName"] = Estate.EstateName; } return(View("OutstandingRepairs", vm)); } else { //return not logged in view return(View("../Home/NotLoggedIn")); } }
private async Task GetEstates(bool forceCloud = false) { Estates.Clear(); try { using (var dlg = this.Dialogs.Loading("Progress (No Cancel)")) { var result = await _estatesService.GetAllEstates(forceCloud); if (!result.Success) { Dialogs.Toast(result.Message); return; } var estates = result.ResultObject as IEnumerable <EstateRow>; if (estates != null && estates.Any()) { Estates.AddRange(estates); } } } catch (ServiceAuthenticationException e) { var result = await TryToLogin(); if (!result) { await NavigationService.NavigateToAsync <LoginViewModel>(); } else { await GetEstates(forceCloud); } } catch (Exception e) { await ShowErrorAlert(e.Message); } }
//ParseData Method private Boolean ParseData() { try { JSONArray mJsonArray = new JSONArray(mJsonData); JSONObject mJsonObject; //new estate javalist mEstates = new JavaList <Estates>(); for (int i = 0; i < mJsonArray.Length(); i++) { mJsonObject = mJsonArray.GetJSONObject(i); //retrieve parsed data long id = mJsonObject.GetLong("estateId"); string name = mJsonObject.GetString("estateName"); string email = mJsonObject.GetString("estateEmail"); string telno = mJsonObject.GetString("estateTelNo"); int status = mJsonObject.GetInt("regStatus"); string added = mJsonObject.GetString("regdate"); //new instance of estates mEstate = new Estates(); mEstate.Id = id; mEstate.EstateName = name; mEstate.RegStatus = status; mEstate.RegDate = added; mEstates.Add(mEstate); } } catch (Exception ex) { Console.WriteLine(ex.Message); } return(false); }
public SearchResults(string terms, bool includeUnavailable) { Terms = terms; IncludeUnavailable = includeUnavailable; foreach (var owner in Estatehub.Owners) { foreach (var estate in owner.Estates) { if (includeUnavailable || estate.IsCurrentlyAvailable()) { if (estate.IsBeingAdvertised()) { Advertisements.Add(estate.Advertisement); } else if (estate.MatchesTerms(terms)) { Estates.Add(estate); } } } } }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { Pixel = new Texture2D(graphics.GraphicsDevice, 1, 1, false, SurfaceFormat.Color); Pixel.SetData <Color>(new Color[] { Color.White }); // Create a new SpriteBatch, which can be used to draw textures. graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 450; graphics.ApplyChanges(); sp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, 1, 1, 1, 1, 0, 0, }, }, 40); splashtexture = Content.Load <Texture2D>("Splash"); menutexture = Content.Load <Texture2D>("Menu"); playtexture = Content.Load <Texture2D>("PlayButton"); idleSpritesheet = Content.Load <Texture2D>("LuffyIdle"); walkSpritesheet = Content.Load <Texture2D>("LuffyWalk"); tauntSpritesheet = Content.Load <Texture2D>("LuffyTaunt"); //mapTexture = Content.Load<Texture2D>("Tile1"); jumpSpritesheet = Content.Load <Texture2D>("LuffyJump"); ////backgroundtexture = Content.Load<Texture2D>("Gamebackground"); backgroundtexture = Content.Load <Texture2D>("Gamebackground"); healthbartexture = Content.Load <Texture2D>("healthbar"); enemyIdleTexture = Content.Load <Texture2D>("EnemyIdle"); enemyWalkTexture = Content.Load <Texture2D>("EnemyWalk"); splashScreen = new SplashScreen(splashtexture); menu = new Menu(menutexture, playtexture); Camera.Main = new Camera(graphics); gameplay = new Gameplay(idleSpritesheet, walkSpritesheet, tauntSpritesheet, jumpSpritesheet, backgroundtexture, map, healthbartexture, enemyIdleTexture, enemyWalkTexture); ////gamebackground = new Gameplay(backgroundtexture); healthbar = new Healthbar(healthbartexture); currentState = Estates.Splashscreen; previousState = Estates.Unsepecified; // TODO: use this.Content to load your game content here }
public ActionResult PropertySummary(Models.PropertyTypes PropType = PropertyTypes.None, int PropID = 0, string PropName = "") { if (Session["UserType"].ToString() == "1") { if (StaticVariables.PropList != null) { foreach (Models.Properties p in StaticVariables.PropList) { //sets details to display on toolbar if (p.ID == PropID) { Session["SelectedProperty"] = p.Address1; Session["SelectedPropertyID"] = p.ID; // Session["IsDirector"] = EstateDirectors.EstateDirectorMethods.IsCustomerDirector(GlobalVariables.CS, p.ID); break; } } } else { return(View("NotLoggedIn")); } //get View Model with summary notes Models.MyAccountViewModel vm = GetViewModel(); vm.PageTitle = "Property Level Contact Preferences"; vm = GetAccountDetails(vm, (int)Session["SelectedPropertyID"]); //get details for outstanding repairs table Estates Estate = new Estates(); Estate = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); Session["EstateName"] = Estate.EstateName; vm.RepairVM = new RepairsMaintenanceViewModel(); vm.RepairVM.Repair = RepairMethods.GetOutstandingRepairs(Estate.EstatedID); return(View(vm)); } else if (Session["UserType"].ToString() == "2") { if (PropType == PropertyTypes.Estate) { StaticVariables.PropList = Models.PropertyMethods.GetAllUnitsProperties(PropID); //Sends to list of properties (viewname = index) //viewName = "Index"; Session["SelectedPropertyID"] = 0; Session["SelectedProperty"] = null; Session["IsDirector"] = null; //Models.GlobalVariables.SelectedPropertyID = 0; //Models.GlobalVariables.SelectedProperty = null; object anonObj = null; anonObj = StaticVariables.PropList; return(View("Index", anonObj)); } else if (PropType == PropertyTypes.Unit) { //getowners StaticVariables.PropList = Models.PropertyMethods.GetAllUnitsowners(PropID); //Sends to list of properties (viewname = index) //viewName = "Index"; Session["SelectedPropertyID"] = PropID; Session["SelectedProperty"] = Models.PropertyMethods.GetPropertyName(PropID); Session["IsDirector"] = null; //Models.GlobalVariables.SelectedPropertyID = 0; //Models.GlobalVariables.SelectedProperty = null; object anonObj = null; anonObj = StaticVariables.PropList; return(View("Index", anonObj)); } else if (PropType == PropertyTypes.Owner) { //Session["IsDirector"] = EstateDirectors.EstateDirectorMethods.IsCustomerDirector(GlobalVariables.CS, PropID); //Session["CustomerID"] = PropID; //get View Model with summary notes Models.MyAccountViewModel vm = GetViewModel(); vm.PageTitle = "Property Level Contact Preferences"; vm = GetAccountDetails(vm, (int)Session["SelectedPropertyID"]); //get details for outstanding repairs table Estates Estate = new Estates(); Estate = EstateMethods.GetEstatedByUnitID((int)Session["SelectedPropertyID"]); Session["EstateName"] = Estate.EstateName; vm.RepairVM = new RepairsMaintenanceViewModel(); vm.RepairVM.Repair = RepairMethods.GetOutstandingRepairs(Estate.EstatedID); return(View(vm)); } } return(View("NotLoggedIn")); }
public Task Update(Estates entity) { throw new NotImplementedException(); }
public Task <Estates> Add(Estates entity) { throw new NotImplementedException(); }
public override void Initialize() { targetState = Estates.Menu; }
public TestCharacter SetEstate(Estate estate) { Estates.Add(estate); return(this); }
public override void Initialize() { targetState = Estates.Gameplay; timer = new Timer(); }
private void AfterEstateSaved(AfterEstateSavedEventArgs obj) { var lookupItem = Estates.Single(l => l.Id == obj.Id); lookupItem.DisplayMember = obj.DisplayMember; }