private void UpdateRegions(Coordinates location) { UserData.Instance.LandInfo.Init(location.latitude, location.longitude); landId.text = UserData.Instance.LandInfo.LandId; landCoords.text = UserData.Instance.LandInfo.Latitude.ToString("###.000000") + ", " + UserData.Instance.LandInfo.Longitude.ToString("###.000000"); playerCoords.text = location.latitude.ToString("###.000000") + ", " + location.longitude.ToString("###.000000"); centerOffset.text = (UserData.Instance.LandInfo.OffsetFromCenter * -1f).ToString(); LandInfo li = new LandInfo(); Vector3 pos = Vector3.zero; Vector3 borderOffset = Vector3.zero; Vector3 landOffset = Vector3.zero; for (int indLat = -8; indLat <= 8; ++indLat) { for (int indLon = -8; indLon <= 8; ++indLon) { li.Init(location.latitude + indLat * LandConsts.twoSeconds, location.longitude + indLon * LandConsts.twoSeconds); pos = GPSEncoder.GPSToUCS(new Vector2((float)li.Latitude, (float)li.Longitude)); borderOffset = GPSEncoder.GPSToUCS(new Vector2((float)(li.Latitude + LandConsts.oneSecond), (float)(li.Longitude + LandConsts.oneSecond))); borderOffset -= pos; RenderRegion(li.LandId, pos, borderOffset, indLat == 0 && indLon == 0); } } }
private static async Task <BaseResponseData> BuyLand() { BuyLandResult result = new BuyLandResult(); if (User.bytes == null) { result.Result = GameEnum.WsResult.ParamsError; return(result); } var data = await InitHelpers.GetPse().DeserializeAsync <BuyLandReq>(User.bytes); if (data == null) { result.Result = GameEnum.WsResult.ParamsError; return(result); } var landConfig = LandInfo.GetForLevel(data.Level); long needMoney = landConfig.Price.Count; var moneyType = landConfig.Price.CurrencyID; if (needMoney <= 0) { result.Result = GameEnum.WsResult.ParamsError; return(result); } if (!(BagController.Instance.CheckMoney(needMoney, moneyType))) { result.Result = GameEnum.WsResult.NotEnoughMoney; return(result); } return(await LandController.Instance.BuyLand(data.Pos, result)); }
private void TableView_MouseDoubleClick(object sender, MouseButtonEventArgs e) { System.Data.DataRowView selectedRow = (System.Data.DataRowView)TableView.SelectedItems[0]; int landId = (int)selectedRow.Row[0]; LandInfo l_info = new LandInfo(this, landId); this.Hide(); l_info.Show(); Error.Text = ""; }
void Awake() { for (int i = 0; i < (int)Mathf.Pow(TopValue.TopValueSingleton.MapSize, 2); i++) { LandInfo newInfo = new LandInfo(); newInfo.LandStatus = "GrassLand"; newInfo.LandValue = LandValueStandard; LandArray.Add(newInfo); } }
private static List <LandInfo> GetInfoFromIn4Polygon <T>(T in4Polygon) where T : In4Polygon { List <LandInfo> info = new List <LandInfo>(); LandInfo landInfo = null; foreach (PropertyInfo property in typeof(T).GetProperties()) { if (property.GetValue(in4Polygon, null) != null && typeof(String) == property.GetValue(in4Polygon, null).GetType()) { landInfo = new LandInfo(property.Name, (String)property.GetValue(in4Polygon, null)); info.Add(landInfo); } } return(info); }
protected void btnSaleLand_Click(object sender, ImageClickEventArgs e) { var objRealEstateOwner = new RealEstateOwnersInfo { RealEstateOwnersName = txtRealEstateOwner3.Text, CLUR = rdCLUR3.SelectedValue, RealEstateOwnersType = rdRealEstateOwnerType3.SelectedItem.ToString(), Gender = rdGender3.SelectedValue, Address = txtAddress32.Text, IdentityCard = txtIdentyCard3.Text, MobilePhone = txtMobilePhone3.Text, Email = txtEmail3.Text, }; int realEstateOwnerID = RealEstateOwnersService.RealEstateOwnersInfo_Insert(objRealEstateOwner, _reOwnerId); var obj2 = new LandInfo { LandTypeID = ddlLandType3.SelectedValue, Name = txtTenNha3.Text, RealEstateOwnersID = "1", RealEstateID = ddlRealEstate3.SelectedValue, Title = "", TransactionType = "sale", Tag = "", CreateBy = txtTenChuSoHuu3.Text, CreateDate = DateTime.Now.ToShortDateString(), RealEstateOwnersName = txtTenChuSoHuu3.Text, CityID = ddlCity3.SelectedValue, LocationID = "", DistrictID = ddlDistrict3.SelectedValue, Address = txtAddress3.Text + ddlDistrict3.SelectedItem + ddlCity3.SelectedItem, Description = "N" + txtDescription3.Text, TotalArea = txtArea3.Text, Price = txtPrice3.Text, Image1 = lbImages1.Text, Image2 = lbImages2.Text, Image3 = lbImages3.Text, Image4 = lbImages4.Text, Image5 = lbImages5.Text, Image6 = lbImages6.Text }; int homeID2 = LandService.LandInfo_InsertGetID(obj2, _homeId); Response.Redirect("~/ViewPostNewRE.aspx?reOwnerID=" + realEstateOwnerID + "&homeID=" + homeID2); }
public ICollection <LandPlot> GetLandPlots() { var landsPlotsColections = new List <LandPlot>(); foreach (var item1 in data.InfoPart.CadastralZoneInfo.CadastralQuarters.CadastralQuarterInfo.Parcels.ParcelInfo /*[0].MetricInfo.Externals.Boundary.Lines.Line*/) { foreach (var item in item1.LandsParcel.LandParcelInfo) { var LandInfo = new LandInfo(item1, data); var tempBuferLines = new List <System.Windows.Shapes.Polyline>(); var tempPints = new List <System.Windows.Point>(); foreach (var item2 in item.MetricInfo.Externals.Boundary.Lines.Line) { tempBuferLines.Add(Polilines[item2.ULID]); } landsPlotsColections.Add(new LandPlot(tempBuferLines, LandInfo)); } } return(landsPlotsColections); }
/// <summary> /// Замінює у заголовку таблиці кода на відповідні їм значення. /// </summary> /// <param name="polygon">Ділянка, що є вихідною для таблиці.</param> /// <param name="settingTable">Налаштування таблиці.</param> /// <returns> /// Повертає <see cref="T:System.Sting"/> після заміни кодів на відповідні їм значення. /// </returns> internal static String ReplaceValueCodeInTitle(LandParcel polygon, SettingTable settingTable) { string titleTable = settingTable.Title; List <string> keys = settingTable.GetCodeAddTitle(); foreach (string key in keys) { LandInfo info = polygon.FindInfo(key); if (info != null) { titleTable = titleTable.Replace("/*" + info.Key + "*/", info.Value); } else { titleTable = titleTable.Replace("/*" + key + "*/", "< Невірний код /*" + key + "*/>"); } } return(titleTable); }
internal static HatchPolygon GetHatchLand(LandPolygon poligon) { List <HatchPolygon> list = ServiceXml.ReadXml <List <HatchPolygon> >(new LocalPath("LoSa_Land").FindFullPathFromXml("PathHatchPolygon")); HatchPolygon hatchPolygon = null; LandInfo infoCC = poligon.FindInfo("CC"); if (infoCC != null) { string type = infoCC.Value; hatchPolygon = list.Find ( delegate(HatchPolygon hatchLand) { return(hatchLand.Type == type); } ); } return(hatchPolygon); }
private static NeighborsAlongContour GetNeighborsAlongContour(List <LandPolygon> allNeighbors, LandPolygon contourParcel) { NeighborsAlongContour contour = new NeighborsAlongContour(); foreach (LandPolygon curNeighbor in allNeighbors) { LandInfo curNeighbor_SC = curNeighbor.FindInfo("SC"); LandInfo curNeighbor_NM = curNeighbor.FindInfo("NM"); if (contourParcel.IsCoincidesDirectionBorder(curNeighbor)) { curNeighbor.ReverseBorder(); } if (contourParcel.IsCommonPoints(curNeighbor)) { //if ( ! contourParcel.FindInfo("SC").Value.Equals( curNeighbor_SC.Value ) ) if (curNeighbor_SC != null) { if (contourParcel.FindInfo("SC").Value != curNeighbor_SC.Value) { contour.Neighbors.AddRange(contourParcel.GetNeighborLines(curNeighbor)); } } else { contour.Neighbors.AddRange(contourParcel.GetNeighborLines(curNeighbor)); } } } contour.Neighbors = ServiceIn4.SortingNeighbors(contourParcel, contour.Neighbors); return(contour); }
void Start() { Initialize(); LandInfo.Use(KeyTerm.GRASS, GetComponent <Tile>()); }
public bool Equls(LandInfo info) { return(this.LatitudeIndex.Equals(info.LatitudeIndex) && this.LongitudeIndex.Equals(info.LongitudeIndex)); }
public static bool LandInfo_Update(LandInfo data) { return(db.LandInfo_Update(data)); }
public static int LandInfo_InsertGetID(LandInfo data, int ID) { return(db.LandInfo_InsertGetID(data, ID)); }
public static bool LandInfo_Insert(LandInfo data) { return(db.LandInfo_Insert(data)); }